geordi 0.18.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.ruby-version +1 -0
- data/README.md +199 -110
- data/Rakefile +40 -0
- data/bin/apache-site +1 -19
- data/bin/cap-all +1 -27
- data/bin/cleanup-directory +1 -11
- data/bin/console-for +1 -12
- data/bin/cuc +1 -2
- data/bin/cuc-show +1 -2
- data/bin/cuc-vnc-setup +1 -114
- data/bin/deploy-to-production +1 -91
- data/bin/dump-for +4 -32
- data/bin/dumple +2 -4
- data/bin/geordi +10 -0
- data/bin/gitpt +1 -2
- data/bin/launchy_browser +9 -3
- data/bin/load-dump +1 -4
- data/bin/migrate-all +1 -13
- data/bin/optimize-png +1 -118
- data/bin/power-rake +1 -7
- data/bin/remove-executable-flags +1 -6
- data/bin/rs +1 -26
- data/bin/run_tests +1 -2
- data/bin/setup-firefox-for-selenium +1 -3
- data/bin/shell-for +1 -8
- data/bin/tests +1 -5
- data/geordi.gemspec +19 -0
- data/lib/geordi/COMMAND_TEMPLATE +29 -0
- data/lib/geordi/capistrano.rb +9 -7
- data/lib/geordi/capistrano_config.rb +66 -0
- data/lib/geordi/cli.rb +28 -0
- data/lib/geordi/commands/all_targets.rb +26 -0
- data/lib/geordi/commands/apache_site.rb +22 -0
- data/lib/geordi/commands/bundle_install.rb +7 -0
- data/lib/geordi/commands/cleanup_directory.rb +16 -0
- data/lib/geordi/commands/commit.rb +171 -0
- data/lib/geordi/commands/console.rb +24 -0
- data/lib/geordi/commands/create_database_yml.rb +18 -0
- data/lib/geordi/commands/create_databases.rb +16 -0
- data/lib/geordi/commands/cucumber.rb +20 -0
- data/lib/geordi/commands/deploy.rb +65 -0
- data/lib/geordi/commands/devserver.rb +14 -0
- data/lib/geordi/commands/dump.rb +63 -0
- data/lib/geordi/commands/migrate.rb +26 -0
- data/lib/geordi/commands/png_optimize.rb +92 -0
- data/lib/geordi/commands/rake.rb +21 -0
- data/lib/geordi/commands/remove_executable_flags.rb +14 -0
- data/lib/geordi/commands/rspec.rb +40 -0
- data/lib/geordi/commands/security_update.rb +56 -0
- data/lib/geordi/commands/setup.rb +33 -0
- data/lib/geordi/commands/setup_firefox_for_selenium.rb +6 -0
- data/lib/geordi/commands/setup_vnc.rb +84 -0
- data/lib/geordi/commands/shell.rb +20 -0
- data/lib/geordi/commands/test.rb +9 -0
- data/lib/geordi/commands/unit.rb +11 -0
- data/lib/geordi/commands/update.rb +33 -0
- data/lib/geordi/commands/version.rb +7 -0
- data/lib/geordi/commands/vnc_show.rb +6 -0
- data/lib/geordi/commands/with_firefox_for_selenium.rb +18 -0
- data/lib/geordi/commands/with_rake.rb +11 -0
- data/lib/geordi/{cuc.rb → cucumber.rb} +28 -39
- data/lib/geordi/dump_loader.rb +44 -70
- data/lib/geordi/firefox_for_selenium.rb +93 -74
- data/lib/geordi/interaction.rb +47 -0
- data/lib/geordi/remote.rb +66 -0
- data/lib/geordi/util.rb +60 -0
- data/lib/geordi/version.rb +1 -1
- data/lib/geordi.rb +1 -0
- metadata +50 -16
- data/bin/install-gems-remotely +0 -18
- data/bin/install-gems-remotely.sh +0 -16
- data/bin/power-deploy +0 -18
- data/bin/remotify-local-branch +0 -12
- data/lib/geordi/gitpt.rb +0 -175
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NzZlZDljN2VhOThlZWI0OGJlNTYxZTE0MzU5MDQ3NmI2OGE0YjQ1ZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NWIwNTMxMjQxOGM2MTVmY2U2YTRjNjE2NGQwOWJlNDI1MDNlMzY1Nw==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MWQ4YjRiY2Q5MzY5NDE3NjNhYTA0OGI1YWM4M2I0NDhkZGMyNDI0MjVkZDhk
|
10
|
+
ZmU4NTRiZjU4NzI1MDA4ZDBiYTgyMmU5ZDZlZDBlY2NlMGE3ZWYyZDE1NTA3
|
11
|
+
OWRhNGY4ZjFhMjI4NWNlMjAwYWVlZjNmMzIyZDVlZjAyOGY4NmI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YjI4OTA2YmY4NmM5MDFlZDQ2ZjYwZjIzMDk4ZDY5NzkyZTliYTg5ODliMzNk
|
14
|
+
YmVhMDc5ODczY2NjZWViNjc2OGZjZTU2NTg4N2ZkYzJlMWZiMDQxMTk1OWFj
|
15
|
+
M2ViZGZkNWZiZjcwOTA3ZDAxYWRlY2E0YmE1ZjA3ODUyMjJiOTk=
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3
|
data/README.md
CHANGED
@@ -1,220 +1,309 @@
|
|
1
1
|
Geordi
|
2
2
|
======
|
3
3
|
|
4
|
-
Geordi is a collection of command line tools we use in our daily work with
|
4
|
+
Geordi is a collection of command line tools we use in our daily work with
|
5
|
+
Ruby, Rails and Linux at [makandra](http://makandra.com/).
|
5
6
|
|
6
|
-
Installing the
|
7
|
+
Installing the `geordi` gem will install some binaries (see below):
|
7
8
|
|
8
|
-
|
9
|
+
gem install geordi
|
9
10
|
|
10
|
-
Below you can find a list of all included tools.
|
11
11
|
|
12
|
+
geordi
|
13
|
+
------
|
12
14
|
|
13
|
-
|
14
|
-
-----------
|
15
|
+
The base command line utility offering most of the commands.
|
15
16
|
|
16
|
-
|
17
|
+
You may abbreviate commands by typing only the first letter(s), e.g. `geordi
|
18
|
+
dev` will boot a development server, `geordi s -t` will setup a project and run
|
19
|
+
tests afterwards. Underscores and dashes are equivalent.
|
17
20
|
|
18
|
-
|
21
|
+
For details on commands, e.g. supported options, run `geordi help <command>`.
|
19
22
|
|
20
|
-
|
23
|
+
### geordi all-targets COMMAND
|
21
24
|
|
25
|
+
Run a capistrano command on all deploy targets.
|
22
26
|
|
23
|
-
|
24
|
-
-
|
27
|
+
Example: `geordi all-targets deploy`
|
25
28
|
|
26
|
-
Runs the given command under `bundle exec` if a `Gemfile` is present in your working directory. If no `Gemfile` is present just runs the given command:
|
27
29
|
|
28
|
-
|
30
|
+
### geordi apache-site VIRTUAL_HOST
|
29
31
|
|
30
|
-
|
32
|
+
Enable the given virtual host, disabling all others.
|
31
33
|
|
32
34
|
|
33
|
-
|
34
|
-
-----------
|
35
|
+
### geordi cleanup-directory
|
35
36
|
|
36
|
-
|
37
|
+
Remove unneeded files.
|
37
38
|
|
38
|
-
console-for staging
|
39
39
|
|
40
|
-
|
40
|
+
### geordi commit
|
41
41
|
|
42
|
+
Commit using a story title from Pivotal Tracker.
|
42
43
|
|
43
44
|
|
44
|
-
|
45
|
-
-----
|
45
|
+
### geordi console [TARGET]
|
46
46
|
|
47
|
-
|
47
|
+
Open a Rails console locally or on a Capistrano deploy target.
|
48
48
|
|
49
|
-
|
49
|
+
Open a local Rails console: `geordi console`
|
50
50
|
|
51
|
-
|
51
|
+
Open a Rails console on `staging`: `geordi console staging`
|
52
52
|
|
53
53
|
|
54
|
+
### geordi cucumber [FILES]
|
54
55
|
|
55
|
-
|
56
|
-
-----------------
|
56
|
+
Run Cucumber features.
|
57
57
|
|
58
|
-
|
58
|
+
Example: `geordi cucumber features/authentication_feature:3`
|
59
59
|
|
60
|
-
|
60
|
+
Runs Cucumber as you want: with `bundle exec`, `cucumber_spinner` detection,
|
61
|
+
separate Firefox for Selenium, etc.
|
61
62
|
|
62
|
-
More information at http://makandracards.com/makandra/951-shell-script-to-clean-up-a-project-directory
|
63
63
|
|
64
|
+
### geordi deploy
|
64
65
|
|
65
|
-
|
66
|
-
-------------------
|
66
|
+
Guided deployment.
|
67
67
|
|
68
|
-
Shows the commits between your `master` and `production` branch, then merges the changes and deploys to the production Capistrano stage:
|
69
68
|
|
70
|
-
|
69
|
+
### geordi devserver
|
71
70
|
|
72
|
-
|
71
|
+
Start a development server.
|
73
72
|
|
74
73
|
|
75
|
-
dump
|
76
|
-
--------
|
74
|
+
### geordi dump [TARGET]
|
77
75
|
|
78
|
-
|
76
|
+
Handle dumps.
|
79
77
|
|
80
|
-
|
78
|
+
When called without arguments, dumps the development database with `dumple`.
|
81
79
|
|
82
|
-
|
80
|
+
geordi dump
|
83
81
|
|
84
|
-
|
82
|
+
When called with the `--load` option, sources the specified dump into the
|
83
|
+
development database.
|
85
84
|
|
86
|
-
|
87
|
-
------
|
85
|
+
geordi dump -l tmp/staging.dump
|
88
86
|
|
89
|
-
|
87
|
+
When called with a capistrano deploy target (e.g. `staging`), remotely dumps
|
88
|
+
the specified target's database and downloads it to `tmp/`.
|
90
89
|
|
91
|
-
|
90
|
+
geordi dump staging
|
92
91
|
|
93
|
-
|
92
|
+
When called with a capistrano deploy target and the `--load` option, sources the
|
93
|
+
dump into the development database after downloading it.
|
94
|
+
|
95
|
+
geordi dump staging -l
|
96
|
+
|
97
|
+
|
98
|
+
### geordi help [COMMAND]
|
99
|
+
|
100
|
+
Describe available commands or one specific command.
|
101
|
+
|
102
|
+
|
103
|
+
### geordi migrate
|
104
|
+
|
105
|
+
Migrate all databases.
|
106
|
+
|
107
|
+
Example: `geordi migrate`
|
108
|
+
|
109
|
+
If you are using `parallel_tests`, this runs migrations in your development
|
110
|
+
environment and `rake parallel:prepare` afterwards. Otherwise, invokes `geordi rake`
|
111
|
+
with `db:migrate`.
|
112
|
+
|
113
|
+
|
114
|
+
### geordi png-optimize
|
115
|
+
|
116
|
+
Optimize .png files.
|
117
|
+
|
118
|
+
- Removes color profiles: cHRM, sRGB, gAMA, ICC, etc.
|
119
|
+
- Eliminates unused colors and reduces bit-depth (if possible)
|
120
|
+
- May reduce PNG file size lossless
|
121
|
+
|
122
|
+
Batch-optimize all `*.png` files in a directory:
|
123
|
+
|
124
|
+
geordi png-optimize directory
|
125
|
+
|
126
|
+
Batch-optimize the current directory:
|
127
|
+
|
128
|
+
geordi png-optimize .
|
129
|
+
|
130
|
+
Optimize a single file:
|
131
|
+
|
132
|
+
geordi png-optimize input.png
|
133
|
+
|
134
|
+
|
135
|
+
### geordi rake TASK
|
136
|
+
|
137
|
+
Run a rake task in several Rails environments.
|
138
|
+
|
139
|
+
Example: `geordi rake db:migrate`
|
94
140
|
|
141
|
+
TASK is run in the following Rails environments (if present):
|
95
142
|
|
96
|
-
|
97
|
-
|
143
|
+
- development
|
144
|
+
- test
|
145
|
+
- cucumber
|
98
146
|
|
99
|
-
Loads a database dump (e.g. created with dump-for or dumple) into you database.
|
100
147
|
|
101
|
-
|
148
|
+
### geordi remove-executable-flags
|
102
149
|
|
103
|
-
|
150
|
+
Remove executable-flags from files that should not be executable.
|
104
151
|
|
105
152
|
|
153
|
+
### geordi rspec [FILES]
|
106
154
|
|
107
|
-
|
108
|
-
-----
|
155
|
+
Run RSpec.
|
109
156
|
|
110
|
-
|
157
|
+
Example: `geordi rspec spec/models/user_spec.rb:13`
|
111
158
|
|
112
|
-
|
159
|
+
Runs RSpec as you want: with RSpec 1/2 detection, `bundle exec`, rspec_spinner
|
160
|
+
detection, etc.
|
113
161
|
|
114
|
-
This lets you choose from all started, finished and rejected stories in Pivotal Tracker and commit staged changes.
|
115
|
-
Requires the project's Pivotal Tracker ID(s) to be defined in a `.pt_project_id` file in the project's directory.
|
116
162
|
|
117
|
-
|
163
|
+
### geordi security-update [step]
|
118
164
|
|
165
|
+
Support for performing security updates.
|
119
166
|
|
120
|
-
|
121
|
-
---------------------
|
167
|
+
Preparation for security update: `geordi security-update`
|
122
168
|
|
123
|
-
|
169
|
+
After performing the update: `geordi security-update finish`
|
124
170
|
|
125
|
-
|
171
|
+
Switches branches, pulls, pushes and deploys as required by our workflow. Tells
|
172
|
+
what it will do before it does it.
|
126
173
|
|
127
|
-
More information at http://makandracards.com/makandra/692-install-a-local-gemfile-on-a-remote-server
|
128
174
|
|
175
|
+
### geordi setup
|
129
176
|
|
130
|
-
|
131
|
-
---------------------
|
177
|
+
Setup a project for the first time.
|
132
178
|
|
133
|
-
|
134
|
-
in your development environment and executes `b rake parallel:prepare` after that.
|
179
|
+
Example: `geordi setup`
|
135
180
|
|
136
|
-
|
181
|
+
Check out a repository, cd into its directory. Now let `setup` do the tiring
|
182
|
+
work: run `bundle install`, create `database.yml`, create databases, migrate
|
183
|
+
(all if applicable).
|
137
184
|
|
185
|
+
After setting up, loads a dump into the development db when called with the
|
186
|
+
`--dump` option:
|
138
187
|
|
139
|
-
|
140
|
-
------------
|
188
|
+
geordi setup -d staging
|
141
189
|
|
142
|
-
|
190
|
+
After setting up, runs all tests when called with the `--test` option:
|
143
191
|
|
144
|
-
|
192
|
+
geordi setup -t
|
145
193
|
|
146
|
-
|
194
|
+
See `geordi help setup` for details.
|
147
195
|
|
148
196
|
|
149
|
-
|
150
|
-
----------
|
197
|
+
### geordi setup-firefox-for-selenium VERSION
|
151
198
|
|
152
|
-
|
199
|
+
Install a special firefox for running Selenium tests.
|
153
200
|
|
154
|
-
power-rake db:migrate
|
155
201
|
|
156
|
-
|
202
|
+
### geordi setup-vnc
|
157
203
|
|
204
|
+
Setup VNC for running Selenium tests there.
|
158
205
|
|
159
|
-
remove-executable-flags
|
160
|
-
-----------------------
|
161
206
|
|
162
|
-
|
207
|
+
### geordi shell TARGET
|
163
208
|
|
164
|
-
|
165
|
-
|
166
|
-
More information at http://makandracards.com/makandra/659-recursively-remove-unnecessary-execute-flags
|
209
|
+
Open a shell on a Capistrano deploy target.
|
167
210
|
|
211
|
+
Example: `geordi shell production`
|
168
212
|
|
169
|
-
|
170
|
-
-----
|
213
|
+
Lets you select the server to connect to when called with `--select-server`:
|
171
214
|
|
172
|
-
|
215
|
+
geordi shell production -s
|
173
216
|
|
174
|
-
rs spec/models/user_spec.rb
|
175
217
|
|
176
|
-
|
218
|
+
### geordi tests
|
177
219
|
|
220
|
+
Run all employed tests.
|
178
221
|
|
179
|
-
setup-firefox-for-selenium
|
180
|
-
--------------------------
|
181
222
|
|
182
|
-
|
223
|
+
### geordi unit
|
183
224
|
|
184
|
-
|
225
|
+
Run Test::Unit.
|
185
226
|
|
186
|
-
More information at http://makandracards.com/makandra/1575-how-to-install-a-frozen-version-of-firefox-for-your-selenium-tests
|
187
227
|
|
228
|
+
### geordi update
|
188
229
|
|
189
|
-
|
190
|
-
---------
|
230
|
+
Bring a project up to date.
|
191
231
|
|
192
|
-
|
232
|
+
Example: `geordi update`
|
193
233
|
|
194
|
-
|
234
|
+
Performs: `git pull`, `bundle install` (if necessary) and migrates (if applicable).
|
195
235
|
|
196
|
-
|
236
|
+
After updating, loads a dump into the development db when called with the
|
237
|
+
`--dump` option:
|
197
238
|
|
198
|
-
|
239
|
+
geordi update -d staging
|
199
240
|
|
200
|
-
|
241
|
+
After updating, runs all tests when called with the `--test` option:
|
201
242
|
|
243
|
+
geordi update -t
|
202
244
|
|
203
|
-
|
204
|
-
--------------
|
245
|
+
See `geordi help update` for details.
|
205
246
|
|
206
|
-
Runs both `rs` and `cuc`. Call from any project directory:
|
207
247
|
|
208
|
-
|
248
|
+
### geordi version
|
249
|
+
|
250
|
+
Print the current version of geordi.
|
251
|
+
|
252
|
+
|
253
|
+
### geordi vnc-show
|
254
|
+
|
255
|
+
Show the hidden VNC window.
|
256
|
+
|
257
|
+
|
258
|
+
### geordi with-firefox-for-selenium COMMAND
|
259
|
+
|
260
|
+
Run a command with firefox for selenium set up.
|
261
|
+
|
262
|
+
Example: `geordi with-firefox-for-selenium b cucumber`
|
263
|
+
|
264
|
+
Useful when you need Firefox for Selenium, but can't use the `geordi cucumber`
|
265
|
+
command.
|
266
|
+
|
267
|
+
|
268
|
+
### geordi with-rake
|
269
|
+
|
270
|
+
Run tests with `rake`.
|
271
|
+
|
272
|
+
|
273
|
+
b
|
274
|
+
---
|
275
|
+
|
276
|
+
Runs the given command under `bundle exec` if a `Gemfile` is present in your
|
277
|
+
working directory. If no `Gemfile` is present just runs the given command:
|
278
|
+
|
279
|
+
b spec spec/models
|
280
|
+
|
281
|
+
More information at http://makandracards.com/makandra/684-automatically-run-bundle-exec-if-required
|
282
|
+
|
283
|
+
|
284
|
+
dumple
|
285
|
+
------
|
286
|
+
|
287
|
+
Stores a timestamped database dump for the given Rails environment in `~/dumps`:
|
288
|
+
|
289
|
+
dumple development
|
290
|
+
|
291
|
+
More information at http://makandracards.com/makandra/1008-dump-your-database-with-dumple
|
292
|
+
|
209
293
|
|
210
|
-
|
294
|
+
launchy_browser
|
295
|
+
---------------
|
211
296
|
|
297
|
+
Used by the `geordi cucumber` command. Makes launchy open pages in the user's
|
298
|
+
browser, as opposed to opening it within the VNC window.
|
212
299
|
|
213
|
-
run_tests
|
214
|
-
---------
|
215
300
|
|
216
|
-
|
301
|
+
Contributing
|
302
|
+
============
|
217
303
|
|
218
|
-
|
304
|
+
Copy `lib/geordi/COMMAND_TEMPLATE` to `lib/geordi/commands/your_command` and
|
305
|
+
edit it to do what you need it to do. Usually, it is hard to automatedly test
|
306
|
+
Geordi commands, so make sure you've manually tested it.
|
219
307
|
|
220
|
-
|
308
|
+
Don't forget to update this README. The whole `geordi` section is auto-generated
|
309
|
+
by `rake update_readme`.
|
data/Rakefile
CHANGED
@@ -1,2 +1,42 @@
|
|
1
1
|
require 'bundler'
|
2
2
|
Bundler::GemHelper.install_tasks
|
3
|
+
|
4
|
+
task :update_readme do
|
5
|
+
require File.expand_path('../lib/geordi/cli', __FILE__)
|
6
|
+
|
7
|
+
readme = File.read('README.md')
|
8
|
+
geordi_section_regex = /
|
9
|
+
geordi\n
|
10
|
+
-{3,} # 3 dashes or more
|
11
|
+
.*? # anything, non-greedy
|
12
|
+
(?= # stop before:
|
13
|
+
^\w+\n-{3,} # the next section
|
14
|
+
)
|
15
|
+
/xm
|
16
|
+
|
17
|
+
geordi_section = <<-TEXT
|
18
|
+
geordi
|
19
|
+
------
|
20
|
+
|
21
|
+
The base command line utility offering most of the commands.
|
22
|
+
|
23
|
+
You may abbreviate commands by typing only the first letter(s), e.g. `geordi
|
24
|
+
dev` will boot a development server, `geordi s -t` will setup a project and run
|
25
|
+
tests afterwards. Underscores and dashes are equivalent.
|
26
|
+
|
27
|
+
For details on commands, e.g. supported options, run `geordi help <command>`.
|
28
|
+
|
29
|
+
TEXT
|
30
|
+
|
31
|
+
Geordi::CLI.all_commands.sort.each do |_, command|
|
32
|
+
unless command.hidden?
|
33
|
+
geordi_section << "### geordi #{ command.usage }\n\n"
|
34
|
+
geordi_section << "#{ command.description.sub /(\.)?$/, '.' }\n\n"
|
35
|
+
geordi_section << "#{ command.long_description.strip }\n\n" if command.long_description
|
36
|
+
geordi_section << "\n"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
updated_readme = readme.sub(geordi_section_regex, geordi_section)
|
41
|
+
File.open('README.md', 'w') { |f| f.puts updated_readme.strip }
|
42
|
+
end
|
data/bin/apache-site
CHANGED
@@ -1,21 +1,3 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
old_cwd = Dir.pwd
|
5
|
-
Dir.chdir "/etc/apache2/sites-available/"
|
6
|
-
|
7
|
-
# show available sites if no site was passed as argument
|
8
|
-
unless site
|
9
|
-
puts 'ERROR: Argument site is missing.'
|
10
|
-
puts 'Please call: apache-site my-site'
|
11
|
-
puts
|
12
|
-
puts 'Available sites:'
|
13
|
-
Dir.new(".").each do |file|
|
14
|
-
puts "- #{file}" if file != '.' && file != '..'
|
15
|
-
end
|
16
|
-
exit
|
17
|
-
end
|
18
|
-
|
19
|
-
has_default = File.exists?("default")
|
20
|
-
exec "sudo a2dissite \*; sudo a2ensite #{"default " if has_default}#{site} && sudo apache2ctl restart"
|
21
|
-
Dir.chdir old_cwd
|
3
|
+
exec 'geordi', 'apache_site', *ARGV
|
data/bin/cap-all
CHANGED
@@ -1,29 +1,3 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
targets = Dir["config/deploy/*.rb"].map { |f| File.basename(f, ".rb") }
|
7
|
-
|
8
|
-
if targets.empty?
|
9
|
-
targets = [nil]
|
10
|
-
end
|
11
|
-
|
12
|
-
targets.each do |stage|
|
13
|
-
|
14
|
-
puts "Deploying to #{stage ? stage : 'default target'}"
|
15
|
-
puts "*" * 80
|
16
|
-
|
17
|
-
if stage
|
18
|
-
exit_code = system("bundle", "exec", "cap", stage, *ARGV)
|
19
|
-
else
|
20
|
-
exit_code = system("bundle", "exec", "cap", *ARGV)
|
21
|
-
end
|
22
|
-
unless exit_code
|
23
|
-
puts "*" * 80
|
24
|
-
puts "Capistrano failed. Have a look!"
|
25
|
-
exit(1)
|
26
|
-
end
|
27
|
-
|
28
|
-
puts
|
29
|
-
end
|
3
|
+
exec 'geordi', 'all_targets', *ARGV
|
data/bin/cleanup-directory
CHANGED
@@ -1,13 +1,3 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
for pattern in %w[ webrat-* capybara-* tmp/webrat-* tmp/capybara-* tmp/rtex/* log/*.log ]
|
5
|
-
puts "- #{pattern}"
|
6
|
-
puts `rm -vfR #{pattern}`
|
7
|
-
end
|
8
|
-
|
9
|
-
puts 'Finding recursively and removing:'
|
10
|
-
for pattern in %w[ *~ ]
|
11
|
-
puts "- #{pattern}"
|
12
|
-
`find . -name #{pattern} -exec rm {} ';'`
|
13
|
-
end
|
3
|
+
exec 'geordi', 'cleanup-directory'
|
data/bin/console-for
CHANGED
@@ -1,14 +1,3 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require File.dirname(__FILE__) + "/../lib/geordi/capistrano"
|
3
|
-
include Geordi::Capistrano
|
4
2
|
|
5
|
-
|
6
|
-
self.stage = ARGV.shift
|
7
|
-
options = { :select_server => true }
|
8
|
-
|
9
|
-
if File.exists? "#{config.root}/script/console" # => Rails 2
|
10
|
-
shell_for("script/console #{config.env}", options)
|
11
|
-
else
|
12
|
-
shell_for("bundle exec rails console #{config.env}", options)
|
13
|
-
end
|
14
|
-
end
|
3
|
+
exec 'geordi', 'console', *ARGV
|
data/bin/cuc
CHANGED
data/bin/cuc-show
CHANGED