geordi 2.10.1 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +8 -2
- data/CHANGELOG.md +46 -0
- data/Gemfile +2 -5
- data/Gemfile.lock +10 -10
- data/README.md +11 -6
- 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 +20 -17
- data/lib/geordi/chromedriver_updater.rb +9 -10
- data/lib/geordi/cli.rb +5 -2
- 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 +25 -25
- 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 +28 -25
- data/lib/geordi/version.rb +1 -1
- metadata +27 -39
- 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
data/features/dump.feature
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
Feature: The dump command
|
2
|
-
Most aspects of connection to a server are tested in shell feature.
|
3
|
-
|
4
|
-
Scenario: Creating a dump of the development database
|
5
|
-
When I run `geordi dump`
|
6
|
-
Then the output should contain "Util.system! dumple development"
|
7
|
-
And the output should contain "Successfully dumped the development database"
|
8
|
-
|
9
|
-
|
10
|
-
Scenario: Creating a dump of a remote database
|
11
|
-
Given a file named "Capfile" with "Capfile exists"
|
12
|
-
And a file named "config/deploy.rb" with:
|
13
|
-
"""
|
14
|
-
"""
|
15
|
-
And a file named "config/deploy/staging.rb" with:
|
16
|
-
"""
|
17
|
-
set :rails_env, 'staging'
|
18
|
-
set :deploy_to, '/var/www/example.com'
|
19
|
-
set :user, 'user'
|
20
|
-
|
21
|
-
server 'www.example.com'
|
22
|
-
"""
|
23
|
-
|
24
|
-
When I run `geordi dump staging`
|
25
|
-
Then the output should contain "# Dumping the database of staging"
|
26
|
-
And the output should contain "> Connecting to www.example.com"
|
27
|
-
And the output should contain "Util.system! ssh, user@www.example.com, -t, cd /var/www/example.com/current && bash --login -c 'dumple staging --for_download'"
|
28
|
-
And the output should contain "> Downloading remote dump to tmp/staging.dump"
|
29
|
-
# Omitting the absolute path in this regex (.*)
|
30
|
-
And the output should match:
|
31
|
-
"""
|
32
|
-
Util\.system! scp -C user@www\.example\.com:~\/dumps\/dump_for_download.dump .*?\/tmp\/aruba\/tmp\/staging.dump
|
33
|
-
"""
|
34
|
-
And the output should contain "> Dumped the staging database to tmp/staging.dump"
|
data/features/firefox.feature
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
Feature: The firefox/chrome command
|
2
|
-
|
3
|
-
This command is used internally by the cucumber command.
|
4
|
-
|
5
|
-
Scenario: Running a command with VNC set up
|
6
|
-
Given a file named "testfile" with "testcontent"
|
7
|
-
|
8
|
-
When I run `geordi firefox cat testfile`
|
9
|
-
Then the output should contain "> Run `geordi vnc` to view the Selenium test browsers"
|
10
|
-
And the output should contain "testcontent"
|
11
|
-
But the output should not contain "Firefox for Selenium"
|
12
|
-
|
13
|
-
|
14
|
-
Scenario: The command is aliased as "chrome"
|
15
|
-
Given a file named "testfile" with "testcontent"
|
16
|
-
|
17
|
-
When I run `geordi chrome cat testfile`
|
18
|
-
Then the output should contain "> Run `geordi vnc` to view the Selenium test browsers"
|
19
|
-
And the output should contain "testcontent"
|
20
|
-
|
21
|
-
Scenario: Having a .firefox-version that is not installed yet
|
22
|
-
Given a file named ".firefox-version" with "1337"
|
23
|
-
And a file named "testfile" with "testcontent"
|
24
|
-
|
25
|
-
When I run `geordi firefox cat testfile` interactively
|
26
|
-
And I type "yes"
|
27
|
-
Then the output should contain "> Firefox 1337 not found"
|
28
|
-
And the output should contain "Run tests anyway?"
|
29
|
-
And the output should contain "testcontent"
|
30
|
-
|
31
|
-
|
32
|
-
Scenario: A .firefox-version file with "system" is ignored (legacy support)
|
33
|
-
Given a file named ".firefox-version" with "system"
|
34
|
-
And a file named "testfile" with "testcontent"
|
35
|
-
|
36
|
-
When I run `geordi firefox cat testfile`
|
37
|
-
Then the output should contain "> Run `geordi vnc`"
|
38
|
-
And the output should contain "testcontent"
|
39
|
-
But the output should not contain "Firefox for Selenium"
|
40
|
-
|
41
|
-
|
42
|
-
Scenario: Running --setup without a version prints an error
|
43
|
-
When I run `geordi firefox --setup`
|
44
|
-
Then the output should contain "Firefox version required"
|
data/features/server.feature
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
Feature: The server/devserver command
|
2
|
-
|
3
|
-
Scenario: Booting a development server
|
4
|
-
When I run `geordi server`
|
5
|
-
Then the output should contain "http://aruba.vcap.me:3000"
|
6
|
-
And the output should contain "Util.system! bundle exec rails server -p 3000"
|
7
|
-
|
8
|
-
|
9
|
-
Scenario: Passing a port as argument
|
10
|
-
When I run `geordi server 3001`
|
11
|
-
Then the output should contain "http://aruba.vcap.me:3001"
|
12
|
-
And the output should contain "Util.system! bundle exec rails server -p 3001"
|
13
|
-
|
14
|
-
|
15
|
-
Scenario: Passing a port as option
|
16
|
-
When I run `geordi server -p 3001`
|
17
|
-
Then the output should contain "http://aruba.vcap.me:3001"
|
18
|
-
And the output should contain "Util.system! bundle exec rails server -p 3001"
|
19
|
-
|
20
|
-
|
21
|
-
Scenario: The command is aliased for backwards compatibility
|
22
|
-
When I run `geordi devserver`
|
23
|
-
Then the output should contain "Util.system! bundle exec rails server"
|
24
|
-
|
25
|
-
|
26
|
-
Scenario: Starting the server as accessible from the local network
|
27
|
-
|
28
|
-
... so it can be accessed from a test iPad or so.
|
29
|
-
|
30
|
-
When I run `geordi server --public`
|
31
|
-
Then the output should contain "Util.system! bundle exec rails server -b 0.0.0.0"
|
data/features/setup.feature
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Feature: Project setup
|
2
|
-
|
3
|
-
Scenario: A local bin/setup is preferred
|
4
|
-
Given a file named "bin/setup" with "custom project setup"
|
5
|
-
|
6
|
-
When I run `geordi setup`
|
7
|
-
Then the output should contain "Running bin/setup"
|
8
|
-
And the output should contain "Geordi's own setup routine is skipped"
|
9
|
-
And the output should contain "Util.system! bin/setup"
|
10
|
-
And the output should not contain "Creating databases"
|
11
|
-
But the output should contain "Successfully set up the project"
|
data/features/shell.feature
DELETED
@@ -1,78 +0,0 @@
|
|
1
|
-
Feature: The shell command
|
2
|
-
|
3
|
-
Background:
|
4
|
-
Given a file named "Capfile" with "Capfile exists"
|
5
|
-
|
6
|
-
|
7
|
-
Scenario: It opens a remote shell on the primary server
|
8
|
-
Given a file named "config/deploy.rb" with "deploy.rb exists"
|
9
|
-
And a file named "config/deploy/geordi.rb" with:
|
10
|
-
"""
|
11
|
-
set :user, 'deploy'
|
12
|
-
set :deploy_to, '/var/www/example.com'
|
13
|
-
server 'first.example.com'
|
14
|
-
server 'second.example.com'
|
15
|
-
"""
|
16
|
-
|
17
|
-
When I run `geordi shell geordi`
|
18
|
-
Then the output should contain "Util.system! ssh, deploy@first.example.com, -t, cd /var/www/example.com/current && bash --login"
|
19
|
-
|
20
|
-
|
21
|
-
Scenario: It understands Capistrano 3 syntax
|
22
|
-
Given a file named "config/deploy.rb" with "deploy.rb exists"
|
23
|
-
And a file named "config/deploy/geordi.rb" with:
|
24
|
-
"""
|
25
|
-
set :deploy_to, '/var/www/example.com'
|
26
|
-
server 'first.example.com', user: 'deploy'
|
27
|
-
"""
|
28
|
-
|
29
|
-
When I run `geordi shell geordi`
|
30
|
-
Then the output should contain "Util.system! ssh, deploy@first.example.com, -t, cd /var/www/example.com/current && bash --login"
|
31
|
-
|
32
|
-
Scenario: It allows multiline capistrano server definitions
|
33
|
-
Given a file named "config/deploy.rb" with "deploy.rb exists"
|
34
|
-
And a file named "config/deploy/geordi.rb" with:
|
35
|
-
"""
|
36
|
-
set :deploy_to, '/var/www/example.com'
|
37
|
-
server 'first.example.com',
|
38
|
-
user: 'deploy'
|
39
|
-
"""
|
40
|
-
|
41
|
-
When I run `geordi shell geordi`
|
42
|
-
Then the output should contain "Util.system! ssh, deploy@first.example.com, -t, cd /var/www/example.com/current && bash --login"
|
43
|
-
|
44
|
-
|
45
|
-
Scenario: It prefers stage settings over general config
|
46
|
-
Given a file named "config/deploy.rb" with:
|
47
|
-
"""
|
48
|
-
set :deploy_to, '/var/www/unknown.example.com'
|
49
|
-
set :user, 'user'
|
50
|
-
|
51
|
-
server 'www.unknown.example.com'
|
52
|
-
"""
|
53
|
-
And a file named "config/deploy/staging.rb" with:
|
54
|
-
"""
|
55
|
-
set :deploy_to, '/var/www/example.com'
|
56
|
-
|
57
|
-
server 'www.example.com'
|
58
|
-
"""
|
59
|
-
|
60
|
-
When I run `geordi shell staging`
|
61
|
-
Then the output should contain "Util.system! ssh, user@www.example.com, -t, cd /var/www/example.com/current"
|
62
|
-
|
63
|
-
|
64
|
-
Scenario: It allows whitespaces in the config
|
65
|
-
We also add the unset command to check we are still matching the right
|
66
|
-
commands and not allow any char at the beginning.
|
67
|
-
|
68
|
-
Given a file named "config/deploy.rb" with "deploy.rb exists"
|
69
|
-
And a file named "config/deploy/staging.rb" with:
|
70
|
-
"""
|
71
|
-
unset :user, 'wrong'
|
72
|
-
set :deploy_to, '/var/www/example.com'
|
73
|
-
set :user, 'user'
|
74
|
-
server 'www.example.com'
|
75
|
-
"""
|
76
|
-
|
77
|
-
When I run `geordi shell staging`
|
78
|
-
Then the output should contain "Util.system! ssh, user@www.example.com, -t, cd /var/www/example.com/current"
|
data/features/support/env.rb
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
Given(/^(?:a|the) file(?: named)? "([^"]*)" with "([^"]*)"$/) do |file_name, file_content|
|
2
|
-
unescape_content = file_content.gsub('\n', "\n").gsub('\"', '"').gsub('\e', "\e").gsub('\033', "\e").gsub('\016', "\016").gsub('\017', "\017").gsub('\t', "\t")
|
3
|
-
|
4
|
-
write_file(file_name, unescape_content)
|
5
|
-
end
|