ors 0.1.8 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ors/commands/deploy.rb +2 -0
- data/lib/ors/commands/env.rb +2 -2
- data/lib/ors/commands/setup.rb +10 -5
- data/lib/ors/config.rb +9 -5
- data/lib/ors/version.rb +1 -1
- data/lib/ors.rb +1 -0
- metadata +6 -6
data/lib/ors/commands/deploy.rb
CHANGED
data/lib/ors/commands/env.rb
CHANGED
@@ -5,8 +5,8 @@ module ORS::Commands
|
|
5
5
|
def execute
|
6
6
|
puts "ORS v#{ORS::VERSION} configuration:\n\n"
|
7
7
|
|
8
|
-
[:name, :environment, :use_gateway, :pretending, :log_lines, :rails2, :gateway, :deploy_user,
|
9
|
-
:
|
8
|
+
[:name, :environment, :use_gateway, :pretending, :log_lines, :rails2, :gateway, :deploy_user, :repo,
|
9
|
+
:base_path, :deploy_hook, :web_servers, :app_servers, :migration_server, :console_server, :cron_server].each do |config_variable|
|
10
10
|
puts "%20s: %-40s" % [config_variable, ORS::Config.send(config_variable).inspect]
|
11
11
|
end
|
12
12
|
end
|
data/lib/ors/commands/setup.rb
CHANGED
@@ -5,12 +5,17 @@ module ORS::Commands
|
|
5
5
|
def execute
|
6
6
|
info "setting up #{name} #{environment}..."
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
info "Are you sure? ('crashandburn' + ctrl+D^2)"
|
9
|
+
if STDIN.read == "crashandburn"
|
10
|
+
execute_in_parallel(all_servers) {|server| setup_repo server }
|
11
|
+
execute_in_parallel(ruby_servers) {|server| setup_ruby server }
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
execute_command migration_server, %(source ~/.rvm/scripts/rvm),
|
14
|
+
%(cd #{deploy_directory}),
|
15
|
+
%(RAILS_ENV=#{environment} bundle exec rake db:create)
|
16
|
+
else
|
17
|
+
info "Stopping crash and burn setup"
|
18
|
+
end
|
14
19
|
end
|
15
20
|
|
16
21
|
end
|
data/lib/ors/config.rb
CHANGED
@@ -3,7 +3,7 @@ module ORS
|
|
3
3
|
|
4
4
|
CONFIG_FILENAME="config/deploy.yml"
|
5
5
|
|
6
|
-
mattr_accessor :name, :environment, :use_gateway, :pretending, :log_lines, :rails2
|
6
|
+
mattr_accessor :name, :environment, :use_gateway, :pretending, :log_lines, :rails2, :deploy_hook
|
7
7
|
mattr_accessor :gateway, :deploy_user, :repo, :base_path, :web_servers, :app_servers, :migration_server, :console_server, :cron_server
|
8
8
|
|
9
9
|
self.environment = "production"
|
@@ -49,16 +49,16 @@ module ORS
|
|
49
49
|
%w(production demo staging)
|
50
50
|
end
|
51
51
|
|
52
|
+
def git
|
53
|
+
@git ||= Git.open(Dir.pwd)
|
54
|
+
end
|
55
|
+
|
52
56
|
private
|
53
57
|
|
54
58
|
def name_from_git
|
55
59
|
git.config["remote.origin.url"].gsub /.*?:(.*?).git/, '\1'
|
56
60
|
end
|
57
61
|
|
58
|
-
def git
|
59
|
-
@git ||= Git.open(Dir.pwd)
|
60
|
-
end
|
61
|
-
|
62
62
|
end
|
63
63
|
extend ModuleMethods
|
64
64
|
|
@@ -70,6 +70,10 @@ module ORS
|
|
70
70
|
(web_servers + ruby_servers).uniq
|
71
71
|
end
|
72
72
|
|
73
|
+
def revision
|
74
|
+
Config.git.log(1).first.sha
|
75
|
+
end
|
76
|
+
|
73
77
|
def deploy_directory
|
74
78
|
directory = File.join base_path, name
|
75
79
|
|
data/lib/ors/version.rb
CHANGED
data/lib/ors.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jason Dew and John Long
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-08 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
requirements: []
|
142
142
|
|
143
143
|
rubyforge_project: ors
|
144
|
-
rubygems_version: 1.4.
|
144
|
+
rubygems_version: 1.4.1
|
145
145
|
signing_key:
|
146
146
|
specification_version: 3
|
147
147
|
summary: Heroku-like deployment utilities for ORS
|