travis 1.7.2.travis.630.5 → 1.7.2.travis.632.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjRkNDhiY2U3NTVmNzg1OGUwMmNkOTYzOGNmZjNkOGU2MTJmOWQ0OQ==
4
+ Mjg4NjRjZDg1MWUwMGM4MWRlYTYxYzQ0MDM4MjU3NDA2M2E4ZjBkYw==
5
5
  data.tar.gz: !binary |-
6
- OGU0NjFjZjkzMDk3YjRhNzJmM2MxNjQ3MTc5ODc3NTRmN2M4MDA0ZA==
6
+ NWVmNjQ4ODQ5NjhmZDg0MjA5YzIxMzk4OGZiYTQ4MGZkODBiYTY1Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MWIxZTMyMDA0YjA2Mzg2YTZkY2E4Y2U5Y2IwMDZmNjRiZDJiMzZmMWIzYmQ5
10
- NGUxMDNkNjg4MWJhNmE2MjQyNGRiZjdiOWM1ZjkxMWJhYzA3OGZjZGYxYTcx
11
- NmU5ZTQ2NzMwNjhmODk2NzZhZGI1OTc2M2JjYzg4YmI2OWZiMWU=
9
+ MGY1ZjM1NWE1YWQyOWM0ODkxYmJhZTNiOTQ2YjQwNDViOGUwMTljOWU2ZTMy
10
+ MTA2ZGEyNmIyZmI0YmRlOTE1MjQ1YWZmNzllMjIxMDVmMTU4YzA1MDc3NjRj
11
+ YzEwZWVhNjExZGQ2ZjZhYWJkOWFiZTU2NDA4ODdhZmMyNTgxZmE=
12
12
  data.tar.gz: !binary |-
13
- MzI1N2NhNDI0ZGNlODEyYmY2MWE1YmYwZTBhNWRkOWRhOTY4OTU5ZmFhMTdh
14
- YWZiMTVmM2Q0MDZlOTBiNDhmZjNjYWI3ZmVhNGM1Y2M4ZThmZTIxZjdiYmE3
15
- NWIyM2RkNGJlYTM2ZjA3OTMwNTFlZDkyYWM2MzAwODEyNmRhNDI=
13
+ ZjMwOTZhYzAxNzBmZDQ1ZDU5MGI3NDBkNzkwNDlhMDE5NzM0MWU5NTk0YjA1
14
+ ZTllYzNkOGNmNGE1MGQ3Njc1OGIzOThjN2I1N2Q0ZWI2ZDBkMDVmMWQxMmNm
15
+ OTM3MmQxODVmYzZkNDY4ZjQ2YTI2NmZhYWUzYzA2OTVjNDU5NmI=
data/README.md CHANGED
@@ -2044,6 +2044,10 @@ If you updated to Ruby 2.1 as shown above:
2044
2044
 
2045
2045
  #### Mac OS X
2046
2046
 
2047
+ If you start with a clean Mac OS X, you will have to install the XCode Command Line Tools, which are necessary for installing native extensions. You can do so via `xcode-select`:
2048
+
2049
+ $ xcode-select --install
2050
+
2047
2051
  Mac OS X 10.9.2 shipped with a slightly broken Ruby version. If you want to install the gem via the system Ruby and you get an error, you might have to run the following instead:
2048
2052
 
2049
2053
  $ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install travis
@@ -5,6 +5,9 @@ module Travis
5
5
  class Error < StandardError
6
6
  end
7
7
 
8
+ class SSLError < Error
9
+ end
10
+
8
11
  class NotFound < Error
9
12
  end
10
13
 
@@ -37,6 +37,7 @@ module Travis
37
37
  raise ArgumentError, "neither :uri nor :connection specified" unless connection
38
38
  headers['Accept'] = 'application/vnd.travis-ci.2+json'
39
39
  set_user_agent
40
+ check_ssl
40
41
  end
41
42
 
42
43
  def uri
@@ -209,7 +210,7 @@ module Travis
209
210
  end
210
211
 
211
212
  case result.status
212
- when 0 then raise Travis::Client::Error, 'SSL error: could not verify peer'
213
+ when 0 then raise Travis::Client::SSLError, 'SSL error: could not verify peer'
213
214
  when 200..299 then JSON.parse(result.body) rescue result.body
214
215
  when 301, 303 then raw(:get, result.headers['Location'])
215
216
  when 302, 307, 308 then raw(verb, result.headers['Location'])
@@ -324,6 +325,12 @@ module Travis
324
325
  cache = keys.inject(@cache) { |store, key| store[key] ||= {} }
325
326
  cache[last] ||= yield
326
327
  end
328
+
329
+ def check_ssl
330
+ raw(:head, '/') if ssl == SSL_OPTIONS
331
+ rescue SSLError => error
332
+ self.ssl = {}
333
+ end
327
334
  end
328
335
  end
329
336
  end
@@ -19,6 +19,10 @@ module Travis
19
19
  env['HTTP_AUTHORIZATION'] == 'token token'
20
20
  end
21
21
 
22
+ get '/' do
23
+ "{}"
24
+ end
25
+
22
26
  get '/users/' do
23
27
  halt(403, 'wrong token') unless authorized?
24
28
  {"user"=>
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.7.2.travis.630.5
4
+ version: 1.7.2.travis.632.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
@@ -40,7 +40,7 @@ authors:
40
40
  autorequire:
41
41
  bindir: bin
42
42
  cert_chain: []
43
- date: 2014-09-10 00:00:00.000000000 Z
43
+ date: 2014-09-12 00:00:00.000000000 Z
44
44
  dependencies:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: faraday