getlocal 0.1.0 → 0.1.1

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: e958e892452a0d3f63f2694a9c2521c8c1d907eb
4
- data.tar.gz: 761bf80f42ad3a85aed5c34a4bf31c54b153e0d0
3
+ metadata.gz: 0e432a1963606a1f32b6a7a3376323acd148c3a8
4
+ data.tar.gz: deabc02486e7fc7cd54746d0f15344b5077c228e
5
5
  SHA512:
6
- metadata.gz: 0079e0e27d6637e97452b92e2033c81134fa10cf57e28a1bb807df52ec9567a5f20cb36abf4f5f2d754d575648348c2685ebb229e5b21b2b11d295c6e76469de
7
- data.tar.gz: 0506c7f248f276eb7c4de6a2bcf11c6aabf945f3822ef844bc6b741d9bd4008663aa1c9a0b195def4623173b9dd126c21546408d1b5b30a015cbf1ee36641bc4
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"
@@ -1,3 +1,3 @@
1
1
  module Getlocal
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
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.1.0
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: 2015-02-03 00:00:00.000000000 Z
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.4.5
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