iron_worker 2.3.8 → 2.3.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 2
3
3
  :minor: 3
4
- :patch: 8
4
+ :patch: 9
5
5
  :build:
@@ -29,10 +29,11 @@ module IronWorker
29
29
  :merged_gems,
30
30
  :unmerged_gems,
31
31
  :force_upload,
32
- :beta # for setting beta feature flags
32
+ :beta, # for setting beta feature flags
33
+ :skip_auto_dependencies
33
34
 
34
35
  def self.system_gems
35
- ['bson_ext','curb','em-http-request','eventmachine','mysql2','net-scp','net-sftp','net-ssh','nokogiri','rmagick','sqlite3','typhoeus']
36
+ ['bson_ext', 'curb', 'em-http-request', 'eventmachine', 'mysql2', 'net-scp', 'net-sftp', 'net-ssh', 'nokogiri', 'rmagick', 'sqlite3', 'typhoeus']
36
37
  end
37
38
 
38
39
  def initialize
@@ -50,6 +51,7 @@ module IronWorker
50
51
  def access_key=(x)
51
52
  raise "IronWorker Config Error: access_key and secret_key are no longer used. The new IronWorker gem requires a couple of small configuration changes, please see: http://docs.IronWorker.com/ruby/new-gem-v2-update-guide for information."
52
53
  end
54
+
53
55
  def secret_key=(x)
54
56
  raise "IronWorker Config Error: access_key and secret_key are no longer used. The new IronWorker gem requires a couple of small configuration changes, please see: http://docs.IronWorker.com/ruby/new-gem-v2-update-guide for information."
55
57
  end
@@ -67,13 +69,13 @@ module IronWorker
67
69
  #end
68
70
 
69
71
  def bundle=(activate)
70
- if activate
71
- IronWorker.logger.info "Initializing IronWorker for Bundler..."
72
- IronWorker.configure do |c2|
73
- c2.merged_gems.merge!(get_required_gems)
74
- IronWorker.logger.debug "List of gems from bundler:#{c2.merged_gems.inspect}"
75
- end
76
- end
72
+ if activate
73
+ IronWorker.logger.info "Initializing IronWorker for Bundler..."
74
+ IronWorker.configure do |c2|
75
+ c2.merged_gems.merge!(get_required_gems)
76
+ IronWorker.logger.debug "List of gems from bundler:#{c2.merged_gems.inspect}"
77
+ end
78
+ end
77
79
  end
78
80
 
79
81
  def auto_merge=(b)
@@ -127,12 +129,12 @@ module IronWorker
127
129
  # IronWorker.logger.debug "Skipping #{spec.name}"
128
130
  # next
129
131
  #end
130
- # next if dep.name=='rails' #monkey patch
132
+ # next if dep.name=='rails' #monkey patch
131
133
  gem_info = {:name=>spec.name, :version=>spec.version}
132
134
  gem_info[:auto_merged] = true
133
135
  gem_info[:merge] = spec.extensions.length == 0 #merging only non binary gems
134
136
  gem_info[:bypass_require] = true #don't require gem'
135
- # Now find dependency in gemfile in case user set the require
137
+ # Now find dependency in gemfile in case user set the require
136
138
  dep = gems_in_gemfile.find { |g| g.name == gem_info[:name] }
137
139
  if dep
138
140
  IronWorker.logger.debug 'dep found in gemfile: ' + dep.inspect
@@ -142,7 +144,7 @@ module IronWorker
142
144
  end
143
145
  gem_info[:version] = spec.version.to_s
144
146
  gems[gem_info[:name]] = gem_info
145
- gemspec,path = IronWorker::Service.get_gem_path(gem_info)
147
+ gemspec, path = IronWorker::Service.get_gem_path(gem_info)
146
148
  if path
147
149
  gem_info[:gemspec] = gemspec
148
150
  gem_info[:path] = path
@@ -96,7 +96,7 @@ module IronWorker
96
96
  def self.get_gem_path(gem_info)
97
97
  # gem_name =(gem_info[:require] || gem_info[:name].match(/^[a-zA-Z0-9\-_]+/)[0])
98
98
  gem_name =(gem_info[:name].match(/^[a-zA-Z0-9\-_]+/)[0])
99
- #puts "Searching for #{gem_name}..."
99
+ IronWorker.logger.debug "Searching for gem #{gem_name}..."
100
100
  gems= Gem::Specification.respond_to?(:each) ? Gem::Specification.find_all_by_name(gem_name) : Gem::GemPathSearcher.new.find_all(gem_name)
101
101
  if (Service.heroku?) && (!gems || gems.empty?)
102
102
  gems = Gem::GemPathSearcher.new.init_gemspecs.select { |gem| gem.name==gem_name }
@@ -136,6 +136,7 @@ module IronWorker
136
136
  list = Bundler::Resolver.resolve(filtered_deps, index)
137
137
  list.each do |gemspec|
138
138
  next if list_of_gems.keys.include?(gemspec.name) || Config.system_gems.include?(gemspec.name)
139
+ IronWorker.logger.debug "gemspec from bundler " + gemspec.inspect
139
140
  gi = IronWorker::MergeHelper.create_gem_info(gemspec.name, gemspec.version.version)
140
141
  dependendent_gems[gemspec.name] = gi
141
142
  end
@@ -160,14 +161,18 @@ module IronWorker
160
161
  merged_gems = merged_gems.merge(IronWorker.config.merged_gems)
161
162
  IronWorker.logger.debug 'merged_gems=' + merged_gems.inspect
162
163
 
163
- gems_dependencies = gem_dependencies(merged_gems)
164
- IronWorker.logger.debug 'gem_dependencies=' + gems_dependencies.inspect
165
- # add dependencies to merged_gems
166
- #require gems dependencies
167
- gems_dependencies.each_pair do |k, gem|
168
- IronWorker.logger.debug "Bundling dependent gem #{gem[:name]}..."
169
- gem[:bypass_require] = true
170
- merged_gems[k] ||= gem
164
+ if config.skip_auto_dependencies
165
+ gems_dependencies = {}
166
+ else
167
+ gems_dependencies = gem_dependencies(merged_gems)
168
+ IronWorker.logger.debug 'gem_dependencies=' + gems_dependencies.inspect
169
+ # add dependencies to merged_gems
170
+ #require gems dependencies
171
+ gems_dependencies.each_pair do |k, gem|
172
+ IronWorker.logger.debug "Bundling dependent gem #{gem[:name]}..."
173
+ gem[:bypass_require] = true
174
+ merged_gems[k] ||= gem
175
+ end
171
176
  end
172
177
 
173
178
  # Now remove unmerged gems
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.8
4
+ version: 2.3.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-20 00:00:00.000000000 Z
12
+ date: 2012-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: zip
16
- requirement: &27271720 !ruby/object:Gem::Requirement
16
+ requirement: &9463360 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *27271720
24
+ version_requirements: *9463360
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rest-client
27
- requirement: &27271200 !ruby/object:Gem::Requirement
27
+ requirement: &9462400 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *27271200
35
+ version_requirements: *9462400
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rest
38
- requirement: &27270720 !ruby/object:Gem::Requirement
38
+ requirement: &9461380 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *27270720
46
+ version_requirements: *9461380
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &27270160 !ruby/object:Gem::Requirement
49
+ requirement: &9460360 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *27270160
57
+ version_requirements: *9460360
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: zip
60
- requirement: &27269600 !ruby/object:Gem::Requirement
60
+ requirement: &9476300 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *27269600
68
+ version_requirements: *9476300
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rest-client
71
- requirement: &27269080 !ruby/object:Gem::Requirement
71
+ requirement: &9475320 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *27269080
79
+ version_requirements: *9475320
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rest
82
- requirement: &27268580 !ruby/object:Gem::Requirement
82
+ requirement: &9474580 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *27268580
90
+ version_requirements: *9474580
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: bundler
93
- requirement: &27268080 !ruby/object:Gem::Requirement
93
+ requirement: &9473360 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *27268080
101
+ version_requirements: *9473360
102
102
  description: The official IronWorker gem for IronWorker by Iron.io. http://www.iron.io
103
103
  email: travis@iron.io
104
104
  executables: []