blazing 0.3.0 → 0.4.0.beta1
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 +9 -0
- data/lib/blazing/commands.rb +8 -1
- metadata +5 -5
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## master
|
2
2
|
|
3
|
+
## 0.4.0.beta1 - April 29, 2013 (features/goto_server)
|
4
|
+
|
5
|
+
* add goto command. `blazing goto production` gives you a shell on the server, with the app root as current directory and RAILS_ENV set.
|
6
|
+
|
3
7
|
## 0.3.0 - January 23, 2013
|
4
8
|
|
5
9
|
* target name is passed to recipe at runtime
|
data/blazing.gemspec
CHANGED
data/lib/blazing/cli.rb
CHANGED
@@ -52,6 +52,15 @@ module Blazing
|
|
52
52
|
Blazing::Commands.run(:recipes, :target_name => target_name, :options => options)
|
53
53
|
end
|
54
54
|
|
55
|
+
desc 'goto [TARGET]', 'Open a shell for specified target'
|
56
|
+
|
57
|
+
#
|
58
|
+
# SSH to the server and cd into the app directory. Of course it also sets the appropriate RAILS_ENV
|
59
|
+
#
|
60
|
+
def goto(target_name)
|
61
|
+
Blazing::Commands.run(:goto, :target_name => target_name, :options => options)
|
62
|
+
end
|
63
|
+
|
55
64
|
desc 'list', 'List available recipes'
|
56
65
|
|
57
66
|
#
|
data/lib/blazing/commands.rb
CHANGED
@@ -46,6 +46,13 @@ module Blazing
|
|
46
46
|
@config.recipes.each { |recipe| recipe.run({:target_name => @target_name}) }
|
47
47
|
end
|
48
48
|
|
49
|
+
def goto
|
50
|
+
# TODO: Would be nice to detect zsh and use it instead of bash?
|
51
|
+
@targets.each do |target|
|
52
|
+
system "ssh -t #{target.user}@#{target.host} 'cd #{target.path} && RAILS_ENV=#{target.options[:rails_env]} bash --login'"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
49
56
|
def list
|
50
57
|
Blazing::Recipe.pretty_list
|
51
58
|
end
|
@@ -72,7 +79,7 @@ module Blazing
|
|
72
79
|
end
|
73
80
|
|
74
81
|
def command_requires_config?
|
75
|
-
[:setup, :update, :recipes].include? @command
|
82
|
+
[:setup, :update, :recipes, :goto].include? @command
|
76
83
|
end
|
77
84
|
end
|
78
85
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blazing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.0.beta1
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Felipe Kaufmann
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdoc
|
@@ -311,9 +311,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
311
311
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
312
312
|
none: false
|
313
313
|
requirements:
|
314
|
-
- - ! '
|
314
|
+
- - ! '>'
|
315
315
|
- !ruby/object:Gem::Version
|
316
|
-
version:
|
316
|
+
version: 1.3.1
|
317
317
|
requirements: []
|
318
318
|
rubyforge_project: blazing
|
319
319
|
rubygems_version: 1.8.24
|