blazing 0.4.0.beta1 → 0.4.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/blazing.gemspec +1 -1
- data/lib/blazing/cli.rb +5 -0
- data/lib/blazing/commands.rb +6 -2
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## master
|
2
2
|
|
3
|
+
## 0.4.0.beta2 - May 8, 2013 (features/goto_server)
|
4
|
+
|
5
|
+
* Improve goto command: use `blazing goto production -c "do stuff"` to run commands on the server
|
6
|
+
|
3
7
|
## 0.4.0.beta1 - April 29, 2013 (features/goto_server)
|
4
8
|
|
5
9
|
* add goto command. `blazing goto production` gives you a shell on the server, with the app root as current directory and RAILS_ENV set.
|
data/blazing.gemspec
CHANGED
data/lib/blazing/cli.rb
CHANGED
@@ -54,6 +54,11 @@ module Blazing
|
|
54
54
|
|
55
55
|
desc 'goto [TARGET]', 'Open a shell for specified target'
|
56
56
|
|
57
|
+
method_option :run,
|
58
|
+
:type => :string,
|
59
|
+
:aliases => '-c',
|
60
|
+
:banner => 'Specify a command'
|
61
|
+
|
57
62
|
#
|
58
63
|
# SSH to the server and cd into the app directory. Of course it also sets the appropriate RAILS_ENV
|
59
64
|
#
|
data/lib/blazing/commands.rb
CHANGED
@@ -13,7 +13,7 @@ module Blazing
|
|
13
13
|
|
14
14
|
def initialize(options = {})
|
15
15
|
warn 'The :default Target option has been deprecated and will be ignored' if options.has_key?(:default)
|
16
|
-
|
16
|
+
@cli_options = options[:options] # that stinks! TODO: clean up options handling.
|
17
17
|
@target_name = options[:target_name]
|
18
18
|
@config_file = options[:file]
|
19
19
|
@command = options[:command]
|
@@ -49,7 +49,11 @@ module Blazing
|
|
49
49
|
def goto
|
50
50
|
# TODO: Would be nice to detect zsh and use it instead of bash?
|
51
51
|
@targets.each do |target|
|
52
|
-
|
52
|
+
if @cli_options[:run]
|
53
|
+
system "ssh -t #{target.user}@#{target.host} 'cd #{target.path} && RAILS_ENV=#{target.options[:rails_env]} #{@cli_options[:run]}'"
|
54
|
+
else
|
55
|
+
system "ssh -t #{target.user}@#{target.host} 'cd #{target.path} && RAILS_ENV=#{target.options[:rails_env]} bash --login'"
|
56
|
+
end
|
53
57
|
end
|
54
58
|
end
|
55
59
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blazing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0.
|
4
|
+
version: 0.4.0.beta2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-05-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdoc
|