ors 0.2.2 → 0.2.3
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/sync.rb +9 -4
- data/lib/ors/helpers.rb +8 -3
- data/lib/ors/version.rb +1 -1
- metadata +4 -4
data/lib/ors/commands/sync.rb
CHANGED
@@ -9,10 +9,15 @@ module ORS::Commands
|
|
9
9
|
environments = [environment]
|
10
10
|
end
|
11
11
|
|
12
|
-
environments.each do |
|
13
|
-
unless ORS::Config.git.branches[
|
14
|
-
info "Syncing environment/branch #{
|
15
|
-
|
12
|
+
environments.each do |environment|
|
13
|
+
unless ORS::Config.git.branches[environment].nil?
|
14
|
+
info "Syncing environment/branch #{environment}..."
|
15
|
+
execute_command :localhost, %(git checkout master),
|
16
|
+
%(git checkout #{environment}),
|
17
|
+
%(git pull),
|
18
|
+
%(git rebase master),
|
19
|
+
%(git push),
|
20
|
+
%(git checkout master)
|
16
21
|
end
|
17
22
|
end
|
18
23
|
end
|
data/lib/ors/helpers.rb
CHANGED
@@ -83,6 +83,7 @@ module ORS
|
|
83
83
|
def execute_command server, *command_array
|
84
84
|
options = {:exec => false, :capture => false}
|
85
85
|
options.merge!(command_array.pop) if command_array.last.is_a?(Hash)
|
86
|
+
options[:local] = true if server.to_s == "localhost"
|
86
87
|
|
87
88
|
command = build_command(server, command_array, options)
|
88
89
|
|
@@ -118,10 +119,14 @@ module ORS
|
|
118
119
|
commands = command_array.join " && "
|
119
120
|
psuedo_tty = options[:exec] ? '-t ' : ''
|
120
121
|
|
121
|
-
if
|
122
|
-
|
122
|
+
if options[:local]
|
123
|
+
commands
|
123
124
|
else
|
124
|
-
|
125
|
+
if use_gateway
|
126
|
+
%(ssh #{psuedo_tty}#{gateway} 'ssh #{psuedo_tty}#{deploy_user}@#{server} "#{commands}"')
|
127
|
+
else
|
128
|
+
%(ssh #{psuedo_tty}#{deploy_user}@#{server} "#{commands}")
|
129
|
+
end
|
125
130
|
end
|
126
131
|
end
|
127
132
|
|
data/lib/ors/version.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: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
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-25 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|