rsence-deps 969 → 970
Sign up to get free protection for your applications and to get access to all the features.
- data/extconf.rb +49 -0
- metadata +24 -28
data/extconf.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'rubygems/dependency_installer'
|
2
|
+
|
3
|
+
failed = []
|
4
|
+
succeeded = []
|
5
|
+
deps = [
|
6
|
+
[ 'sqlite3', '>= 1.2.5'],
|
7
|
+
[ 'rmagick', '>= 2.12.0'],
|
8
|
+
[ 'saeuothsth', '>= 89898' ]
|
9
|
+
]
|
10
|
+
installer = Gem::DependencyInstaller.new
|
11
|
+
deps.each do |dependency|
|
12
|
+
begin
|
13
|
+
begin
|
14
|
+
has_gem = gem(*dependency)
|
15
|
+
rescue Gem::LoadError => e
|
16
|
+
has_gem = false
|
17
|
+
end
|
18
|
+
installer.install(*dependency) unless has_gem
|
19
|
+
succeeded.push dependency
|
20
|
+
rescue Gem::LoadError => e
|
21
|
+
failed.push dependency
|
22
|
+
rescue => e
|
23
|
+
failed.push dependency
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
failed.map! {|f| f.join(' ')}
|
28
|
+
|
29
|
+
if failed.length > 0
|
30
|
+
puts %{
|
31
|
+
You are adviced to also install the following gems,
|
32
|
+
even though RSence is able to run in a degraded mode
|
33
|
+
without them. They aren't included as hard-dependencies,
|
34
|
+
because they require additional tasks on some platforms:
|
35
|
+
- #{failed.join("\n - ")}
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# fakes extension build:
|
40
|
+
extension_name = 'rsence-deps'
|
41
|
+
File.open('Makefile', 'w') { |f| f.write "all:\n\ninstall:\n\n" }
|
42
|
+
File.open('make', 'w') do |f|
|
43
|
+
f.write '#!/bin/sh'
|
44
|
+
f.chmod f.stat.mode | 0111
|
45
|
+
end
|
46
|
+
File.open(extension_name + '.so', 'w') {}
|
47
|
+
File.open(extension_name + '.dll', 'w') {}
|
48
|
+
File.open('nmake.bat', 'w') { |f| }
|
49
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsence-deps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '970'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -203,22 +203,6 @@ dependencies:
|
|
203
203
|
- - ! '>='
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: 0.1.4
|
206
|
-
- !ruby/object:Gem::Dependency
|
207
|
-
name: therubyracer
|
208
|
-
requirement: !ruby/object:Gem::Requirement
|
209
|
-
none: false
|
210
|
-
requirements:
|
211
|
-
- - ! '>='
|
212
|
-
- !ruby/object:Gem::Version
|
213
|
-
version: 0.9.9
|
214
|
-
type: :runtime
|
215
|
-
prerelease: false
|
216
|
-
version_requirements: !ruby/object:Gem::Requirement
|
217
|
-
none: false
|
218
|
-
requirements:
|
219
|
-
- - ! '>='
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: 0.9.9
|
222
206
|
- !ruby/object:Gem::Dependency
|
223
207
|
name: coffee-script
|
224
208
|
requirement: !ruby/object:Gem::Requirement
|
@@ -235,24 +219,36 @@ dependencies:
|
|
235
219
|
- - ! '>='
|
236
220
|
- !ruby/object:Gem::Version
|
237
221
|
version: 2.2.0
|
238
|
-
description: !
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
222
|
+
description: ! "This is an empty gem specifying a list of dependencies for RSence\n\nAdditionally,
|
223
|
+
you may want to install these gems also, even though\nthey are tested for and auto-installation
|
224
|
+
in tried:\n - sqlite3\n - rmagick\n\nYou must install a Javascript runtime engine
|
225
|
+
separately, because\nRubyGems isn't smart enough to allow conditional dependencies.\n\nThe
|
226
|
+
V8-based NodeJS is recommended: http://nodejs.org/\n\nIf you are on OS X, you already
|
227
|
+
have Apple's JavaScriptCore\ninstalled, which is fine.\n\nPreviously, RSence depended
|
228
|
+
on therubyracer, but it was found\nto be the the culprit for crashing the Ruby VM
|
229
|
+
and the cause\nof some other random memory corruption issues, so it's not\nrecommended
|
230
|
+
until its maintainers have sorted it out.\nYou may however proceed to use it on
|
231
|
+
your own risk, if the\nspeed gains are worth the instability.\n\nMore info: http://rsence.org/\n\n"
|
243
232
|
email: o@rsence.org
|
244
233
|
executables: []
|
245
|
-
extensions:
|
234
|
+
extensions:
|
235
|
+
- extconf.rb
|
246
236
|
extra_rdoc_files: []
|
247
237
|
files:
|
248
238
|
- lib/rsence-deps.rb
|
239
|
+
- extconf.rb
|
249
240
|
- README.rdoc
|
250
241
|
homepage: http://rsence.org/
|
251
242
|
licenses: []
|
252
|
-
post_install_message: ! "\
|
253
|
-
|
254
|
-
|
255
|
-
|
243
|
+
post_install_message: ! "\n ** Important note about Javascript runtimes **\n\n You
|
244
|
+
must install a Javascript runtime engine separately, because\n RubyGems isn't smart
|
245
|
+
enough to allow conditional dependencies.\n\n The V8-based NodeJS is recommended:
|
246
|
+
http://nodejs.org/\n \n If you are on OS X, you already have Apple's JavaScriptCore\n
|
247
|
+
installed, which is fine.\n\n Previously, RSence depended on therubyracer, but it
|
248
|
+
was found\n to be the the culprit for crashing the Ruby VM and the cause\n of some
|
249
|
+
other random memory corruption issues, so it's not\n recommended until its maintainers
|
250
|
+
have sorted it out.\n\n You may however proceed to use it on your own risk, if the\n
|
251
|
+
speed gains are worth the instability.\n\n"
|
256
252
|
rdoc_options: []
|
257
253
|
require_paths:
|
258
254
|
- lib
|
@@ -270,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
266
|
version: '0'
|
271
267
|
requirements: []
|
272
268
|
rubyforge_project:
|
273
|
-
rubygems_version: 1.8.
|
269
|
+
rubygems_version: 1.8.24
|
274
270
|
signing_key:
|
275
271
|
specification_version: 3
|
276
272
|
summary: RSence dependency package
|