origen_app_generators 1.1.4 → 2.2.0

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.
Files changed (65) hide show
  1. checksums.yaml +5 -5
  2. data/bin/boot.rb +4 -2
  3. data/config/commands.rb +3 -3
  4. data/config/shared_commands.rb +17 -10
  5. data/config/version.rb +3 -4
  6. data/lib/origen_app_generators.rb +6 -4
  7. data/lib/origen_app_generators/application.rb +12 -12
  8. data/lib/origen_app_generators/base.rb +53 -9
  9. data/lib/origen_app_generators/new.rb +17 -9
  10. data/lib/{tasks/new_app_tests.rake → origen_app_generators/new_app_tests.rb} +1 -5
  11. data/lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb +6 -8
  12. data/lib/origen_app_generators/plugin.rb +4 -7
  13. data/lib/origen_app_generators/test_engineering/common.rb +29 -0
  14. data/lib/origen_app_generators/test_engineering/stand_alone_application.rb +9 -181
  15. data/lib/origen_app_generators/test_engineering/test_block.rb +4 -105
  16. data/templates/app_generators/application/Gemfile +17 -5
  17. data/templates/app_generators/application/{lib → app/blocks}/top_level.rb +1 -1
  18. data/templates/app_generators/application/app/lib/module.rb +6 -0
  19. data/templates/app_generators/application/{templates → app/templates}/web/index.md.erb +0 -0
  20. data/templates/app_generators/application/{templates → app/templates}/web/layouts/_basic.html.erb +0 -0
  21. data/templates/app_generators/application/{templates → app/templates}/web/partials/_navbar.html.erb +0 -0
  22. data/templates/app_generators/application/{templates → app/templates}/web/release_notes.md.erb +0 -0
  23. data/templates/app_generators/application/config/application.rb +51 -55
  24. data/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/application.rb +0 -0
  25. data/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/base.rb +0 -0
  26. data/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/module.rb +0 -0
  27. data/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/plugin.rb +0 -0
  28. data/templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb +1 -1
  29. data/templates/app_generators/plugin/Gemfile +13 -4
  30. data/templates/app_generators/plugin/{templates → app/templates}/web/index.md.erb +0 -0
  31. data/templates/app_generators/plugin/{templates → app/templates}/web/partials/_navbar_external.html.erb +0 -0
  32. data/templates/app_generators/plugin/{templates → app/templates}/web/partials/_navbar_internal.html.erb +0 -0
  33. data/templates/app_generators/plugin/gemspec.rb +4 -3
  34. data/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/j750.rb +0 -0
  35. data/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/uflex.rb +0 -0
  36. data/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/v93k.rb +0 -0
  37. data/templates/app_generators/test_engineering/stand_alone_application/.keep +0 -0
  38. data/templates/app_generators/test_engineering/test_block/.keep +0 -0
  39. metadata +25 -48
  40. data/bin/fix_my_workspace +0 -100
  41. data/lib/origen_app_generators/sub_block_parser.rb +0 -81
  42. data/lib/tasks/app_generators.rake +0 -6
  43. data/templates/app_generators/application/lib/app.rake +0 -6
  44. data/templates/app_generators/application/lib/module.rb +0 -22
  45. data/templates/app_generators/plugin/lib/README +0 -4
  46. data/templates/app_generators/plugin/lib_dev/README +0 -5
  47. data/templates/app_generators/test_engineering/stand_alone_application/Gemfile +0 -20
  48. data/templates/app_generators/test_engineering/stand_alone_application/environment/jlink.rb +0 -1
  49. data/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb +0 -23
  50. data/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block_controller.rb +0 -5
  51. data/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb +0 -33
  52. data/templates/app_generators/test_engineering/stand_alone_application/lib/top_level_controller.rb +0 -21
  53. data/templates/app_generators/test_engineering/stand_alone_application/pattern/example.rb +0 -4
  54. data/templates/app_generators/test_engineering/stand_alone_application/target/top_level.rb +0 -4
  55. data/templates/app_generators/test_engineering/test_block/environment/j750.rb +0 -2
  56. data/templates/app_generators/test_engineering/test_block/environment/ultraflex.rb +0 -2
  57. data/templates/app_generators/test_engineering/test_block/environment/v93k.rb +0 -2
  58. data/templates/app_generators/test_engineering/test_block/lib/controller.rb +0 -12
  59. data/templates/app_generators/test_engineering/test_block/lib/interface.rb +0 -21
  60. data/templates/app_generators/test_engineering/test_block/lib/model.rb +0 -18
  61. data/templates/app_generators/test_engineering/test_block/lib_dev/dut.rb +0 -27
  62. data/templates/app_generators/test_engineering/test_block/lib_dev/dut_controller.rb +0 -26
  63. data/templates/app_generators/test_engineering/test_block/pattern/example.rb +0 -5
  64. data/templates/app_generators/test_engineering/test_block/program/prb1.rb +0 -11
  65. data/templates/app_generators/test_engineering/test_block/target/default.rb +0 -2
@@ -2,5 +2,5 @@
2
2
  # 'origen new' command, it must not be removed or modified
3
3
  require 'origen_app_generators'
4
4
  require "<%= @name %>"
5
- template_dir = File.expand_path('../../templates/app_generators', __FILE__)
5
+ template_dir = File.expand_path('../../app/templates/app_generators', __FILE__)
6
6
  OrigenAppGenerators.add_generators(<%= @namespace %>::AVAILABLE, template_dir: template_dir)
@@ -1,6 +1,9 @@
1
+ <% if (@audience != :external) && (Origen.site_config.gem_server_pull || Origen.site_config.gem_server) -%>
2
+ <% Array(Origen.site_config.gem_server_pull || Origen.site_config.gem_server).each do |server| -%>
3
+ source '<%= server %>'
4
+ <% end -%>
5
+ <% else %>
1
6
  source 'https://rubygems.org'
2
- <% if (@audience != :external) && Origen.site_config.gem_server -%>
3
- source '<%= Origen.site_config.gem_server %>'
4
7
  <% end -%>
5
8
 
6
9
  # Only development dependencies (things your plugin needs only when it is running in its own workspace)
@@ -10,10 +13,16 @@ source '<%= Origen.site_config.gem_server %>'
10
13
  # your application's test coverage
11
14
  gem 'coveralls', require: false
12
15
  <% end -%>
13
- gem 'byebug', '<9.1.0' # This version restriction required if you need Ruby < 2.2, otherwise you can remove it
16
+
17
+ gem 'byebug'
14
18
  gem 'ripper-tags'
15
19
  gem 'origen_doc_helpers'
16
- gem 'origen_updater'
20
+ <% if (@audience != :external) && Origen.site_config.gem_push_plugins -%>
21
+ <% Origen.site_config.gem_push_plugins.each do |plugin| -%>
22
+ gem <%= Array(plugin).map{ |d| "\"#{d}\"" }.join(', ') %>
23
+ <% end -%>
24
+ <% end -%>
25
+
17
26
  # Uncomment these if you want to use a visual debugger (e.g. Visual Studio Code) to debug your app
18
27
  #gem 'ruby-debug-ide'
19
28
  #gem 'debase'
@@ -21,11 +21,12 @@ Gem::Specification.new do |spec|
21
21
  # packaged gem, the default should hit everything in most cases but this will
22
22
  # need to be added to if you have any custom directories
23
23
  spec.files = Dir["lib/<%= @name %>.rb", "lib/<%= @name %>/**/*.rb", "templates/**/*", "config/**/*.rb",
24
- "bin/*", "lib/tasks/**/*.rake", "pattern/**/*.rb",
25
- "program/**/*.rb"
24
+ "bin/*", "lib/tasks/**/*.rake", "pattern/**/*.rb", "program/**/*.rb",
25
+ "app/lib/**/*.rb", "app/templates/**/*",
26
+ "app/patterns/**/*.rb", "app/flows/**/*.rb", "app/blocks/**/*.rb"
26
27
  ]
27
28
  spec.executables = []
28
- spec.require_paths = ["lib"]
29
+ spec.require_paths = ["lib", "app/lib"]
29
30
 
30
31
  # Add any gems that your plugin needs to run within a host application
31
32
  spec.add_runtime_dependency "origen", ">= <%= @latest_origen_version %>"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen_app_generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-07 00:00:00.000000000 Z
11
+ date: 2020-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.23.0
19
+ version: 0.40.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.23.0
26
+ version: 0.40.2
27
27
  description:
28
28
  email:
29
29
  - stephen.f.mcginty@gmail.com
@@ -32,7 +32,6 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - bin/boot.rb
35
- - bin/fix_my_workspace
36
35
  - config/application.rb
37
36
  - config/boot.rb
38
37
  - config/commands.rb
@@ -44,19 +43,24 @@ files:
44
43
  - lib/origen_app_generators/empty_application.rb
45
44
  - lib/origen_app_generators/empty_plugin.rb
46
45
  - lib/origen_app_generators/new.rb
46
+ - lib/origen_app_generators/new_app_tests.rb
47
47
  - lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb
48
48
  - lib/origen_app_generators/plugin.rb
49
- - lib/origen_app_generators/sub_block_parser.rb
49
+ - lib/origen_app_generators/test_engineering/common.rb
50
50
  - lib/origen_app_generators/test_engineering/stand_alone_application.rb
51
51
  - lib/origen_app_generators/test_engineering/test_block.rb
52
- - lib/tasks/app_generators.rake
53
- - lib/tasks/new_app_tests.rake
54
52
  - templates/app_generators/application/.gitignore
55
53
  - templates/app_generators/application/.irbrc
56
54
  - templates/app_generators/application/.rspec
57
55
  - templates/app_generators/application/.travis.yml
58
56
  - templates/app_generators/application/Gemfile
59
57
  - templates/app_generators/application/Rakefile
58
+ - templates/app_generators/application/app/blocks/top_level.rb
59
+ - templates/app_generators/application/app/lib/module.rb
60
+ - templates/app_generators/application/app/templates/web/index.md.erb
61
+ - templates/app_generators/application/app/templates/web/layouts/_basic.html.erb
62
+ - templates/app_generators/application/app/templates/web/partials/_navbar.html.erb
63
+ - templates/app_generators/application/app/templates/web/release_notes.md.erb
60
64
  - templates/app_generators/application/config/application.rb
61
65
  - templates/app_generators/application/config/boot.rb
62
66
  - templates/app_generators/application/config/commands.rb
@@ -65,56 +69,30 @@ files:
65
69
  - templates/app_generators/application/config/version.rb
66
70
  - templates/app_generators/application/doc/history
67
71
  - templates/app_generators/application/dot_keep
68
- - templates/app_generators/application/lib/app.rake
69
- - templates/app_generators/application/lib/module.rb
70
- - templates/app_generators/application/lib/top_level.rb
71
72
  - templates/app_generators/application/origen_core_session
72
73
  - templates/app_generators/application/spec/spec_helper.rb
73
74
  - templates/app_generators/application/target/debug.rb
74
75
  - templates/app_generators/application/target/default.rb
75
76
  - templates/app_generators/application/target/production.rb
76
- - templates/app_generators/application/templates/web/index.md.erb
77
- - templates/app_generators/application/templates/web/layouts/_basic.html.erb
78
- - templates/app_generators/application/templates/web/partials/_navbar.html.erb
79
- - templates/app_generators/application/templates/web/release_notes.md.erb
80
77
  - templates/app_generators/new/generator.rb
81
78
  - templates/app_generators/new/info.md.erb
79
+ - templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/application.rb
80
+ - templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/base.rb
81
+ - templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/module.rb
82
+ - templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/plugin.rb
82
83
  - templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb
83
- - templates/app_generators/origen_infrastructure/app_generator_plugin/lib/application.rb
84
- - templates/app_generators/origen_infrastructure/app_generator_plugin/lib/base.rb
85
- - templates/app_generators/origen_infrastructure/app_generator_plugin/lib/module.rb
86
- - templates/app_generators/origen_infrastructure/app_generator_plugin/lib/plugin.rb
87
84
  - templates/app_generators/plugin/Gemfile
88
85
  - templates/app_generators/plugin/Rakefile
86
+ - templates/app_generators/plugin/app/templates/web/index.md.erb
87
+ - templates/app_generators/plugin/app/templates/web/partials/_navbar_external.html.erb
88
+ - templates/app_generators/plugin/app/templates/web/partials/_navbar_internal.html.erb
89
89
  - templates/app_generators/plugin/config/boot.rb
90
90
  - templates/app_generators/plugin/gemspec.rb
91
- - templates/app_generators/plugin/lib/README
92
- - templates/app_generators/plugin/lib_dev/README
93
- - templates/app_generators/plugin/templates/web/index.md.erb
94
- - templates/app_generators/plugin/templates/web/partials/_navbar_external.html.erb
95
- - templates/app_generators/plugin/templates/web/partials/_navbar_internal.html.erb
96
- - templates/app_generators/test_engineering/stand_alone_application/Gemfile
97
- - templates/app_generators/test_engineering/stand_alone_application/environment/j750.rb
98
- - templates/app_generators/test_engineering/stand_alone_application/environment/jlink.rb
99
- - templates/app_generators/test_engineering/stand_alone_application/environment/uflex.rb
100
- - templates/app_generators/test_engineering/stand_alone_application/environment/v93k.rb
101
- - templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
102
- - templates/app_generators/test_engineering/stand_alone_application/lib/ip_block_controller.rb
103
- - templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
104
- - templates/app_generators/test_engineering/stand_alone_application/lib/top_level_controller.rb
105
- - templates/app_generators/test_engineering/stand_alone_application/pattern/example.rb
106
- - templates/app_generators/test_engineering/stand_alone_application/target/top_level.rb
107
- - templates/app_generators/test_engineering/test_block/environment/j750.rb
108
- - templates/app_generators/test_engineering/test_block/environment/ultraflex.rb
109
- - templates/app_generators/test_engineering/test_block/environment/v93k.rb
110
- - templates/app_generators/test_engineering/test_block/lib/controller.rb
111
- - templates/app_generators/test_engineering/test_block/lib/interface.rb
112
- - templates/app_generators/test_engineering/test_block/lib/model.rb
113
- - templates/app_generators/test_engineering/test_block/lib_dev/dut.rb
114
- - templates/app_generators/test_engineering/test_block/lib_dev/dut_controller.rb
115
- - templates/app_generators/test_engineering/test_block/pattern/example.rb
116
- - templates/app_generators/test_engineering/test_block/program/prb1.rb
117
- - templates/app_generators/test_engineering/test_block/target/default.rb
91
+ - templates/app_generators/test_engineering/environment/j750.rb
92
+ - templates/app_generators/test_engineering/environment/uflex.rb
93
+ - templates/app_generators/test_engineering/environment/v93k.rb
94
+ - templates/app_generators/test_engineering/stand_alone_application/.keep
95
+ - templates/app_generators/test_engineering/test_block/.keep
118
96
  homepage: http://origen-sdk.org/origen_app_generators
119
97
  licenses:
120
98
  - MIT
@@ -134,8 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
112
  - !ruby/object:Gem::Version
135
113
  version: 1.8.11
136
114
  requirements: []
137
- rubyforge_project:
138
- rubygems_version: 2.6.13
115
+ rubygems_version: 3.0.3
139
116
  signing_key:
140
117
  specification_version: 4
141
118
  summary: Origen application generators
@@ -1,100 +0,0 @@
1
- #!/usr/bin/env ruby
2
- $VERBOSE = nil # Don't care about world writable dir warnings and the like
3
-
4
- if $_fix_my_workspace_version_check
5
- $_fix_my_workspace_version = '0.7.0'
6
- else
7
- if File.exist?(File.expand_path('../../lib/origen.rb', __FILE__))
8
- # If this script is being run from within an origen-core workspace, use that Origen-core,
9
- # not the system-installed origen-core version.
10
- $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
11
- require 'origen'
12
- else
13
- # Use system-installed Origen (the gem in system Ruby)
14
- require 'origen'
15
- end
16
-
17
- if !Origen.site_config.gem_manage_bundler
18
- puts 'Sorry but you have opted to manage Bundler yourself via your Origen site config, and this means'
19
- puts 'that I cannot make certain assumptions about how your workspace is configured.'
20
- puts 'You will need to either resolve this problem yourself, or else change the value of'
21
- puts 'gem_mange_bundler to true.'
22
- puts 'See here for more details on how to do that: http://origen-sdk.org/origen/guides/starting/company/'
23
-
24
- else
25
- ENV['BUNDLE_GEMFILE'] = File.join(Origen.root, 'Gemfile')
26
- ENV['BUNDLE_PATH'] = File.expand_path(Origen.site_config.gem_install_dir)
27
- ENV['BUNDLE_BIN'] = File.join(Origen.root, 'lbin')
28
-
29
- # Force copy system gems to local gems
30
- if Origen.site_config.gem_use_from_system
31
- local_gem_dir = "#{ENV['BUNDLE_PATH']}/ruby/#{Pathname.new(Gem.dir).basename}"
32
- gem_dir = Pathname.new(Gem.dir)
33
-
34
- Origen.site_config.gem_use_from_system.each do |gem, version|
35
- begin
36
- # This will raise an error if the system doesn't have this gem installed, that
37
- # will be rescued below
38
- spec = Gem::Specification.find_by_name(gem, version)
39
-
40
- local_dir = File.join(local_gem_dir, Pathname.new(spec.gem_dir).relative_path_from(gem_dir))
41
- FileUtils.mkdir_p local_dir
42
- FileUtils.cp_r("#{spec.gem_dir}/.", local_dir)
43
-
44
- local_file = Pathname.new(File.join(local_gem_dir, Pathname.new(spec.cache_file).relative_path_from(gem_dir)))
45
- FileUtils.mkdir_p local_file.dirname
46
- FileUtils.cp(spec.cache_file, local_file)
47
-
48
- if spec.extension_dir && File.exist?(spec.extension_dir)
49
- local_dir = File.join(local_gem_dir, Pathname.new(spec.extension_dir).relative_path_from(gem_dir))
50
- FileUtils.mkdir_p local_dir
51
- FileUtils.cp_r("#{spec.extension_dir}/.", local_dir)
52
- end
53
-
54
- local_file = Pathname.new(File.join(local_gem_dir, Pathname.new(spec.spec_file).relative_path_from(gem_dir)))
55
- FileUtils.mkdir_p local_file.dirname
56
- FileUtils.cp(spec.spec_file, local_file)
57
-
58
- rescue Gem::LoadError
59
- # This just means that one of the gems that should be copied from the system
60
- # was not actually installed in the system, so nothing we can do about that here
61
- end
62
- end
63
- end
64
-
65
- # Delete lbin
66
- FileUtils.rm_rf(ENV['BUNDLE_BIN']) if File.exist?(ENV['BUNDLE_BIN'])
67
-
68
- # Run bundler with correct switches
69
- cmd = "bundle install --gemfile #{ENV['BUNDLE_GEMFILE']} --binstubs #{ENV['BUNDLE_BIN']} --path #{ENV['BUNDLE_PATH']}"
70
- `chmod o-w #{Origen.root}` # Stops some annoying world writable warnings during install
71
- `chmod o-w #{Origen.root}/bin` if File.exist?("#{Origen.root}/bin")
72
- `chmod o-w #{Origen.root}/.bin` if File.exist?("#{Origen.root}/.bin")
73
-
74
- # Try again, this time updating the bundle
75
- if system(cmd)
76
- fixed = true
77
- elsif system 'bundle update'
78
- fixed = true
79
- end
80
-
81
- if File.exist?(ENV['BUNDLE_BIN'])
82
- `chmod o-w #{ENV['BUNDLE_BIN']}`
83
-
84
- # Make .bat versions of all executables, Bundler should really be doing this when running
85
- # on windows
86
- if Origen.os.windows?
87
- Dir.glob("#{ENV['BUNDLE_BIN']}/*").each do |bin|
88
- unless bin =~ /.bat$/
89
- bat = "#{bin}.bat"
90
- unless File.exist?(bat)
91
- File.open(bat, 'w') { |f| f.write('@"ruby.exe" "%~dpn0" %*') }
92
- end
93
- end
94
- end
95
- end
96
- end
97
-
98
- system 'origen -v' if fixed
99
- end
100
- end
@@ -1,81 +0,0 @@
1
- module OrigenAppGenerators
2
- require 'strscan'
3
- # Responsible for parsing something like this:
4
- #
5
- # "ram, osc, pll, atd(2), comms[ram(2), osc](3)"
6
- #
7
- # into this:
8
- #
9
- # {
10
- # "RAM"=>{}, "Osc"=>{}, "PLL"=>{}, "ATD"=> {:instances=>2},
11
- # "Comms"=>{:instances=>3, :children=>{"RAM"=>{:instances=>2}, "Osc"=>{}}}
12
- # }
13
- #
14
- class SubBlockParser
15
- def parse(str)
16
- r = {}
17
- split(str).each do |tag|
18
- tag, i = extract_instances(tag)
19
- name, children = extract_children(tag)
20
- name = camelize(name)
21
- r[name] = {}
22
- r[name][:instances] = i if i
23
- r[name][:children] = children if children
24
- end
25
- r
26
- end
27
-
28
- private
29
-
30
- # Splits the given string by comma, but understands that nested
31
- # commas should not be split on
32
- def split(str)
33
- r = []
34
- str = StringScanner.new(str)
35
- r << next_tag(str) until str.eos?
36
- r
37
- end
38
-
39
- def next_tag(str)
40
- v = str.scan_until(/,|\[|$/)
41
- if v[-1] == ','
42
- v.chop.strip
43
- elsif v[-1] == '['
44
- open = 1
45
- while open > 0
46
- v += str.scan_until(/\[|\]/)
47
- if v[-1] == '['
48
- open += 1
49
- else
50
- open -= 1
51
- end
52
- end
53
- v += next_tag(str)
54
- # End of line
55
- else
56
- v.strip
57
- end
58
- end
59
-
60
- def extract_children(tag)
61
- # http://rubular.com/r/plGILY2e2U
62
- if tag.strip =~ /([^\[]*)\[(.*)\]/
63
- [Regexp.last_match(1), parse(Regexp.last_match(2))]
64
- else
65
- [tag.strip, nil]
66
- end
67
- end
68
-
69
- def extract_instances(tag)
70
- if tag.strip =~ /(.*)\((\d+)\)$/
71
- [Regexp.last_match(1), Regexp.last_match(2).to_i]
72
- else
73
- [tag.strip, nil]
74
- end
75
- end
76
-
77
- def camelize(val)
78
- val.strip.gsub(/\s+/, '_').camelize
79
- end
80
- end
81
- end
@@ -1,6 +0,0 @@
1
- # You can define any Rake tasks to support your application here (or in any file
2
- # ending in .rake in this directory).
3
- #
4
- # Rake (Ruby Make) is very useful for creating build scripts, see this short video
5
- # for a quick introduction:
6
- # http://railscasts.com/episodes/66-custom-rake-tasks
@@ -1,6 +0,0 @@
1
- # You can define any Rake tasks to support your application here (or in any file
2
- # ending in .rake in this directory).
3
- #
4
- # Rake (Ruby Make) is very useful for creating build scripts, see this short video
5
- # for a quick introduction:
6
- # http://railscasts.com/episodes/66-custom-rake-tasks
@@ -1,22 +0,0 @@
1
- require 'origen'
2
- <% if @type == :plugin -%>
3
- require_relative '../config/application.rb'
4
- <% end -%>
5
- module <%= @namespace %>
6
- <% if @type == :plugin -%>
7
- # THIS FILE SHOULD ONLY BE USED TO LOAD RUNTIME DEPENDENCIES
8
- # If this plugin has any development dependencies (e.g. dummy DUT or other models that are only used
9
- # for testing), then these should be loaded from config/boot.rb
10
-
11
- <% end -%>
12
- # Example of how to explicitly require a file
13
- # require "<%= @name %>/my_file"
14
-
15
- # Load all files in the lib/<%= @name %> directory.
16
- # Note that there is no problem from requiring a file twice (Ruby will ignore
17
- # the second require), so if you have a file that must be required first, then
18
- # explicitly require it up above and then let this take care of the rest.
19
- Dir.glob("#{File.dirname(__FILE__)}/<%= @name %>/**/*.rb").sort.each do |file|
20
- require file
21
- end
22
- end