geordi 2.12.3 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +8 -2
  4. data/CHANGELOG.md +8 -0
  5. data/Gemfile +2 -6
  6. data/Gemfile.lock +20 -25
  7. data/README.md +8 -28
  8. data/Rakefile +6 -10
  9. data/{bin → exe}/b +0 -0
  10. data/{bin → exe}/cap-all +0 -0
  11. data/{bin → exe}/console-for +0 -0
  12. data/{bin → exe}/cuc +0 -0
  13. data/{bin → exe}/cuc-show +0 -0
  14. data/{bin → exe}/cuc-vnc-setup +0 -0
  15. data/{bin → exe}/deploy-to-production +0 -0
  16. data/{bin → exe}/dump-for +0 -0
  17. data/{bin → exe}/dumple +0 -0
  18. data/{bin → exe}/geordi +0 -2
  19. data/{bin → exe}/gitpt +0 -0
  20. data/{bin → exe}/launchy_browser +0 -0
  21. data/{bin → exe}/load-dump +0 -0
  22. data/{bin → exe}/migrate-all +0 -0
  23. data/{bin → exe}/rs +0 -0
  24. data/{bin → exe}/run_tests +0 -0
  25. data/{bin → exe}/shell-for +0 -0
  26. data/{bin → exe}/tests +0 -0
  27. data/geordi.gemspec +23 -20
  28. data/lib/geordi/COMMAND_TEMPLATE +2 -3
  29. data/lib/geordi/capistrano_config.rb +7 -7
  30. data/lib/geordi/chromedriver_updater.rb +7 -7
  31. data/lib/geordi/cli.rb +1 -6
  32. data/lib/geordi/commands/_setup_vnc.rb +1 -1
  33. data/lib/geordi/commands/apache_site.rb +3 -3
  34. data/lib/geordi/commands/bundle_install.rb +2 -2
  35. data/lib/geordi/commands/capistrano.rb +2 -3
  36. data/lib/geordi/commands/chromedriver_update.rb +0 -9
  37. data/lib/geordi/commands/clean.rb +2 -4
  38. data/lib/geordi/commands/commit.rb +0 -1
  39. data/lib/geordi/commands/console.rb +2 -2
  40. data/lib/geordi/commands/create_database_yml.rb +2 -2
  41. data/lib/geordi/commands/create_databases.rb +2 -2
  42. data/lib/geordi/commands/cucumber.rb +20 -20
  43. data/lib/geordi/commands/delete_dumps.rb +9 -9
  44. data/lib/geordi/commands/deploy.rb +12 -13
  45. data/lib/geordi/commands/drop_databases.rb +12 -14
  46. data/lib/geordi/commands/dump.rb +5 -6
  47. data/lib/geordi/commands/eurest.rb +2 -2
  48. data/lib/geordi/commands/firefox.rb +3 -3
  49. data/lib/geordi/commands/png_optimize.rb +13 -12
  50. data/lib/geordi/commands/rake.rb +2 -2
  51. data/lib/geordi/commands/remove_executable_flags.rb +1 -1
  52. data/lib/geordi/commands/rspec.rb +6 -6
  53. data/lib/geordi/commands/security_update.rb +12 -12
  54. data/lib/geordi/commands/server.rb +5 -5
  55. data/lib/geordi/commands/setup.rb +5 -5
  56. data/lib/geordi/commands/shell.rb +2 -2
  57. data/lib/geordi/commands/unit.rb +1 -1
  58. data/lib/geordi/commands/update.rb +5 -5
  59. data/lib/geordi/commands/vnc.rb +1 -1
  60. data/lib/geordi/commands/with_rake.rb +1 -1
  61. data/lib/geordi/commands/yarn_install.rb +2 -2
  62. data/lib/geordi/cucumber.rb +28 -29
  63. data/lib/geordi/db_cleaner.rb +28 -28
  64. data/lib/geordi/dump_loader.rb +3 -3
  65. data/lib/geordi/firefox_for_selenium.rb +11 -12
  66. data/lib/geordi/gitpt.rb +13 -13
  67. data/lib/geordi/remote.rb +6 -6
  68. data/lib/geordi/util.rb +18 -24
  69. data/lib/geordi/version.rb +1 -1
  70. metadata +25 -42
  71. data/features/commit.feature +0 -17
  72. data/features/console.feature +0 -7
  73. data/features/cucumber.feature +0 -261
  74. data/features/deploy.feature +0 -66
  75. data/features/docker.feature +0 -86
  76. data/features/dump.feature +0 -34
  77. data/features/firefox.feature +0 -44
  78. data/features/server.feature +0 -31
  79. data/features/setup.feature +0 -11
  80. data/features/shell.feature +0 -78
  81. data/features/step_definitions/docker_command_steps.rb +0 -21
  82. data/features/step_definitions/miscellaneous_steps.rb +0 -11
  83. data/features/support/aruba.rb +0 -60
  84. data/features/support/env.rb +0 -9
  85. data/features/support/step_definitions/aruba_backport_steps.rb +0 -5
  86. data/lib/geordi/commands/docker.rb +0 -42
  87. data/lib/geordi/docker.rb +0 -116
@@ -1,3 +1,3 @@
1
1
  module Geordi
2
- VERSION = '2.12.3'
2
+ VERSION = '3.0.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geordi
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.3
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-11 00:00:00.000000000 Z
11
+ date: 2020-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.18.0
19
+ version: '1'
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.18.0
26
+ version: '1'
27
27
  description: Collection of command line tools we use in our daily work with Ruby,
28
28
  Rails and Linux at makandra.
29
29
  email:
@@ -59,39 +59,24 @@ files:
59
59
  - LICENSE
60
60
  - README.md
61
61
  - Rakefile
62
- - bin/b
63
- - bin/cap-all
64
- - bin/console-for
65
- - bin/cuc
66
- - bin/cuc-show
67
- - bin/cuc-vnc-setup
68
- - bin/deploy-to-production
69
- - bin/dump-for
70
- - bin/dumple
71
- - bin/geordi
72
- - bin/gitpt
73
- - bin/launchy_browser
74
- - bin/load-dump
75
- - bin/migrate-all
76
- - bin/rs
77
- - bin/run_tests
78
- - bin/shell-for
79
- - bin/tests
80
- - features/commit.feature
81
- - features/console.feature
82
- - features/cucumber.feature
83
- - features/deploy.feature
84
- - features/docker.feature
85
- - features/dump.feature
86
- - features/firefox.feature
87
- - features/server.feature
88
- - features/setup.feature
89
- - features/shell.feature
90
- - features/step_definitions/docker_command_steps.rb
91
- - features/step_definitions/miscellaneous_steps.rb
92
- - features/support/aruba.rb
93
- - features/support/env.rb
94
- - features/support/step_definitions/aruba_backport_steps.rb
62
+ - exe/b
63
+ - exe/cap-all
64
+ - exe/console-for
65
+ - exe/cuc
66
+ - exe/cuc-show
67
+ - exe/cuc-vnc-setup
68
+ - exe/deploy-to-production
69
+ - exe/dump-for
70
+ - exe/dumple
71
+ - exe/geordi
72
+ - exe/gitpt
73
+ - exe/launchy_browser
74
+ - exe/load-dump
75
+ - exe/migrate-all
76
+ - exe/rs
77
+ - exe/run_tests
78
+ - exe/shell-for
79
+ - exe/tests
95
80
  - geordi.gemspec
96
81
  - lib/geordi.rb
97
82
  - lib/geordi/COMMAND_TEMPLATE
@@ -111,7 +96,6 @@ files:
111
96
  - lib/geordi/commands/cucumber.rb
112
97
  - lib/geordi/commands/delete_dumps.rb
113
98
  - lib/geordi/commands/deploy.rb
114
- - lib/geordi/commands/docker.rb
115
99
  - lib/geordi/commands/drop_databases.rb
116
100
  - lib/geordi/commands/dump.rb
117
101
  - lib/geordi/commands/eurest.rb
@@ -134,7 +118,6 @@ files:
134
118
  - lib/geordi/commands/yarn_install.rb
135
119
  - lib/geordi/cucumber.rb
136
120
  - lib/geordi/db_cleaner.rb
137
- - lib/geordi/docker.rb
138
121
  - lib/geordi/dump_loader.rb
139
122
  - lib/geordi/firefox_for_selenium.rb
140
123
  - lib/geordi/gitpt.rb
@@ -154,14 +137,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
137
  requirements:
155
138
  - - ">="
156
139
  - !ruby/object:Gem::Version
157
- version: '0'
140
+ version: 2.0.0
158
141
  required_rubygems_version: !ruby/object:Gem::Requirement
159
142
  requirements:
160
143
  - - ">="
161
144
  - !ruby/object:Gem::Version
162
145
  version: '0'
163
146
  requirements: []
164
- rubygems_version: 3.0.3
147
+ rubygems_version: 3.0.8
165
148
  signing_key:
166
149
  specification_version: 4
167
150
  summary: Collection of command line tools we use in our daily work with Ruby, Rails
@@ -1,17 +0,0 @@
1
- @ruby>=1.9
2
- Feature: Creating a git commit from a Pivotal Tracker story
3
-
4
- Scenario: Extra arguments are forwarded to "git commit"
5
- Given I have staged changes
6
-
7
- When I run `geordi commit --extra-option` interactively
8
- # No optional message
9
- And I type ""
10
- Then the output should contain "Util.system! git, commit, --allow-empty, -m, [#12] Test Story, --extra-option"
11
-
12
-
13
- Scenario: With no staged changes, a warning is printed
14
- When I run `geordi commit --allow-empty` interactively
15
- # No optional message
16
- And I type ""
17
- Then the output should contain "> No staged changes. Will create an empty commit."
@@ -1,7 +0,0 @@
1
- Feature: The console command
2
- Most aspects of connection to a server are tested in shell feature.
3
-
4
- Scenario: Opening a local Rails console
5
- When I run `geordi console`
6
- Then the output should contain "# Opening a local Rails console"
7
- And the output should contain "Util.system! bundle exec rails console -e development"
@@ -1,261 +0,0 @@
1
- Feature: The cucumber command
2
-
3
- Background:
4
- Given a file named "config/cucumber.yml" with:
5
- """
6
- default: features
7
- rerun: features
8
- """
9
-
10
-
11
- Scenario: Run a single feature
12
- Given a file named "features/single.feature" with:
13
- """
14
- Feature: Running a single feature
15
- Scenario: A single scenario
16
- """
17
-
18
- When I run `geordi cucumber features/single.feature`
19
- Then the output should contain "# Running features"
20
- And the output should contain "> Only: features/single.feature"
21
- And the output should contain "Features green."
22
- But the output should not contain "parallel"
23
-
24
-
25
- Scenario: Multiple features are run in parallel
26
- Given a file named "features/one.feature" with:
27
- """
28
- Feature: One
29
- Scenario: One
30
- """
31
- And a file named "features/two.feature" with:
32
- """
33
- Feature: Two
34
- Scenario: Two
35
- """
36
-
37
- When I run `geordi cucumber`
38
- Then the output should contain "# Running features"
39
- And the output should contain "> All features in features/"
40
- And the output should contain "> Using parallel_tests"
41
-
42
-
43
- Scenario: Rerunning tests until they pass
44
- Given a file named "features/step_definitions/test_steps.rb" with:
45
- """
46
- Given /^this test fails$/ do
47
- raise
48
- end
49
- """
50
- And a file named "features/failing.feature" with:
51
- """
52
- Feature: Failing feature
53
- Scenario: Failing scenario
54
- And this test fails
55
- """
56
-
57
- When I run `geordi cucumber --rerun=2`
58
- Then the output should contain "# Running features"
59
- And the output should contain "# Rerun #1 of 2"
60
- And the output should contain "# Rerun #2 of 2"
61
- And the output should contain "Rerunning failed scenarios"
62
- And the output should contain "Using the rerun profile"
63
- And the exit status should be 1
64
- And the output should contain "Features failed."
65
-
66
-
67
- Scenario: A rerun should only consider the specified file
68
- Note that we need a cucumber.yml to write the rerun.txt and read the rerun.txt for the reruns.
69
-
70
- Given a file named "features/step_definitions/test_steps.rb" with:
71
- """
72
- Given /^this test fails$/ do
73
- raise
74
- end
75
-
76
- Given /^I use puts with text "(.*)"$/ do |ann|
77
- puts(ann)
78
- end
79
- """
80
- And a file named "features/some.feature" with:
81
- """
82
- Feature: Failing feature
83
- Scenario: Passing scenario
84
- And I use puts with text "Running passing Feature"
85
-
86
- Scenario: Failing scenario
87
- And I use puts with text "Running failing Feature"
88
- And this test fails
89
- """
90
- And an empty file named "tmp/rerun.txt"
91
- And a file named "cucumber.yml" with:
92
- """
93
- <%
94
- rerun_log = 'tmp/rerun.txt'
95
- rerun_failures = File.file?(rerun_log) ? File.read(rerun_log).gsub("\n", ' ') : ''
96
- log_failures = "--format=rerun --out=#{rerun_log}"
97
- %>
98
- default: features <%= log_failures %>
99
- rerun: <%= rerun_failures %> <%= log_failures %>
100
- """
101
-
102
- When I run `geordi cucumber --rerun=1 features/some.feature`
103
- Then the output should contain:
104
- """
105
- # Rerun #1 of 1
106
- > Rerunning failed scenarios
107
- > Run `geordi vnc` to view the Selenium test browsers
108
-
109
- Using the rerun profile...
110
-
111
- Running failing Feature
112
- .F
113
-
114
- (::) failed steps (::)
115
-
116
- (RuntimeError)
117
- features/some.feature:7:in `And this test fails'
118
-
119
- Failing Scenarios:
120
- cucumber -p rerun features/some.feature:5 # Scenario: Failing scenario
121
- """
122
-
123
-
124
- Scenario: Running all features in a given subfolder
125
- Given a file named "features/sub/one.feature" with:
126
- """
127
- Feature: Testfeature
128
- """
129
- And a file named "features/sub/two.feature" with:
130
- """
131
- Feature: Testfeature
132
- """
133
-
134
- When I run `geordi cucumber features/sub`
135
- Then the output should contain "> Only: features/sub/two.feature, features/sub/one.feature"
136
- And the output should contain "> Using parallel_tests"
137
-
138
-
139
- Scenario: Using the @solo tag
140
-
141
- The cucumber command runs all features without the @solo tag. If any of the
142
- specified .feature files contains '@solo', it boots Cucumber a second time
143
- and runs only those of the features tagged with @solo.
144
-
145
- Given a file named "features/no_solo.feature" with:
146
- """
147
- Feature: Test without solo tag
148
- Scenario: This scenario can run in parallel
149
- """
150
- And a file named "features/solo.feature" with:
151
- """
152
- Feature: Solo test
153
- @solo
154
- Scenario: This scenario must NOT run in parallel
155
- """
156
-
157
- When I run `geordi cucumber --verbose features`
158
- Then the output should contain "# Running @solo features"
159
- And the output should match /^> .*cucumber .*--tags @solo/
160
- And the output should contain "# Running features"
161
- And the output should match /^> .*cucumber .*--tags \"~@solo\"/
162
-
163
-
164
- Scenario: When there are no scenarios tagged @solo, the extra run is skipped
165
- Given a file named "features/no_solo/one.feature" with:
166
- """
167
- Feature: Test without solo tag
168
- Scenario: This scenario can run in parallel
169
- """
170
- And a file named "features/no_solo/two.feature" with:
171
- """
172
- Feature: A second test to provoke a parallel run
173
- Scenario: Something
174
- """
175
- And a file named "features/solo.feature" with:
176
- """
177
- Feature: Solo test
178
- @solo
179
- Scenario: This scenario is not even run during this test
180
- """
181
-
182
- When I run `geordi cucumber features/no_solo --verbose`
183
- Then the output should contain "# Running features"
184
- And the output should match /^> .*features .*--tags \"~@solo\"/
185
- But the output should not contain "# Running @solo features"
186
-
187
-
188
- Scenario: When called with line numbers, the @solo extra run is skipped
189
-
190
- Note that with line numbers in the passed file names, features are run
191
- serially.
192
-
193
- Given a file named "features/example.feature" with:
194
- """
195
- Feature: Test without solo tag
196
- Scenario: Example scenario
197
- Scenario: Other scenario
198
- """
199
-
200
- When I run `geordi cucumber --verbose features/example.feature:2`
201
- Then the output should contain "# Running features"
202
- But the output should not contain "# Running @solo features"
203
- # Regression test, with line numbers grep would fail with:
204
- # grep: features/example.feature:2: No such file or directory
205
- And the output should not contain "No such file or directory"
206
-
207
-
208
- Scenario: It does not start the full test run when the @solo run fails
209
- Given a file named "features/step_definitions/test_steps.rb" with:
210
- """
211
- Given 'this test fails' do
212
- raise
213
- end
214
- """
215
- And a file named "features/failing.feature" with:
216
- """
217
- Feature: Failing feature
218
- @solo
219
- Scenario: Failing scenario
220
- And this test fails
221
- Scenario: Other scenario
222
- """
223
-
224
- When I run `geordi cucumber`
225
- Then the output should contain "# Running @solo features"
226
- And the output should contain "Features failed."
227
- But the output should not contain "# Running features"
228
-
229
-
230
- Scenario: Specifying a firefox version to use
231
- Given a file named "features/sub/one.feature" with:
232
- """
233
- Feature: Testfeature
234
- """
235
- And a file named ".firefox-version" with:
236
- """
237
- 24.0
238
- """
239
-
240
- When I run `geordi cucumber --verbose`
241
- Then the output should match /^> PATH=.*24.0:\$PATH.* features/
242
-
243
-
244
- Scenario: Running all cucumber features matching a given string
245
- Given a file named "features/given.feature" with "Feature: given"
246
- And a file named "features/other.feature" with "Feature: other"
247
-
248
- When I run `geordi cucumber --containing given`
249
- Then the output should contain "Only: features/given.feature"
250
- But the output should not contain "other.feature"
251
-
252
-
253
- Scenario: Passing a format argument will skip the default format for a single run
254
- Given a file named "features/single.feature" with:
255
- """
256
- Feature: Running a single feature
257
- Scenario: A single scenario
258
- """
259
-
260
- When I run `geordi cucumber features/single.feature --format=pretty --verbose`
261
- Then the output should contain "b cucumber features/single.feature --format pretty"
@@ -1,66 +0,0 @@
1
- Feature: The deploy command
2
-
3
- Scenario: Deploying from master to staging
4
-
5
- Unfortunately, Aruba cannot run commands truly interactively. We need to
6
- answer prompts blindly, and check the output afterwards.
7
-
8
- When I run `geordi deploy` interactively
9
- # Answer three prompts
10
- And I type "staging"
11
- And I type "master"
12
- And I type ""
13
- # Confirm deployment
14
- And I type "yes"
15
- Then the output should contain:
16
- """
17
- # Checking whether your master branch is ready
18
- Util.system! git checkout master
19
- > All good.
20
-
21
- # You are about to:
22
- > Deploy to staging
23
- Go ahead with the deployment? [n]
24
- """
25
- And the output should contain:
26
- """
27
- > cap staging deploy:migrations
28
- Util.system! cap staging deploy:migrations
29
-
30
- > Deployment complete.
31
- """
32
-
33
-
34
- Scenario: Deploying the current branch
35
-
36
- Deploying the current branch requires support by the deployed application:
37
- its deploy config needs to pick up the DEPLOY_BRANCH environment variable.
38
-
39
- When I run `geordi deploy --current-branch` interactively
40
- # Answer deployment stage prompt
41
- And I type "staging"
42
- Then the output should contain "configure config/deploy/staging.rb"
43
- And the output should contain "ENV['DEPLOY_BRANCH']"
44
-
45
- Given a file named "config/deploy/staging.rb" with:
46
- """
47
- set :branch, ENV['DEPLOY_BRANCH'] || 'master'
48
- """
49
- When I run `geordi deploy --current-branch` interactively
50
- # Answer deployment stage prompt
51
- And I type "staging"
52
- # Confirm deployment
53
- And I type "yes"
54
- # Current branch is always "master" during tests
55
- Then the output should contain "From current branch master"
56
- And the output should contain "DEPLOY_BRANCH=master cap staging deploy:migrations"
57
-
58
-
59
- Scenario: Deploying with a given stage
60
- Given a file named "config/deploy/staging.rb" with "staging.rb exists"
61
-
62
- When I run `geordi deploy staging` interactively
63
- And I type "master"
64
- And I type ""
65
- And I type "no"
66
- Then the output should not contain "Deployment stage: [staging]"