fanforce-factory 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Yjk1MjlmM2I1OTQxZmE0ZTEzYjEwMTAzNDFmNGZjYjI3NjY5ZGZjOQ==
4
+ NWExMGJlMmQ4OTc2YmM3MDZiMGEwMTAxZDJjYmJkODc0ZmRhYTk3Mg==
5
5
  data.tar.gz: !binary |-
6
- MTY4NGJmOWM5MzUzY2Q3NThkZGQ2YWEzNmRiNDU1ZTc5ODc2ZTc5YQ==
6
+ ZTQ2NzRjMmM2MTZhNjdjZTZhZTFiMzQ0NDkyYjQwM2U0OWU5NDk2YQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MDAyOTI4YzJjYjUxMDdhZjA3MmQ0MWUzNzBlZTUxNjkzMmFjZmM0YTY2YTQ1
10
- Nzk1M2M0NTU2MGI1ZTFkN2QzMjMwY2UwMDk1YjU3Y2M1MWVjZTUxYmI4Y2Q1
11
- MjA1Nzc3ZDQ2YjlmMWRlOTVmMDg5YzZlOTJhNDNiNjY3OTJjZDQ=
9
+ YjFmZjRkNzVhYWJhZjljNDlhYTE1YzBlNjRkZDQ3NTg2MGI2Y2ZmMDU3ZDNk
10
+ ZGNlMDBkMzUzNTFkMTNjYTYwMGJhYWI1MjQ4NDRmZjlhMDUzZmZjMDY5MWEx
11
+ NDJjY2NjMDJhMTdiNWNlODE5ZTc2ZTMwNWJlYjdhZjlhNDY1Y2M=
12
12
  data.tar.gz: !binary |-
13
- NDZmYjhlYmE3MDE0ZWMxNWUxY2Y5NTgwZmIwNjkzYTIwNDBhODUwMmI1OTgx
14
- YjgyMzM2NDUzMmM4NDBmMjJmNWYwMTNmYTJiZmQ4NmRmNDRlZDAxNGRiNzM3
15
- N2Y5ZGFkYWIzOGE5OWQ0ZThmZDc2Yzc0NWU1YzhlNDYwYzE2OWY=
13
+ OGVlNjcwNmUxNzE2OTkxMmQyMjM1NzE5YjZmMmMyZTk3NjgzMzI2Y2FlOWE2
14
+ ZTBjMDZkYjg3MzNiMmVkMWFjNzhjNjUzYTZiNmU3NWZkNzhiYjg5NDdhNWQ2
15
+ ZGY2YjhmMmZkNWIwYzczMTYyMTYwMzc5NzI2NzFhYjJjN2E1NjM=
@@ -366,7 +366,7 @@ class Fanforce::Factory
366
366
  puts "\n---------------------------------------------------------------------------------------------------------------"
367
367
  puts "#{addon.type.to_s.upcase.format(:bold)} - #{addon._id.upcase.gsub('-',' ').format(:bold)} (#{processed_count} of #{total_count})... "
368
368
 
369
- push_iron(addon, command, environments)
369
+ upload_iron(addon, command, environments)
370
370
  end
371
371
 
372
372
  def upload_iron(addon, command, environments)
@@ -376,15 +376,13 @@ class Fanforce::Factory
376
376
 
377
377
  environments.each do |environment|
378
378
  vars = Env.vars_by_addon(environment)[addon.dir_name]
379
- has_workers = File.directory?("#{addon.dir}/workers") ? true : false
380
-
381
- next puts "#{'Skipped '.format(:bold)} #{environment.to_s.titleize} is missing IRON_TOKEN and/or IRON_PROJECT_ID env variables" if vars['iron_token'].blank? or vars['iron_project_id'].blank?
379
+ next puts "#{'Skipped '.format(:bold)} #{environment.to_s.titleize} is missing IRON_TOKEN and/or IRON_PROJECT_ID env variables" if vars['IRON_TOKEN'].blank? or vars['IRON_PROJECT_ID'].blank?
382
380
 
383
381
  vars = {} if vars.blank?
384
- puts "#{'Updating Env'.format(:green,:bold)} #{environment.to_s.titleize}#{has_workers ? '... and workers have' : 'has'} #{vars.size} env variables"
382
+ puts "#{'Updating Env'.format(:green,:bold)} #{environment.to_s.titleize}... and workers have #{vars.size} env variables"
385
383
  push_env_to(environment, addon, vars, true)
386
384
 
387
- iron_worker = IronWorkerNG::Client.new(:token => vars['iron_token'], :project_id => vars['iron_project_id'])
385
+ iron_worker = IronWorkerNG::Client.new(:token => vars['IRON_TOKEN'], :project_id => vars['IRON_PROJECT_ID'])
388
386
  Dir.chdir("#{addon.dir}/workers") do
389
387
  workers = Dir["*.worker"]
390
388
  next puts "#{'Skipped '.format(:bold)} #{environment.to_s.titleize} has 0 workers" if workers.size == 0
@@ -407,7 +405,7 @@ class Fanforce::Factory
407
405
  iron_worker.codes.list.each do |code|
408
406
  next if code.name != code_name
409
407
  iron_worker.codes.delete(code.id)
410
- puts "#{'Removing '.format(:green,:bold)} #{addon._id}-#{filename.gsub('.worker', '')} from #{environment.to_s.titleize}..."
408
+ puts "#{'Removing '.format(:green,:bold)} #{code_name} from #{environment.to_s.titleize}..."
411
409
  return true
412
410
  end
413
411
  end
@@ -423,7 +421,7 @@ class Fanforce::Factory
423
421
  environments.each do |environment|
424
422
  vars = Env.vars_by_addon(environment)[addon.dir_name]
425
423
  iron_auths[environment] ||= {}
426
- iron_auths[environment][vars['iron_project_id']] = vars['iron_token'] if vars['iron_project_id'].present?
424
+ iron_auths[environment][vars['IRON_PROJECT_ID']] = vars['IRON_TOKEN'] if vars['IRON_PROJECT_ID'].present?
427
425
  end
428
426
  end
429
427
 
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  class Factory
3
- VERSION = '0.4.1'
3
+ VERSION = '0.4.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce-factory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Clark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-04 00:00:00.000000000 Z
11
+ date: 2013-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -124,7 +124,6 @@ files:
124
124
  - lib/fanforce/factory/run.rb
125
125
  - lib/fanforce/factory/utils.rb
126
126
  - lib/fanforce/factory/version.rb
127
- - lib/fanforce_factory.rb
128
127
  homepage: ''
129
128
  licenses: []
130
129
  metadata: {}
@@ -1,3 +0,0 @@
1
- class Fanforce
2
- require 'fanforce/factory/version'
3
- end