opener-core 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/opener/core/resource_switcher.rb +7 -9
- data/lib/opener/core/version.rb +1 -1
- metadata +10 -11
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZmRjZjhiODAyOWI2NWMwYTY5YTY2M2U5NWE0YjAxZDA5NWMzZGViNA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Y2E1NDhkYWYzNDU0YTljYjQ0N2E2M2NmYTY4MmNkY2U4MjcxOGQ4OA==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NDUyYTg0MTM4ZjU5ZTZlYTY5MTA4N2M5NWIzYmRmZGZkMDdjMzc4Y2ZiYmE1
|
10
|
+
NzdmZmZlZjY5MjQzNjcwMjRlY2ZlM2Q5MWYyNGYwODM5YjBiMjc3ZWQzNGRj
|
11
|
+
ZWVjZDQ1MjI0MTE0ZDQ4N2I5N2JhYjg1MTgzZmQzMGU4ODhlYTE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OTE2MzdhMDRhMGNhYWZmY2M0M2YzMzFhOWNkZDljNmM0MjgxYzU3ZGM5Yjg0
|
14
|
+
ZTBiNDgxODhmZGI0ZTNiNzQwYjAzNDk4NDViOTE0ZmUwMmZlZTg5YzVmNDU1
|
15
|
+
YmYxMWRmODAzYzFlZDZhYWU5NmQ1OWUxOTBkZjBjM2ZmY2U5Njg=
|
@@ -35,25 +35,23 @@ module Opener
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def download_and_unzip_resource(url, path)
|
38
|
-
filename = download(url)
|
38
|
+
filename = download(url, path)
|
39
39
|
unzip(filename, path)
|
40
40
|
end
|
41
41
|
|
42
|
-
def download(url)
|
43
|
-
filename
|
44
|
-
destination = File.
|
45
|
-
|
46
|
-
`wget -N -O #{destination} #{url}`
|
47
|
-
|
42
|
+
def download(url, path)
|
43
|
+
filename = get_filename_from_url(url)
|
44
|
+
destination = File.expand_path(filename, path)
|
45
|
+
`wget -N -P #{path} #{url}`
|
48
46
|
return destination
|
49
47
|
end
|
50
48
|
|
51
49
|
def unzip(file, path)
|
52
50
|
extname = File.extname(file)
|
53
51
|
if extname == ".zip"
|
54
|
-
`unzip -o #{file} -d #{path}`
|
52
|
+
puts `unzip -o #{file} -d #{path}`
|
55
53
|
else
|
56
|
-
`tar -zxvf #{file} --directory #{path}`
|
54
|
+
puts `tar -zxvf #{file} --directory #{path}`
|
57
55
|
end
|
58
56
|
end
|
59
57
|
|
data/lib/opener/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opener-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- development@olery.com
|
@@ -14,28 +14,28 @@ dependencies:
|
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Gem that contains some low lever generic functions for all OpeNER components.
|
@@ -44,13 +44,13 @@ executables: []
|
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
-
- README.md
|
48
|
-
- lib/opener/core.rb
|
49
47
|
- lib/opener/core/argv_splitter.rb
|
50
48
|
- lib/opener/core/opt_parser.rb
|
51
49
|
- lib/opener/core/resource_switcher.rb
|
52
50
|
- lib/opener/core/version.rb
|
51
|
+
- lib/opener/core.rb
|
53
52
|
- opener-core.gemspec
|
53
|
+
- README.md
|
54
54
|
homepage: http://opener-project.github.com
|
55
55
|
licenses:
|
56
56
|
- Apachev2
|
@@ -61,19 +61,18 @@ require_paths:
|
|
61
61
|
- lib
|
62
62
|
required_ruby_version: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- -
|
64
|
+
- - ! '>='
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- -
|
69
|
+
- - ! '>='
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.
|
74
|
+
rubygems_version: 2.1.11
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: Gem that contains some low lever generic functions for all OpeNER components.
|
78
78
|
test_files: []
|
79
|
-
has_rdoc:
|