getlocal 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/getlocal/cli.rb +6 -2
- data/lib/getlocal/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e432a1963606a1f32b6a7a3376323acd148c3a8
|
4
|
+
data.tar.gz: deabc02486e7fc7cd54746d0f15344b5077c228e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b50ae7ace46299a935ff0b3494bc5d1998c20ea260afa36bf7311de0a264e5c71d401c9a134daa6d010c623fe5ac2fff38310a586520c179f294ee13fcfd3830
|
7
|
+
data.tar.gz: 0f5b619ba24fd744c61602b03e270136344b04e1b1ffefdbce547eaafe4784c9f23cfce6caa21b9b8f4165e6fb379483cf7ae23df298003db9b238ea48e5abd9
|
data/lib/getlocal/cli.rb
CHANGED
@@ -19,6 +19,7 @@ module Getlocal
|
|
19
19
|
method_option :user, :required => true, :aliases => "-u"
|
20
20
|
method_option :password, :aliases => "-p"
|
21
21
|
method_option :timeout, :type => :numeric, :default => 600, :aliases => "-t"
|
22
|
+
method_option :sleep, :type => :numeric, :default => 0, :alias => "-s"
|
22
23
|
desc "fetch [PROJECT]", "Used to fetch the latest localisations"
|
23
24
|
def fetch(project)
|
24
25
|
|
@@ -42,6 +43,8 @@ module Getlocal
|
|
42
43
|
p = PowerBar.new
|
43
44
|
|
44
45
|
auth = {:username => username, :password => password}
|
46
|
+
|
47
|
+
sleepTime = options[:sleep]
|
45
48
|
|
46
49
|
# Find all the languages we support
|
47
50
|
supportedLanguages = []
|
@@ -101,7 +104,7 @@ module Getlocal
|
|
101
104
|
puts "The username or password are invailed"
|
102
105
|
return
|
103
106
|
else
|
104
|
-
puts "Bad response. Close but no cigar."
|
107
|
+
puts "Bad response. Close but no cigar. Response Code = " + response.code
|
105
108
|
puts "Sorry couldn't get #{lang} translations this time."
|
106
109
|
end
|
107
110
|
ensure
|
@@ -112,7 +115,8 @@ module Getlocal
|
|
112
115
|
puts "" if options[:verbose]
|
113
116
|
puts "" if options[:verbose]
|
114
117
|
end
|
115
|
-
|
118
|
+
#Sleep so we don't hit the rate limiting on GetLocalization's API
|
119
|
+
sleep(sleepTime)
|
116
120
|
end
|
117
121
|
|
118
122
|
method_option :user, :required => true, :aliases => "-u"
|
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.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Briggs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
149
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
150
|
+
rubygems_version: 2.0.14
|
151
151
|
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: A simple tool to make keeping GetLocalisation up to date
|