travis 1.6.2.travis.364.4 → 1.6.2.travis.365.4

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
- ZWE4NWIwN2U1YWFkOGRkYmZjNjc4YTcwY2QyMjUxY2E2YTE4ZDgxOQ==
4
+ ZTNjNmY4MmM4YjE2MTk5MWI0OWM0YjMwNDQ0MmFlODAxOTI4YWRiMg==
5
5
  data.tar.gz: !binary |-
6
- NDAxY2I0MGJiNjQzMjZjMmRiZDMwZGZjMjNjMzViZGMxOTU1ZjA1NQ==
6
+ ZDE0NGU3YWUzMTEzY2I3ZDc1ZGVmMDBkNDIzOTg5OGE2NWMxYWRhYQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MzY1OWNiZGRhNmI1NTNjYTAwOTRkZGZmYTRhYTk1NDU3MDZkY2JhNTEwMzll
10
- YWMyMTA5YzE4YmYzZDk3ZTYzMGVlNWY3NGEyYWM5ZGIyZjNmNjYyYmM1NTQx
11
- NWY3NjZmMTk4YjExMmVhODQ4MzIyMTRlNDI5Y2RkZDliMDk1ZmI=
9
+ NmJkMmZkYzI2MDRiZDJhYWZkMGQwYzRmNzQ4NDAxYjU1ODUwMTQ4MTUxZDVj
10
+ YjEyZjNmOWI5NTM1NzBjMjQ3YTdmMzQ5NTVkNTYxYmJiMWYzMTY3NzMwMGE4
11
+ MmIxZTE1NDExMTAwNTJiZjkwZTQ3MGY5ZjEyZTBlMTRiNjNhODY=
12
12
  data.tar.gz: !binary |-
13
- M2YwYTZhOTYyOTE0YTZkYjg0YmE1ZDM0ZjNmY2VmNWQxOTI3YjBhZDllNjE0
14
- NDlmMzQ2NzBlYmJhZmMzYTIzOTJiYzkwMjBjZjU4ZWQ3YTU3MWY1ODk3ZjMz
15
- YjllMjkwOWMyZWRjM2RiNzUyMTVkNmRhNTBlNzM4MWFkMDVlMTE=
13
+ Nzc2N2UyZTA1NjBmM2FhZDkxMzdhOWRkZWNkNmZmZTEyNWM0NThhZGQwNDU0
14
+ NzRiYTcwOThmMjM2YjliOThiMzMwY2Q2ZThjNzhlZjIzYzMyODliY2M3ZTVh
15
+ NWM4NjA2NDkzZWJkNDBkN2I5MmI5YmQ2YTAxMzE2MWI3MDA2MWM=
data/README.md CHANGED
@@ -51,7 +51,6 @@ The [travis gem](https://rubygems.org/gems/travis) includes both a [command line
51
51
  * [Artifacts](#artifacts)
52
52
  * [Users](#users)
53
53
  * [Commits](#commits)
54
- * [Workers](#workers)
55
54
  * [Listening for Events](#listening-for-events)
56
55
  * [Dealing with Sessions](#dealing-with-sessions)
57
56
  * [Using Namespaces](#using-namespaces)
@@ -1258,19 +1257,6 @@ It is also possible to delete multiple caches with a single API call:
1258
1257
  repo.delete_caches(branch: "master", match: "rbx")
1259
1258
  ```
1260
1259
 
1261
- #### Workers
1262
-
1263
- If a worker is running something, it will reference a `job` and a `repository`. Otherwise the values will be `nil`.
1264
-
1265
- ``` ruby
1266
- require 'travis'
1267
- workers = Travis::Worker.find_all
1268
-
1269
- workers.each do |worker|
1270
- puts "#{worker.name}: #{worker.host} - #{worker.state} - #{worker.repository.slug if worker.repository}"
1271
- end
1272
- ```
1273
-
1274
1260
  ### Dealing with Sessions
1275
1261
 
1276
1262
  Under the hood the session is where the fun is happening. Most methods on the constants and entities just wrap methods on your session, so you don't have to pass the session around all the time or even see it if you don't want to.
@@ -1443,6 +1429,10 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
1443
1429
 
1444
1430
  ## Version History
1445
1431
 
1432
+ **1.6.2** (not yet released)
1433
+
1434
+ * Remove worker support, as API endpoints have been removed from Travis CI.
1435
+
1446
1436
  **1.6.1** (November 4, 2013)
1447
1437
 
1448
1438
  * Update autocompletion when updating travis gem.
data/lib/travis/client.rb CHANGED
@@ -12,7 +12,6 @@ require 'travis/client/artifact'
12
12
  require 'travis/client/cache'
13
13
  require 'travis/client/commit'
14
14
  require 'travis/client/job'
15
- require 'travis/client/worker'
16
15
  require 'travis/client/namespace'
17
16
  require 'travis/client/account'
18
17
  require 'travis/client/broadcast'
@@ -37,14 +37,6 @@ module Travis
37
37
  session.find_one(Repository, id_or_slug)
38
38
  end
39
39
 
40
- def worker(id)
41
- session.find_one(Worker, id)
42
- end
43
-
44
- def workers(params = {})
45
- session.find_many(Worker, params)
46
- end
47
-
48
40
  def build(id)
49
41
  session.find_one(Build, id)
50
42
  end
@@ -686,26 +686,6 @@ module Travis
686
686
  {"key"=>RAILS_KEY}.to_json
687
687
  end
688
688
 
689
- get '/workers/' do
690
- {"workers"=>
691
- [{'id' => 'foo',
692
- 'name' => 'ruby-1',
693
- 'host' => 'ruby-1.worker.travis-ci.org',
694
- 'state' => 'ready',
695
- 'payload' => {
696
- "job"=>{"id"=>4125096},
697
- "repo"=>{"id"=>891}}}]}.to_json
698
- end
699
-
700
- get '/workers/foo' do
701
- {"worker"=>
702
- {'id' => 'foo',
703
- 'name' => 'ruby-1',
704
- 'host' => 'ruby-1.worker.travis-ci.org',
705
- 'state' => 'ready',
706
- 'payload' => nil}}.to_json
707
- end
708
-
709
689
  get '/accounts/' do
710
690
  {"accounts"=>
711
691
  [{'name' => "Konstantin Haase",
data/travis.gemspec CHANGED
@@ -160,7 +160,6 @@ Gem::Specification.new do |s|
160
160
  "lib/travis/client/states.rb",
161
161
  "lib/travis/client/user.rb",
162
162
  "lib/travis/client/weak_entity.rb",
163
- "lib/travis/client/worker.rb",
164
163
  "lib/travis/pro.rb",
165
164
  "lib/travis/tools/assets.rb",
166
165
  "lib/travis/tools/completion.rb",
@@ -196,7 +195,6 @@ Gem::Specification.new do |s|
196
195
  "spec/client/repository_spec.rb",
197
196
  "spec/client/session_spec.rb",
198
197
  "spec/client/user_spec.rb",
199
- "spec/client/worker_spec.rb",
200
198
  "spec/client_spec.rb",
201
199
  "spec/pro_spec.rb",
202
200
  "spec/spec_helper.rb",
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.2.travis.364.4
4
+ version: 1.6.2.travis.365.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
@@ -28,7 +28,7 @@ authors:
28
28
  autorequire:
29
29
  bindir: bin
30
30
  cert_chain: []
31
- date: 2013-11-04 00:00:00.000000000 Z
31
+ date: 2013-11-05 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: faraday
@@ -353,7 +353,6 @@ files:
353
353
  - lib/travis/client/states.rb
354
354
  - lib/travis/client/user.rb
355
355
  - lib/travis/client/weak_entity.rb
356
- - lib/travis/client/worker.rb
357
356
  - lib/travis/pro.rb
358
357
  - lib/travis/tools/assets.rb
359
358
  - lib/travis/tools/completion.rb
@@ -389,7 +388,6 @@ files:
389
388
  - spec/client/repository_spec.rb
390
389
  - spec/client/session_spec.rb
391
390
  - spec/client/user_spec.rb
392
- - spec/client/worker_spec.rb
393
391
  - spec/client_spec.rb
394
392
  - spec/pro_spec.rb
395
393
  - spec/spec_helper.rb
@@ -1,36 +0,0 @@
1
- require 'travis/client'
2
-
3
- module Travis
4
- module Client
5
- class Worker < Entity
6
- include States
7
-
8
- def self.cast_id(id)
9
- String(id)
10
- end
11
-
12
- # @!parse attr_reader :name, :host, :state, :payload
13
- attributes :name, :host, :state, :payload
14
- inspect_info :name
15
-
16
- one :worker
17
- many :workers
18
-
19
- def self.id?(object)
20
- object.is_a? String
21
- end
22
-
23
- def payload=(value)
24
- set_attribute(:payload, session.load(value))
25
- end
26
-
27
- def repository
28
- payload['repo']
29
- end
30
-
31
- def job
32
- payload['job']
33
- end
34
- end
35
- end
36
- end
@@ -1,23 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Travis::Client::Worker do
4
- let(:session) { Travis::Client.new }
5
- subject { session.workers.first }
6
-
7
- its(:id) { should be == 'foo' }
8
- its(:name) { should be == 'ruby-1' }
9
- its(:host) { should be == 'ruby-1.worker.travis-ci.org' }
10
- its(:state) { should be == 'ready' }
11
- its(:color) { should be == 'green' }
12
- its(:job) { should be_a(Travis::Client::Job) }
13
- its(:repository) { should be_a(Travis::Client::Repository) }
14
-
15
- it { should be_ready }
16
-
17
- describe 'without payload' do
18
- subject { session.worker('foo') }
19
- its(:payload) { should be == {}}
20
- its(:job) { should be_nil }
21
- its(:repository) { should be_nil }
22
- end
23
- end