Class: Pakyow::Generators::Project Private

Inherits:
Pakyow::Generator show all
Defined in:
lib/pakyow/generators/project.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary

Attributes inherited from Pakyow::Generator

#files

Instance Method Summary collapse

Methods inherited from Pakyow::Generator

#generate, #initialize, #run

Methods included from Pakyow::Generator::Common

#dot

Constructor Details

This class inherits a constructor from Pakyow::Generator

Instance Method Details

#generate_secretObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



24
25
26
# File 'lib/pakyow/generators/project.rb', line 24

def generate_secret
  SecureRandom.hex(64)
end

#generating_locally?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


19
20
21
22
# File 'lib/pakyow/generators/project.rb', line 19

def generating_locally?
  local_pakyow = Gem::Specification.sort_by { |g| [g.name.downcase, g.version] }.group_by(&:name).detect { |k, _| k == "pakyow" }
  !local_pakyow || local_pakyow.last.last.version < Gem::Version.new(Pakyow::VERSION)
end