fanforce-factory 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YTBhZjc0ZTU1Mzg1MTBhNzkxNDc1NDBkMjYwZGExZDZkNTkxYjhmMQ==
5
- data.tar.gz: !binary |-
6
- ZmExNTNhNzYyMjM0OTE0NTk1NTk1Y2FmMDFlNGIxNWFhNTVhN2RiMg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- N2ZiYzkzYzc0MTJhYzQ4OGVmYTk0OGFjYTk1YzhmYjBmZTRlOTZmZWE4MTdm
10
- ZTVjMjNkNDRlN2MzMzY0YTIwYzVhYTZiY2VhNmU3OTRlZmY2YWY0NGI4MWRh
11
- NzU1ZWViYTM3MzE3ODg2ZGE0MTJiNTM0NjcyNTA5OWVjZWQ0OGE=
12
- data.tar.gz: !binary |-
13
- YjdkNTZkM2I4YjZhZmU1YjE4YTRlN2FkYTY5NzQxOTk2MmEzODY1ODE1YTEz
14
- MzBjZWM2MDRmNGJjZDFlMDE5NzlhY2YwNmUxNzNhNGIxMDlkZjUyNmUzMDJl
15
- MDkwMzlhZGIzNjJhMTdlMzI3ZDI2ZDEzNTkwNDg2MjI1ZDc4Y2Y=
2
+ SHA1:
3
+ metadata.gz: 9648d15dda7ba2e09b30ea730425f6a004be3b3e
4
+ data.tar.gz: 6eca51d3cdab82532badb937fc25d8b8eae9758c
5
+ SHA512:
6
+ metadata.gz: be7adf46e86bbb224193a7287e9c2ea7fd183d69b5146bc9f36fc00e9d394b8f22e1cc5436ed8f9b15eebcc353091712e8aa65c69444ac4163bdbe6fa12f43de
7
+ data.tar.gz: d28a25236bded7e9f195237c3eabd3f3ee2ecf0371eae4843063a407e31536d1c962b5b889b5aa7d63c47cef38dd67bab61f1f1accc102857c44b61ced051ce9
data/.gitignore CHANGED
File without changes
data/.rbenv-gemsets ADDED
@@ -0,0 +1 @@
1
+ fanforce-factory
data/.rbenv-version ADDED
@@ -0,0 +1 @@
1
+ 2.0.0-p247
data/Gemfile CHANGED
File without changes
data/Gemfile.lock ADDED
@@ -0,0 +1,90 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ fanforce-factory (0.7.0)
5
+ activesupport
6
+ bitbucket_rest_api
7
+ fanforce-api
8
+ heroku-api (= 0.3.8)
9
+ iron_worker_ng
10
+ multi_json
11
+ redis
12
+ rest-client
13
+
14
+ GEM
15
+ remote: https://rubygems.org/
16
+ specs:
17
+ activesupport (4.0.2)
18
+ i18n (~> 0.6, >= 0.6.4)
19
+ minitest (~> 4.2)
20
+ multi_json (~> 1.3)
21
+ thread_safe (~> 0.1)
22
+ tzinfo (~> 0.3.37)
23
+ activesupport-inflector (0.1.0)
24
+ atomic (1.1.14)
25
+ bitbucket_rest_api (0.1.5)
26
+ faraday (~> 0.8.1)
27
+ faraday_middleware (~> 0.9.0)
28
+ hashie (~> 2.0.5)
29
+ multi_json (~> 1.3)
30
+ nokogiri (>= 1.5.2)
31
+ simple_oauth
32
+ excon (0.16.10)
33
+ fanforce (0.17.0)
34
+ multi_json (>= 1.7.2)
35
+ oj (~> 2.1.4)
36
+ rack
37
+ fanforce-api (0.20.0)
38
+ fanforce-exceptions (~> 0.5)
39
+ fanforce-validations (~> 0.7)
40
+ rest-client (~> 1.6.7)
41
+ fanforce-exceptions (0.5.1)
42
+ fanforce (~> 0.15)
43
+ fanforce-validations (0.7.1)
44
+ activesupport-inflector (~> 0.1)
45
+ fanforce (~> 0.15)
46
+ fanforce-exceptions (~> 0.5)
47
+ faraday (0.8.9)
48
+ multipart-post (~> 1.2.0)
49
+ faraday_middleware (0.9.0)
50
+ faraday (>= 0.7.4, < 0.9)
51
+ hashie (2.0.5)
52
+ heroku-api (0.3.8)
53
+ excon (~> 0.16.10)
54
+ i18n (0.6.9)
55
+ iron_core (1.0.3)
56
+ rest (>= 2.6.4)
57
+ iron_worker_ng (1.2.0)
58
+ bundler
59
+ iron_core (>= 1.0.0)
60
+ rubyzip (>= 1.0.0)
61
+ mime-types (2.1)
62
+ mini_portile (0.5.2)
63
+ minitest (4.7.5)
64
+ multi_json (1.8.4)
65
+ multipart-post (1.2.0)
66
+ net-http-persistent (2.9.2)
67
+ netrc (0.7.7)
68
+ nokogiri (1.6.1)
69
+ mini_portile (~> 0.5.0)
70
+ oj (2.1.7)
71
+ rack (1.5.2)
72
+ redis (3.0.7)
73
+ rest (2.7.1)
74
+ net-http-persistent (>= 2.9.1)
75
+ rest_client (>= 1.7.1)
76
+ rest-client (1.6.7)
77
+ mime-types (>= 1.16)
78
+ rest_client (1.7.2)
79
+ netrc (~> 0.7.7)
80
+ rubyzip (1.1.0)
81
+ simple_oauth (0.2.0)
82
+ thread_safe (0.1.3)
83
+ atomic
84
+ tzinfo (0.3.38)
85
+
86
+ PLATFORMS
87
+ ruby
88
+
89
+ DEPENDENCIES
90
+ fanforce-factory!
data/LICENSE.txt CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
data/bin/factory CHANGED
@@ -8,11 +8,11 @@ if File.exists?("#{$HomeDir}/config.ru") and File.exists?("#{$HomeDir}/../.facto
8
8
  $HomeDir = File.expand_path('..', $HomeDir)
9
9
  factory.start(
10
10
  :runtype => :single,
11
- :allowed => [:setup, :update, :restart, :push, :count, :bundle, :git, :iron, :version, :config, :cleanorgs],
11
+ :allowed => [:setup, :update, :restart, :push, :count, :bundle, :git, :iron, :version, :config, :cleanorgs, :upgrade],
12
12
  )
13
13
  else
14
14
  factory.start(
15
- :runtype => :realtime,
16
- :allowed => [:create, :setup, :delete, :update, :restart, :push, :count, :bundle, :git, :iron, :version, :config, :cleanorgs],
15
+ :runtype => :multiple,
16
+ :allowed => [:create, :setup, :delete, :update, :restart, :push, :count, :bundle, :git, :iron, :version, :config, :cleanorgs, :upgrade],
17
17
  )
18
18
  end
File without changes
File without changes
@@ -222,10 +222,10 @@ class Fanforce::Factory
222
222
  #################################################################################
223
223
 
224
224
  def run(method, *args)
225
- (@runtype == :forked) ? run_forked(method, *args) : run_realtime(method, *args)
225
+ (@runtype == :forked) ? run_forked(method, *args) : run_multiple(method, *args)
226
226
  end
227
227
 
228
- def run_realtime(method, *args)
228
+ def run_multiple(method, *args)
229
229
  if (dirs = Addons.dirs).size == 0
230
230
  puts "\n---------------------------------------------------------------------------------------------------------------"
231
231
  puts "#{'Oops'.format(:bold)}... no factory addons #{$Filter.length > 0 ? 'matching your filter was' : 'were'} found in this directory."
File without changes
@@ -293,7 +293,7 @@ class Fanforce::Factory
293
293
 
294
294
  if [:all,:bitbucket].include?(command) and $Config[:bitbucket].present?
295
295
  puts "\n#{'Pushing '.format(:green,:bold)}" + "latest commit to Bitbucket (#{$Config[:bitbucket][:user]})..."
296
- Run.command("git push #{$Config[:bitbucket][:user]} --all")
296
+ Run.command("git push bitbucket --all")
297
297
  end
298
298
 
299
299
  if [:all,:heroku].include?(command) and environment != :development
@@ -569,24 +569,35 @@ class Fanforce::Factory
569
569
  puts "\n---------------------------------------------------------------------------------------------------------------"
570
570
  puts "#{addon.type.to_s.upcase.format(:bold)} - #{addon._id.upcase.gsub('-',' ').format(:bold)} (#{processed_count} of #{total_count})... "
571
571
 
572
- heroku = auth_heroku(:staging)
573
- heroku_app_name = get_heroku_app_qa_name(addon, environment)
574
- begin
575
- heroku.delete_app(heroku_app_name)
576
- puts "#{'Deleted '.format(:green,:bold)}" + "#{environment} app on heroku (#{heroku_app_name})"
577
- rescue
578
- heroku.post_app(name: heroku_app_name)
579
- puts "#{'Not Found '.format(:green,:bold)}" + "#{environment} on heroku (#{heroku_app_name})"
572
+ #heroku = auth_heroku(:staging)
573
+ #heroku_app_name = get_heroku_app_qa_name(addon, environment)
574
+ #begin
575
+ # heroku.delete_app(heroku_app_name)
576
+ # puts "#{'Deleted '.format(:green,:bold)}" + "#{environment} app on heroku (#{heroku_app_name})"
577
+ #rescue
578
+ # heroku.post_app(name: heroku_app_name)
579
+ # puts "#{'Not Found '.format(:green,:bold)}" + "#{environment} on heroku (#{heroku_app_name})"
580
+ #end
581
+
582
+ if (`git remote`).split(/\r?\n/).include?($Config[:bitbucket][:user])
583
+ puts "#{'Removed '.format(:red,:bold)}" + "git remote for #{$Config[:bitbucket][:user]}"
584
+ `git remote rm #{$Config[:bitbucket][:user]}`
580
585
  end
581
-
582
- remote_name = "#{environment==:production ? 'prd' : 'qa'}-heroku"
583
- if (`git remote`).split(/\r?\n/).include?(remote_name)
584
- puts "#{'Removed '.format(:green,:bold)}" + "git remote for #{remote_name}"
585
- `git remote rm #{remote_name}`
586
+ if (`git remote`).split(/\r?\n/).include?('qa-heroku')
587
+ puts "#{'Removed '.format(:red,:bold)}" + "git remote for qa-heroku"
588
+ `git remote rm qa-heroku`
589
+ end
590
+ if (`git remote`).split(/\r?\n/).include?('bitbucket')
591
+ puts "#{'Updated '.format(:green,:bold)}" + "git remote for bitbucket"
592
+ `git remote rm bitbucket`
593
+ `git remote add bitbucket git@bitbucket.org:#{$Config[:bitbucket][:user]}/#{addon.dir_name}.git`
586
594
  else
587
- puts "#{'Not Found '.format(:green,:bold)}" + "git remote for #{remote_name}"
595
+ `git remote add bitbucket git@bitbucket.org:#{$Config[:bitbucket][:user]}/#{addon.dir_name}.git`
596
+ puts "#{'Created '.format(:green,:bold)}" + "git remote for bitbucket"
588
597
  end
589
598
 
599
+ `git config --remove-section branch.master`
600
+ `git push --set-upstream bitbucket master`
590
601
 
591
602
  end
592
603
 
@@ -84,13 +84,17 @@ class Fanforce::Factory
84
84
  if (`git remote`).split(/\r?\n/).include?($Config[:bitbucket][:user])
85
85
  puts "#{'Updated '.format(:green,:bold)}" + "git remote for #{$Config[:bitbucket][:user]}"
86
86
  `git remote rm #{$Config[:bitbucket][:user]}`
87
+ elsif (`git remote`).split(/\r?\n/).include?('bitbucket')
88
+ `git remote rm bitbucket`
89
+ puts "#{'Removed '.format(:red,:bold)}" + "git remote for #{$Config[:bitbucket][:user]}"
90
+ puts "#{'Created '.format(:green,:bold)}" + "git remote for bitbucket"
87
91
  else
88
- puts "#{'Created '.format(:green,:bold)}" + "git remote for #{$Config[:bitbucket][:user]}"
92
+ puts "#{'Created '.format(:green,:bold)}" + "git remote for bitbucket"
89
93
  end
90
- `git remote add #{$Config[:bitbucket][:user]} https://#{$Config[:bitbucket][:user]}@bitbucket.org/#{$Config[:bitbucket][:user]}/#{addon.dir_name}.git`
94
+ `git remote add bitbucket git@bitbucket.org:#{$Config[:bitbucket][:user]}/#{addon.dir_name}.git`
91
95
 
92
96
  puts "#{'Pushing '.format(:green,:bold)}" + "latest commit to #{$Config[:bitbucket][:user]}..."
93
- Run.command("git push #{$Config[:bitbucket][:user]} --all")
97
+ Run.command("git push bitbucket --all")
94
98
  end
95
99
 
96
100
  def auth_heroku(environment)
File without changes
File without changes
File without changes
@@ -8,8 +8,8 @@ module Fanforce::Factory::Help
8
8
 
9
9
  def commands(allowed_commands)
10
10
  response = "\n\nAVAILABLE COMMANDS...\n-----------------------------------------------------------------------------------------------------------------------\n"
11
- commands = allowed_commands.map do |c|
12
- self.send(:"#{c}_command")
11
+ commands = allowed_commands.inject([]) do |results, c|
12
+ results << self.send(:"#{c}_command") rescue next results
13
13
  end
14
14
  response += commands.join("-----------------------------------------------------------------------------------------------------------------------\n")
15
15
  response += "-----------------------------------------------------------------------------------------------------------------------\n\n"
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  class Factory
3
- VERSION = '0.6.2'
3
+ VERSION = '0.7.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce-factory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.0
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-12-04 00:00:00.000000000 Z
11
+ date: 2014-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rest-client
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: iron_worker_ng
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activesupport
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
@@ -84,42 +84,42 @@ dependencies:
84
84
  name: multi_json
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bitbucket_rest_api
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ! '>='
101
+ - - '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ! '>='
108
+ - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: fanforce-api
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ! '>='
115
+ - - '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ! '>='
122
+ - - '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  description: CLI for managing a folder of Fanforce addons
@@ -132,7 +132,10 @@ extensions: []
132
132
  extra_rdoc_files: []
133
133
  files:
134
134
  - .gitignore
135
+ - .rbenv-gemsets
136
+ - .rbenv-version
135
137
  - Gemfile
138
+ - Gemfile.lock
136
139
  - LICENSE.txt
137
140
  - README.md
138
141
  - Rakefile
@@ -161,12 +164,12 @@ require_paths:
161
164
  - lib
162
165
  required_ruby_version: !ruby/object:Gem::Requirement
163
166
  requirements:
164
- - - ! '>='
167
+ - - '>='
165
168
  - !ruby/object:Gem::Version
166
169
  version: '0'
167
170
  required_rubygems_version: !ruby/object:Gem::Requirement
168
171
  requirements:
169
- - - ! '>='
172
+ - - '>='
170
173
  - !ruby/object:Gem::Version
171
174
  version: '0'
172
175
  requirements: []