docman 0.0.30 → 0.0.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/application.rb +12 -2
- data/lib/docman/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9884d38b60c0071ba70bcfcb5062eb578dc5a93e
|
4
|
+
data.tar.gz: 7f234f43fe775224765ff94bcb6a0de1bf6485bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18a4b55e58f6c3e0688c2e7035cc59f462d256c26ac79a75a86f77a0b8f1fd7ba1c2b8320a4a5931bf9c5d58a885c80790b72d461eeab82f4fdc379523ae0fbe
|
7
|
+
data.tar.gz: d2b818a78f59ccc0fa4abd5bc96d2f1a9152e59ee941837a950dc5e9f192c8499b3c25a54ab34c4076fdbdca2a210d92cdfab3abc8a20a6a24e90e9e0176b0f0
|
data/lib/application.rb
CHANGED
@@ -88,14 +88,24 @@ module Docman
|
|
88
88
|
@docroot_config = DocrootConfig.new(@workspace_dir, deploy_target)
|
89
89
|
@docroot_config.states_dependin_on(name, version).keys.each do |state|
|
90
90
|
execute('deploy', state, name)
|
91
|
+
write_environment @deploy_target['states'][state]
|
92
|
+
write_state state
|
91
93
|
result = state
|
92
|
-
filepath = File.join(@workspace_dir, 'state')
|
93
|
-
File.open(filepath, 'w') { |file| file.write(result) }
|
94
94
|
end
|
95
95
|
end
|
96
96
|
result
|
97
97
|
end
|
98
98
|
|
99
|
+
def write_state state
|
100
|
+
filepath = File.join(@workspace_dir, 'state')
|
101
|
+
File.open(filepath, 'w') { |file| file.write(state) }
|
102
|
+
end
|
103
|
+
|
104
|
+
def write_environment(environment)
|
105
|
+
filepath = File.join(@workspace_dir, 'environment')
|
106
|
+
File.open(filepath, 'w') { |file| file.write(environment) }
|
107
|
+
end
|
108
|
+
|
99
109
|
def execute(action, state, name = nil, tag = nil)
|
100
110
|
params = Marshal.load(Marshal.dump(@deploy_target))
|
101
111
|
params['state'] = state
|
data/lib/docman/version.rb
CHANGED