travis 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -192,11 +192,9 @@ If you just want to know if your account is being synchronized right now, use `-
192
192
  $ travis sync --check
193
193
  rkh is currently syncing
194
194
 
195
-
196
-
197
195
  #### `token`
198
196
 
199
- The use the Ruby library you will need to obtain an access token first. To do this simply run the `travis login` command. Once logged in you can check your token with `travis token`:
197
+ In order to use the Ruby library you will need to obtain an access token first. To do this simply run the `travis login` command. Once logged in you can check your token with `travis token`:
200
198
 
201
199
  $ travis token
202
200
  Your access token is super-secret
@@ -206,7 +204,7 @@ You can use that token for instance with curl:
206
204
  $ curl -H "Authorization: token $(travis token)" https://api.travis-ci.org/users/
207
205
  {"login":"rkh","name":"Konstantin Haase","email":"konstantin.haase@gmail.com","gravatar_id":"5c2b452f6eea4a6d84c105ebd971d2a4","locale":"en","is_syncing":false,"synced_at":"2013-01-21T20:31:06Z"}
208
206
 
209
- Note that if you just need it for looking at API payloads, that we also have the [`raw`][#raw] command.
207
+ Note that if you just need it for looking at API payloads, that we also have the [`raw`](#raw) command.
210
208
 
211
209
  #### `whatsup`
212
210
 
@@ -864,6 +862,11 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
864
862
 
865
863
  ## Version History
866
864
 
865
+ **v1.1.3** (January 26, 2013)
866
+
867
+ * use persistent HTTP connections (performance for commands with multiple api requests)
868
+ * include round trip time in debug output
869
+
867
870
  **v1.1.2** (January 24, 2013)
868
871
 
869
872
  * `token` command
@@ -14,8 +14,11 @@ module Travis
14
14
 
15
15
  on('--debug', 'show API requests') do |c,_|
16
16
  c.session.instrument do |info, request|
17
+ start = Time.now
17
18
  c.debug(info)
18
19
  request.call
20
+ duration = Time.now - start
21
+ c.debug(" took %.2g seconds" % duration)
19
22
  end
20
23
  end
21
24
 
@@ -1,6 +1,7 @@
1
1
  require 'travis/client'
2
2
 
3
3
  require 'faraday'
4
+ require 'faraday/adapter/net_http_persistent'
4
5
  require 'faraday_middleware'
5
6
  require 'json'
6
7
 
@@ -184,7 +185,7 @@ module Travis
184
185
  end
185
186
 
186
187
  def faraday_adapter
187
- Faraday.default_adapter
188
+ :net_http_persistent #Faraday.default_adapter
188
189
  end
189
190
 
190
191
  def reset_entities
@@ -1,3 +1,3 @@
1
1
  module Travis
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
data/travis.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  # general infos
4
4
  s.name = "travis"
5
- s.version = "1.1.2"
5
+ s.version = "1.1.3"
6
6
  s.description = "CLI and Ruby client library for Travis CI"
7
7
  s.homepage = "https://github.com/travis-ci/travis"
8
8
  s.summary = "Travis CI client"
@@ -117,6 +117,7 @@ Gem::Specification.new do |s|
117
117
  s.add_dependency "backports", "~> 2.6"
118
118
  s.add_dependency "launchy", "~> 2.1"
119
119
  s.add_dependency "pry", "~> 0.9"
120
+ s.add_dependency "net-http-persistent", "~> 2.8"
120
121
  s.add_development_dependency "rspec", "~> 2.12"
121
122
  s.add_development_dependency "sinatra", "~> 1.3"
122
123
  s.add_development_dependency "rack-test", "~> 0.6"
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.1.2
4
+ version: 1.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-01-24 00:00:00.000000000 Z
16
+ date: 2013-01-26 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: faraday
@@ -143,6 +143,22 @@ dependencies:
143
143
  - - ~>
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0.9'
146
+ - !ruby/object:Gem::Dependency
147
+ name: net-http-persistent
148
+ requirement: !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ~>
152
+ - !ruby/object:Gem::Version
153
+ version: '2.8'
154
+ type: :runtime
155
+ prerelease: false
156
+ version_requirements: !ruby/object:Gem::Requirement
157
+ none: false
158
+ requirements:
159
+ - - ~>
160
+ - !ruby/object:Gem::Version
161
+ version: '2.8'
146
162
  - !ruby/object:Gem::Dependency
147
163
  name: rspec
148
164
  requirement: !ruby/object:Gem::Requirement