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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c9cb7a5ed49217d15c3cebdaef77df85f60a31b
4
- data.tar.gz: bef6d57ebf26f2d48468b8fe6919e3041e9bd763
3
+ metadata.gz: 9884d38b60c0071ba70bcfcb5062eb578dc5a93e
4
+ data.tar.gz: 7f234f43fe775224765ff94bcb6a0de1bf6485bc
5
5
  SHA512:
6
- metadata.gz: c5fe60d766d1cf1215ee59518907f2ec35099ab3bac0a37feec3482f6e3a07e37c7a22e310fd013b08e901d7fad389faf6ad6322b349c17a8657b055dd1060ab
7
- data.tar.gz: d97c22976b83db1a8c5ef420fc99da02510372d752f99cff22396316a4536f1f94f44964095dbf71fd1015605836cdaf237ba981fef8763b7435f449fed25157
6
+ metadata.gz: 18a4b55e58f6c3e0688c2e7035cc59f462d256c26ac79a75a86f77a0b8f1fd7ba1c2b8320a4a5931bf9c5d58a885c80790b72d461eeab82f4fdc379523ae0fbe
7
+ data.tar.gz: d2b818a78f59ccc0fa4abd5bc96d2f1a9152e59ee941837a950dc5e9f192c8499b3c25a54ab34c4076fdbdca2a210d92cdfab3abc8a20a6a24e90e9e0176b0f0
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Docman
2
- VERSION = "0.0.30"
2
+ VERSION = "0.0.31"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.30
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tolstikov