geordi 2.11.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +8 -2
- data/CHANGELOG.md +40 -0
- data/Gemfile +2 -5
- data/Gemfile.lock +50 -3
- data/README.md +34 -7
- data/Rakefile +6 -10
- data/{bin → exe}/b +0 -0
- data/{bin → exe}/cap-all +0 -0
- data/{bin → exe}/console-for +0 -0
- data/{bin → exe}/cuc +0 -0
- data/{bin → exe}/cuc-show +0 -0
- data/{bin → exe}/cuc-vnc-setup +0 -0
- data/{bin → exe}/deploy-to-production +0 -0
- data/{bin → exe}/dump-for +0 -0
- data/{bin → exe}/dumple +0 -0
- data/{bin → exe}/geordi +0 -0
- data/{bin → exe}/gitpt +0 -0
- data/{bin → exe}/launchy_browser +0 -0
- data/{bin → exe}/load-dump +0 -0
- data/{bin → exe}/migrate-all +0 -0
- data/{bin → exe}/rs +0 -0
- data/{bin → exe}/run_tests +0 -0
- data/{bin → exe}/shell-for +0 -0
- data/{bin → exe}/tests +0 -0
- data/geordi.gemspec +23 -20
- data/lib/geordi/COMMAND_TEMPLATE +4 -6
- data/lib/geordi/capistrano_config.rb +7 -7
- data/lib/geordi/chromedriver_updater.rb +9 -10
- data/lib/geordi/cli.rb +1 -7
- data/lib/geordi/commands/_setup_vnc.rb +23 -23
- data/lib/geordi/commands/apache_site.rb +3 -3
- data/lib/geordi/commands/bundle_install.rb +3 -3
- data/lib/geordi/commands/capistrano.rb +5 -6
- data/lib/geordi/commands/chromedriver_update.rb +0 -9
- data/lib/geordi/commands/clean.rb +5 -6
- data/lib/geordi/commands/commit.rb +0 -1
- data/lib/geordi/commands/console.rb +4 -4
- data/lib/geordi/commands/create_database_yml.rb +4 -4
- data/lib/geordi/commands/create_databases.rb +3 -3
- data/lib/geordi/commands/cucumber.rb +25 -25
- data/lib/geordi/commands/delete_dumps.rb +12 -12
- data/lib/geordi/commands/deploy.rb +27 -28
- data/lib/geordi/commands/drop_databases.rb +13 -15
- data/lib/geordi/commands/dump.rb +12 -13
- data/lib/geordi/commands/eurest.rb +2 -2
- data/lib/geordi/commands/firefox.rb +4 -4
- data/lib/geordi/commands/migrate.rb +3 -3
- data/lib/geordi/commands/png_optimize.rb +15 -14
- data/lib/geordi/commands/rake.rb +3 -3
- data/lib/geordi/commands/remove_executable_flags.rb +3 -3
- data/lib/geordi/commands/rspec.rb +11 -11
- data/lib/geordi/commands/security_update.rb +84 -27
- data/lib/geordi/commands/server.rb +6 -6
- data/lib/geordi/commands/setup.rb +8 -8
- data/lib/geordi/commands/shell.rb +3 -3
- data/lib/geordi/commands/tests.rb +1 -1
- data/lib/geordi/commands/unit.rb +3 -3
- data/lib/geordi/commands/update.rb +7 -7
- data/lib/geordi/commands/vnc.rb +1 -1
- data/lib/geordi/commands/with_rake.rb +3 -3
- data/lib/geordi/commands/yarn_install.rb +3 -3
- data/lib/geordi/cucumber.rb +35 -36
- data/lib/geordi/db_cleaner.rb +40 -41
- data/lib/geordi/dump_loader.rb +6 -5
- data/lib/geordi/firefox_for_selenium.rb +26 -29
- data/lib/geordi/gitpt.rb +14 -15
- data/lib/geordi/interaction.rb +2 -6
- data/lib/geordi/remote.rb +9 -10
- data/lib/geordi/util.rb +26 -27
- data/lib/geordi/version.rb +1 -1
- metadata +25 -37
- data/features/commit.feature +0 -17
- data/features/console.feature +0 -7
- data/features/cucumber.feature +0 -261
- data/features/deploy.feature +0 -66
- data/features/dump.feature +0 -34
- data/features/firefox.feature +0 -44
- data/features/server.feature +0 -31
- data/features/setup.feature +0 -11
- data/features/shell.feature +0 -78
- data/features/support/env.rb +0 -8
- data/features/support/step_definitions/aruba_backport_steps.rb +0 -5
- data/features/support/step_definitions/miscellaneous_steps.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f2ea989e784592d99136278e2e7aeca1329d56460590dd0de0c713839d007f4
|
4
|
+
data.tar.gz: c3c001d594fa572a4c562cb91c8796ca1f1170fbfb0168be4f5ec2efaac87556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c516cd2e6716be0c8e487b5aea0ff741e8d4f99660ee1f9bc2c2277abe275f5b07a31ecd79392cb94c3b804c6357391077d27acd36d8511a1b9dd510baa88e49
|
7
|
+
data.tar.gz: be170bc924f84b7ea056a394348cef9aa24b4b89c2696ef4a400713ca03dad509e446c048217a5626390a459eafaaa52b63212d5990f6898b644acc120fb28c3
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.0.0
|
data/.travis.yml
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
3
|
rvm:
|
4
|
-
- '
|
5
|
-
- '2.
|
4
|
+
- '2.0.0'
|
5
|
+
- '2.1.10'
|
6
|
+
- '2.2.10'
|
7
|
+
- '2.3.8'
|
8
|
+
- '2.4.10'
|
9
|
+
- '2.5.8'
|
10
|
+
- '2.6.6'
|
6
11
|
|
7
12
|
gemfile:
|
8
13
|
- 'Gemfile'
|
@@ -10,6 +15,7 @@ gemfile:
|
|
10
15
|
dist: trusty
|
11
16
|
|
12
17
|
install:
|
18
|
+
- gem install bundler:1.17.3
|
13
19
|
# Replace default Travis CI bundler script with a version that doesn't
|
14
20
|
# explode when lockfile doesn't match recently bumped version
|
15
21
|
- bundle install --no-deployment --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
data/CHANGELOG.md
CHANGED
@@ -11,6 +11,46 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
11
11
|
### Breaking changes
|
12
12
|
|
13
13
|
|
14
|
+
## 3.1.0 2020-06-03
|
15
|
+
|
16
|
+
### Compatible changes
|
17
|
+
|
18
|
+
- Update security-update for improved workflow (#89): Deploy staging first and ask user, if application is still running. Then deploy other stages.
|
19
|
+
|
20
|
+
### Breaking changes
|
21
|
+
|
22
|
+
|
23
|
+
## 3.0.3 2020-05-27
|
24
|
+
|
25
|
+
### Compatible changes
|
26
|
+
|
27
|
+
- Fix #98: Changing the `config/database.yml` reader from `YAML.load` to `YAML.safe_load` dropped the support for aliases. We now allow aliases and the classes `Time` and `Symbol`. If we encounter further issues with this approach a revert to `YAML.load` would be an option, too.
|
28
|
+
|
29
|
+
|
30
|
+
## 3.0.2 2020-05-18
|
31
|
+
|
32
|
+
### Compatible changes
|
33
|
+
|
34
|
+
- Fix #95: Method change from `! *.include?` to `*.exclude?` was not valid as we do not have active support in Geordi. Affected commands where `geordi cucumber` and `geordi deploy`.
|
35
|
+
|
36
|
+
### Breaking changes
|
37
|
+
|
38
|
+
|
39
|
+
## 3.0.1 2020-05-13
|
40
|
+
|
41
|
+
### Compatible changes
|
42
|
+
- Fix #93: Using `$CHILDSTATUS` instead of `$?` did not work properly. This affected commands like `geordi drop-databases` to fail.
|
43
|
+
- Fix #92: Geordi fail messages were converted to exceptions by accident. Now they are printed as red error message without the backtrace again.
|
44
|
+
|
45
|
+
|
46
|
+
## 3.0.0 2020-05-04
|
47
|
+
|
48
|
+
### Compatible changes
|
49
|
+
|
50
|
+
### Breaking changes
|
51
|
+
- Remove support for Ruby 1.8.7 and Ruby 1.9.3. Bug fixes might still be backported to 2.x, but we will not add any features to 2.x anymore. Please consider to upgrade the Ruby version of your project.
|
52
|
+
|
53
|
+
|
14
54
|
## 2.11.0 2020-05-04
|
15
55
|
|
16
56
|
### Compatible changes
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
geordi (
|
5
|
-
thor (~>
|
4
|
+
geordi (3.1.0)
|
5
|
+
thor (~> 1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
@@ -12,27 +12,55 @@ GEM
|
|
12
12
|
childprocess (>= 0.3.6)
|
13
13
|
cucumber (>= 1.1.1)
|
14
14
|
rspec-expectations (>= 2.7.0)
|
15
|
+
axiom-types (0.1.1)
|
16
|
+
descendants_tracker (~> 0.0.4)
|
17
|
+
ice_nine (~> 0.11.0)
|
18
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
15
19
|
builder (3.2.3)
|
16
20
|
childprocess (1.0.1)
|
17
21
|
rake (< 13.0)
|
22
|
+
coderay (1.1.2)
|
23
|
+
coercible (1.0.0)
|
24
|
+
descendants_tracker (~> 0.0.1)
|
18
25
|
cucumber (1.3.20)
|
19
26
|
builder (>= 2.1.2)
|
20
27
|
diff-lcs (>= 1.1.3)
|
21
28
|
gherkin (~> 2.12)
|
22
29
|
multi_json (>= 1.7.5, < 2.0)
|
23
30
|
multi_test (>= 0.1.2)
|
31
|
+
declarative (0.0.10)
|
32
|
+
declarative-option (0.1.0)
|
33
|
+
descendants_tracker (0.0.4)
|
34
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
24
35
|
diff-lcs (1.2.5)
|
36
|
+
equalizer (0.0.11)
|
37
|
+
excon (0.73.0)
|
38
|
+
faraday (0.17.3)
|
39
|
+
multipart-post (>= 1.2, < 3)
|
40
|
+
faraday_middleware (0.14.0)
|
41
|
+
faraday (>= 0.7.4, < 1.0)
|
25
42
|
gherkin (2.12.2)
|
26
43
|
multi_json (~> 1.3)
|
27
44
|
highline (1.6.21)
|
45
|
+
ice_nine (0.11.2)
|
28
46
|
launchy (2.4.3)
|
29
47
|
addressable (~> 2.3)
|
48
|
+
method_source (1.0.0)
|
49
|
+
mimemagic (0.3.4)
|
30
50
|
multi_json (1.13.1)
|
31
51
|
multi_test (0.1.2)
|
52
|
+
multipart-post (2.1.1)
|
32
53
|
parallel (0.5.16)
|
33
54
|
parallel_tests (0.6.18)
|
34
55
|
parallel
|
56
|
+
pry (0.13.1)
|
57
|
+
coderay (~> 1.1)
|
58
|
+
method_source (~> 1.0)
|
35
59
|
rake (10.5.0)
|
60
|
+
representable (3.0.4)
|
61
|
+
declarative (< 0.1.0)
|
62
|
+
declarative-option (< 0.2.0)
|
63
|
+
uber (< 0.2.0)
|
36
64
|
rspec-expectations (3.4.0)
|
37
65
|
diff-lcs (>= 1.2.0, < 2.0)
|
38
66
|
rspec-support (~> 3.4.0)
|
@@ -40,7 +68,24 @@ GEM
|
|
40
68
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
69
|
rspec-support (~> 3.4.0)
|
42
70
|
rspec-support (3.4.1)
|
43
|
-
thor (0.
|
71
|
+
thor (1.0.1)
|
72
|
+
thread_safe (0.3.6)
|
73
|
+
tracker_api (1.10.0)
|
74
|
+
addressable
|
75
|
+
equalizer
|
76
|
+
excon
|
77
|
+
faraday
|
78
|
+
faraday_middleware
|
79
|
+
mimemagic
|
80
|
+
multi_json
|
81
|
+
representable
|
82
|
+
virtus
|
83
|
+
uber (0.1.0)
|
84
|
+
virtus (1.0.5)
|
85
|
+
axiom-types (~> 0.1)
|
86
|
+
coercible (~> 1.0)
|
87
|
+
descendants_tracker (~> 0.0, >= 0.0.3)
|
88
|
+
equalizer (~> 0.0, >= 0.0.9)
|
44
89
|
|
45
90
|
PLATFORMS
|
46
91
|
ruby
|
@@ -51,7 +96,9 @@ DEPENDENCIES
|
|
51
96
|
highline
|
52
97
|
launchy
|
53
98
|
parallel_tests
|
99
|
+
pry
|
54
100
|
rspec-mocks
|
101
|
+
tracker_api
|
55
102
|
|
56
103
|
BUNDLED WITH
|
57
104
|
1.17.3
|
data/README.md
CHANGED
@@ -54,6 +54,11 @@ Commit using a story title from Pivotal Tracker.
|
|
54
54
|
|
55
55
|
Example: `geordi commit`
|
56
56
|
|
57
|
+
Any extra arguments are forwarded to `git commit -m <message>`.
|
58
|
+
|
59
|
+
If there are no staged changes, prints a warning but will continue to create
|
60
|
+
an empty commit.
|
61
|
+
|
57
62
|
On the first execution we ask for your Pivotal Tracker API token. It will be
|
58
63
|
stored in `~/.gitpt`.
|
59
64
|
|
@@ -255,10 +260,30 @@ Support for performing security updates.
|
|
255
260
|
|
256
261
|
Preparation for security update: `geordi security-update`
|
257
262
|
|
263
|
+
Checks out production and pulls.
|
264
|
+
|
258
265
|
After performing the update: `geordi security-update finish`
|
259
266
|
|
260
267
|
Switches branches, pulls, pushes and deploys as required by our workflow. Tells
|
261
|
-
what it will do before it does it.
|
268
|
+
what it will do before it does it. In detail:
|
269
|
+
|
270
|
+
1. Asks user, if tests are green
|
271
|
+
|
272
|
+
2. Pushes production
|
273
|
+
|
274
|
+
3. Checks out master and pulls
|
275
|
+
|
276
|
+
4. Merges production and pushes in master
|
277
|
+
|
278
|
+
5. Deploys staging first, if there is a staging environment
|
279
|
+
|
280
|
+
6. Asks user, if deployment log is okay and application is still running on staging
|
281
|
+
|
282
|
+
7. Deploys other stages
|
283
|
+
|
284
|
+
8. Asks user, if deployment log is okay and application is still running on all other stages
|
285
|
+
|
286
|
+
9. Informs user about the next steps
|
262
287
|
|
263
288
|
|
264
289
|
### `geordi server [PORT]`
|
@@ -378,6 +403,14 @@ browser, as opposed to opening it within the VNC window.
|
|
378
403
|
Contributing
|
379
404
|
============
|
380
405
|
|
406
|
+
* Run the tests for the oldest supported ruby version with `bundle exec rake`. Ensure that all other ruby versions in the `travis.yml` pass as well after pushing your feature branch and triggering the travis build.
|
407
|
+
* Update this `README`. The whole `geordi` section is auto-generated
|
408
|
+
by `rake readme`.
|
409
|
+
* Document your changes in the `CHANGELOG.md` file.
|
410
|
+
|
411
|
+
Adding a new command
|
412
|
+
---------------
|
413
|
+
|
381
414
|
Copy `lib/geordi/COMMAND_TEMPLATE` to `lib/geordi/commands/your_command` and
|
382
415
|
edit it to do what you need it to do. Usually, it is hard to automatedly test
|
383
416
|
Geordi commands, so make sure you've manually tested it. You can do so by
|
@@ -388,9 +421,3 @@ calling your local geordi like so (adjust paths to your needs):
|
|
388
421
|
|
389
422
|
# with debugger
|
390
423
|
ruby -r byebug -I ../geordi/lib ../geordi/bin/geordi <command>
|
391
|
-
|
392
|
-
Don't forget to update this README. The whole `geordi` section is auto-generated
|
393
|
-
by `rake readme`. Also remember to add your changes to the CHANGELOG.
|
394
|
-
|
395
|
-
Geordi is (partially) tested with Cucumber and Aruba. Run `bundle exec rake` to test the gem against you current Ruby
|
396
|
-
version. The `travis.yml` contains all Ruby versions the gem is and needs to be tested with.
|
data/Rakefile
CHANGED
@@ -2,18 +2,14 @@ require 'bundler'
|
|
2
2
|
Bundler::GemHelper.install_tasks
|
3
3
|
|
4
4
|
desc 'Default: Run all tests'
|
5
|
-
task :
|
5
|
+
task default: :features
|
6
6
|
|
7
7
|
task :features do
|
8
|
-
|
9
|
-
system 'bundle exec cucumber'
|
10
|
-
else
|
11
|
-
system 'bundle exec cucumber --tags "~@ruby>=1.9"'
|
12
|
-
end
|
8
|
+
system 'bundle exec cucumber'
|
13
9
|
end
|
14
10
|
|
15
11
|
task :readme do
|
16
|
-
require File.expand_path('
|
12
|
+
require File.expand_path('lib/geordi/cli', __dir__)
|
17
13
|
|
18
14
|
readme = File.read('README.md')
|
19
15
|
geordi_section_regex = /
|
@@ -43,9 +39,9 @@ For details on commands, e.g. supported options, you may always run
|
|
43
39
|
|
44
40
|
Geordi::CLI.all_commands.sort.each do |_, command|
|
45
41
|
unless command.hidden?
|
46
|
-
geordi_section << "### `geordi #{
|
47
|
-
geordi_section << "#{
|
48
|
-
geordi_section << "#{
|
42
|
+
geordi_section << "### `geordi #{command.usage}`\n\n"
|
43
|
+
geordi_section << "#{command.description.sub /(\.)?$/, '.'}\n\n"
|
44
|
+
geordi_section << "#{command.long_description.strip}\n\n" if command.long_description
|
49
45
|
geordi_section << "\n"
|
50
46
|
end
|
51
47
|
end
|
data/{bin → exe}/b
RENAMED
File without changes
|
data/{bin → exe}/cap-all
RENAMED
File without changes
|
data/{bin → exe}/console-for
RENAMED
File without changes
|
data/{bin → exe}/cuc
RENAMED
File without changes
|
data/{bin → exe}/cuc-show
RENAMED
File without changes
|
data/{bin → exe}/cuc-vnc-setup
RENAMED
File without changes
|
File without changes
|
data/{bin → exe}/dump-for
RENAMED
File without changes
|
data/{bin → exe}/dumple
RENAMED
File without changes
|
data/{bin → exe}/geordi
RENAMED
File without changes
|
data/{bin → exe}/gitpt
RENAMED
File without changes
|
data/{bin → exe}/launchy_browser
RENAMED
File without changes
|
data/{bin → exe}/load-dump
RENAMED
File without changes
|
data/{bin → exe}/migrate-all
RENAMED
File without changes
|
data/{bin → exe}/rs
RENAMED
File without changes
|
data/{bin → exe}/run_tests
RENAMED
File without changes
|
data/{bin → exe}/shell-for
RENAMED
File without changes
|
data/{bin → exe}/tests
RENAMED
File without changes
|
data/geordi.gemspec
CHANGED
@@ -1,28 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'geordi/version'
|
4
4
|
|
5
|
-
Gem::Specification.new do |
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
s.homepage = "http://makandra.com"
|
12
|
-
s.summary = 'Collection of command line tools we use in our daily work with Ruby, Rails and Linux at makandra.'
|
13
|
-
s.description = 'Collection of command line tools we use in our daily work with Ruby, Rails and Linux at makandra.'
|
14
|
-
s.license = 'MIT'
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'geordi'
|
7
|
+
spec.version = Geordi::VERSION
|
8
|
+
spec.required_ruby_version = '>= 2.0.0'
|
9
|
+
spec.authors = ['Henning Koch']
|
10
|
+
spec.email = ['henning.koch@makandra.de']
|
15
11
|
|
16
|
-
|
12
|
+
spec.summary = 'Collection of command line tools we use in our daily work with Ruby, Rails and Linux at makandra.'
|
13
|
+
spec.description = 'Collection of command line tools we use in our daily work with Ruby, Rails and Linux at makandra.'
|
14
|
+
spec.homepage = 'http://makandra.com'
|
15
|
+
spec.license = 'MIT'
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = 'exe'
|
23
|
+
spec.executables = spec.files.grep(%r(^exe/)) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ['lib']
|
22
25
|
|
23
|
-
|
26
|
+
spec.add_runtime_dependency 'thor', '~> 1'
|
24
27
|
|
25
|
-
|
28
|
+
spec.post_install_message = <<-ATTENTION
|
26
29
|
* Binary `geordi` installed
|
27
30
|
ATTENTION
|
28
31
|
end
|
data/lib/geordi/COMMAND_TEMPLATE
CHANGED
@@ -15,17 +15,15 @@ by `rake update_readme`. Thus, please format descriptions in a way that's reader
|
|
15
15
|
friendly both in Markdown and the console.
|
16
16
|
LONGDESC
|
17
17
|
|
18
|
-
option :opt, :
|
19
|
-
:desc => 'If set, VALUE_NAME will be used for something'
|
18
|
+
option :opt, type: :boolean, aliases: '-o', banner: 'VALUE_NAME', desc: 'If set, VALUE_NAME will be used for something'
|
20
19
|
|
21
20
|
def example
|
22
21
|
# Invoke other commands like this:
|
23
|
-
invoke_cmd 'other_command', 'argument', :
|
22
|
+
invoke_cmd 'other_command', 'argument', an: 'option'
|
24
23
|
|
25
|
-
fail 'Option missing' unless options.opt?
|
24
|
+
Interaction.fail 'Option missing' unless options.opt?
|
26
25
|
|
27
|
-
|
28
|
-
success 'Done.'
|
26
|
+
Interaction.success 'Done.'
|
29
27
|
end
|
30
28
|
|
31
29
|
# Command mappings, usually not needed
|
@@ -10,8 +10,8 @@ module Geordi
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def user(server)
|
13
|
-
cap2user = deploy_info[
|
14
|
-
cap2user || deploy_info[
|
13
|
+
cap2user = deploy_info[/^\s*set\s*:user,\s*['"](.*?)['"]/, 1]
|
14
|
+
cap2user || deploy_info[/^\s*server\s*['"]#{server}['"],.*user.{1,4}['"](.*?)['"]/m, 1]
|
15
15
|
end
|
16
16
|
|
17
17
|
def servers
|
@@ -26,11 +26,11 @@ module Geordi
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def remote_root
|
29
|
-
File.join deploy_info[
|
29
|
+
File.join deploy_info[/^\s*set\s*:deploy_to,\s*['"](.*?)['"]/, 1], 'current'
|
30
30
|
end
|
31
31
|
|
32
32
|
def env
|
33
|
-
deploy_info[
|
33
|
+
deploy_info[/^\s*set\s*:rails_env,\s*['"](.*?)['"]/, 1]
|
34
34
|
end
|
35
35
|
|
36
36
|
def shell
|
@@ -45,17 +45,17 @@ module Geordi
|
|
45
45
|
self.deploy_info = ''
|
46
46
|
|
47
47
|
if stage
|
48
|
-
deploy_info << File.read(File.join
|
48
|
+
deploy_info << File.read(File.join(root, "config/deploy/#{stage}.rb"))
|
49
49
|
deploy_info << "\n"
|
50
50
|
end
|
51
51
|
|
52
|
-
deploy_info << File.read(File.join
|
52
|
+
deploy_info << File.read(File.join(root, 'config/deploy.rb'))
|
53
53
|
end
|
54
54
|
|
55
55
|
def find_project_root!
|
56
56
|
current = ENV['RAILS_ROOT'] || Dir.pwd
|
57
57
|
|
58
|
-
until File.
|
58
|
+
until File.exist?(File.join(current, 'Capfile'))
|
59
59
|
if current == '/' || current == '/home' || !File.directory?(current)
|
60
60
|
raise <<-ERROR
|
61
61
|
Could not locate Capfile.
|