iron_worker 2.3.7 → 2.3.8

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: 7
4
+ :patch: 8
5
5
  :build:
@@ -215,9 +215,9 @@ module IronWorker
215
215
  def queue(options={})
216
216
  # puts 'in queue'
217
217
 
218
+ IronWorker.service.config.force_upload = IronWorker.service.config.force_upload && is_local?
218
219
  set_auto_attributes
219
220
  upload_if_needed(options)
220
- IronWorker.service.config.force_upload = IronWorker.service.config.force_upload && is_local?
221
221
  response = IronWorker.service.queue(self.class.name, sw_get_data, options)
222
222
  IronWorker.service.logger.debug 'queue response=' + response.inspect
223
223
  @response = response
@@ -363,6 +363,7 @@ module IronWorker
363
363
  end
364
364
 
365
365
  def upload_if_needed(options={})
366
+ return if is_remote?
366
367
  check_service
367
368
  IronWorker.service.check_config
368
369
 
@@ -31,6 +31,9 @@ module IronWorker
31
31
  :force_upload,
32
32
  :beta # for setting beta feature flags
33
33
 
34
+ def self.system_gems
35
+ ['bson_ext','curb','em-http-request','eventmachine','mysql2','net-scp','net-sftp','net-ssh','nokogiri','rmagick','sqlite3','typhoeus']
36
+ end
34
37
 
35
38
  def initialize
36
39
  @global_attributes = {}
@@ -87,12 +87,18 @@ module IronWorker
87
87
  IronWorker.logger
88
88
  end
89
89
 
90
+
91
+ def self.heroku?
92
+ !Gem::GemPathSearcher.private_instance_methods.include?(:_deprecated_initialize)
93
+ end
94
+
95
+
90
96
  def self.get_gem_path(gem_info)
91
97
  # gem_name =(gem_info[:require] || gem_info[:name].match(/^[a-zA-Z0-9\-_]+/)[0])
92
98
  gem_name =(gem_info[:name].match(/^[a-zA-Z0-9\-_]+/)[0])
93
99
  #puts "Searching for #{gem_name}..."
94
100
  gems= Gem::Specification.respond_to?(:each) ? Gem::Specification.find_all_by_name(gem_name) : Gem::GemPathSearcher.new.find_all(gem_name)
95
- if (!Gem::GemPathSearcher.private_instance_methods.include?(:_deprecated_initialize)) && (!gems || gems.empty?)
101
+ if (Service.heroku?) && (!gems || gems.empty?)
96
102
  gems = Gem::GemPathSearcher.new.init_gemspecs.select { |gem| gem.name==gem_name }
97
103
  end
98
104
  IronWorker.logger.debug 'gems found=' + gems.inspect
@@ -105,8 +111,13 @@ module IronWorker
105
111
  end
106
112
  end
107
113
 
108
-
109
114
  def gem_dependencies(list_of_gems)
115
+ if Service.heroku?
116
+ gem_specs = Gem::GemPathSearcher.new.init_gemspecs
117
+ else
118
+ gem_specs = Gem::Specification.all
119
+ end
120
+
110
121
  IronWorker.logger.debug "Getting gem_dependencies.."
111
122
  deps = []
112
123
  dependendent_gems ={}
@@ -121,10 +132,10 @@ module IronWorker
121
132
  filtered_deps = deps.select { |d| d.type != :development }
122
133
  IronWorker.logger.debug "filtered_deps=#{filtered_deps}"
123
134
  index = Bundler::Index.new
124
- Gem::Specification.all.collect { |s| index<<s }
135
+ gem_specs.collect { |s| index<<s }
125
136
  list = Bundler::Resolver.resolve(filtered_deps, index)
126
137
  list.each do |gemspec|
127
- next if list_of_gems.keys.include?(gemspec.name)
138
+ next if list_of_gems.keys.include?(gemspec.name) || Config.system_gems.include?(gemspec.name)
128
139
  gi = IronWorker::MergeHelper.create_gem_info(gemspec.name, gemspec.version.version)
129
140
  dependendent_gems[gemspec.name] = gi
130
141
  end
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.7
4
+ version: 2.3.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: zip
16
- requirement: &26666020 !ruby/object:Gem::Requirement
16
+ requirement: &27271720 !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: *26666020
24
+ version_requirements: *27271720
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rest-client
27
- requirement: &26665500 !ruby/object:Gem::Requirement
27
+ requirement: &27271200 !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: *26665500
35
+ version_requirements: *27271200
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rest
38
- requirement: &26665020 !ruby/object:Gem::Requirement
38
+ requirement: &27270720 !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: *26665020
46
+ version_requirements: *27270720
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &26664460 !ruby/object:Gem::Requirement
49
+ requirement: &27270160 !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: *26664460
57
+ version_requirements: *27270160
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: zip
60
- requirement: &26663900 !ruby/object:Gem::Requirement
60
+ requirement: &27269600 !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: *26663900
68
+ version_requirements: *27269600
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rest-client
71
- requirement: &26663380 !ruby/object:Gem::Requirement
71
+ requirement: &27269080 !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: *26663380
79
+ version_requirements: *27269080
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rest
82
- requirement: &26662880 !ruby/object:Gem::Requirement
82
+ requirement: &27268580 !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: *26662880
90
+ version_requirements: *27268580
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: bundler
93
- requirement: &26662380 !ruby/object:Gem::Requirement
93
+ requirement: &27268080 !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: *26662380
101
+ version_requirements: *27268080
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: []