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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87a35bed0fc83dee63f750eca7f030ec2b9c3358
4
- data.tar.gz: aa2294ec8f166678697fef0b41107ac48c4591fe
3
+ metadata.gz: 32fad14425e0c9d1ac334b685859a7d4e5eccb65
4
+ data.tar.gz: ef7b2325fd7435f3a15d4c4bae23c52683028ef7
5
5
  SHA512:
6
- metadata.gz: 25b7ae479b6a1f180c072bebc32d3adea867714e7d00bf4ba498fe8e193cc94a982df3e60dde267e6ae0734aa45e9d78a37022984ce99b970b2a96ecc3ef5cc3
7
- data.tar.gz: 4c1e5bf5862f18407b340995b5bb27065af472a8953581f6257d897bcc943fdd8f2f1bbd5f276bbf24786d724dda77ac4f5b871c6cc563dc72d4e3c610076884
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
@@ -1,3 +1,3 @@
1
1
  module Getlocal
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
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
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-20 00:00:00.000000000 Z
11
+ date: 2015-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler