iron_worker 2.3.5 → 2.3.6

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: 5
4
+ :patch: 6
5
5
  :build:
@@ -388,6 +388,7 @@ module IronWorker
388
388
  if !uploaded?
389
389
  unmerged = self.class.instance_variable_get(:@unmerged)
390
390
  merged_gems = self.class.instance_variable_get(:@merged_gems)
391
+ unmerged_gems = self.class.instance_variable_get(:@unmerged_gems)
391
392
  merged_mailers = self.class.instance_variable_get(:@merged_mailers)
392
393
  merged_folders = self.class.instance_variable_get(:@merged_folders)
393
394
  merged, rfile, subclass = IronWorker::Base.extract_superclasses_merges(self, merged)
@@ -396,7 +397,7 @@ module IronWorker
396
397
  merged_gems = gems_to_merge(merged_gems)
397
398
  end
398
399
 
399
- options_for_upload = {:merge=>merged, :unmerge=>unmerged, :merged_gems=>merged_gems, :merged_mailers=>merged_mailers, :merged_folders=>merged_folders}
400
+ options_for_upload = {:merge=>merged, :unmerge=>unmerged, :merged_gems=>merged_gems, :unmerged_gems=>unmerged_gems, :merged_mailers=>merged_mailers, :merged_folders=>merged_folders}
400
401
  options_for_upload.merge!(options)
401
402
  IronWorker.service.upload(rfile, subclass.name, options_for_upload)
402
403
  self.class.instance_variable_set(:@uploaded, true)
@@ -51,11 +51,11 @@ module IronWorker
51
51
 
52
52
  begin
53
53
 
54
- zip_filename = build_merged_file(filename, options[:merge], options[:unmerge], options[:merged_gems], options[:merged_mailers], options[:merged_folders])
54
+ zip_filename = build_merged_file(filename, options[:merge], options[:unmerge], options[:merged_gems], options[:unmerged_gems], options[:merged_mailers], options[:merged_folders])
55
55
 
56
- # Check for code changes.
57
- zipfile = Zip::ZipFile.open(zip_filename, Zip::ZipFile::CREATE)
58
- crc = zipfile.entries.collect{|x|x.crc}.inject(:+)
56
+ # Check for code changes.
57
+ zipfile = Zip::ZipFile.open(zip_filename, Zip::ZipFile::CREATE)
58
+ crc = zipfile.entries.collect { |x| x.crc }.inject(:+)
59
59
  new_code = false
60
60
  if self.config.force_upload || crc.to_s != existing_md5
61
61
  IronWorker.logger.info "Uploading #{class_name}, code modified."
@@ -99,9 +99,9 @@ module IronWorker
99
99
  gems = gems.select { |g| g.version.version==gem_info[:version] } if gem_info[:version]
100
100
  if !gems.empty?
101
101
  gem = gems.last
102
- return gem,gem.full_gem_path
102
+ return gem, gem.full_gem_path
103
103
  else
104
- return nil,nil
104
+ return nil, nil
105
105
  end
106
106
  end
107
107
 
@@ -121,12 +121,15 @@ module IronWorker
121
121
  list = Bundler::Resolver.resolve(filtered_deps, index)
122
122
  list.each do |gemspec|
123
123
  next if list_of_gems.keys.include?(gemspec.name)
124
- dependendent_gems[gemspec.name] = IronWorker::MergeHelper.create_gem_info(gemspec.name, gemspec.version.version)
124
+ gi = IronWorker::MergeHelper.create_gem_info(gemspec.name, gemspec.version.version)
125
+ dependendent_gems[gemspec.name] = gi
125
126
  end
126
127
  dependendent_gems
127
128
  end
128
129
 
129
- def build_merged_file(filename, merged, unmerge, merged_gems, merged_mailers, merged_folders)
130
+ def build_merged_file(filename, merged, unmerge, merged_gems, unmerged_gems, merged_mailers, merged_folders)
131
+
132
+ unmerged_gems ||= {}
130
133
 
131
134
  merge = IronWorker.config.merged.dup
132
135
  merge.merge!(merged) if merged
@@ -141,13 +144,25 @@ module IronWorker
141
144
 
142
145
  merged_gems = merged_gems.merge(IronWorker.config.merged_gems)
143
146
  IronWorker.logger.debug 'merged_gems=' + merged_gems.inspect
144
- IronWorker.config.unmerged_gems.each_pair do |k, v|
147
+
148
+ gems_dependencies = gem_dependencies(merged_gems)
149
+ IronWorker.logger.debug 'gem_dependencies=' + gems_dependencies.inspect
150
+ # add dependencies to merged_gems
151
+ #require gems dependencies
152
+ gems_dependencies.each_pair do |k, gem|
153
+ IronWorker.logger.debug "Bundling dependent gem #{gem[:name]}..."
154
+ gem[:bypass_require] = true
155
+ merged_gems[k] ||= gem
156
+ end
157
+
158
+ # Now remove unmerged gems
159
+ unmerged_gems = unmerged_gems.merge(IronWorker.config.unmerged_gems)
160
+ unmerged_gems.each_pair do |k, v|
145
161
  IronWorker.logger.debug 'unmerging gem=' + k.inspect
146
162
  merged_gems.delete(k)
147
163
  end
148
164
  IronWorker.logger.debug 'merged_gems_after=' + merged_gems.inspect
149
- gems_dependencies = gem_dependencies(merged_gems)
150
- IronWorker.logger.debug 'gem_dependencies=' + gems_dependencies.inspect
165
+
151
166
  merged_mailers ||= {}
152
167
  merged_mailers = merged_mailers.merge(IronWorker.config.mailers) if IronWorker.config.mailers
153
168
 
@@ -179,11 +194,7 @@ ARGV.each do |arg|
179
194
  end
180
195
  require 'json'
181
196
  ")
182
- #require gems dependencies
183
- gems_dependencies.each_pair do |k, gem|
184
- IronWorker.logger.debug "Bundling dependent gem #{gem[:name]}..."
185
- f.write "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '/gems/#{gem[:name]}/lib'))\n"
186
- end
197
+
187
198
  # require merged gems
188
199
  merged_gems.each_pair do |k, gem|
189
200
  IronWorker.logger.debug "Bundling gem #{gem[:name]}..."
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.5
4
+ version: 2.3.6
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-19 00:00:00.000000000 Z
12
+ date: 2012-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: zip
16
- requirement: &18837620 !ruby/object:Gem::Requirement
16
+ requirement: &21515140 !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: *18837620
24
+ version_requirements: *21515140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rest-client
27
- requirement: &18837080 !ruby/object:Gem::Requirement
27
+ requirement: &21605480 !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: *18837080
35
+ version_requirements: *21605480
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rest
38
- requirement: &18836460 !ruby/object:Gem::Requirement
38
+ requirement: &21604620 !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: *18836460
46
+ version_requirements: *21604620
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &18834940 !ruby/object:Gem::Requirement
49
+ requirement: &21603720 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,164 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *18834940
57
+ version_requirements: *21603720
58
+ - !ruby/object:Gem::Dependency
59
+ name: rack
60
+ requirement: &21603020 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - <
64
+ - !ruby/object:Gem::Version
65
+ version: '1.4'
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *21603020
69
+ - !ruby/object:Gem::Dependency
70
+ name: test-unit
71
+ requirement: &21602380 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: *21602380
80
+ - !ruby/object:Gem::Dependency
81
+ name: jeweler2
82
+ requirement: &21601760 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :runtime
89
+ prerelease: false
90
+ version_requirements: *21601760
91
+ - !ruby/object:Gem::Dependency
92
+ name: zip
93
+ requirement: &21600920 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ type: :runtime
100
+ prerelease: false
101
+ version_requirements: *21600920
102
+ - !ruby/object:Gem::Dependency
103
+ name: rest
104
+ requirement: &21600280 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :runtime
111
+ prerelease: false
112
+ version_requirements: *21600280
113
+ - !ruby/object:Gem::Dependency
114
+ name: activesupport
115
+ requirement: &21599440 !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ type: :runtime
122
+ prerelease: false
123
+ version_requirements: *21599440
124
+ - !ruby/object:Gem::Dependency
125
+ name: simple_record
126
+ requirement: &21598120 !ruby/object:Gem::Requirement
127
+ none: false
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: *21598120
135
+ - !ruby/object:Gem::Dependency
136
+ name: dropbox
137
+ requirement: &21743080 !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - =
141
+ - !ruby/object:Gem::Version
142
+ version: 1.2.3
143
+ type: :runtime
144
+ prerelease: false
145
+ version_requirements: *21743080
146
+ - !ruby/object:Gem::Dependency
147
+ name: mongoid_i18n
148
+ requirement: &21742480 !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ type: :runtime
155
+ prerelease: false
156
+ version_requirements: *21742480
157
+ - !ruby/object:Gem::Dependency
158
+ name: signature
159
+ requirement: &21741760 !ruby/object:Gem::Requirement
160
+ none: false
161
+ requirements:
162
+ - - ! '>='
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ type: :runtime
166
+ prerelease: false
167
+ version_requirements: *21741760
168
+ - !ruby/object:Gem::Dependency
169
+ name: pusher
170
+ requirement: &21740720 !ruby/object:Gem::Requirement
171
+ none: false
172
+ requirements:
173
+ - - ! '>='
174
+ - !ruby/object:Gem::Version
175
+ version: '0'
176
+ type: :runtime
177
+ prerelease: false
178
+ version_requirements: *21740720
179
+ - !ruby/object:Gem::Dependency
180
+ name: carrierwave
181
+ requirement: &21739840 !ruby/object:Gem::Requirement
182
+ none: false
183
+ requirements:
184
+ - - ! '>='
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ type: :runtime
188
+ prerelease: false
189
+ version_requirements: *21739840
190
+ - !ruby/object:Gem::Dependency
191
+ name: aws-s3
192
+ requirement: &21738060 !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ type: :runtime
199
+ prerelease: false
200
+ version_requirements: *21738060
201
+ - !ruby/object:Gem::Dependency
202
+ name: mechanize
203
+ requirement: &21736780 !ruby/object:Gem::Requirement
204
+ none: false
205
+ requirements:
206
+ - - ! '>='
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ type: :runtime
210
+ prerelease: false
211
+ version_requirements: *21736780
58
212
  - !ruby/object:Gem::Dependency
59
213
  name: zip
60
- requirement: &18869820 !ruby/object:Gem::Requirement
214
+ requirement: &21770720 !ruby/object:Gem::Requirement
61
215
  none: false
62
216
  requirements:
63
217
  - - ! '>='
@@ -65,10 +219,10 @@ dependencies:
65
219
  version: '0'
66
220
  type: :runtime
67
221
  prerelease: false
68
- version_requirements: *18869820
222
+ version_requirements: *21770720
69
223
  - !ruby/object:Gem::Dependency
70
224
  name: rest-client
71
- requirement: &18869020 !ruby/object:Gem::Requirement
225
+ requirement: &21770080 !ruby/object:Gem::Requirement
72
226
  none: false
73
227
  requirements:
74
228
  - - ! '>='
@@ -76,10 +230,10 @@ dependencies:
76
230
  version: '0'
77
231
  type: :runtime
78
232
  prerelease: false
79
- version_requirements: *18869020
233
+ version_requirements: *21770080
80
234
  - !ruby/object:Gem::Dependency
81
235
  name: rest
82
- requirement: &18868220 !ruby/object:Gem::Requirement
236
+ requirement: &21769340 !ruby/object:Gem::Requirement
83
237
  none: false
84
238
  requirements:
85
239
  - - ! '>='
@@ -87,10 +241,10 @@ dependencies:
87
241
  version: '0'
88
242
  type: :runtime
89
243
  prerelease: false
90
- version_requirements: *18868220
244
+ version_requirements: *21769340
91
245
  - !ruby/object:Gem::Dependency
92
246
  name: bundler
93
- requirement: &18867180 !ruby/object:Gem::Requirement
247
+ requirement: &21768620 !ruby/object:Gem::Requirement
94
248
  none: false
95
249
  requirements:
96
250
  - - ! '>='
@@ -98,7 +252,7 @@ dependencies:
98
252
  version: '0'
99
253
  type: :runtime
100
254
  prerelease: false
101
- version_requirements: *18867180
255
+ version_requirements: *21768620
102
256
  description: The official IronWorker gem for IronWorker by Iron.io. http://www.iron.io
103
257
  email: travis@iron.io
104
258
  executables: []