native_ext_fetcher 0.1.1 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b45a9c692ef2197ccea81a650abb56ccc69184cc
|
4
|
+
data.tar.gz: 3b99b8566a10af6f32bcb29c66d6cd6c1e112f3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 848a2c36b96abc924e26310cdafeac5a9d8efade09e12545320a0f7a7b8e6493738ccb964948778d7b50e13f1494496e217a0a897f78b7261d742c2f8791dd96
|
7
|
+
data.tar.gz: e7e6f3078b8a8221dc95acc200c0ee3f5fe047f6fa242d11fdad89a25a9ba19c90cc1e5a3c68f7bfdefb27da1bbf9a7647b6dbb19adc16b7ec4f042569bd160b
|
data/lib/native_ext_fetcher.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module NativeExtFetcher
|
2
2
|
class Fetcher
|
3
|
-
InvalidDigest = Class.new(
|
3
|
+
InvalidDigest = Class.new(Error)
|
4
4
|
|
5
5
|
attr_reader :download_path
|
6
6
|
|
7
|
-
def config(host, path, checksums, options = {})
|
8
|
-
@lib_path = File.expand_path(File.join(path, '..', '..', 'lib'))
|
7
|
+
def config(name, host, path, checksums, options = {})
|
8
|
+
@lib_path = File.expand_path(File.join(path, '..', '..', 'lib', name))
|
9
9
|
|
10
10
|
raise ArgumentError, 'Checksums must be a hash' unless Hash === checksums
|
11
11
|
raise ArgumentError, 'Library path not found ' unless Dir.exists?(@lib_path)
|
@@ -45,7 +45,7 @@ module NativeExtFetcher
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def expand_download_path
|
48
|
-
File.join(@lib_path, 'native',
|
48
|
+
File.join(@lib_path, 'native', Platform.native_extension_tuple.join('-')).tap do |native_path|
|
49
49
|
FileUtils.mkdir_p native_path
|
50
50
|
end
|
51
51
|
end
|
@@ -8,8 +8,8 @@ module NativeExtFetcher
|
|
8
8
|
MAX_REDIRECTS = 5
|
9
9
|
MAX_RETRIES = 3
|
10
10
|
|
11
|
-
MaxRedirect = Class.new(
|
12
|
-
MaxRetries = Class.new(
|
11
|
+
MaxRedirect = Class.new(Error)
|
12
|
+
MaxRetries = Class.new(Error)
|
13
13
|
|
14
14
|
def initialize(options = {})
|
15
15
|
@max_redirects = options[:max_redirects] || MAX_REDIRECTS
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: native_ext_fetcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DefWare LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- bin/console
|
85
85
|
- bin/setup
|
86
86
|
- lib/native_ext_fetcher.rb
|
87
|
+
- lib/native_ext_fetcher/error.rb
|
87
88
|
- lib/native_ext_fetcher/fetcher.rb
|
88
89
|
- lib/native_ext_fetcher/http.rb
|
89
90
|
- lib/native_ext_fetcher/platform.rb
|