machine_setup 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +2 -3
- data/VERSION +1 -1
- data/bin/setup_analyze_dat +8 -2
- data/bin/setup_init_dsl +1 -0
- data/examples/ssm/ssm.setup.param +0 -1
- data/examples/underleaver/underleaver.setup.param +0 -1
- data/lib/setup_configuration/encoding.rb +36 -0
- data/lib/setup_configuration/generator_module.rb +1 -1
- data/lib/setup_configuration/legacy/importer.rb +7 -6
- data/lib/setup_configuration/mps_template_binding.rb +1 -1
- data/lib/setup_configuration/parameter_template_binding.rb +7 -3
- data/lib/setup_configuration/setup_code_binding.rb +7 -5
- data/lib/setup_configuration/setup_code_generator.rb +1 -1
- data/lib/setup_configuration/setup_config.rb +13 -13
- data/lib/setup_configuration/templates/mps3.ini.erb +1 -3
- data/lib/setup_configuration/translation.rb +10 -3
- data/lib/setup_configuration.rb +1 -0
- data/test/setup_configuration/machine_type_test.rb +13 -8
- data/test/setup_configuration/parameter_factory_test.rb +11 -4
- data/test/setup_configuration/setup_configuration_test.rb +0 -7
- data/test/setup_configuration/translation_test.rb +85 -0
- data/test/test_helper.rb +5 -2
- metadata +132 -104
    
        data/Rakefile
    CHANGED
    
    | @@ -1,4 +1,3 @@ | |
| 1 | 
            -
            require 'rubygems'
         | 
| 2 1 | 
             
            require 'rake'
         | 
| 3 2 |  | 
| 4 3 | 
             
            begin
         | 
| @@ -8,11 +7,11 @@ begin | |
| 8 7 | 
             
                gem.executables = %W{setup_config_gen setup_init_dsl setup_analyze_dat}
         | 
| 9 8 | 
             
                gem.summary = %Q{Generating configuration for machine setup parameters.}
         | 
| 10 9 | 
             
                gem.description = %Q{Helps generating configuration files for machine setup parameters.}
         | 
| 11 | 
            -
                gem.email = "robi-wan@ | 
| 10 | 
            +
                gem.email = "robi-wan@suy"+'u.de'
         | 
| 12 11 | 
             
                gem.homepage = "http://github.com/robi-wan/machine_setup"
         | 
| 13 12 | 
             
                gem.authors = ["robi-wan"]
         | 
| 14 13 | 
             
                gem.add_runtime_dependency "i18n", "~> 0.6"
         | 
| 15 | 
            -
                gem.add_runtime_dependency "inifile", "~>  | 
| 14 | 
            +
                gem.add_runtime_dependency "inifile", "~> 1.1"
         | 
| 16 15 | 
             
                gem.add_runtime_dependency "erubis", "~> 2.7"
         | 
| 17 16 | 
             
                gem.add_development_dependency "shoulda"
         | 
| 18 17 | 
             
                # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
         | 
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.4. | 
| 1 | 
            +
            0.4.1
         | 
    
        data/bin/setup_analyze_dat
    CHANGED
    
    | @@ -1,7 +1,13 @@ | |
| 1 1 | 
             
            #!/usr/bin/env ruby
         | 
| 2 | 
            -
             | 
| 2 | 
            +
            # this script analyzes a setup.dat and prints the values of the setup parameters
         | 
| 3 | 
            +
            # actually setup.dat is a saved binary array.
         | 
| 4 | 
            +
            #
         | 
| 5 | 
            +
            # usage: setup_analyze_dat <path_to_setup.dat> [setup_parameter_id(,setup_parameter_id ...)]
         | 
| 6 | 
            +
            #
         | 
| 3 7 | 
             
            require 'pp'
         | 
| 4 8 |  | 
| 9 | 
            +
            setup_file_name=ARGV[0]
         | 
| 10 | 
            +
            raise RuntimeError.new("Missing argument: 'setup.dat' file with parameter values") if setup_file_name.nil?
         | 
| 5 11 | 
             
            setup_file_name=ARGV[0].gsub(/\\/,"/")
         | 
| 6 12 | 
             
            setup_ids= ARGV[1].nil? ? [] : ARGV[1].split(',').collect(){|id| id.to_i}
         | 
| 7 13 | 
             
            #puts setup_file_name
         | 
| @@ -100,4 +106,4 @@ File.open(setup_file_name, "rb") do |file| | |
| 100 106 | 
             
                #break if counter > 16
         | 
| 101 107 |  | 
| 102 108 | 
             
              end
         | 
| 103 | 
            -
            end
         | 
| 109 | 
            +
            end
         | 
    
        data/bin/setup_init_dsl
    CHANGED
    
    | @@ -10,6 +10,7 @@ begin | |
| 10 10 | 
             
              raise RuntimeError.new("Wrong argument: directory '#{legacy_data_folder}' with legacy definition not found") unless File.directory?(legacy_data_folder)
         | 
| 11 11 |  | 
| 12 12 | 
             
              raise RuntimeError.new("Missing argument: machine name") unless machine_name
         | 
| 13 | 
            +
              raise RuntimeError.new("Missing argument: machine abbreviation") unless machine_abbreviation
         | 
| 13 14 |  | 
| 14 15 |  | 
| 15 16 | 
             
              $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
         | 
| @@ -0,0 +1,36 @@ | |
| 1 | 
            +
            # encoding: UTF-8
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module SetupConfiguration
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              module Encoder
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                @@supported = RUBY_VERSION > '1.9'
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                def self.encoding_supported
         | 
| 10 | 
            +
                  @@supported
         | 
| 11 | 
            +
                end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                def self.default_encoding
         | 
| 14 | 
            +
                  "windows-1252"
         | 
| 15 | 
            +
                end
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                def self.encoding
         | 
| 18 | 
            +
                  default_encoding
         | 
| 19 | 
            +
                end
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                if encoding_supported
         | 
| 22 | 
            +
                  Encoding.default_external = encoding
         | 
| 23 | 
            +
            #      puts "Encoding.default_external: #{Encoding.default_external}"
         | 
| 24 | 
            +
            #      puts Encoding.default_internal
         | 
| 25 | 
            +
                end
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                def force_encoding(text, encoding = Encoder.encoding)
         | 
| 28 | 
            +
                  if @@supported
         | 
| 29 | 
            +
                    text.force_encoding(encoding)
         | 
| 30 | 
            +
                  else
         | 
| 31 | 
            +
                    text
         | 
| 32 | 
            +
                  end
         | 
| 33 | 
            +
                end
         | 
| 34 | 
            +
             | 
| 35 | 
            +
              end
         | 
| 36 | 
            +
            end
         | 
| @@ -45,7 +45,7 @@ module SetupConfiguration | |
| 45 45 | 
             
                    input = File.read(template)
         | 
| 46 46 | 
             
                    eruby = Erubis::Eruby.new(input)
         | 
| 47 47 |  | 
| 48 | 
            -
                    File.open(File.join(output_path, " | 
| 48 | 
            +
                    File.open(File.join(output_path, "#@name.#{Translation::FILE_EXTENSION}" ), "w") do |f|
         | 
| 49 49 | 
             
                      f << eruby.result(binding())
         | 
| 50 50 | 
             
                    end
         | 
| 51 51 |  | 
| @@ -80,7 +80,8 @@ module SetupConfiguration | |
| 80 80 | 
             
                    machine_types = @mps3['MASCHINENTYP']
         | 
| 81 81 | 
             
                    machine_type_regexp=/BEGIN_TYP(\d\d?)/
         | 
| 82 82 | 
             
                    machine_types.each do |k,v|
         | 
| 83 | 
            -
                      number=k.scan(machine_type_regexp).flatten.first.to_i
         | 
| 83 | 
            +
                      number = k.scan(machine_type_regexp).flatten.first.to_i
         | 
| 84 | 
            +
                      number = number + 1
         | 
| 84 85 | 
             
                      @settings.machine_type("machine_type_#{number}".to_sym, number, v.to_i)
         | 
| 85 86 | 
             
                    end
         | 
| 86 87 |  | 
| @@ -131,7 +132,7 @@ module SetupConfiguration | |
| 131 132 |  | 
| 132 133 | 
             
                            #check for multiple defined parameters (in different categories)
         | 
| 133 134 | 
             
                            #warn and skip
         | 
| 134 | 
            -
                            if param_by_number(param_number) | 
| 135 | 
            +
                            if param_by_number(param_number)
         | 
| 135 136 | 
             
                              $stderr.puts("WARNING: parameter '#{ param_key(param_number)}' with number '#{param_number}' multiple defined. Duplicate found in category '#{category_name(cat_number)}'.")
         | 
| 136 137 | 
             
                              parameter = ParameterReference.new( param_key(param_number) )
         | 
| 137 138 | 
             
                              cat.parameter << parameter
         | 
| @@ -150,7 +151,7 @@ module SetupConfiguration | |
| 150 151 |  | 
| 151 152 | 
             
                    # replace parameter numbers with parameter keys
         | 
| 152 153 | 
             
                    parameters.each() do |param|
         | 
| 153 | 
            -
                      if param.param? | 
| 154 | 
            +
                      if param.param?
         | 
| 154 155 | 
             
                        p = param_by_number(param.dependency)
         | 
| 155 156 | 
             
                        param.depends_on(p ? p.key : :none)
         | 
| 156 157 | 
             
                      end
         | 
| @@ -236,8 +237,8 @@ module SetupConfiguration | |
| 236 237 | 
             
                  end
         | 
| 237 238 |  | 
| 238 239 | 
             
                  def category_by_number(number)
         | 
| 239 | 
            -
                    cat = self.categories.select(){| | 
| 240 | 
            -
                    unless cat | 
| 240 | 
            +
                    cat = self.categories.select(){|c| c.number.eql?(number)}.first
         | 
| 241 | 
            +
                    unless cat
         | 
| 241 242 | 
             
                      cat = Category.new
         | 
| 242 243 | 
             
                      cat.number = number
         | 
| 243 244 | 
             
                      self.categories << cat
         | 
| @@ -22,21 +22,25 @@ module SetupConfiguration | |
| 22 22 |  | 
| 23 23 | 
             
                  def cat_name(cat)
         | 
| 24 24 | 
             
                    name, desc=@translator.translate(cat.name, @lang)
         | 
| 25 | 
            -
                    $stderr.puts("WARNING: missing translation for key  | 
| 25 | 
            +
                    $stderr.puts("WARNING: missing translation for key #@lang.#{cat.name}.#{Translation::Translator::NAME}") if name.eql?(cat.name.to_s)
         | 
| 26 26 | 
             
                    name
         | 
| 27 27 | 
             
                  end
         | 
| 28 28 |  | 
| 29 29 | 
             
                  def name(number)
         | 
| 30 30 | 
             
                    p_name= translate(number) { |name, desc| name }
         | 
| 31 31 | 
             
                    if find_param_by_number(number) && p_name.eql?(find_param_by_number(number).key.to_s)
         | 
| 32 | 
            -
                      $stderr.puts("WARNING: missing translation for key  | 
| 32 | 
            +
                      $stderr.puts("WARNING: missing translation for key #@lang.#{find_param_by_number(number).key.to_s}.#{Translation::Translator::NAME}")
         | 
| 33 33 | 
             
                    end
         | 
| 34 34 | 
             
                    p_name.empty? ? "placeholder for mps3.exe" : p_name
         | 
| 35 35 | 
             
                  end
         | 
| 36 36 |  | 
| 37 37 | 
             
                  def description(number)
         | 
| 38 38 | 
             
                    translate(number) do |name, desc|
         | 
| 39 | 
            -
                       | 
| 39 | 
            +
                      begin
         | 
| 40 | 
            +
                        $stderr.puts("WARNING: missing translation for key #@lang.#{find_param_by_number(number).key.to_s}.#{Translation::Translator::COMMENT}") if desc.empty?
         | 
| 41 | 
            +
                      rescue
         | 
| 42 | 
            +
                        raise RuntimeError.new("ERROR: reading translation failed '#{desc.inspect()}'")
         | 
| 43 | 
            +
                      end
         | 
| 40 44 | 
             
                      escape(desc)
         | 
| 41 45 | 
             
                    end
         | 
| 42 46 | 
             
                  end
         | 
| @@ -4,6 +4,7 @@ module SetupConfiguration | |
| 4 4 |  | 
| 5 5 | 
             
                def initialize
         | 
| 6 6 | 
             
                  super
         | 
| 7 | 
            +
                  @longest = nil
         | 
| 7 8 | 
             
                end
         | 
| 8 9 |  | 
| 9 10 | 
             
                def parameters
         | 
| @@ -19,22 +20,23 @@ module SetupConfiguration | |
| 19 20 | 
             
                end
         | 
| 20 21 |  | 
| 21 22 | 
             
                def key(symbol)
         | 
| 22 | 
            -
                  s=symbol.to_s
         | 
| 23 | 
            -
                  delimiter='_'
         | 
| 23 | 
            +
                  s = symbol.to_s
         | 
| 24 | 
            +
                  delimiter = '_'
         | 
| 24 25 | 
             
                  s.split(delimiter).collect() { |splitter| splitter.capitalize }.join(delimiter).ljust(longest_key_length)
         | 
| 25 26 | 
             
                end
         | 
| 26 27 |  | 
| 27 | 
            -
                 | 
| 28 | 
            +
                private
         | 
| 28 29 |  | 
| 29 30 | 
             
                def longest_key_length
         | 
| 30 31 | 
             
                  # find the length of the longest word
         | 
| 31 32 | 
             
                  unless @longest
         | 
| 32 33 | 
             
                    longest = parameters.inject(0) do |memo, param|
         | 
| 33 | 
            -
                      memo  | 
| 34 | 
            +
                      [memo, param.key.to_s.length].max
         | 
| 34 35 | 
             
                    end
         | 
| 35 | 
            -
                    @longest=longest + 5
         | 
| 36 | 
            +
                    @longest = longest + 5
         | 
| 36 37 | 
             
                  end
         | 
| 37 38 | 
             
                  @longest
         | 
| 38 39 | 
             
                end
         | 
| 40 | 
            +
                
         | 
| 39 41 | 
             
              end
         | 
| 40 42 | 
             
            end
         | 
| @@ -27,7 +27,7 @@ module SetupConfiguration | |
| 27 27 | 
             
                end
         | 
| 28 28 |  | 
| 29 29 | 
             
                def category(category, &category_params)
         | 
| 30 | 
            -
                  if category_params | 
| 30 | 
            +
                  if category_params
         | 
| 31 31 |  | 
| 32 32 | 
             
                    #this code calls instance_eval and delivers the context object
         | 
| 33 33 | 
             
                    parameter_factory = ParameterFactory.new()
         | 
| @@ -47,7 +47,7 @@ module SetupConfiguration | |
| 47 47 |  | 
| 48 48 | 
             
                def category_by_name(name)
         | 
| 49 49 | 
             
                  cat = self.categories.keys.select(){|c| c.name.eql?(name)}.first
         | 
| 50 | 
            -
                  unless cat | 
| 50 | 
            +
                  unless cat
         | 
| 51 51 | 
             
                    cat = Category.new
         | 
| 52 52 | 
             
                    cat.number = self.next_category_number!
         | 
| 53 53 | 
             
                    cat.name = name
         | 
| @@ -244,7 +244,7 @@ module SetupConfiguration | |
| 244 244 | 
             
                # <drive>_selection.
         | 
| 245 245 | 
             
                # The additional for_machine_type is also applied to other generated parameters.
         | 
| 246 246 | 
             
                #
         | 
| 247 | 
            -
                def drive(drive, number, ¶meter_def)
         | 
| 247 | 
            +
                def drive(drive, number, added_props=[], ¶meter_def)
         | 
| 248 248 |  | 
| 249 249 | 
             
                  key = symbol(drive, "drive")
         | 
| 250 250 | 
             
                  drive_selection = symbol(key, "selection")
         | 
| @@ -252,7 +252,8 @@ module SetupConfiguration | |
| 252 252 | 
             
                  drive_param=param(drive_selection, number)
         | 
| 253 253 | 
             
                  drive_param.instance_eval(¶meter_def) if parameter_def
         | 
| 254 254 |  | 
| 255 | 
            -
                  properties=[%w(distance revolution), %w( | 
| 255 | 
            +
                  properties=[%w(distance revolution), %w(gear in), %w(gear out), "length", "motortype"]
         | 
| 256 | 
            +
                  properties += added_props if added_props
         | 
| 256 257 | 
             
                  properties.each_with_index do |prop, index|
         | 
| 257 258 | 
             
                    parameter = param(symbol(key, *prop), number + index + 1) { depends_on drive_selection }
         | 
| 258 259 | 
             
                    parameter.for_machine_type(drive_param.machine_type)
         | 
| @@ -260,7 +261,7 @@ module SetupConfiguration | |
| 260 261 |  | 
| 261 262 | 
             
                end
         | 
| 262 263 |  | 
| 263 | 
            -
                 | 
| 264 | 
            +
                private
         | 
| 264 265 |  | 
| 265 266 | 
             
                def symbol(*strings)
         | 
| 266 267 | 
             
                  strings.join('_').to_sym
         | 
| @@ -346,23 +347,22 @@ module SetupConfiguration | |
| 346 347 | 
             
              class MachineType
         | 
| 347 348 | 
             
                include Enumerable
         | 
| 348 349 |  | 
| 349 | 
            -
                RANGES = [ | 
| 350 | 
            +
                RANGES = [1000..1999, 2000..2999, 3000..3999, 4000..4999, 5000..5999, 6000..6999, 7000..7999, 8000..8999].freeze
         | 
| 350 351 |  | 
| 351 352 | 
             
                attr_reader :name
         | 
| 352 353 | 
             
                attr_reader :range
         | 
| 353 354 | 
             
                attr_reader :sequence_number
         | 
| 355 | 
            +
                attr_reader :sequence_number_coded
         | 
| 354 356 | 
             
                attr_reader :binary_number
         | 
| 355 357 |  | 
| 356 358 | 
             
                def initialize(name, sequence_number, range = nil)
         | 
| 357 359 | 
             
                  @name=name
         | 
| 358 | 
            -
                  raise RuntimeError.new("ERROR:  | 
| 360 | 
            +
                  raise RuntimeError.new("ERROR: Number for machine type must be greater than 0: [name=#{name}] [number=#{sequence_number}]") if sequence_number <= 0
         | 
| 361 | 
            +
                  raise RuntimeError.new("ERROR: More than #{RANGES.length} different machine types are not supported: [name=#{name}] [number=#{sequence_number}]") if sequence_number > RANGES.length
         | 
| 359 362 | 
             
                  @sequence_number=sequence_number
         | 
| 360 | 
            -
                  @ | 
| 361 | 
            -
                   | 
| 362 | 
            -
             | 
| 363 | 
            -
                  else
         | 
| 364 | 
            -
                    @binary_number=2**(@sequence_number-1)
         | 
| 365 | 
            -
                  end
         | 
| 363 | 
            +
                  @sequence_number_coded = @sequence_number - 1
         | 
| 364 | 
            +
                  @range = range ? range : RANGES[@sequence_number_coded]
         | 
| 365 | 
            +
                  @binary_number=2**@sequence_number_coded
         | 
| 366 366 | 
             
                end
         | 
| 367 367 |  | 
| 368 368 | 
             
                def <=>(machine_type)
         | 
| @@ -21,11 +21,9 @@ END_WAAG_MAX=<%= settings.balance_maximum.last %> | |
| 21 21 |  | 
| 22 22 | 
             
            [MASCHINENTYP]
         | 
| 23 23 | 
             
            <% settings.machine_types.each do |machine_type| %>
         | 
| 24 | 
            -
            BEGIN_TYP<%= machine_type. | 
| 24 | 
            +
            BEGIN_TYP<%= machine_type.sequence_number_coded %>=<%= machine_type.range.first %>
         | 
| 25 25 | 
             
            <% end %>
         | 
| 26 26 |  | 
| 27 | 
            -
            ;(0..16)
         | 
| 28 | 
            -
            ;generate param names as comment
         | 
| 29 27 | 
             
            [PARAMANZEIGE]
         | 
| 30 28 | 
             
            <%  categories.each_with_index do |category, index| %>
         | 
| 31 29 | 
             
                <% dependencies, machine_types, parameters = param_infos(category) %>
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # encoding:  | 
| 1 | 
            +
            # encoding: UTF-8
         | 
| 2 2 |  | 
| 3 3 | 
             
            module SetupConfiguration
         | 
| 4 4 |  | 
| @@ -31,16 +31,18 @@ module SetupConfiguration | |
| 31 31 | 
             
                  language_defs.values.sort
         | 
| 32 32 | 
             
                end
         | 
| 33 33 |  | 
| 34 | 
            -
                 | 
| 34 | 
            +
                private
         | 
| 35 35 |  | 
| 36 36 | 
             
                def self.language_defs()
         | 
| 37 37 | 
             
                  {:de => "deutsch", :en => "english"}
         | 
| 38 38 | 
             
                end
         | 
| 39 39 |  | 
| 40 40 | 
             
                class Translator
         | 
| 41 | 
            +
                  include SetupConfiguration::Encoder
         | 
| 41 42 |  | 
| 42 43 | 
             
                  NAME = :name.freeze
         | 
| 43 44 | 
             
                  COMMENT = :comment.freeze
         | 
| 45 | 
            +
                  EMPTY = ''
         | 
| 44 46 |  | 
| 45 47 | 
             
                  # Adds a file with translations.
         | 
| 46 48 | 
             
                  def self.i18n_load_path(path)
         | 
| @@ -50,7 +52,12 @@ module SetupConfiguration | |
| 50 52 | 
             
                  # Returns name and description for the given parameter in the given language.
         | 
| 51 53 | 
             
                  def translate(key, language)
         | 
| 52 54 | 
             
                    name=I18n.translate(NAME, :scope => key, :default => key.to_s, :locale => language)
         | 
| 53 | 
            -
                    description=I18n.translate(COMMENT, :scope => key, :default =>  | 
| 55 | 
            +
                    description=I18n.translate(COMMENT, :scope => key, :default => EMPTY, :locale => language)
         | 
| 56 | 
            +
                    # if an empty string is found as translation use key as name (not empty string)
         | 
| 57 | 
            +
                    name = key.to_s if name.strip.empty?
         | 
| 58 | 
            +
                    description = EMPTY if description.strip.empty?
         | 
| 59 | 
            +
                    name = force_encoding(name)
         | 
| 60 | 
            +
                    description = force_encoding(description)
         | 
| 54 61 | 
             
                    [name, description]
         | 
| 55 62 | 
             
                  end
         | 
| 56 63 |  | 
    
        data/lib/setup_configuration.rb
    CHANGED
    
    | @@ -15,6 +15,7 @@ require 'singleton' | |
| 15 15 | 
             
            require 'erubis'
         | 
| 16 16 | 
             
            require 'fileutils'
         | 
| 17 17 | 
             
            require 'i18n'
         | 
| 18 | 
            +
            require File.expand_path(File.dirname(__FILE__) + '/setup_configuration/encoding')
         | 
| 18 19 | 
             
            require File.expand_path(File.dirname(__FILE__) + '/setup_configuration/core_ext')
         | 
| 19 20 | 
             
            require File.expand_path(File.dirname(__FILE__) + '/setup_configuration/parameter_machinetype_bridge')
         | 
| 20 21 | 
             
            require File.expand_path(File.dirname(__FILE__) + '/setup_configuration/generator_module')
         | 
| @@ -5,34 +5,39 @@ class MachineTypeTest < Test::Unit::TestCase | |
| 5 5 |  | 
| 6 6 | 
             
              context "A Machine Type" do
         | 
| 7 7 | 
             
                setup do
         | 
| 8 | 
            -
                  @all_machines = SetupConfiguration::MachineType.new(:all_machines, 0, 0..999)
         | 
| 9 8 | 
             
                  @machine_one = SetupConfiguration::MachineType.new(:machine_one, 1, 1000..1999)
         | 
| 10 | 
            -
                  @machine_three = SetupConfiguration::MachineType.new(: | 
| 11 | 
            -
                  @machine_four = SetupConfiguration::MachineType.new(: | 
| 12 | 
            -
                  @machine_five = SetupConfiguration::MachineType.new(: | 
| 9 | 
            +
                  @machine_three = SetupConfiguration::MachineType.new(:machine_three, 3, 3000..3999)
         | 
| 10 | 
            +
                  @machine_four = SetupConfiguration::MachineType.new(:machine_four, 4)
         | 
| 11 | 
            +
                  @machine_five = SetupConfiguration::MachineType.new(:machine_five, 5)
         | 
| 13 12 | 
             
                end
         | 
| 14 13 |  | 
| 15 14 | 
             
                should "return its name" do
         | 
| 16 | 
            -
                  assert_equal : | 
| 15 | 
            +
                  assert_equal :machine_one, @machine_one.name
         | 
| 17 16 | 
             
                end
         | 
| 18 17 |  | 
| 19 18 | 
             
                should "return its machine type number range" do
         | 
| 20 | 
            -
                  assert_equal 0..999, @all_machines.range
         | 
| 21 19 | 
             
                  #default machine type ranges
         | 
| 20 | 
            +
                  assert_equal 1000..1999, @machine_one.range
         | 
| 21 | 
            +
                  assert_equal 3000..3999, @machine_three.range
         | 
| 22 22 | 
             
                  assert_equal 4000..4999, @machine_four.range
         | 
| 23 23 | 
             
                  assert_equal 5000..5999, @machine_five.range
         | 
| 24 24 | 
             
                end
         | 
| 25 25 |  | 
| 26 26 | 
             
                should "return its sequence number" do
         | 
| 27 | 
            -
                  assert_equal 0, @all_machines.sequence_number
         | 
| 28 27 | 
             
                  assert_equal 1, @machine_one.sequence_number
         | 
| 29 28 | 
             
                  assert_equal 3, @machine_three.sequence_number
         | 
| 30 29 | 
             
                  assert_equal 4, @machine_four.sequence_number
         | 
| 31 30 | 
             
                  assert_equal 5, @machine_five.sequence_number
         | 
| 32 31 | 
             
                end
         | 
| 33 32 |  | 
| 33 | 
            +
                should "return its coded sequence number as used in mps3.ini" do
         | 
| 34 | 
            +
                  assert_equal 0, @machine_one.sequence_number_coded
         | 
| 35 | 
            +
                  assert_equal 2, @machine_three.sequence_number_coded
         | 
| 36 | 
            +
                  assert_equal 3, @machine_four.sequence_number_coded
         | 
| 37 | 
            +
                  assert_equal 4, @machine_five.sequence_number_coded
         | 
| 38 | 
            +
                end
         | 
| 39 | 
            +
             | 
| 34 40 | 
             
                should "return its binary number" do
         | 
| 35 | 
            -
                  assert_equal 0, @all_machines.binary_number
         | 
| 36 41 | 
             
                  assert_equal 1, @machine_one.binary_number
         | 
| 37 42 | 
             
                  assert_equal 4, @machine_three.binary_number
         | 
| 38 43 | 
             
                  assert_equal 8, @machine_four.binary_number
         | 
| @@ -1,4 +1,3 @@ | |
| 1 | 
            -
            require "test/unit"
         | 
| 2 1 | 
             
            require File.dirname(__FILE__) + "/../test_helper"
         | 
| 3 2 | 
             
            module SetupConfiguration
         | 
| 4 3 |  | 
| @@ -11,17 +10,25 @@ module SetupConfiguration | |
| 11 10 | 
             
                  end
         | 
| 12 11 |  | 
| 13 12 | 
             
                  should "define a method 'drive'" do
         | 
| 14 | 
            -
                     | 
| 13 | 
            +
                    contain_method("drive")
         | 
| 15 14 | 
             
                  end
         | 
| 16 15 |  | 
| 17 16 | 
             
                  should "define a method 'param'" do
         | 
| 18 | 
            -
                     | 
| 17 | 
            +
                    contain_method("param")
         | 
| 19 18 | 
             
                  end
         | 
| 20 19 |  | 
| 21 20 | 
             
                  should "define a method 'param_ref'" do
         | 
| 22 | 
            -
                     | 
| 21 | 
            +
                    contain_method("param_ref")
         | 
| 23 22 | 
             
                  end
         | 
| 24 23 |  | 
| 25 24 | 
             
                end
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                :private
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                def contain_method(name)
         | 
| 29 | 
            +
                  # Ruby 1.8.7 delivers string, Ruby 1.9.2 delivers symbols in public_methods array
         | 
| 30 | 
            +
                  assert_equal 1, @creator.public_methods.select(){|m| m.to_s.eql?(name)}.length
         | 
| 31 | 
            +
                end
         | 
| 32 | 
            +
                
         | 
| 26 33 | 
             
              end
         | 
| 27 34 | 
             
            end
         | 
| @@ -11,17 +11,10 @@ class SetupConfigurationTest < Test::Unit::TestCase | |
| 11 11 |  | 
| 12 12 | 
             
              # Called after every test method runs. Can be used to tear
         | 
| 13 13 | 
             
              # down fixture information.
         | 
| 14 | 
            -
             | 
| 15 14 | 
             
              def teardown
         | 
| 16 15 | 
             
                # Do nothing
         | 
| 17 16 | 
             
              end
         | 
| 18 17 |  | 
| 19 | 
            -
            #  # Fake test
         | 
| 20 | 
            -
            #  def test_fail
         | 
| 21 | 
            -
            #
         | 
| 22 | 
            -
            #    # To change this template use File | Settings | File Templates.
         | 
| 23 | 
            -
            #    fail("Not implemented")
         | 
| 24 | 
            -
            #  end
         | 
| 25 18 |  | 
| 26 19 | 
             
              def test_parameter_range
         | 
| 27 20 | 
             
                assert_equal( (0..1299), SetupConfiguration.parameter_range())
         | 
| @@ -0,0 +1,85 @@ | |
| 1 | 
            +
            # encoding: utf-8
         | 
| 2 | 
            +
            require File.dirname(__FILE__) + "/../test_helper"
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            module SetupConfiguration
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              module Translation
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                class TranslationTest < Test::Unit::TestCase
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                  context "A parameter translation" do
         | 
| 11 | 
            +
                    setup do
         | 
| 12 | 
            +
                      I18n.backend.store_translations(:en,
         | 
| 13 | 
            +
                                                      :parameter_distance => {:name => 'cool name', :comment => 'cooler comment'},
         | 
| 14 | 
            +
                                                      :parameter_sensor => {:name => '', :comment => 'bazzer'},
         | 
| 15 | 
            +
                                                      :parameter_drive => {:name => 'ice cold drive', :comment => ' ice aged  '}
         | 
| 16 | 
            +
                      )
         | 
| 17 | 
            +
                      @translator = Translator.new()
         | 
| 18 | 
            +
                    end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                    should "return a translation for name and description" do
         | 
| 21 | 
            +
                      name, desc = @translator.translate(:parameter_distance, :en)
         | 
| 22 | 
            +
                      assert_equal("cool name", name)
         | 
| 23 | 
            +
                      assert_equal("cooler comment", desc)
         | 
| 24 | 
            +
                    end
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                    should "leave whitespace around comment" do
         | 
| 27 | 
            +
                      name, desc = @translator.translate(:parameter_drive, :en)
         | 
| 28 | 
            +
                      assert_equal(' ice aged  ', desc)
         | 
| 29 | 
            +
                    end
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                    context "with empty string as name" do
         | 
| 32 | 
            +
                      setup do
         | 
| 33 | 
            +
                        @key = :parameter_sensor
         | 
| 34 | 
            +
                        I18n.backend.store_translations(:en, @key => {:name => '  ', :comment => 'bazzer'})
         | 
| 35 | 
            +
                      end
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                      should "return the key as name" do
         | 
| 38 | 
            +
                        name, desc = @translator.translate(@key, :en)
         | 
| 39 | 
            +
                        assert_equal(@key.to_s, name)
         | 
| 40 | 
            +
                        assert_equal("bazzer", desc)
         | 
| 41 | 
            +
                      end
         | 
| 42 | 
            +
                    end
         | 
| 43 | 
            +
             | 
| 44 | 
            +
                    context "without entry for name" do
         | 
| 45 | 
            +
                      setup do
         | 
| 46 | 
            +
                        @key = :parameter_missing_name
         | 
| 47 | 
            +
                        I18n.backend.store_translations(:en, @key => {})
         | 
| 48 | 
            +
                      end
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                      should "return the key as name" do
         | 
| 51 | 
            +
                        name, desc = @translator.translate(@key, :en)
         | 
| 52 | 
            +
                        assert_equal(@key.to_s, name)
         | 
| 53 | 
            +
                        assert_equal("", desc)
         | 
| 54 | 
            +
                      end
         | 
| 55 | 
            +
                    end
         | 
| 56 | 
            +
             | 
| 57 | 
            +
                    context "with empty translation for comment" do
         | 
| 58 | 
            +
                      setup do
         | 
| 59 | 
            +
                        @key = :parameter_empty_comment
         | 
| 60 | 
            +
                        I18n.backend.store_translations(:en, @key => {:comment => '     '})
         | 
| 61 | 
            +
                      end
         | 
| 62 | 
            +
             | 
| 63 | 
            +
                      should "return an empty string as description" do
         | 
| 64 | 
            +
                        name, desc = @translator.translate(@key, :en)
         | 
| 65 | 
            +
                        assert_equal("", desc)
         | 
| 66 | 
            +
                      end
         | 
| 67 | 
            +
                    end
         | 
| 68 | 
            +
             | 
| 69 | 
            +
                    context "without entry for comment" do
         | 
| 70 | 
            +
                      setup do
         | 
| 71 | 
            +
                        @key = :parameter_missing_comment
         | 
| 72 | 
            +
                        I18n.backend.store_translations(:en, @key => {})
         | 
| 73 | 
            +
                      end
         | 
| 74 | 
            +
             | 
| 75 | 
            +
                      should "return an empty string as description" do
         | 
| 76 | 
            +
                        name, desc = @translator.translate(@key, :en)
         | 
| 77 | 
            +
                        assert_equal("", desc)
         | 
| 78 | 
            +
                      end
         | 
| 79 | 
            +
                    end
         | 
| 80 | 
            +
             | 
| 81 | 
            +
                  end
         | 
| 82 | 
            +
             | 
| 83 | 
            +
                end
         | 
| 84 | 
            +
              end
         | 
| 85 | 
            +
            end
         | 
    
        data/test/test_helper.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,117 +1,139 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: machine_setup
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            +
              hash: 13
         | 
| 4 5 | 
             
              prerelease: 
         | 
| 5 | 
            -
               | 
| 6 | 
            +
              segments: 
         | 
| 7 | 
            +
              - 0
         | 
| 8 | 
            +
              - 4
         | 
| 9 | 
            +
              - 1
         | 
| 10 | 
            +
              version: 0.4.1
         | 
| 6 11 | 
             
            platform: ruby
         | 
| 7 12 | 
             
            authors: 
         | 
| 8 | 
            -
             | 
| 13 | 
            +
            - robi-wan
         | 
| 9 14 | 
             
            autorequire: 
         | 
| 10 15 | 
             
            bindir: bin
         | 
| 11 16 | 
             
            cert_chain: []
         | 
| 12 17 |  | 
| 13 | 
            -
            date:  | 
| 18 | 
            +
            date: 2012-07-04 00:00:00 Z
         | 
| 14 19 | 
             
            dependencies: 
         | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 35 | 
            -
                 | 
| 36 | 
            -
                 | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
               | 
| 49 | 
            -
                 | 
| 50 | 
            -
                 | 
| 51 | 
            -
                 | 
| 52 | 
            -
                   | 
| 53 | 
            -
             | 
| 54 | 
            -
                     | 
| 55 | 
            -
             | 
| 56 | 
            -
             | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 20 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 21 | 
            +
              name: i18n
         | 
| 22 | 
            +
              prerelease: false
         | 
| 23 | 
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         | 
| 24 | 
            +
                none: false
         | 
| 25 | 
            +
                requirements: 
         | 
| 26 | 
            +
                - - ~>
         | 
| 27 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 28 | 
            +
                    hash: 7
         | 
| 29 | 
            +
                    segments: 
         | 
| 30 | 
            +
                    - 0
         | 
| 31 | 
            +
                    - 6
         | 
| 32 | 
            +
                    version: "0.6"
         | 
| 33 | 
            +
              type: :runtime
         | 
| 34 | 
            +
              version_requirements: *id001
         | 
| 35 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 36 | 
            +
              name: inifile
         | 
| 37 | 
            +
              prerelease: false
         | 
| 38 | 
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         | 
| 39 | 
            +
                none: false
         | 
| 40 | 
            +
                requirements: 
         | 
| 41 | 
            +
                - - ~>
         | 
| 42 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 43 | 
            +
                    hash: 13
         | 
| 44 | 
            +
                    segments: 
         | 
| 45 | 
            +
                    - 1
         | 
| 46 | 
            +
                    - 1
         | 
| 47 | 
            +
                    version: "1.1"
         | 
| 48 | 
            +
              type: :runtime
         | 
| 49 | 
            +
              version_requirements: *id002
         | 
| 50 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 51 | 
            +
              name: erubis
         | 
| 52 | 
            +
              prerelease: false
         | 
| 53 | 
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         | 
| 54 | 
            +
                none: false
         | 
| 55 | 
            +
                requirements: 
         | 
| 56 | 
            +
                - - ~>
         | 
| 57 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 58 | 
            +
                    hash: 13
         | 
| 59 | 
            +
                    segments: 
         | 
| 60 | 
            +
                    - 2
         | 
| 61 | 
            +
                    - 7
         | 
| 62 | 
            +
                    version: "2.7"
         | 
| 63 | 
            +
              type: :runtime
         | 
| 64 | 
            +
              version_requirements: *id003
         | 
| 65 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 66 | 
            +
              name: shoulda
         | 
| 67 | 
            +
              prerelease: false
         | 
| 68 | 
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         | 
| 69 | 
            +
                none: false
         | 
| 70 | 
            +
                requirements: 
         | 
| 71 | 
            +
                - - ">="
         | 
| 72 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 73 | 
            +
                    hash: 3
         | 
| 74 | 
            +
                    segments: 
         | 
| 75 | 
            +
                    - 0
         | 
| 76 | 
            +
                    version: "0"
         | 
| 77 | 
            +
              type: :development
         | 
| 78 | 
            +
              version_requirements: *id004
         | 
| 59 79 | 
             
            description: Helps generating configuration files for machine setup parameters.
         | 
| 60 80 | 
             
            email: robi-wan@suyu.de
         | 
| 61 81 | 
             
            executables: 
         | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 82 | 
            +
            - setup_config_gen
         | 
| 83 | 
            +
            - setup_init_dsl
         | 
| 84 | 
            +
            - setup_analyze_dat
         | 
| 65 85 | 
             
            extensions: []
         | 
| 66 86 |  | 
| 67 87 | 
             
            extra_rdoc_files: 
         | 
| 68 | 
            -
             | 
| 69 | 
            -
             | 
| 88 | 
            +
            - README.rdoc
         | 
| 89 | 
            +
            - TODO
         | 
| 70 90 | 
             
            files: 
         | 
| 71 | 
            -
             | 
| 72 | 
            -
             | 
| 73 | 
            -
             | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 76 | 
            -
             | 
| 77 | 
            -
             | 
| 78 | 
            -
             | 
| 79 | 
            -
             | 
| 80 | 
            -
             | 
| 81 | 
            -
             | 
| 82 | 
            -
             | 
| 83 | 
            -
             | 
| 84 | 
            -
             | 
| 85 | 
            -
             | 
| 86 | 
            -
             | 
| 87 | 
            -
             | 
| 88 | 
            -
             | 
| 89 | 
            -
             | 
| 90 | 
            -
             | 
| 91 | 
            -
             | 
| 92 | 
            -
             | 
| 93 | 
            -
             | 
| 94 | 
            -
             | 
| 95 | 
            -
             | 
| 96 | 
            -
             | 
| 97 | 
            -
             | 
| 98 | 
            -
             | 
| 99 | 
            -
             | 
| 100 | 
            -
             | 
| 101 | 
            -
             | 
| 102 | 
            -
             | 
| 103 | 
            -
             | 
| 104 | 
            -
             | 
| 105 | 
            -
             | 
| 106 | 
            -
             | 
| 107 | 
            -
             | 
| 108 | 
            -
             | 
| 109 | 
            -
             | 
| 110 | 
            -
             | 
| 111 | 
            -
             | 
| 112 | 
            -
             | 
| 113 | 
            -
             | 
| 114 | 
            -
             | 
| 91 | 
            +
            - .document
         | 
| 92 | 
            +
            - MIT-LICENSE
         | 
| 93 | 
            +
            - README.rdoc
         | 
| 94 | 
            +
            - Rakefile
         | 
| 95 | 
            +
            - TODO
         | 
| 96 | 
            +
            - VERSION
         | 
| 97 | 
            +
            - bin/setup_analyze_dat
         | 
| 98 | 
            +
            - bin/setup_config_gen
         | 
| 99 | 
            +
            - bin/setup_init_dsl
         | 
| 100 | 
            +
            - examples/ssm/ssm.setup.param
         | 
| 101 | 
            +
            - examples/ssm/ssm.setup.param.de.yml
         | 
| 102 | 
            +
            - examples/ssm/ssm.setup.param.en.yml
         | 
| 103 | 
            +
            - examples/underleaver/underleaver.setup.param
         | 
| 104 | 
            +
            - examples/underleaver/underleaver.setup.param.de.yml
         | 
| 105 | 
            +
            - examples/underleaver/underleaver.setup.param.en.yml
         | 
| 106 | 
            +
            - lib/setup_configuration.rb
         | 
| 107 | 
            +
            - lib/setup_configuration/core_ext.rb
         | 
| 108 | 
            +
            - lib/setup_configuration/core_ext/array.rb
         | 
| 109 | 
            +
            - lib/setup_configuration/core_ext/array/grouping.rb
         | 
| 110 | 
            +
            - lib/setup_configuration/encoding.rb
         | 
| 111 | 
            +
            - lib/setup_configuration/generator_module.rb
         | 
| 112 | 
            +
            - lib/setup_configuration/legacy/importer.rb
         | 
| 113 | 
            +
            - lib/setup_configuration/legacy/language_context.rb
         | 
| 114 | 
            +
            - lib/setup_configuration/legacy/legacy.rb
         | 
| 115 | 
            +
            - lib/setup_configuration/legacy/parameter.rb
         | 
| 116 | 
            +
            - lib/setup_configuration/legacy/templates/setup.param.erb
         | 
| 117 | 
            +
            - lib/setup_configuration/legacy/templates/setup.param.language.yml.erb
         | 
| 118 | 
            +
            - lib/setup_configuration/mps_template_binding.rb
         | 
| 119 | 
            +
            - lib/setup_configuration/parameter_machinetype_bridge.rb
         | 
| 120 | 
            +
            - lib/setup_configuration/parameter_template_binding.rb
         | 
| 121 | 
            +
            - lib/setup_configuration/setup_code_binding.rb
         | 
| 122 | 
            +
            - lib/setup_configuration/setup_code_generator.rb
         | 
| 123 | 
            +
            - lib/setup_configuration/setup_config.rb
         | 
| 124 | 
            +
            - lib/setup_configuration/suite_generator.rb
         | 
| 125 | 
            +
            - lib/setup_configuration/template_binding.rb
         | 
| 126 | 
            +
            - lib/setup_configuration/templates/deutsch.lng.erb
         | 
| 127 | 
            +
            - lib/setup_configuration/templates/english.lng.erb
         | 
| 128 | 
            +
            - lib/setup_configuration/templates/logcodesetup.exp.erb
         | 
| 129 | 
            +
            - lib/setup_configuration/templates/mps3.ini.erb
         | 
| 130 | 
            +
            - lib/setup_configuration/translation.rb
         | 
| 131 | 
            +
            - test/setup_configuration/machine_type_test.rb
         | 
| 132 | 
            +
            - test/setup_configuration/parameter_factory_test.rb
         | 
| 133 | 
            +
            - test/setup_configuration/parameter_test.rb
         | 
| 134 | 
            +
            - test/setup_configuration/setup_configuration_test.rb
         | 
| 135 | 
            +
            - test/setup_configuration/translation_test.rb
         | 
| 136 | 
            +
            - test/test_helper.rb
         | 
| 115 137 | 
             
            homepage: http://github.com/robi-wan/machine_setup
         | 
| 116 138 | 
             
            licenses: []
         | 
| 117 139 |  | 
| @@ -119,23 +141,29 @@ post_install_message: | |
| 119 141 | 
             
            rdoc_options: []
         | 
| 120 142 |  | 
| 121 143 | 
             
            require_paths: 
         | 
| 122 | 
            -
             | 
| 144 | 
            +
            - lib
         | 
| 123 145 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 124 146 | 
             
              none: false
         | 
| 125 147 | 
             
              requirements: 
         | 
| 126 | 
            -
             | 
| 127 | 
            -
             | 
| 128 | 
            -
             | 
| 148 | 
            +
              - - ">="
         | 
| 149 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 150 | 
            +
                  hash: 3
         | 
| 151 | 
            +
                  segments: 
         | 
| 152 | 
            +
                  - 0
         | 
| 153 | 
            +
                  version: "0"
         | 
| 129 154 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 130 155 | 
             
              none: false
         | 
| 131 156 | 
             
              requirements: 
         | 
| 132 | 
            -
             | 
| 133 | 
            -
             | 
| 134 | 
            -
             | 
| 157 | 
            +
              - - ">="
         | 
| 158 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 159 | 
            +
                  hash: 3
         | 
| 160 | 
            +
                  segments: 
         | 
| 161 | 
            +
                  - 0
         | 
| 162 | 
            +
                  version: "0"
         | 
| 135 163 | 
             
            requirements: []
         | 
| 136 164 |  | 
| 137 165 | 
             
            rubyforge_project: 
         | 
| 138 | 
            -
            rubygems_version: 1.8. | 
| 166 | 
            +
            rubygems_version: 1.8.24
         | 
| 139 167 | 
             
            signing_key: 
         | 
| 140 168 | 
             
            specification_version: 3
         | 
| 141 169 | 
             
            summary: Generating configuration for machine setup parameters.
         |