ors 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ors/commands/check.rb +30 -0
- data/lib/ors/commands/help.rb +1 -0
- data/lib/ors/version.rb +1 -1
- data/spec/ors/commands/check_spec.rb +15 -0
- metadata +8 -5
@@ -0,0 +1,30 @@
|
|
1
|
+
module ORS::Commands
|
2
|
+
class Check < Base
|
3
|
+
def execute
|
4
|
+
timestamps = app_servers.map do |server|
|
5
|
+
[
|
6
|
+
"[#{server}] ",
|
7
|
+
execute_command(server,
|
8
|
+
%(cd #{deploy_directory}),
|
9
|
+
%(cat restart.timestamp),
|
10
|
+
:capture => true)
|
11
|
+
].join
|
12
|
+
end.join("\n")
|
13
|
+
|
14
|
+
puts timestamps unless pretending
|
15
|
+
end
|
16
|
+
|
17
|
+
def help
|
18
|
+
puts <<-END
|
19
|
+
Usage: ./ors check [environment=production] [options]
|
20
|
+
|
21
|
+
=== Description
|
22
|
+
Prints out contents of restart.timestamp on the app servers
|
23
|
+
|
24
|
+
=== Options
|
25
|
+
--pretend (or -p) Don't execute anything, just show me what you're going to do
|
26
|
+
--no-gateway (or -ng) Don't use a gateway (if you're inside the firewall)
|
27
|
+
END
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/ors/commands/help.rb
CHANGED
@@ -19,6 +19,7 @@ migrate Runs the migrations on the migration server
|
|
19
19
|
start Starts up unicorn on the app servers
|
20
20
|
stop Stops unicorn on the app servers
|
21
21
|
restart Retarts unicorn on the app servers
|
22
|
+
check Prints out contents of restart.timestamp on the app servers
|
22
23
|
|
23
24
|
=== Environments
|
24
25
|
Must be one of: production demo staging
|
data/lib/ors/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe ORS::Commands::Check do
|
4
|
+
|
5
|
+
context "#execute" do
|
6
|
+
it "should get restart.timestamp from all of the app servers" do
|
7
|
+
mock(subject).pretending { false }
|
8
|
+
mock(subject).app_servers { mock!.map { ["server", "timestamp"] }.subject }
|
9
|
+
mock(subject).puts("server\ntimestamp")
|
10
|
+
|
11
|
+
subject.execute
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
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: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 8
|
10
|
+
version: 0.1.8
|
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-
|
18
|
+
date: 2011-04-06 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- lib/ors.rb
|
81
81
|
- lib/ors/command.rb
|
82
82
|
- lib/ors/commands/base.rb
|
83
|
+
- lib/ors/commands/check.rb
|
83
84
|
- lib/ors/commands/console.rb
|
84
85
|
- lib/ors/commands/deploy.rb
|
85
86
|
- lib/ors/commands/env.rb
|
@@ -100,6 +101,7 @@ files:
|
|
100
101
|
- ors.gemspec
|
101
102
|
- spec/ors/command_spec.rb
|
102
103
|
- spec/ors/commands/base_spec.rb
|
104
|
+
- spec/ors/commands/check_spec.rb
|
103
105
|
- spec/ors/commands/console_spec.rb
|
104
106
|
- spec/ors/commands/deploy_spec.rb
|
105
107
|
- spec/ors/commands/help_spec.rb
|
@@ -139,13 +141,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
141
|
requirements: []
|
140
142
|
|
141
143
|
rubyforge_project: ors
|
142
|
-
rubygems_version: 1.
|
144
|
+
rubygems_version: 1.4.2
|
143
145
|
signing_key:
|
144
146
|
specification_version: 3
|
145
147
|
summary: Heroku-like deployment utilities for ORS
|
146
148
|
test_files:
|
147
149
|
- spec/ors/command_spec.rb
|
148
150
|
- spec/ors/commands/base_spec.rb
|
151
|
+
- spec/ors/commands/check_spec.rb
|
149
152
|
- spec/ors/commands/console_spec.rb
|
150
153
|
- spec/ors/commands/deploy_spec.rb
|
151
154
|
- spec/ors/commands/help_spec.rb
|