fidoci 0.1.7 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fidoci/env.rb +16 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd5cb4d6051aff6519d75eb5e56c5c6f53a70e41
4
- data.tar.gz: 4f2b6b0492a8c3f08bde207215ea950701adf84f
3
+ metadata.gz: 2aaa3751f85c4bad189bd011b7fafd58caf5a839
4
+ data.tar.gz: adabdb607b4062cf30158723c105a0ffb5c2ce9c
5
5
  SHA512:
6
- metadata.gz: 366612bfa685ff7d1018737ddbe170353f2ae75d58ed6c87c5b08cf2657cb86732e7add8cc3994e987c3f80c8689bd17083d43b3292511937ccac5700d56a654
7
- data.tar.gz: 5752aed2b97a7f663c4ccbeb482eeba7c08fefc677d70d53c8d9b9f9c9d5cf0e809f6cb97fc68d7ee2b5b1728f35d8edf0e29450ae3eade6e084dacec82007c9
6
+ metadata.gz: 6a74e5251cd2fe9edb85c937887fc06384861bcfd7481cb4f236a879e4e87f8e0dc3446508e8e751fb228a137ee95edbfb42330e6fb2ec9c9cdc1ec7040245bb
7
+ data.tar.gz: f8bb5cff8857d5c391c225cd67a54cd44e78a96bc304192da49f4065b175922b1460ad630e3139acb8c5f3bef5f08489ed12107e77c349f1a7ac17776f59a008
data/lib/fidoci/env.rb CHANGED
@@ -142,6 +142,11 @@ module Fidoci
142
142
  def stop!
143
143
  links.map{|key, config|
144
144
  cname = link_container_name(key)
145
+ if links[key]['shared']
146
+ debug "Keeping running #{cname}..."
147
+ next
148
+ end
149
+
145
150
  begin
146
151
  debug "Stopping container #{cname}..."
147
152
  container = Docker::Container.get(cname)
@@ -165,13 +170,11 @@ module Fidoci
165
170
  end
166
171
 
167
172
  def link_container_name(key)
168
- "#{container_name}_#{key}"
173
+ links[key]['shared'] || "#{container_name}_#{key}"
169
174
  end
170
175
 
171
176
  # starts link containers and return dict name:container_name
172
177
  def link_containers
173
- links = env_config['links'] || []
174
-
175
178
  links.map {|key, link_config|
176
179
  [key, start_link(link_container_name(key), link_config)]
177
180
  }
@@ -304,6 +307,15 @@ module Fidoci
304
307
  }
305
308
  end
306
309
 
310
+ if config['environment_pass']
311
+ config['environment_pass'].each{|key|
312
+ params['Env'] ||= []
313
+ params['Env'] << "#{key}=#{ENV[key]}"
314
+
315
+ puts "Warning: Passing environment variable #{key} is not locally set" unless ENV[key]
316
+ }
317
+ end
318
+
307
319
  # volumes
308
320
  if config['volumes']
309
321
  config['volumes'].each {|v|
@@ -352,4 +364,4 @@ module Fidoci
352
364
  success
353
365
  end
354
366
  end
355
- end
367
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fidoci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Dolezal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-12 00:00:00.000000000 Z
11
+ date: 2015-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docker-api