origen 0.44.0 → 0.50.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/application.rb +2 -2
- data/config/boot.rb +0 -7
- data/config/commands.rb +3 -74
- data/config/rubocop/easy_disabled.yml +4 -0
- data/config/rubocop/easy_enabled.yml +0 -4
- data/config/rubocop/strict_disabled.yml +4 -0
- data/config/rubocop/strict_enabled.yml +0 -4
- data/config/version.rb +1 -2
- data/lib/origen/application/deployer.rb +3 -1
- data/lib/origen/application/release.rb +2 -2
- data/lib/origen/application/runner.rb +9 -2
- data/lib/origen/application.rb +91 -2
- data/lib/origen/boot/app.rb +0 -4
- data/lib/origen/boot.rb +2 -1
- data/lib/origen/code_generators/actions.rb +244 -34
- data/lib/origen/code_generators/base.rb +9 -2
- data/lib/origen/code_generators/block.rb +203 -0
- data/lib/origen/code_generators/block_common.rb +100 -0
- data/lib/origen/code_generators/dut.rb +62 -0
- data/lib/origen/code_generators/feature.rb +50 -0
- data/lib/origen/code_generators/klass.rb +41 -0
- data/lib/origen/code_generators/model.rb +60 -0
- data/lib/origen/code_generators/module.rb +92 -0
- data/lib/origen/code_generators.rb +30 -10
- data/lib/origen/commands/lint.rb +6 -1
- data/lib/origen/commands/new.rb +1 -1
- data/lib/origen/commands/new_resource.rb +41 -0
- data/lib/origen/commands/web.rb +11 -6
- data/lib/origen/commands.rb +18 -0
- data/lib/{option_parser → origen/core_ext/option_parser}/optparse.rb +0 -0
- data/lib/origen/dependencies.rb +0 -0
- data/lib/origen/file_handler.rb +8 -4
- data/lib/origen/generator/pattern_finder.rb +3 -3
- data/lib/origen/loader.rb +377 -0
- data/lib/origen/model.rb +22 -1
- data/lib/origen/model_initializer.rb +5 -1
- data/lib/origen/parameters/set.rb +2 -1
- data/lib/origen/parameters.rb +95 -3
- data/lib/origen/sub_blocks.rb +21 -7
- data/lib/origen/top_level.rb +11 -0
- data/lib/origen.rb +3 -1
- data/origen_app_generators/Gemfile +6 -2
- data/origen_app_generators/Gemfile.lock +83 -72
- data/origen_app_generators/bin/boot.rb +4 -2
- data/origen_app_generators/config/commands.rb +3 -3
- data/origen_app_generators/config/shared_commands.rb +11 -6
- data/origen_app_generators/lbin/bundle +105 -0
- data/origen_app_generators/lbin/byebug +29 -0
- data/origen_app_generators/lbin/coderay +29 -0
- data/origen_app_generators/lbin/htmldiff +29 -0
- data/origen_app_generators/lbin/httparty +29 -0
- data/origen_app_generators/lbin/httpclient +29 -0
- data/origen_app_generators/lbin/kramdown +29 -0
- data/origen_app_generators/lbin/ldiff +29 -0
- data/origen_app_generators/lbin/nanoc +29 -0
- data/origen_app_generators/lbin/nokogiri +29 -0
- data/origen_app_generators/lbin/origen +62 -0
- data/origen_app_generators/lbin/pry +29 -0
- data/origen_app_generators/lbin/rackup +29 -0
- data/origen_app_generators/lbin/rake +29 -0
- data/origen_app_generators/lbin/rspec +29 -0
- data/origen_app_generators/lbin/rubocop +29 -0
- data/origen_app_generators/lbin/ruby-parse +29 -0
- data/origen_app_generators/lbin/ruby-rewrite +29 -0
- data/origen_app_generators/lbin/thor +29 -0
- data/origen_app_generators/lbin/tilt +29 -0
- data/origen_app_generators/lbin/yard +29 -0
- data/origen_app_generators/lbin/yardoc +29 -0
- data/origen_app_generators/lbin/yri +29 -0
- data/origen_app_generators/lib/origen_app_generators/application.rb +12 -12
- data/origen_app_generators/lib/origen_app_generators/base.rb +34 -8
- data/origen_app_generators/lib/origen_app_generators/new.rb +17 -9
- data/origen_app_generators/lib/{tasks/new_app_tests.rake → origen_app_generators/new_app_tests.rb} +1 -5
- data/origen_app_generators/lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb +6 -8
- data/origen_app_generators/lib/origen_app_generators/plugin.rb +4 -7
- data/origen_app_generators/lib/origen_app_generators/test_engineering/common.rb +29 -0
- data/origen_app_generators/lib/origen_app_generators/test_engineering/stand_alone_application.rb +9 -181
- data/origen_app_generators/lib/origen_app_generators/test_engineering/test_block.rb +4 -105
- data/origen_app_generators/lib/origen_app_generators.rb +6 -4
- data/origen_app_generators/origen_app_generators.gemspec +7 -7
- data/origen_app_generators/templates/app_generators/application/Gemfile +14 -3
- data/origen_app_generators/templates/app_generators/application/{lib → app/blocks}/top_level.rb +1 -1
- data/origen_app_generators/templates/app_generators/application/app/lib/module.rb +6 -0
- data/origen_app_generators/templates/app_generators/application/{templates → app/templates}/web/index.md.erb +0 -0
- data/origen_app_generators/templates/app_generators/application/{templates → app/templates}/web/layouts/_basic.html.erb +0 -0
- data/origen_app_generators/templates/app_generators/application/{templates → app/templates}/web/partials/_navbar.html.erb +0 -0
- data/origen_app_generators/templates/app_generators/application/{templates → app/templates}/web/release_notes.md.erb +0 -0
- data/origen_app_generators/templates/app_generators/application/config/application.rb +51 -55
- data/origen_app_generators/templates/app_generators/application/{spec → test/spec}/spec_helper.rb +0 -0
- data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/application.rb +0 -0
- data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/base.rb +0 -0
- data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/module.rb +0 -0
- data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/{lib → app/lib}/plugin.rb +0 -0
- data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb +1 -1
- data/origen_app_generators/templates/app_generators/plugin/Gemfile +5 -2
- data/origen_app_generators/templates/app_generators/plugin/{templates → app/templates}/web/index.md.erb +0 -0
- data/origen_app_generators/templates/app_generators/plugin/{templates → app/templates}/web/partials/_navbar_external.html.erb +0 -0
- data/origen_app_generators/templates/app_generators/plugin/{templates → app/templates}/web/partials/_navbar_internal.html.erb +0 -0
- data/origen_app_generators/templates/app_generators/plugin/gemspec.rb +4 -3
- data/origen_app_generators/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/j750.rb +0 -0
- data/origen_app_generators/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/uflex.rb +0 -0
- data/origen_app_generators/templates/app_generators/test_engineering/{stand_alone_application/environment → environment}/v93k.rb +0 -0
- data/origen_site_config.yml +0 -7
- data/templates/code_generators/attributes.rb +20 -0
- data/templates/code_generators/class.rb +9 -0
- data/templates/code_generators/controller.rb +87 -0
- data/templates/code_generators/model.rb +21 -0
- data/templates/code_generators/module.rb +4 -0
- data/templates/code_generators/parameters.rb +19 -0
- data/templates/code_generators/pins.rb +28 -0
- data/templates/code_generators/registers.rb +20 -0
- data/templates/code_generators/sub_blocks.rb +24 -0
- data/templates/code_generators/timesets.rb +24 -0
- data/templates/code_generators/version.rb +0 -1
- metadata +66 -77
- data/lib/c99/ate_interface.rb +0 -77
- data/lib/c99/nvm.rb +0 -110
- data/lib/c99/target/mock2.rb +0 -1
- data/lib/c99/target/subdir/mock3.rb +0 -1
- data/lib/origen/code_generators/bundler.rb +0 -17
- data/lib/origen/code_generators/gem_setup.rb +0 -49
- data/lib/origen/code_generators/rake.rb +0 -13
- data/lib/origen/code_generators/rspec.rb +0 -12
- data/lib/origen/commands/add.rb +0 -12
- data/lib/tasks/private/build.rake +0 -8
- data/origen_app_generators/bin/fix_my_workspace +0 -100
- data/origen_app_generators/lib/origen_app_generators/sub_block_parser.rb +0 -81
- data/origen_app_generators/lib/tasks/app_generators.rake +0 -6
- data/origen_app_generators/spec/sub_block_spec.rb +0 -36
- data/origen_app_generators/templates/app_generators/application/lib/app.rake +0 -6
- data/origen_app_generators/templates/app_generators/application/lib/module.rb +0 -22
- data/origen_app_generators/templates/app_generators/plugin/lib/README +0 -4
- data/origen_app_generators/templates/app_generators/plugin/lib_dev/README +0 -5
- data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/Gemfile +0 -23
- data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/environment/jlink.rb +0 -1
- data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb +0 -23
- data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block_controller.rb +0 -5
- data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb +0 -33
- data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level_controller.rb +0 -21
- data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/pattern/example.rb +0 -4
- data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/target/top_level.rb +0 -4
- data/origen_app_generators/templates/app_generators/test_engineering/test_block/environment/j750.rb +0 -2
- data/origen_app_generators/templates/app_generators/test_engineering/test_block/environment/ultraflex.rb +0 -2
- data/origen_app_generators/templates/app_generators/test_engineering/test_block/environment/v93k.rb +0 -2
- data/origen_app_generators/templates/app_generators/test_engineering/test_block/lib/controller.rb +0 -12
- data/origen_app_generators/templates/app_generators/test_engineering/test_block/lib/interface.rb +0 -21
- data/origen_app_generators/templates/app_generators/test_engineering/test_block/lib/model.rb +0 -18
- data/origen_app_generators/templates/app_generators/test_engineering/test_block/lib_dev/dut.rb +0 -27
- data/origen_app_generators/templates/app_generators/test_engineering/test_block/lib_dev/dut_controller.rb +0 -26
- data/origen_app_generators/templates/app_generators/test_engineering/test_block/pattern/example.rb +0 -5
- data/origen_app_generators/templates/app_generators/test_engineering/test_block/program/prb1.rb +0 -11
- data/origen_app_generators/templates/app_generators/test_engineering/test_block/target/default.rb +0 -2
- data/templates/code_generators/gemfile_app.rb +0 -4
- data/templates/code_generators/gemfile_plugin.rb +0 -6
- data/templates/code_generators/gemspec.rb +0 -33
- data/templates/code_generators/rakefile.rb +0 -10
- data/templates/code_generators/spec_helper.rb +0 -49
@@ -12,5 +12,9 @@ gemspec
|
|
12
12
|
# ON THE GEMS THAT RGEN ITSELF DEPENDS ON.
|
13
13
|
|
14
14
|
gem 'byebug', '< 9.1.0'
|
15
|
-
gem '
|
16
|
-
gem 'origen'
|
15
|
+
#gem 'origen'
|
16
|
+
#gem 'origen', path: "~/Code/github/origen"
|
17
|
+
gem 'origen', git: 'https://github.com/Origen-SDK/origen.git', branch: 'app_dir'
|
18
|
+
|
19
|
+
# Lock this version to enable testing on Ruby 2.2
|
20
|
+
gem 'nokogiri', '1.8.5'
|
@@ -1,32 +1,67 @@
|
|
1
|
+
GIT
|
2
|
+
remote: https://github.com/Origen-SDK/origen.git
|
3
|
+
revision: 8633bbef6606d9b7e80ca7719ddd86c855de9edc
|
4
|
+
branch: app_dir
|
5
|
+
specs:
|
6
|
+
origen (0.43.0)
|
7
|
+
activesupport (~> 4.1)
|
8
|
+
bootsnap (>= 1.3.2)
|
9
|
+
bundler (~> 1.7)
|
10
|
+
coderay (~> 1.1)
|
11
|
+
colored (~> 1.2)
|
12
|
+
colorize (~> 0.8.1)
|
13
|
+
cri (~> 2.10.0)
|
14
|
+
dentaku (~> 2)
|
15
|
+
geminabox (= 0.12.4)
|
16
|
+
gems (~> 0.8)
|
17
|
+
highline (~> 1.7)
|
18
|
+
httparty (~> 0.13)
|
19
|
+
kramdown (~> 1.5)
|
20
|
+
nanoc (~> 3.7.0)
|
21
|
+
net-ldap (~> 0.13)
|
22
|
+
nokogiri (>= 1.7.2)
|
23
|
+
pry (~> 0.10)
|
24
|
+
rake (~> 10)
|
25
|
+
rspec (~> 3)
|
26
|
+
rspec-legacy_formatters (~> 1)
|
27
|
+
rubocop (= 0.30)
|
28
|
+
scrub_rb (~> 1.0)
|
29
|
+
simplecov (~> 0.9)
|
30
|
+
sinatra (~> 1)
|
31
|
+
thor (~> 0.19)
|
32
|
+
yard (~> 0.8)
|
33
|
+
|
1
34
|
PATH
|
2
35
|
remote: .
|
3
36
|
specs:
|
4
37
|
origen_app_generators (1.2.0)
|
5
|
-
origen (>= 0.
|
38
|
+
origen (>= 0.40.2)
|
6
39
|
|
7
40
|
GEM
|
8
41
|
remote: https://rubygems.org/
|
9
42
|
specs:
|
10
|
-
activesupport (4.2.
|
43
|
+
activesupport (4.2.11)
|
11
44
|
i18n (~> 0.7)
|
12
45
|
minitest (~> 5.1)
|
13
46
|
thread_safe (~> 0.3, >= 0.3.4)
|
14
47
|
tzinfo (~> 1.1)
|
15
|
-
ast (2.
|
48
|
+
ast (2.4.0)
|
16
49
|
astrolabe (1.3.1)
|
17
50
|
parser (~> 2.2)
|
51
|
+
bootsnap (1.4.1)
|
52
|
+
msgpack (~> 1.0)
|
18
53
|
builder (3.2.3)
|
19
54
|
byebug (9.0.6)
|
20
55
|
coderay (1.1.2)
|
21
56
|
colored (1.2)
|
22
57
|
colorize (0.8.1)
|
23
|
-
concurrent-ruby (1.
|
58
|
+
concurrent-ruby (1.1.5)
|
24
59
|
cri (2.10.1)
|
25
60
|
colored (~> 1.2)
|
26
61
|
dentaku (2.0.11)
|
27
62
|
diff-lcs (1.3)
|
28
|
-
docile (1.1
|
29
|
-
faraday (0.
|
63
|
+
docile (1.3.1)
|
64
|
+
faraday (0.15.4)
|
30
65
|
multipart-post (>= 1.2, < 3)
|
31
66
|
geminabox (0.12.4)
|
32
67
|
builder
|
@@ -36,90 +71,66 @@ GEM
|
|
36
71
|
sinatra (>= 1.2.7)
|
37
72
|
gems (0.8.3)
|
38
73
|
highline (1.7.10)
|
39
|
-
httparty (0.
|
74
|
+
httparty (0.16.4)
|
75
|
+
mime-types (~> 3.0)
|
40
76
|
multi_xml (>= 0.5.2)
|
41
77
|
httpclient (2.8.3)
|
42
|
-
i18n (0.9.
|
78
|
+
i18n (0.9.5)
|
43
79
|
concurrent-ruby (~> 1.0)
|
44
|
-
json (2.
|
45
|
-
kramdown (1.
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
80
|
+
json (2.2.0)
|
81
|
+
kramdown (1.17.0)
|
82
|
+
method_source (0.9.2)
|
83
|
+
mime-types (3.2.2)
|
84
|
+
mime-types-data (~> 3.2015)
|
85
|
+
mime-types-data (3.2018.0812)
|
86
|
+
mini_portile2 (2.3.0)
|
87
|
+
minitest (5.11.3)
|
88
|
+
msgpack (1.2.8)
|
50
89
|
multi_xml (0.6.0)
|
51
90
|
multipart-post (2.0.0)
|
52
|
-
nanoc (3.
|
91
|
+
nanoc (3.7.5)
|
53
92
|
cri (~> 2.3)
|
54
93
|
nesty (1.0.2)
|
55
94
|
net-ldap (0.16.1)
|
56
|
-
nokogiri (1.
|
57
|
-
mini_portile2 (~> 2.
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
colored (~> 1.2)
|
63
|
-
colorize (~> 0.8.1)
|
64
|
-
dentaku (~> 2)
|
65
|
-
geminabox (= 0.12.4)
|
66
|
-
gems (~> 0.8)
|
67
|
-
highline (~> 1.7)
|
68
|
-
httparty (~> 0.13)
|
69
|
-
kramdown (~> 1.5)
|
70
|
-
log4r (~> 1.1.10, ~> 1.1)
|
71
|
-
nanoc (~> 3.7)
|
72
|
-
net-ldap (~> 0.13)
|
73
|
-
nokogiri (= 1.7.2)
|
74
|
-
pry (~> 0.10)
|
75
|
-
rake (~> 10)
|
76
|
-
rspec (~> 3)
|
77
|
-
rspec-legacy_formatters (~> 1)
|
78
|
-
rubocop (= 0.30)
|
79
|
-
scrub_rb (~> 1.0)
|
80
|
-
simplecov (~> 0.9)
|
81
|
-
sinatra (~> 1)
|
82
|
-
thor (~> 0.19)
|
83
|
-
yard (~> 0.8)
|
84
|
-
origen_updater (0.7.0)
|
85
|
-
origen
|
86
|
-
parser (2.4.0.2)
|
87
|
-
ast (~> 2.3)
|
88
|
-
powerpack (0.1.1)
|
89
|
-
pry (0.11.3)
|
95
|
+
nokogiri (1.8.5)
|
96
|
+
mini_portile2 (~> 2.3.0)
|
97
|
+
parser (2.6.0.0)
|
98
|
+
ast (~> 2.4.0)
|
99
|
+
powerpack (0.1.2)
|
100
|
+
pry (0.12.2)
|
90
101
|
coderay (~> 1.1.0)
|
91
102
|
method_source (~> 0.9.0)
|
92
|
-
rack (1.6.
|
93
|
-
rack-protection (1.5.
|
103
|
+
rack (1.6.11)
|
104
|
+
rack-protection (1.5.5)
|
94
105
|
rack
|
95
106
|
rainbow (2.2.2)
|
96
107
|
rake
|
97
108
|
rake (10.5.0)
|
98
|
-
rspec (3.
|
99
|
-
rspec-core (~> 3.
|
100
|
-
rspec-expectations (~> 3.
|
101
|
-
rspec-mocks (~> 3.
|
102
|
-
rspec-core (3.
|
103
|
-
rspec-support (~> 3.
|
104
|
-
rspec-expectations (3.
|
109
|
+
rspec (3.8.0)
|
110
|
+
rspec-core (~> 3.8.0)
|
111
|
+
rspec-expectations (~> 3.8.0)
|
112
|
+
rspec-mocks (~> 3.8.0)
|
113
|
+
rspec-core (3.8.0)
|
114
|
+
rspec-support (~> 3.8.0)
|
115
|
+
rspec-expectations (3.8.2)
|
105
116
|
diff-lcs (>= 1.2.0, < 2.0)
|
106
|
-
rspec-support (~> 3.
|
117
|
+
rspec-support (~> 3.8.0)
|
107
118
|
rspec-legacy_formatters (1.0.1)
|
108
119
|
rspec (~> 3.0)
|
109
|
-
rspec-mocks (3.
|
120
|
+
rspec-mocks (3.8.0)
|
110
121
|
diff-lcs (>= 1.2.0, < 2.0)
|
111
|
-
rspec-support (~> 3.
|
112
|
-
rspec-support (3.
|
122
|
+
rspec-support (~> 3.8.0)
|
123
|
+
rspec-support (3.8.0)
|
113
124
|
rubocop (0.30.0)
|
114
125
|
astrolabe (~> 1.3)
|
115
126
|
parser (>= 2.2.0.1, < 3.0)
|
116
127
|
powerpack (~> 0.1)
|
117
128
|
rainbow (>= 1.99.1, < 3.0)
|
118
129
|
ruby-progressbar (~> 1.4)
|
119
|
-
ruby-progressbar (1.
|
130
|
+
ruby-progressbar (1.10.0)
|
120
131
|
scrub_rb (1.0.1)
|
121
|
-
simplecov (0.
|
122
|
-
docile (~> 1.1
|
132
|
+
simplecov (0.16.1)
|
133
|
+
docile (~> 1.1)
|
123
134
|
json (>= 1.8, < 3)
|
124
135
|
simplecov-html (~> 0.10.0)
|
125
136
|
simplecov-html (0.10.2)
|
@@ -127,21 +138,21 @@ GEM
|
|
127
138
|
rack (~> 1.5)
|
128
139
|
rack-protection (~> 1.4)
|
129
140
|
tilt (>= 1.3, < 3)
|
130
|
-
thor (0.20.
|
141
|
+
thor (0.20.3)
|
131
142
|
thread_safe (0.3.6)
|
132
|
-
tilt (2.0.
|
133
|
-
tzinfo (1.2.
|
143
|
+
tilt (2.0.9)
|
144
|
+
tzinfo (1.2.5)
|
134
145
|
thread_safe (~> 0.1)
|
135
|
-
yard (0.9.
|
146
|
+
yard (0.9.18)
|
136
147
|
|
137
148
|
PLATFORMS
|
138
149
|
ruby
|
139
150
|
|
140
151
|
DEPENDENCIES
|
141
152
|
byebug (< 9.1.0)
|
142
|
-
|
153
|
+
nokogiri (= 1.8.5)
|
154
|
+
origen!
|
143
155
|
origen_app_generators!
|
144
|
-
origen_updater
|
145
156
|
|
146
157
|
BUNDLED WITH
|
147
|
-
1.
|
158
|
+
1.17.1
|
@@ -30,8 +30,10 @@ begin
|
|
30
30
|
OrigenAppGenerators.unload_generators unless ARGV[0]
|
31
31
|
require load_generators if File.exist?(load_generators)
|
32
32
|
|
33
|
-
OrigenAppGenerators.invoke('
|
33
|
+
OrigenAppGenerators.invoke('my_app')
|
34
34
|
end
|
35
35
|
ensure
|
36
|
-
FileUtils.mv "#{tmp_dir}/
|
36
|
+
FileUtils.mv "#{tmp_dir}/my_app", 'output' if File.exist?("#{tmp_dir}/my_app")
|
37
|
+
puts
|
38
|
+
puts "Ignore the above, your new app is in: output/my_app"
|
37
39
|
end
|
@@ -56,8 +56,8 @@ when "specs"
|
|
56
56
|
## origen -h, you can do this be assigning the required text to @application_commands
|
57
57
|
## before handing control back to Origen. Un-comment the example below to get started.
|
58
58
|
else
|
59
|
-
@application_commands = <<-EOT
|
60
|
-
specs Run the specs (tests), -c will enable coverage
|
61
|
-
EOT
|
59
|
+
# @application_commands = <<-EOT
|
60
|
+
# specs Run the specs (tests), -c will enable coverage
|
61
|
+
# EOT
|
62
62
|
|
63
63
|
end
|
@@ -7,9 +7,11 @@ when "app_gen:test"
|
|
7
7
|
opt_parser = OptionParser.new do |opts|
|
8
8
|
opts.banner = <<-END
|
9
9
|
Test the generators by emulating the 'origen new' command execution and building the new
|
10
|
-
application into the
|
10
|
+
application into the output/my_app directory.
|
11
11
|
|
12
12
|
Usage: origen app_gen:test [options]
|
13
|
+
origen app_gen:test --regression # Test all generators
|
14
|
+
origen app_gen:test --inputs 0 # Test with user inputs set 0
|
13
15
|
END
|
14
16
|
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
15
17
|
opts.on('-i', '--inputs INDEX', Integer, "Apply the set of test inputs defined in #{Origen.app.namespace}::TEST_INPUTS[INDEX]") { |f| options[:inputs] = f }
|
@@ -21,7 +23,9 @@ END
|
|
21
23
|
|
22
24
|
opt_parser.orig_parse! ARGV
|
23
25
|
|
24
|
-
|
26
|
+
output_dir = File.join(Origen.root, 'output')
|
27
|
+
FileUtils.rm_rf output_dir if File.exist?(output_dir)
|
28
|
+
FileUtils.mkdir_p output_dir
|
25
29
|
|
26
30
|
if options[:inputs] || options[:regression]
|
27
31
|
if options[:regression]
|
@@ -45,12 +49,12 @@ END
|
|
45
49
|
# For some reason this command doesn't work in Travis CI, don't know why and
|
46
50
|
# couldn't work out how to fix (looks like a Bundler-related issue)
|
47
51
|
cmds << 'origen lint --no-correct' unless ENV['TRAVIS']
|
48
|
-
cmds << 'bundle exec
|
52
|
+
cmds << 'bundle exec origen exec tmp/new_app_tests.rb'
|
49
53
|
cmds << 'origen web compile --no-serve'
|
50
54
|
cmds
|
51
55
|
elsif op.to_s == 'load_target'
|
52
56
|
target_load_test_required = true
|
53
|
-
'
|
57
|
+
'origen exec tmp/new_app_tests.rb'
|
54
58
|
else
|
55
59
|
op
|
56
60
|
end
|
@@ -69,12 +73,13 @@ END
|
|
69
73
|
# The app is successfully built, now see if it works...
|
70
74
|
unless post_build_operations.empty?
|
71
75
|
if target_load_test_required
|
72
|
-
FileUtils.
|
76
|
+
FileUtils.mkdir_p('output/my_app/tmp')
|
77
|
+
FileUtils.cp "#{Origen.root!}/lib/origen_app_generators/new_app_tests.rb", 'output/my_app/tmp'
|
73
78
|
end
|
74
79
|
|
75
80
|
operation_failed = false
|
76
81
|
Bundler.with_clean_env do
|
77
|
-
Dir.chdir "#{Origen.root}/
|
82
|
+
Dir.chdir "#{Origen.root}/output/my_app" do
|
78
83
|
post_build_operations.each_with_index do |op, i|
|
79
84
|
if i == 0 && !Origen.site_config.gem_manage_bundler
|
80
85
|
system('bundle')
|
@@ -0,0 +1,105 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'bundle' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "rubygems"
|
12
|
+
|
13
|
+
m = Module.new do
|
14
|
+
module_function
|
15
|
+
|
16
|
+
def invoked_as_script?
|
17
|
+
File.expand_path($0) == File.expand_path(__FILE__)
|
18
|
+
end
|
19
|
+
|
20
|
+
def env_var_version
|
21
|
+
ENV["BUNDLER_VERSION"]
|
22
|
+
end
|
23
|
+
|
24
|
+
def cli_arg_version
|
25
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
26
|
+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
27
|
+
bundler_version = nil
|
28
|
+
update_index = nil
|
29
|
+
ARGV.each_with_index do |a, i|
|
30
|
+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
31
|
+
bundler_version = a
|
32
|
+
end
|
33
|
+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
34
|
+
bundler_version = $1 || ">= 0.a"
|
35
|
+
update_index = i
|
36
|
+
end
|
37
|
+
bundler_version
|
38
|
+
end
|
39
|
+
|
40
|
+
def gemfile
|
41
|
+
gemfile = ENV["BUNDLE_GEMFILE"]
|
42
|
+
return gemfile if gemfile && !gemfile.empty?
|
43
|
+
|
44
|
+
File.expand_path("../../Gemfile", __FILE__)
|
45
|
+
end
|
46
|
+
|
47
|
+
def lockfile
|
48
|
+
lockfile =
|
49
|
+
case File.basename(gemfile)
|
50
|
+
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
|
51
|
+
else "#{gemfile}.lock"
|
52
|
+
end
|
53
|
+
File.expand_path(lockfile)
|
54
|
+
end
|
55
|
+
|
56
|
+
def lockfile_version
|
57
|
+
return unless File.file?(lockfile)
|
58
|
+
lockfile_contents = File.read(lockfile)
|
59
|
+
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
60
|
+
Regexp.last_match(1)
|
61
|
+
end
|
62
|
+
|
63
|
+
def bundler_version
|
64
|
+
@bundler_version ||= begin
|
65
|
+
env_var_version || cli_arg_version ||
|
66
|
+
lockfile_version || "#{Gem::Requirement.default}.a"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def load_bundler!
|
71
|
+
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
72
|
+
|
73
|
+
# must dup string for RG < 1.8 compatibility
|
74
|
+
activate_bundler(bundler_version.dup)
|
75
|
+
end
|
76
|
+
|
77
|
+
def activate_bundler(bundler_version)
|
78
|
+
if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
|
79
|
+
bundler_version = "< 2"
|
80
|
+
end
|
81
|
+
gem_error = activation_error_handling do
|
82
|
+
gem "bundler", bundler_version
|
83
|
+
end
|
84
|
+
return if gem_error.nil?
|
85
|
+
require_error = activation_error_handling do
|
86
|
+
require "bundler/version"
|
87
|
+
end
|
88
|
+
return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
89
|
+
warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
|
90
|
+
exit 42
|
91
|
+
end
|
92
|
+
|
93
|
+
def activation_error_handling
|
94
|
+
yield
|
95
|
+
nil
|
96
|
+
rescue StandardError, LoadError => e
|
97
|
+
e
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
m.load_bundler!
|
102
|
+
|
103
|
+
if m.invoked_as_script?
|
104
|
+
load Gem.bin_path("bundler", "bundle")
|
105
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'byebug' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("byebug", "byebug")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'coderay' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("coderay", "coderay")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'htmldiff' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("diff-lcs", "htmldiff")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'httparty' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("httparty", "httparty")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'httpclient' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("httpclient", "httpclient")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'kramdown' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("kramdown", "kramdown")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'ldiff' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("diff-lcs", "ldiff")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'nanoc' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("nanoc", "nanoc")
|