Class: Origen::CodeGenerators::Timever

Inherits:
Base
  • Object
show all
Defined in:
lib/origen/code_generators/timever.rb

Instance Method Summary collapse

Methods inherited from Base

banner, inherited, name, namespace

Methods included from Actions

#add_acronyms, #add_autoload, #add_config, #add_source, #camelcase, #comment_config, #config, #environment, #gem, #gem_group, #generate, #git, #initialize, #lib, #rakefile, #readme, #underscored_app_namespace

Methods included from Actions::Helpers

#add_type_to_namespaces, #class_name_to_blocks_dir, #class_name_to_lib_file, #internal_depth, #resource_path, #resource_path_to_blocks_dir, #resource_path_to_class, #resource_path_to_lib_file, #unless_has_method, #unless_valid_underscored_identifier, #validate_resource_path

Instance Method Details

#create_version_fileObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/origen/code_generators/timever.rb', line 8

def create_version_file
  if config[:change]
    @version = config[:change]
  else
    @version = Origen.app.version
    unless @version.timestamp?
      if @version.production?
        @version = VersionString.production_timestamp
      else
        @version = VersionString.development_timestamp
      end
    end
  end
  template 'templates/code_generators/version_time.rb', File.join(Origen.root, 'config', 'version.rb'), force: true
end


31
32
33
34
# File 'lib/origen/code_generators/timever.rb', line 31

def print_version
  puts
  puts "You're new app version is: #{Origen.app.version(refresh: true)}"
end

#set_configurationObject



24
25
26
27
28
29
# File 'lib/origen/code_generators/timever.rb', line 24

def set_configuration
  if Origen.app.config.semantically_version
    comment_config :semantically_version
    add_config :semantically_version, false
  end
end