origen 0.44.0 → 0.50.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/config/application.rb +2 -2
  3. data/config/boot.rb +0 -7
  4. data/config/commands.rb +3 -74
  5. data/config/rubocop/easy_disabled.yml +4 -0
  6. data/config/rubocop/easy_enabled.yml +0 -4
  7. data/config/rubocop/strict_disabled.yml +4 -0
  8. data/config/rubocop/strict_enabled.yml +0 -4
  9. data/config/version.rb +1 -2
  10. data/lib/origen/application/deployer.rb +3 -1
  11. data/lib/origen/application/release.rb +2 -2
  12. data/lib/origen/application/runner.rb +9 -2
  13. data/lib/origen/application.rb +91 -2
  14. data/lib/origen/boot/app.rb +0 -4
  15. data/lib/origen/boot.rb +2 -1
  16. data/lib/origen/code_generators/actions.rb +244 -34
  17. data/lib/origen/code_generators/base.rb +9 -2
  18. data/lib/origen/code_generators/block.rb +203 -0
  19. data/lib/origen/code_generators/block_common.rb +100 -0
  20. data/lib/origen/code_generators/dut.rb +62 -0
  21. data/lib/origen/code_generators/feature.rb +50 -0
  22. data/lib/origen/code_generators/klass.rb +41 -0
  23. data/lib/origen/code_generators/model.rb +60 -0
  24. data/lib/origen/code_generators/module.rb +92 -0
  25. data/lib/origen/code_generators.rb +30 -10
  26. data/lib/origen/commands/lint.rb +6 -1
  27. data/lib/origen/commands/new.rb +1 -1
  28. data/lib/origen/commands/new_resource.rb +41 -0
  29. data/lib/origen/commands/web.rb +11 -6
  30. data/lib/origen/commands.rb +18 -0
  31. data/lib/{option_parser → origen/core_ext/option_parser}/optparse.rb +0 -0
  32. data/lib/origen/dependencies.rb +0 -0
  33. data/lib/origen/file_handler.rb +8 -4
  34. data/lib/origen/generator/pattern_finder.rb +3 -3
  35. data/lib/origen/loader.rb +377 -0
  36. data/lib/origen/model.rb +22 -1
  37. data/lib/origen/model_initializer.rb +5 -1
  38. data/lib/origen/parameters/set.rb +2 -1
  39. data/lib/origen/parameters.rb +95 -3
  40. data/lib/origen/sub_blocks.rb +21 -7
  41. data/lib/origen/top_level.rb +11 -0
  42. data/lib/origen.rb +3 -1
  43. data/origen_app_generators/Gemfile +6 -2
  44. data/origen_app_generators/Gemfile.lock +83 -72
  45. data/origen_app_generators/bin/boot.rb +4 -2
  46. data/origen_app_generators/config/commands.rb +3 -3
  47. data/origen_app_generators/config/shared_commands.rb +11 -6
  48. data/origen_app_generators/lbin/bundle +105 -0
  49. data/origen_app_generators/lbin/byebug +29 -0
  50. data/origen_app_generators/lbin/coderay +29 -0
  51. data/origen_app_generators/lbin/htmldiff +29 -0
  52. data/origen_app_generators/lbin/httparty +29 -0
  53. data/origen_app_generators/lbin/httpclient +29 -0
  54. data/origen_app_generators/lbin/kramdown +29 -0
  55. data/origen_app_generators/lbin/ldiff +29 -0
  56. data/origen_app_generators/lbin/nanoc +29 -0
  57. data/origen_app_generators/lbin/nokogiri +29 -0
  58. data/origen_app_generators/lbin/origen +62 -0
  59. data/origen_app_generators/lbin/pry +29 -0
  60. data/origen_app_generators/lbin/rackup +29 -0
  61. data/origen_app_generators/lbin/rake +29 -0
  62. data/origen_app_generators/lbin/rspec +29 -0
  63. data/origen_app_generators/lbin/rubocop +29 -0
  64. data/origen_app_generators/lbin/ruby-parse +29 -0
  65. data/origen_app_generators/lbin/ruby-rewrite +29 -0
  66. data/origen_app_generators/lbin/thor +29 -0
  67. data/origen_app_generators/lbin/tilt +29 -0
  68. data/origen_app_generators/lbin/yard +29 -0
  69. data/origen_app_generators/lbin/yardoc +29 -0
  70. data/origen_app_generators/lbin/yri +29 -0
  71. data/origen_app_generators/lib/origen_app_generators/application.rb +12 -12
  72. data/origen_app_generators/lib/origen_app_generators/base.rb +34 -8
  73. data/origen_app_generators/lib/origen_app_generators/new.rb +17 -9
  74. data/origen_app_generators/lib/{tasks/new_app_tests.rake → origen_app_generators/new_app_tests.rb} +1 -5
  75. data/origen_app_generators/lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb +6 -8
  76. data/origen_app_generators/lib/origen_app_generators/plugin.rb +4 -7
  77. data/origen_app_generators/lib/origen_app_generators/test_engineering/common.rb +29 -0
  78. data/origen_app_generators/lib/origen_app_generators/test_engineering/stand_alone_application.rb +9 -181
  79. data/origen_app_generators/lib/origen_app_generators/test_engineering/test_block.rb +4 -105
  80. data/origen_app_generators/lib/origen_app_generators.rb +6 -4
  81. data/origen_app_generators/origen_app_generators.gemspec +7 -7
  82. data/origen_app_generators/templates/app_generators/application/Gemfile +14 -3
  83. data/origen_app_generators/templates/app_generators/application/{lib → app/blocks}/top_level.rb +1 -1
  84. data/origen_app_generators/templates/app_generators/application/app/lib/module.rb +6 -0
  85. data/origen_app_generators/templates/app_generators/application/{templates → app/templates}/web/index.md.erb +0 -0
  86. data/origen_app_generators/templates/app_generators/application/{templates → app/templates}/web/layouts/_basic.html.erb +0 -0
  87. data/origen_app_generators/templates/app_generators/application/{templates → app/templates}/web/partials/_navbar.html.erb +0 -0
  88. data/origen_app_generators/templates/app_generators/application/{templates → app/templates}/web/release_notes.md.erb +0 -0
  89. data/origen_app_generators/templates/app_generators/application/config/application.rb +51 -55
  90. data/origen_app_generators/templates/app_generators/application/{spec → test/spec}/spec_helper.rb +0 -0
  91. data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/application.rb +0 -0
  92. data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/base.rb +0 -0
  93. data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/module.rb +0 -0
  94. data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/plugin.rb +0 -0
  95. data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb +1 -1
  96. data/origen_app_generators/templates/app_generators/plugin/Gemfile +5 -2
  97. data/origen_app_generators/templates/app_generators/plugin/{templates → app/templates}/web/index.md.erb +0 -0
  98. data/origen_app_generators/templates/app_generators/plugin/{templates → app/templates}/web/partials/_navbar_external.html.erb +0 -0
  99. data/origen_app_generators/templates/app_generators/plugin/{templates → app/templates}/web/partials/_navbar_internal.html.erb +0 -0
  100. data/origen_app_generators/templates/app_generators/plugin/gemspec.rb +4 -3
  101. data/origen_app_generators/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/j750.rb +0 -0
  102. data/origen_app_generators/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/uflex.rb +0 -0
  103. data/origen_app_generators/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/v93k.rb +0 -0
  104. data/origen_site_config.yml +0 -7
  105. data/templates/code_generators/attributes.rb +20 -0
  106. data/templates/code_generators/class.rb +9 -0
  107. data/templates/code_generators/controller.rb +87 -0
  108. data/templates/code_generators/model.rb +21 -0
  109. data/templates/code_generators/module.rb +4 -0
  110. data/templates/code_generators/parameters.rb +19 -0
  111. data/templates/code_generators/pins.rb +28 -0
  112. data/templates/code_generators/registers.rb +20 -0
  113. data/templates/code_generators/sub_blocks.rb +24 -0
  114. data/templates/code_generators/timesets.rb +24 -0
  115. data/templates/code_generators/version.rb +0 -1
  116. metadata +66 -77
  117. data/lib/c99/ate_interface.rb +0 -77
  118. data/lib/c99/nvm.rb +0 -110
  119. data/lib/c99/target/mock2.rb +0 -1
  120. data/lib/c99/target/subdir/mock3.rb +0 -1
  121. data/lib/origen/code_generators/bundler.rb +0 -17
  122. data/lib/origen/code_generators/gem_setup.rb +0 -49
  123. data/lib/origen/code_generators/rake.rb +0 -13
  124. data/lib/origen/code_generators/rspec.rb +0 -12
  125. data/lib/origen/commands/add.rb +0 -12
  126. data/lib/tasks/private/build.rake +0 -8
  127. data/origen_app_generators/bin/fix_my_workspace +0 -100
  128. data/origen_app_generators/lib/origen_app_generators/sub_block_parser.rb +0 -81
  129. data/origen_app_generators/lib/tasks/app_generators.rake +0 -6
  130. data/origen_app_generators/spec/sub_block_spec.rb +0 -36
  131. data/origen_app_generators/templates/app_generators/application/lib/app.rake +0 -6
  132. data/origen_app_generators/templates/app_generators/application/lib/module.rb +0 -22
  133. data/origen_app_generators/templates/app_generators/plugin/lib/README +0 -4
  134. data/origen_app_generators/templates/app_generators/plugin/lib_dev/README +0 -5
  135. data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/Gemfile +0 -23
  136. data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/environment/jlink.rb +0 -1
  137. data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb +0 -23
  138. data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block_controller.rb +0 -5
  139. data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb +0 -33
  140. data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level_controller.rb +0 -21
  141. data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/pattern/example.rb +0 -4
  142. data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/target/top_level.rb +0 -4
  143. data/origen_app_generators/templates/app_generators/test_engineering/test_block/environment/j750.rb +0 -2
  144. data/origen_app_generators/templates/app_generators/test_engineering/test_block/environment/ultraflex.rb +0 -2
  145. data/origen_app_generators/templates/app_generators/test_engineering/test_block/environment/v93k.rb +0 -2
  146. data/origen_app_generators/templates/app_generators/test_engineering/test_block/lib/controller.rb +0 -12
  147. data/origen_app_generators/templates/app_generators/test_engineering/test_block/lib/interface.rb +0 -21
  148. data/origen_app_generators/templates/app_generators/test_engineering/test_block/lib/model.rb +0 -18
  149. data/origen_app_generators/templates/app_generators/test_engineering/test_block/lib_dev/dut.rb +0 -27
  150. data/origen_app_generators/templates/app_generators/test_engineering/test_block/lib_dev/dut_controller.rb +0 -26
  151. data/origen_app_generators/templates/app_generators/test_engineering/test_block/pattern/example.rb +0 -5
  152. data/origen_app_generators/templates/app_generators/test_engineering/test_block/program/prb1.rb +0 -11
  153. data/origen_app_generators/templates/app_generators/test_engineering/test_block/target/default.rb +0 -2
  154. data/templates/code_generators/gemfile_app.rb +0 -4
  155. data/templates/code_generators/gemfile_plugin.rb +0 -6
  156. data/templates/code_generators/gemspec.rb +0 -33
  157. data/templates/code_generators/rakefile.rb +0 -10
  158. data/templates/code_generators/spec_helper.rb +0 -49
@@ -77,23 +77,21 @@ module OrigenAppGenerators
77
77
  list = super # Always pick up the parent list
78
78
  # Example of how to remove a file from the parent list
79
79
  # list.delete(:web_doc_layout)
80
- list.delete(:lib_readme)
81
- list.delete(:lib_readme_dev)
82
80
  list.delete(:templates_shared)
83
81
  # Example of how to add a file, in this case the file will be compiled and copied to
84
82
  # the same location in the new app
85
83
  # list[:config_shared_commands] = { source: 'config/shared_commands.rb' }
86
84
  list[:config_load_generators] = { source: 'config/load_generators.rb' }
87
- list[:lib_base] = { source: 'lib/base.rb', dest: "lib/#{@name}/base.rb" }
88
- list[:lib_plugin] = { source: 'lib/plugin.rb', dest: "lib/#{@name}/plugin.rb" }
89
- list[:lib_application] = { source: 'lib/application.rb', dest: "lib/#{@name}/application.rb" }
85
+ list[:lib_base] = { source: 'app/lib/base.rb', dest: "app/lib/#{@name}/base.rb" }
86
+ list[:lib_plugin] = { source: 'app/lib/plugin.rb', dest: "app/lib/#{@name}/plugin.rb" }
87
+ list[:lib_application] = { source: 'app/lib/application.rb', dest: "app/lib/#{@name}/application.rb" }
90
88
  # Alternatively specifying a different destination, typically you would do this when
91
89
  # the final location is dynamic
92
90
  # list[:gemspec] = { source: 'gemspec.rb', dest: "#{@name}.gemspec" }
93
91
  # Example of how to create a directory
94
- list[:templates_app] = { dest: 'templates/app_generators/application', type: :directory }
95
- list[:templates_plugin] = { dest: 'templates/app_generators/plugin', type: :directory }
96
- list[:templates_base] = { dest: 'templates/app_generators/base', type: :directory }
92
+ list[:templates_app] = { dest: 'app/templates/app_generators/application', type: :directory }
93
+ list[:templates_plugin] = { dest: 'app/templates/app_generators/plugin', type: :directory }
94
+ list[:templates_base] = { dest: 'app/templates/app_generators/base', type: :directory }
97
95
  # By default, directories created in this way will contain a .keep file, to inhibit this:
98
96
  # list[:pattern_dir] = { dest: "pattern", type: :directory, nokeep: true }
99
97
  # Example of how to create a symlink
@@ -1,8 +1,7 @@
1
1
  module OrigenAppGenerators
2
2
  # The base generator class that should be used by all plugin generators
3
3
  class Plugin < Application
4
- def get_common_user_input
5
- get_name_and_namespace
4
+ def get_additional_user_input
6
5
  get_summary
7
6
  get_audience unless @audience
8
7
  end
@@ -19,15 +18,13 @@ module OrigenAppGenerators
19
18
  list.delete(:web_installation)
20
19
  list.delete(:web_introduction)
21
20
  list[:gemspec] = { source: 'gemspec.rb', dest: "#{@name}.gemspec" }
22
- list[:templates_shared] = { dest: 'templates/shared', type: :directory }
21
+ list[:templates_shared] = { dest: 'app/templates/shared', type: :directory }
23
22
  if @audience == :external
24
23
  list[:travis] = { source: '.travis.yml' }
25
- list[:web_navbar] = { source: 'templates/web/partials/_navbar_external.html.erb', dest: 'templates/web/partials/_navbar.html.erb' }
24
+ list[:web_navbar] = { source: 'app/templates/web/partials/_navbar_external.html.erb', dest: 'app/templates/web/partials/_navbar.html.erb' }
26
25
  else
27
- list[:web_navbar] = { source: 'templates/web/partials/_navbar_internal.html.erb', dest: 'templates/web/partials/_navbar.html.erb' }
26
+ list[:web_navbar] = { source: 'app/templates/web/partials/_navbar_internal.html.erb', dest: 'app/templates/web/partials/_navbar.html.erb' }
28
27
  end
29
- list[:lib_readme] = { source: 'lib/README', dest: "lib/#{@name}/README" }
30
- list[:lib_readme_dev] = { source: 'lib_dev/README', dest: "lib/#{@name}_dev/README" }
31
28
  list
32
29
  end
33
30
  end
@@ -0,0 +1,29 @@
1
+ module OrigenAppGenerators
2
+ module TestEngineering
3
+ module Common
4
+ def common_filelist(list)
5
+ # Example of how to remove a file from the parent list
6
+ # list.delete(:target_debug)
7
+ # Example of how to add a file, in this case the file will be compiled and copied to
8
+ # the same location in the new app
9
+ list[:environment_v93k] = { source: 'environment/v93k.rb' }
10
+ list[:environment_j750] = { source: 'environment/j750.rb' }
11
+ list[:environment_uflex] = { source: 'environment/uflex.rb' }
12
+ # Alternatively specifying a different destination, typically you would do this when
13
+ # the final location is dynamic
14
+ # list[:gemspec] = { source: 'gemspec.rb', dest: "#{@name}.gemspec" }
15
+ # Example of how to create a directory
16
+ # list[:pattern_dir] = { dest: 'pattern', type: :directory }
17
+ # Example of how to create a symlink
18
+ list[:environment_default] = { source: 'uflex.rb', # Relative to the file being linked to
19
+ dest: 'environment/default.rb', # Relative to destination_root
20
+ type: :symlink }
21
+ # Test engineering source directories
22
+ list[:patterns_dir] = { dest: 'app/patterns', type: :directory }
23
+ list[:flows_dir] = { dest: 'app/flows', type: :directory }
24
+ # Remember to return the final list
25
+ list
26
+ end
27
+ end
28
+ end
29
+ end
@@ -1,8 +1,9 @@
1
1
  module OrigenAppGenerators
2
2
  module TestEngineering
3
- require 'origen_app_generators/sub_block_parser'
4
3
  # Generates a generic application shell
5
4
  class StandAloneApplication < Application
5
+ include Common
6
+
6
7
  desc 'A stand alone test engineering application'
7
8
 
8
9
  # Any methods that are not protected will get invoked in the order that they are
@@ -13,13 +14,12 @@ module OrigenAppGenerators
13
14
  # The methods to get the common user input that applies to all applications will
14
15
  # get called at the start automatically, you have a chance here to ask any additional
15
16
  # questions that are specific to the type of application being generated
16
- get_top_level_names
17
- get_sub_block_names
18
17
  end
19
18
 
20
19
  def generate_files
21
- # Calling this will build all files, directories and symlinks contained in the
22
- # hash returned by the filelist method
20
+ @development_dependencies = [
21
+ ['origen_testers']
22
+ ]
23
23
  build_filelist
24
24
  end
25
25
 
@@ -37,122 +37,8 @@ module OrigenAppGenerators
37
37
 
38
38
  protected
39
39
 
40
- def sub_block_parser
41
- @sub_block_parser ||= SubBlockParser.new
42
- end
43
-
44
- def get_top_level_names
45
- puts
46
- puts 'NAME YOUR TOP-LEVEL DEVICE(S)'
47
- puts
48
- puts 'What do you want to call the top-level class that represents your device?'
49
- puts 'By default it will be called TopLevel, but if you want this application to support multiple devices you should'
50
- puts 'give them unique names.'
51
- puts 'Separate multiple names with a comma: Falcon, Eagle, Vulture'
52
- puts
53
-
54
- valid = false
55
- until valid
56
- @top_level_names = get_text(single: true, default: 'TopLevel').strip.split(',').map do |name|
57
- name.strip.gsub(/\s+/, '_').camelize
58
- end
59
- unless @top_level_names.empty?
60
- # Should we check anything here?
61
- valid = true
62
- end
63
- end
64
- @top_level_names
65
- end
66
-
67
- def get_sub_block_names
68
- puts
69
- puts 'DEFINE YOUR SUB-BLOCKS'
70
- puts
71
- puts 'What sub-blocks does this device contain?'
72
- puts 'You can leave this blank, but entering some details of the sub-blocks you will want to involve in your tests'
73
- puts 'will save you some manual setup of the associated models and controllers.'
74
- puts 'You can specify layers of hierarchy and multiple instantiations, here are some examples:'
75
- puts
76
- puts ' A RAM, OSC, PLL and 2 ATDs at the top-level: ram, osc, pll, atd(2)'
77
- puts ' With 3 COMMS blocks with embedded components: ram, osc, pll, atd(2), comms[ram(2), osc](3)'
78
- if @top_level_names.size > 1
79
- puts
80
- puts 'If you want different modules for each of your top-level devices you can do:'
81
- puts
82
- puts " #{@top_level_names[0]}[ram, atd(2)], #{@top_level_names[1]}[ram(2), atd(4)]"
83
- end
84
- puts
85
-
86
- valid = false
87
- until valid
88
- input = get_text(single: true).strip
89
- if input.empty?
90
- @sub_blocks_lookup = {}
91
- valid = true
92
- else
93
- begin
94
- @sub_blocks_lookup = sub_block_parser.parse(input)
95
- valid = true
96
- rescue
97
- valid = false
98
- end
99
- end
100
- end
101
- @sub_blocks_lookup
102
- end
103
-
104
- # Returns a hash that looks like:
105
- #
106
- # {"Falcon"=>{"RAM"=>{}, "ATD"=>{:instances=>2}}, "Eagle"=>{"RAM"=>{:instances=>2}, "ATD"=>{:instances=>4}}}
107
- def top_level_sub_blocks
108
- blocks = {}
109
- # Make sure that each top-level object has a sub blocks assignment
110
- if @top_level_names.any? { |n| @sub_blocks_lookup[n] }
111
- @top_level_names.each do |name|
112
- if @sub_blocks_lookup[name]
113
- blocks[name] = @sub_blocks_lookup[name][:children] || {}
114
- else
115
- blocks[name] = {}
116
- end
117
- end
118
- # Duplicate the given sub blocks to all top-level objects if none have been specified
119
- else
120
- @top_level_names.each do |name|
121
- blocks[name] = @sub_blocks_lookup
122
- end
123
- end
124
- blocks
125
- end
126
-
127
- # Returns a hash with all sub-blocks at the top-level, e.g.:
128
- #
129
- # {"RAM"=>{}, "ATD"=>{}, "Comms"=>{"RAM"=>{:instances=>2}, "Osc"=>{}}, "Osc"=>{}}
130
- def sub_blocks
131
- blocks = {}
132
- top_level_sub_blocks.each do |top, attrs|
133
- extract_sub_blocks(attrs) do |name, attrs|
134
- if blocks[name]
135
- if blocks[name] != (attrs[:children] || {})
136
- Origen.log.warning "The app builder does not currently support different sub-block definitions for block #{name}"
137
- Origen.log.warning 'Only the first defintion has been built'
138
- end
139
- else
140
- blocks[name] = attrs[:children] || {}
141
- end
142
- end
143
- end
144
- blocks
145
- end
146
-
147
- def extract_sub_blocks(blocks, &block)
148
- blocks.each do |name, attrs|
149
- yield name, attrs
150
- extract_sub_blocks(attrs[:children], &block) if attrs[:children]
151
- end
152
- end
153
-
154
40
  # Defines the filelist for the generator, the default list is inherited from the
155
- # parent class (Application).
41
+ # parent class (Plugin).
156
42
  # The filelist can contain references to generate files, directories or symlinks in the
157
43
  # new application.
158
44
  #
@@ -160,74 +46,16 @@ module OrigenAppGenerators
160
46
  # from the parent generator, this means that your generator will automatically stay up
161
47
  # to date with the latest conventions
162
48
  #
163
- # The master templates live in templates/app_generators/application, but
49
+ # The master templates live in templates/app_generators/plugin, but
164
50
  # DO NOT MODIFY THESE FILES DIRECTLY.
165
51
  # Either add or remove things post-generation in the modify_files method or copy the
166
- # master file to the equivalent sub-directory of templates/app_generators/test_engineering/generic_stand_alone_application
52
+ # master file to the equivalent sub-directory of templates/app_generators/test_engineering/mpg_test_block
167
53
  # which will override the version in the master directory.
168
54
  #
169
55
  # Additional files can be added or removed from the filelist as shown below.
170
56
  def filelist
171
57
  @filelist ||= begin
172
- list = super # Always pick up the parent list
173
- # Example of how to remove a file from the parent list
174
- list.delete(:lib_top_level)
175
- list.delete(:target_debug)
176
- list.delete(:target_production)
177
- list.delete(:target_default)
178
- # Example of how to add a file, in this case the file will be compiled and copied to
179
- # the same location in the new app
180
- @top_level_names.each_with_index do |name, i|
181
- list["top_level_model_#{i}"] = { source: 'lib/top_level.rb',
182
- dest: "lib/#{@name}/#{name.underscore}.rb",
183
- options: { name: name, sub_blocks: top_level_sub_blocks[name] }
184
- }
185
-
186
- list["top_level_controller_#{i}"] = { source: 'lib/top_level_controller.rb',
187
- dest: "lib/#{@name}/#{name.underscore}_controller.rb",
188
- options: { name: name }
189
- }
190
-
191
- list["target_#{name}"] = { source: 'target/top_level.rb',
192
- dest: "target/#{name.underscore}.rb",
193
- options: { name: name }
194
- }
195
- if i == 0
196
- list[:target_default] = { source: "#{name.underscore}.rb", # Relative to the file being linked to
197
- dest: 'target/default.rb', # Relative to destination_root
198
- type: :symlink }
199
- end
200
- end
201
-
202
- sub_blocks.each do |name, blocks|
203
- list["ip_block_#{name}"] = { source: 'lib/ip_block.rb',
204
- dest: "lib/#{@name}/#{name.underscore}.rb",
205
- options: { name: name, sub_blocks: blocks }
206
- }
207
-
208
- list["ip_block_controller_#{name}"] = { source: 'lib/ip_block_controller.rb',
209
- dest: "lib/#{@name}/#{name.underscore}_controller.rb" }
210
- end
211
-
212
- list[:environment_j750] = { source: 'environment/j750.rb' }
213
- list[:environment_uflex] = { source: 'environment/uflex.rb' }
214
- list[:environment_v93k] = { source: 'environment/v93k.rb' }
215
- list[:environment_jlink] = { source: 'environment/jlink.rb' }
216
- # Alternatively specifying a different destination, typically you would do this when
217
- # the final location is dynamic
218
- # list[:gemspec] = { source: 'gemspec.rb', dest: "#{@name}.gemspec" }
219
- # Example of how to create a directory
220
- # list[:pattern_dir] = { dest: "pattern", type: :directory }
221
- # Example of how to create a symlink
222
- list[:environment_default] = { source: 'j750.rb', # Relative to the file being linked to
223
- dest: 'environment/default.rb', # Relative to destination_root
224
- type: :symlink }
225
- # Test engineering source directories
226
- list[:program_dir] = { dest: 'program', type: :directory }
227
- list[:pattern_dir] = { dest: 'pattern', type: :directory }
228
- # Example source files
229
- list[:pattern_example] = { source: 'pattern/example.rb' }
230
- # Remember to return the final list
58
+ list = common_filelist(super) # Always pick up the parent list
231
59
  list
232
60
  end
233
61
  end
@@ -2,6 +2,8 @@ module OrigenAppGenerators
2
2
  module TestEngineering
3
3
  # Generates a generic plugin shell
4
4
  class TestBlock < Plugin
5
+ include Common
6
+
5
7
  desc 'An IP test module intended to plugin into a top-level (SoC) application'
6
8
 
7
9
  def initialize(*args)
@@ -13,8 +15,6 @@ module OrigenAppGenerators
13
15
  # The methods to get the common user input that applies to all applications will
14
16
  # get called at the start automatically, you have a chance here to ask any additional
15
17
  # questions that are specific to the type of application being generated
16
- get_ip_names
17
- get_sub_block_name
18
18
  end
19
19
 
20
20
  def generate_files
@@ -25,72 +25,15 @@ module OrigenAppGenerators
25
25
  end
26
26
 
27
27
  def final_modifications
28
- prepend_to_file "lib/#{@name}.rb", "require 'origen_testers'\n"
29
- # Add require line
30
- doc_helpers = /gem 'origen_doc_helpers'/
31
- inject_into_file 'Gemfile', "\ngem 'origen_jtag'\ngem 'origen_arm_debug'\n",
32
- after: doc_helpers
28
+ prepend_to_file "app/lib/#{@name}.rb", "require 'origen_testers'\n"
33
29
  end
34
30
 
35
31
  def conclude
36
32
  puts "New test module created at: #{destination_root}"
37
- puts
38
- puts 'Generate an example pattern by running "origen g example"'
39
33
  end
40
34
 
41
35
  protected
42
36
 
43
- def get_ip_names
44
- puts
45
- puts 'NAME THE IP BLOCKS THAT THIS MODULE WILL SUPPORT'
46
- puts
47
- puts "You don't need to name them all up front, but you must declare at least one."
48
- puts 'We recommend that you use the official name(s) for the IP(s) as used by your design team.'
49
- puts 'Separate multiple names with a comma: FLASH_C40_512K, FLASH_C40_2M'
50
- puts
51
-
52
- valid = false
53
- until valid
54
- @ip_names = get_text(single: true).strip.split(',').map do |name|
55
- n = name.strip.symbolize.to_s.upcase
56
- unless n.empty?
57
- n
58
- end
59
- end.compact
60
- unless @ip_names.empty?
61
- # Should we check anything here?
62
- valid = true
63
- end
64
- end
65
- @ip_names
66
- end
67
-
68
- def get_sub_block_name
69
- puts
70
- puts "WHAT SHOULD BE THE PATH TO #{@ip_names.first} WHEN IT IS INSTANTIATED IN AN SOC?"
71
- puts
72
- puts 'Your IP(s) will be instantiated by a top-level (SoC) model, at which point it should be given a generic nickname'
73
- puts 'that will provide an easy way to access it.'
74
- puts 'For example, if you had an IP model for an NVM block, the IP name might be "FLASH_C40_512K_128K", but when it is'
75
- puts 'instantiated it would be given the name "flash", allowing it be easily accessed as "dut.flash".'
76
- puts
77
-
78
- valid = false
79
- until valid
80
- @sub_block_name = get_text(single: true).strip.split(',').map do |name|
81
- n = name.strip.symbolize.to_s.downcase
82
- unless n.empty?
83
- n
84
- end
85
- end.compact
86
- unless @sub_block_name.empty?
87
- # Should we check anything here?
88
- valid = true
89
- end
90
- end
91
- @sub_block_name = @sub_block_name.first
92
- end
93
-
94
37
  # Defines the filelist for the generator, the default list is inherited from the
95
38
  # parent class (Plugin).
96
39
  # The filelist can contain references to generate files, directories or symlinks in the
@@ -109,51 +52,7 @@ module OrigenAppGenerators
109
52
  # Additional files can be added or removed from the filelist as shown below.
110
53
  def filelist
111
54
  @filelist ||= begin
112
- list = super # Always pick up the parent list
113
- # Example of how to remove a file from the parent list
114
- list.delete(:target_debug)
115
- list.delete(:target_production)
116
- # Example of how to add a file, in this case the file will be compiled and copied to
117
- # the same location in the new app
118
- list[:target_default] = { source: 'target/default.rb' }
119
- list[:environment_v93k] = { source: 'environment/v93k.rb' }
120
- list[:environment_j750] = { source: 'environment/j750.rb' }
121
- list[:environment_ultraflex] = { source: 'environment/ultraflex.rb' }
122
- list[:program_prb1] = { source: 'program/prb1.rb' }
123
- list[:lib_interface] = { source: 'lib/interface.rb', dest: "lib/#{@name}/interface.rb" }
124
- # Alternatively specifying a different destination, typically you would do this when
125
- # the final location is dynamic
126
- # list[:gemspec] = { source: 'gemspec.rb', dest: "#{@name}.gemspec" }
127
- # Example of how to create a directory
128
- list[:pattern_dir] = { dest: 'pattern', type: :directory }
129
- # Example of how to create a symlink
130
- list[:environment_default] = { source: 'ultraflex.rb', # Relative to the file being linked to
131
- dest: 'environment/default.rb', # Relative to destination_root
132
- type: :symlink }
133
- list[:dev_dut] = { source: 'lib_dev/dut.rb',
134
- dest: "lib/#{@name}_dev/dut.rb",
135
- options: { class_name: @ip_names.first, sub_block_name: @sub_block_name }
136
- }
137
- list[:dev_dutc] = { source: 'lib_dev/dut_controller.rb',
138
- dest: "lib/#{@name}_dev/dut_controller.rb"
139
- }
140
-
141
- @ip_names.each_with_index do |name, i|
142
- list["ip_#{i}"] = { source: 'lib/model.rb',
143
- dest: "lib/#{@name}/#{name.underscore}.rb",
144
- options: { name: name }
145
- }
146
-
147
- list["ip_controller_#{i}"] = { source: 'lib/controller.rb',
148
- dest: "lib/#{@name}/#{name.underscore}_controller.rb",
149
- options: { name: name }
150
- }
151
- end
152
-
153
- list[:pattern_example] = { source: 'pattern/example.rb',
154
- options: { sub_block_name: @sub_block_name }
155
- }
156
- # Remember to return the final list
55
+ list = common_filelist(super) # Always pick up the parent list
157
56
  list
158
57
  end
159
58
  end
@@ -7,6 +7,7 @@ require 'origen_app_generators/plugin'
7
7
  require 'origen_app_generators/empty_application'
8
8
  require 'origen_app_generators/empty_plugin'
9
9
  require 'origen_app_generators/new'
10
+ require 'origen_app_generators/test_engineering/common'
10
11
  require 'origen_app_generators/test_engineering/test_block'
11
12
  require 'origen_app_generators/test_engineering/stand_alone_application'
12
13
  require 'origen_app_generators/origen_infrastructure/app_generator_plugin'
@@ -16,15 +17,16 @@ module OrigenAppGenerators
16
17
 
17
18
  TEST_INPUTS = [
18
19
  # 0 - Empty app
19
- ['0', '0', :default, :default, :default],
20
+ ['0', '0', :default],
20
21
  # 1 - Empty plugin
21
22
  ['0', '1', :default, :default, 'A test block', 'yes', :default],
22
23
  # 2 - Stand alone test engineering app
23
- ['2', '0', :default, :default, 'Falcon, Eagle', 'Falcon[ram, atd(2), comm[ram(2), osc](3)], Eagle[ram(2), atd(4)]', [:default, 'origen g example']],
24
+ ['2', '0', [:default]],
24
25
  # 3 - Test module
25
- ['2', '1', :default, :default, 'Test module for all flash IPs', 'FLASH_512K, FLASH_1024K', 'flash', [:default, 'origen g example']],
26
+ # ['2', '1', 'Test module for all flash IPs', [:default, 'origen g example']],
27
+ ['2', '1', 'Test module for all flash IPs', :default],
26
28
  # 4 - An app generators plugin
27
- ['1', '0', :default, :default, 'My application generators', :default]
29
+ ['1', '0', 'My application generators', :default]
28
30
  ] # END_OF_TEST_INPUTS Don't remove this comment, it is used by the app_gen:new command!
29
31
 
30
32
  # As you add new generators to this app they will be entered here, this enables the
@@ -8,26 +8,26 @@ Gem::Specification.new do |s|
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 1.8.11".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Stephen McGinty".freeze]
11
- s.date = "2019-05-16"
11
+ s.date = "2019-05-27"
12
12
  s.email = ["stephen.f.mcginty@gmail.com".freeze]
13
- s.files = ["bin/boot.rb".freeze, "bin/fix_my_workspace".freeze, "config/application.rb".freeze, "config/boot.rb".freeze, "config/commands.rb".freeze, "config/shared_commands.rb".freeze, "config/version.rb".freeze, "lib/origen_app_generators.rb".freeze, "lib/origen_app_generators/application.rb".freeze, "lib/origen_app_generators/base.rb".freeze, "lib/origen_app_generators/empty_application.rb".freeze, "lib/origen_app_generators/empty_plugin.rb".freeze, "lib/origen_app_generators/new.rb".freeze, "lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb".freeze, "lib/origen_app_generators/plugin.rb".freeze, "lib/origen_app_generators/sub_block_parser.rb".freeze, "lib/origen_app_generators/test_engineering/stand_alone_application.rb".freeze, "lib/origen_app_generators/test_engineering/test_block.rb".freeze, "lib/tasks/app_generators.rake".freeze, "lib/tasks/new_app_tests.rake".freeze, "templates/app_generators".freeze, "templates/app_generators/application".freeze, "templates/app_generators/application/.gitignore".freeze, "templates/app_generators/application/.irbrc".freeze, "templates/app_generators/application/.rspec".freeze, "templates/app_generators/application/.travis.yml".freeze, "templates/app_generators/application/Gemfile".freeze, "templates/app_generators/application/Rakefile".freeze, "templates/app_generators/application/config".freeze, "templates/app_generators/application/config/application.rb".freeze, "templates/app_generators/application/config/boot.rb".freeze, "templates/app_generators/application/config/commands.rb".freeze, "templates/app_generators/application/config/maillist_dev.txt".freeze, "templates/app_generators/application/config/maillist_prod.txt".freeze, "templates/app_generators/application/config/version.rb".freeze, "templates/app_generators/application/doc".freeze, "templates/app_generators/application/doc/history".freeze, "templates/app_generators/application/dot_keep".freeze, "templates/app_generators/application/lib".freeze, "templates/app_generators/application/lib/app.rake".freeze, "templates/app_generators/application/lib/module.rb".freeze, "templates/app_generators/application/lib/top_level.rb".freeze, "templates/app_generators/application/origen_core_session".freeze, "templates/app_generators/application/spec".freeze, "templates/app_generators/application/spec/spec_helper.rb".freeze, "templates/app_generators/application/target".freeze, "templates/app_generators/application/target/debug.rb".freeze, "templates/app_generators/application/target/default.rb".freeze, "templates/app_generators/application/target/production.rb".freeze, "templates/app_generators/application/templates".freeze, "templates/app_generators/application/templates/web".freeze, "templates/app_generators/application/templates/web/index.md.erb".freeze, "templates/app_generators/application/templates/web/layouts".freeze, "templates/app_generators/application/templates/web/layouts/_basic.html.erb".freeze, "templates/app_generators/application/templates/web/partials".freeze, "templates/app_generators/application/templates/web/partials/_navbar.html.erb".freeze, "templates/app_generators/application/templates/web/release_notes.md.erb".freeze, "templates/app_generators/new".freeze, "templates/app_generators/new/generator.rb".freeze, "templates/app_generators/new/info.md.erb".freeze, "templates/app_generators/origen_infrastructure".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/lib".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/lib/application.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/lib/base.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/lib/module.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/lib/plugin.rb".freeze, "templates/app_generators/plugin".freeze, "templates/app_generators/plugin/Gemfile".freeze, "templates/app_generators/plugin/Rakefile".freeze, "templates/app_generators/plugin/config".freeze, "templates/app_generators/plugin/config/boot.rb".freeze, "templates/app_generators/plugin/gemspec.rb".freeze, "templates/app_generators/plugin/lib".freeze, "templates/app_generators/plugin/lib/README".freeze, "templates/app_generators/plugin/lib_dev".freeze, "templates/app_generators/plugin/lib_dev/README".freeze, "templates/app_generators/plugin/templates".freeze, "templates/app_generators/plugin/templates/web".freeze, "templates/app_generators/plugin/templates/web/index.md.erb".freeze, "templates/app_generators/plugin/templates/web/partials".freeze, "templates/app_generators/plugin/templates/web/partials/_navbar_external.html.erb".freeze, "templates/app_generators/plugin/templates/web/partials/_navbar_internal.html.erb".freeze, "templates/app_generators/test_engineering".freeze, "templates/app_generators/test_engineering/stand_alone_application".freeze, "templates/app_generators/test_engineering/stand_alone_application/Gemfile".freeze, "templates/app_generators/test_engineering/stand_alone_application/environment".freeze, "templates/app_generators/test_engineering/stand_alone_application/environment/j750.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application/environment/jlink.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application/environment/uflex.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application/environment/v93k.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application/lib".freeze, "templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application/lib/ip_block_controller.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application/lib/top_level_controller.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application/pattern".freeze, "templates/app_generators/test_engineering/stand_alone_application/pattern/example.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application/target".freeze, "templates/app_generators/test_engineering/stand_alone_application/target/top_level.rb".freeze, "templates/app_generators/test_engineering/test_block".freeze, "templates/app_generators/test_engineering/test_block/environment".freeze, "templates/app_generators/test_engineering/test_block/environment/j750.rb".freeze, "templates/app_generators/test_engineering/test_block/environment/ultraflex.rb".freeze, "templates/app_generators/test_engineering/test_block/environment/v93k.rb".freeze, "templates/app_generators/test_engineering/test_block/lib".freeze, "templates/app_generators/test_engineering/test_block/lib/controller.rb".freeze, "templates/app_generators/test_engineering/test_block/lib/interface.rb".freeze, "templates/app_generators/test_engineering/test_block/lib/model.rb".freeze, "templates/app_generators/test_engineering/test_block/lib_dev".freeze, "templates/app_generators/test_engineering/test_block/lib_dev/dut.rb".freeze, "templates/app_generators/test_engineering/test_block/lib_dev/dut_controller.rb".freeze, "templates/app_generators/test_engineering/test_block/pattern".freeze, "templates/app_generators/test_engineering/test_block/pattern/example.rb".freeze, "templates/app_generators/test_engineering/test_block/program".freeze, "templates/app_generators/test_engineering/test_block/program/prb1.rb".freeze, "templates/app_generators/test_engineering/test_block/target".freeze, "templates/app_generators/test_engineering/test_block/target/default.rb".freeze]
13
+ s.files = ["bin/boot.rb".freeze, "config/application.rb".freeze, "config/boot.rb".freeze, "config/commands.rb".freeze, "config/shared_commands.rb".freeze, "config/version.rb".freeze, "lib/origen_app_generators.rb".freeze, "lib/origen_app_generators/application.rb".freeze, "lib/origen_app_generators/base.rb".freeze, "lib/origen_app_generators/empty_application.rb".freeze, "lib/origen_app_generators/empty_plugin.rb".freeze, "lib/origen_app_generators/new.rb".freeze, "lib/origen_app_generators/new_app_tests.rb".freeze, "lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb".freeze, "lib/origen_app_generators/plugin.rb".freeze, "lib/origen_app_generators/test_engineering/common.rb".freeze, "lib/origen_app_generators/test_engineering/stand_alone_application.rb".freeze, "lib/origen_app_generators/test_engineering/test_block.rb".freeze, "templates/app_generators".freeze, "templates/app_generators/application".freeze, "templates/app_generators/application/.gitignore".freeze, "templates/app_generators/application/.irbrc".freeze, "templates/app_generators/application/.rspec".freeze, "templates/app_generators/application/.travis.yml".freeze, "templates/app_generators/application/Gemfile".freeze, "templates/app_generators/application/Rakefile".freeze, "templates/app_generators/application/app".freeze, "templates/app_generators/application/app/blocks".freeze, "templates/app_generators/application/app/blocks/top_level.rb".freeze, "templates/app_generators/application/app/lib".freeze, "templates/app_generators/application/app/lib/module.rb".freeze, "templates/app_generators/application/app/templates".freeze, "templates/app_generators/application/app/templates/web".freeze, "templates/app_generators/application/app/templates/web/index.md.erb".freeze, "templates/app_generators/application/app/templates/web/layouts".freeze, "templates/app_generators/application/app/templates/web/layouts/_basic.html.erb".freeze, "templates/app_generators/application/app/templates/web/partials".freeze, "templates/app_generators/application/app/templates/web/partials/_navbar.html.erb".freeze, "templates/app_generators/application/app/templates/web/release_notes.md.erb".freeze, "templates/app_generators/application/config".freeze, "templates/app_generators/application/config/application.rb".freeze, "templates/app_generators/application/config/boot.rb".freeze, "templates/app_generators/application/config/commands.rb".freeze, "templates/app_generators/application/config/maillist_dev.txt".freeze, "templates/app_generators/application/config/maillist_prod.txt".freeze, "templates/app_generators/application/config/version.rb".freeze, "templates/app_generators/application/doc".freeze, "templates/app_generators/application/doc/history".freeze, "templates/app_generators/application/dot_keep".freeze, "templates/app_generators/application/origen_core_session".freeze, "templates/app_generators/application/target".freeze, "templates/app_generators/application/target/debug.rb".freeze, "templates/app_generators/application/target/default.rb".freeze, "templates/app_generators/application/target/production.rb".freeze, "templates/app_generators/application/test".freeze, "templates/app_generators/application/test/spec".freeze, "templates/app_generators/application/test/spec/spec_helper.rb".freeze, "templates/app_generators/new".freeze, "templates/app_generators/new/generator.rb".freeze, "templates/app_generators/new/info.md.erb".freeze, "templates/app_generators/origen_infrastructure".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/application.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/base.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/module.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/plugin.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb".freeze, "templates/app_generators/plugin".freeze, "templates/app_generators/plugin/Gemfile".freeze, "templates/app_generators/plugin/Rakefile".freeze, "templates/app_generators/plugin/app".freeze, "templates/app_generators/plugin/app/templates".freeze, "templates/app_generators/plugin/app/templates/web".freeze, "templates/app_generators/plugin/app/templates/web/index.md.erb".freeze, "templates/app_generators/plugin/app/templates/web/partials".freeze, "templates/app_generators/plugin/app/templates/web/partials/_navbar_external.html.erb".freeze, "templates/app_generators/plugin/app/templates/web/partials/_navbar_internal.html.erb".freeze, "templates/app_generators/plugin/config".freeze, "templates/app_generators/plugin/config/boot.rb".freeze, "templates/app_generators/plugin/gemspec.rb".freeze, "templates/app_generators/test_engineering".freeze, "templates/app_generators/test_engineering/environment".freeze, "templates/app_generators/test_engineering/environment/j750.rb".freeze, "templates/app_generators/test_engineering/environment/uflex.rb".freeze, "templates/app_generators/test_engineering/environment/v93k.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application".freeze, "templates/app_generators/test_engineering/stand_alone_application/.keep".freeze, "templates/app_generators/test_engineering/test_block".freeze, "templates/app_generators/test_engineering/test_block/.keep".freeze]
14
14
  s.homepage = "http://origen-sdk.org/origen_app_generators".freeze
15
15
  s.licenses = ["MIT".freeze]
16
16
  s.required_ruby_version = Gem::Requirement.new(">= 1.9.3".freeze)
17
- s.rubygems_version = "2.7.6".freeze
17
+ s.rubygems_version = "2.7.7".freeze
18
18
  s.summary = "Origen application generators".freeze
19
19
 
20
- s.installed_by_version = "2.7.6" if s.respond_to? :installed_by_version
20
+ s.installed_by_version = "2.7.7" if s.respond_to? :installed_by_version
21
21
 
22
22
  if s.respond_to? :specification_version then
23
23
  s.specification_version = 4
24
24
 
25
25
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
- s.add_runtime_dependency(%q<origen>.freeze, [">= 0.23.0"])
26
+ s.add_runtime_dependency(%q<origen>.freeze, [">= 0.40.2"])
27
27
  else
28
- s.add_dependency(%q<origen>.freeze, [">= 0.23.0"])
28
+ s.add_dependency(%q<origen>.freeze, [">= 0.40.2"])
29
29
  end
30
30
  else
31
- s.add_dependency(%q<origen>.freeze, [">= 0.23.0"])
31
+ s.add_dependency(%q<origen>.freeze, [">= 0.40.2"])
32
32
  end
33
33
  end
@@ -6,13 +6,24 @@ source '<%= server %>'
6
6
  source 'https://rubygems.org'
7
7
  <% end -%>
8
8
 
9
- gem 'origen', '>= <%= @latest_origen_version %>'
9
+ #gem 'origen', '>= <%= @latest_origen_version %>'
10
+ gem 'origen', git: 'https://github.com/Origen-SDK/origen.git', branch: 'app_dir'
10
11
 
11
12
  gem 'origen_doc_helpers'
13
+ <% if @development_dependencies -%>
14
+ <% @development_dependencies.each do |dep| -%>
15
+ gem <%= dep.map{ |d| "\"#{d}\"" }.join(', ') %>
16
+ <% end -%>
17
+ <% end -%>
12
18
 
13
- gem 'byebug'
19
+ gem 'byebug', '~>8' # You can remove this version constraint if you don't care about your app
20
+ # supporting earlier versions of Ruby 2
21
+ <% if RUBY_VERSION < "2.3.0" -%>
14
22
 
15
- gem 'origen_updater'
23
+ # Lock this version of nokogiri to enable compatibility with Ruby 2.2, if you don't need
24
+ # that then you can remove this line
25
+ gem 'nokogiri', '1.8.5'
26
+ <% end -%>
16
27
 
17
28
  # Uncomment these if you want to use a visual debugger (e.g. Visual Studio Code) to debug your app
18
29
  #gem 'ruby-debug-ide'
@@ -4,7 +4,7 @@ module <%= @namespace %>
4
4
  #
5
5
  # origen i
6
6
  #
7
- # > $dut.hi
7
+ # > dut.hi
8
8
  def hi
9
9
  puts "Hello master!"
10
10
  end
@@ -0,0 +1,6 @@
1
+ require 'origen'
2
+ <% if @type == :plugin -%>
3
+ require_relative '../../config/application.rb'
4
+ <% end -%>
5
+ module <%= @namespace %>
6
+ end