getlocal 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/getlocal/cli.rb +3 -9
- data/lib/getlocal/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32fad14425e0c9d1ac334b685859a7d4e5eccb65
|
|
4
|
+
data.tar.gz: ef7b2325fd7435f3a15d4c4bae23c52683028ef7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4efd1312b6b38dcf7c481ecc79e8c4a39c941f4271c73d40832c2d94acd8bd4228761427729c3cf714c4e34fa0bc00f43c36d30dc878745a74825e82f5e53a77
|
|
7
|
+
data.tar.gz: 85bb53071266fbbe905b16df4d62e32c24f63c11e833ab38b271defd53b0b3f88a53b6932e15be5ed2449b4866b99a5eae97647d1731142d8d9ceef42f63d287
|
data/lib/getlocal/cli.rb
CHANGED
|
@@ -17,7 +17,7 @@ module Getlocal
|
|
|
17
17
|
|
|
18
18
|
method_option :user, :required => true, :aliases => "-u"
|
|
19
19
|
method_option :password, :aliases => "-p"
|
|
20
|
-
method_option :timeout, :aliases => "-t"
|
|
20
|
+
method_option :timeout, :type => :numeric, :default => 600, :aliases => "-t"
|
|
21
21
|
desc "fetch [PROJECT]", "Used to fetch the latest localisations"
|
|
22
22
|
def fetch(project)
|
|
23
23
|
|
|
@@ -57,15 +57,8 @@ module Getlocal
|
|
|
57
57
|
|
|
58
58
|
zipfile = Tempfile.new("file")
|
|
59
59
|
|
|
60
|
-
if options[:timeout] then
|
|
61
|
-
timeout == options[:timeout]
|
|
62
|
-
else
|
|
63
|
-
timeout == 600
|
|
64
|
-
end
|
|
65
|
-
|
|
66
60
|
begin
|
|
67
|
-
|
|
68
|
-
response = HTTParty.get("https://api.getlocalization.com/#{project}/api/translations/zip/", :basic_auth => auth, :timeout => timeout)
|
|
61
|
+
response = HTTParty.get("https://api.getlocalization.com/#{project}/api/translations/zip/", :basic_auth => auth, :timeout => options[:timeout])
|
|
69
62
|
rescue
|
|
70
63
|
puts "Oh no, somthing fucked up."
|
|
71
64
|
return
|
|
@@ -106,6 +99,7 @@ module Getlocal
|
|
|
106
99
|
end
|
|
107
100
|
|
|
108
101
|
end
|
|
102
|
+
|
|
109
103
|
end
|
|
110
104
|
|
|
111
105
|
end
|
data/lib/getlocal/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: getlocal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Benjamin Briggs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-01-
|
|
11
|
+
date: 2015-01-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|