travis 1.6.8.travis.452.6 → 1.6.8.travis.453.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/travis/cli/command.rb +12 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjAyNzI5YTY3NWQxZjBmZjg3ZmY2M2I1YTk5YTFmZmQ1ZDBiMWY3ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTdjMWI2YmQxMjkzY2VjOGY3Y2ZkMTFlZjMzZWNkMDhhYzlkNzhjOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjE0NGU1OTc0ZDM3NzIyMjJjNWFkOWNiY2ZlODg0MWQ5NTQ2ODAzYWQ5MTk3
|
10
|
+
YThjNjU2MTVmM2E4MmE0NWM3OTM2NTllMWRkZTU0NGFiMTUzNzQxZGU4OTQ0
|
11
|
+
YzM1ZWVkMDkxNWVkZDQ1Y2VkOWJhZmNjOGNjZmE1MDE1N2UyZjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODFkNjc2Nzk5M2UxZDk4ZDg5MDE5YTdkZjhkYTcxMmRlMGFmNjg3Yzc1NmEw
|
14
|
+
ZGM4NmUxYTgzNGZiMmRhMmZiZGU0NTA3NjI0NTY1MWY0NzdiNzdiMzcwNDZi
|
15
|
+
ZTYxYTIyY2NkOGEyNjBlYTBkMzM3ZDkwZTMyYmQ1ZjQyYmFmZGY=
|
data/lib/travis/cli/command.rb
CHANGED
@@ -119,11 +119,19 @@ module Travis
|
|
119
119
|
|
120
120
|
def check_version
|
121
121
|
last_check.clear if last_check['version'] != Travis::VERSION
|
122
|
+
seconds_since = Time.now.to_i - last_check['at'].to_i
|
122
123
|
|
123
124
|
return if skip_version_check?
|
124
|
-
return if
|
125
|
+
return if seconds_since < MINUTE
|
125
126
|
|
126
|
-
|
127
|
+
case seconds_since
|
128
|
+
when MINUTE .. HOUR then timeout = 0.5
|
129
|
+
when HOUR .. DAY then timeout = 1.0
|
130
|
+
when DAY .. WEEK then timeout = 2.0
|
131
|
+
else timeout = 10.0
|
132
|
+
end
|
133
|
+
|
134
|
+
Timeout.timeout(timeout) do
|
127
135
|
response = Faraday.get('https://rubygems.org/api/v1/gems/travis.json', {}, 'If-None-Match' => last_check['etag'].to_s)
|
128
136
|
last_check['etag'] = response.headers['etag']
|
129
137
|
last_check['version'] = JSON.parse(response.body)['version'] if response.status == 200
|
@@ -131,7 +139,8 @@ module Travis
|
|
131
139
|
|
132
140
|
last_check['at'] = Time.now.to_i
|
133
141
|
error "Outdated CLI version, run `gem install travis` or use --skip-version-check." if Travis::VERSION < last_check['version']
|
134
|
-
rescue Timeout::Error, Faraday::Error::ClientError
|
142
|
+
rescue Timeout::Error, Faraday::Error::ClientError => error
|
143
|
+
debug "#{error.class}: #{error.message}"
|
135
144
|
end
|
136
145
|
|
137
146
|
def check_completion
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: travis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.8.travis.
|
4
|
+
version: 1.6.8.travis.453.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
@@ -32,7 +32,7 @@ authors:
|
|
32
32
|
autorequire:
|
33
33
|
bindir: bin
|
34
34
|
cert_chain: []
|
35
|
-
date: 2014-
|
35
|
+
date: 2014-02-03 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: faraday
|