tinder 1.9.3 → 1.9.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2d55e9349a7780126ad86990aa8620357ea6002
4
- data.tar.gz: eb2f2fe2b5990203b2a5f4f55e5dfea2a48dc9e7
3
+ metadata.gz: 62bf52725d491eb5a5025b497cb61f083265e7a9
4
+ data.tar.gz: 19303985a7d40659e5ffd0122c0d71acbb7f1122
5
5
  SHA512:
6
- metadata.gz: c914892452c4af7dc20c266d6042356ab8ba9e3a4d681695e4d74c998a66f6370eaa7936be12dc68a1d987ce413eae6d0c070ff4c3e0f225cfa14cc4c359af26
7
- data.tar.gz: ef2db0dae19f724d07c668e4f49bc4f3ace90db8019d6ee2c3298c181988640a217447d55caf2d0c205660173072bfecd2870981ecc1d27f0e20a25e9d478520
6
+ metadata.gz: c12b3b0ca6fc98885bb9711b1d18b9af65d0a7a9e30cac8747b6fea1229153d206cfc3d96789fcd7c7b3135e4945eea32fdb768d9d4f269d2c23cd04ba0865da
7
+ data.tar.gz: 3149d2d8a6ece3607e0d5a369281ad8ad5424040a038a68bf5f6e2b87d838cc452629a73d51d6db5872a247d714012b71bfbd20bb9756d6b2e2e2bfa6484e598
@@ -1,12 +1,13 @@
1
1
  language: ruby
2
2
  rvm:
3
- - rbx-19mode
4
- - rbx-18mode
3
+ - rbx-2.1
5
4
  - jruby-19mode
6
5
  - jruby-18mode
7
6
  - 1.8.7
8
7
  - 1.9.2
9
8
  - 1.9.3
9
+ - 2.0.0
10
+ - 2.1.0
10
11
  only:
11
12
  - master
12
13
  notifications:
@@ -1,3 +1,10 @@
1
+ 1.9.4 - 2014-02-24
2
+ * Fix typos in MIT licence
3
+ * Add Campfire#presence to get a list of rooms in which you are present
4
+
5
+ 1.9.3 - 2013-09-06
6
+ * OAuth support
7
+
1
8
  1.9.2 - 2013-01-04
2
9
  * Update dependencies to latest versions
3
10
 
@@ -1,4 +1,4 @@
1
- Copyright (c) 2006-2010 Brandon Keepers, Collective Idea
1
+ Copyright (c) 2006-2014 Brandon Keepers, Collective Idea
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -13,8 +13,8 @@ included in all copies or substantial portions of the Software.
13
13
 
14
14
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
15
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOa AND
17
- NONINFRINGEMENT. IN NO EVENT SaALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -36,6 +36,13 @@ module Tinder
36
36
  end
37
37
  end
38
38
 
39
+ # Get an array of all rooms user is present in
40
+ def presence
41
+ connection.get('/presence.json')['rooms'].map do |room|
42
+ Room.new(connection, room)
43
+ end
44
+ end
45
+
39
46
  # Find a campfire room by id
40
47
  # NOTE: id should be of type Integer
41
48
  def find_room_by_id(id)
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Tinder
3
- VERSION = '1.9.3' unless defined?(::Tinder::VERSION)
3
+ VERSION = '1.9.4' unless defined?(::Tinder::VERSION)
4
4
  end
@@ -0,0 +1,26 @@
1
+ {"rooms": [
2
+ {
3
+ "name": "Room 1",
4
+ "created_at": "2007/03/16 18:03:21 +0000",
5
+ "updated_at": "2007/03/16 18:03:21 +0000",
6
+ "topic": "Testing",
7
+ "id": 80749,
8
+ "membership_limit": 4
9
+ },
10
+ {
11
+ "name": "Room 2",
12
+ "created_at": "2007/03/16 18:04:54 +0000",
13
+ "updated_at": "2007/03/16 18:04:54 +0000",
14
+ "topic": "test",
15
+ "id": 80751,
16
+ "membership_limit": 4
17
+ },
18
+ {
19
+ "name": "Room 3",
20
+ "created_at": "2012/03/16 18:04:54 +0000",
21
+ "updated_at": "2013/03/16 18:04:54 +0000",
22
+ "topic": "presence",
23
+ "id": 80754,
24
+ "membership_limit": 4
25
+ }]
26
+ }
@@ -25,6 +25,25 @@ describe Tinder::Campfire do
25
25
  end
26
26
  end
27
27
 
28
+ describe "presence" do
29
+ before do
30
+ stub_connection(@campfire.connection) do |stub|
31
+ stub.get('/presence.json') {[200, {}, fixture('presence.json')]}
32
+ end
33
+ end
34
+
35
+ it "should return rooms" do
36
+ @campfire.presence.size.should be == 3
37
+ @campfire.presence.first.should be_kind_of(Tinder::Room)
38
+ end
39
+
40
+ it "should set the room name and id" do
41
+ room = @campfire.presence.last
42
+ room.name.should be == 'Room 3'
43
+ room.id.should be == 80754
44
+ end
45
+ end
46
+
28
47
  describe "find_room_by_id" do
29
48
  before do
30
49
  stub_connection(@campfire.connection) do |stub|
@@ -4,7 +4,7 @@ require 'tinder/version'
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.add_dependency 'eventmachine', '~> 1.0'
7
- gem.add_dependency 'faraday', '~> 0.8'
7
+ gem.add_dependency 'faraday', '~> 0.8.9'
8
8
  gem.add_dependency 'faraday_middleware', '~> 0.9'
9
9
  gem.add_dependency 'hashie', ['>= 1.0', '< 3']
10
10
  gem.add_dependency 'json', '~> 1.8.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.3
4
+ version: 1.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
@@ -10,166 +10,166 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-09-06 00:00:00.000000000 Z
13
+ date: 2014-02-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: eventmachine
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ~>
19
+ - - "~>"
20
20
  - !ruby/object:Gem::Version
21
21
  version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - ~>
26
+ - - "~>"
27
27
  - !ruby/object:Gem::Version
28
28
  version: '1.0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: faraday
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ~>
33
+ - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: '0.8'
35
+ version: 0.8.9
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ~>
40
+ - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '0.8'
42
+ version: 0.8.9
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: faraday_middleware
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ~>
47
+ - - "~>"
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0.9'
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - ~>
54
+ - - "~>"
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0.9'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: hashie
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - '>='
61
+ - - ">="
62
62
  - !ruby/object:Gem::Version
63
63
  version: '1.0'
64
- - - <
64
+ - - "<"
65
65
  - !ruby/object:Gem::Version
66
66
  version: '3'
67
67
  type: :runtime
68
68
  prerelease: false
69
69
  version_requirements: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - '>='
71
+ - - ">="
72
72
  - !ruby/object:Gem::Version
73
73
  version: '1.0'
74
- - - <
74
+ - - "<"
75
75
  - !ruby/object:Gem::Version
76
76
  version: '3'
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: json
79
79
  requirement: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ~>
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: 1.8.0
84
84
  type: :runtime
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ~>
88
+ - - "~>"
89
89
  - !ruby/object:Gem::Version
90
90
  version: 1.8.0
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: mime-types
93
93
  requirement: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ~>
95
+ - - "~>"
96
96
  - !ruby/object:Gem::Version
97
97
  version: '1.19'
98
98
  type: :runtime
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ~>
102
+ - - "~>"
103
103
  - !ruby/object:Gem::Version
104
104
  version: '1.19'
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: multi_json
107
107
  requirement: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ~>
109
+ - - "~>"
110
110
  - !ruby/object:Gem::Version
111
111
  version: '1.7'
112
112
  type: :runtime
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - ~>
116
+ - - "~>"
117
117
  - !ruby/object:Gem::Version
118
118
  version: '1.7'
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: twitter-stream
121
121
  requirement: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - ~>
123
+ - - "~>"
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0.1'
126
126
  type: :runtime
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - ~>
130
+ - - "~>"
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0.1'
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: fakeweb
135
135
  requirement: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  type: :development
141
141
  prerelease: false
142
142
  version_requirements: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - '>='
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: rake
149
149
  requirement: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - '>='
151
+ - - ">="
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  type: :development
155
155
  prerelease: false
156
156
  version_requirements: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - '>='
158
+ - - ">="
159
159
  - !ruby/object:Gem::Version
160
160
  version: '0'
161
161
  - !ruby/object:Gem::Dependency
162
162
  name: rspec
163
163
  requirement: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - '>='
165
+ - - ">="
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  type: :development
169
169
  prerelease: false
170
170
  version_requirements: !ruby/object:Gem::Requirement
171
171
  requirements:
172
- - - '>='
172
+ - - ">="
173
173
  - !ruby/object:Gem::Version
174
174
  version: '0'
175
175
  description: A Ruby API for interfacing with Campfire, the 37Signals chat application.
@@ -182,10 +182,10 @@ extensions: []
182
182
  extra_rdoc_files:
183
183
  - README.markdown
184
184
  files:
185
- - .gemtest
186
- - .gitignore
187
- - .rspec
188
- - .travis.yml
185
+ - ".gemtest"
186
+ - ".gitignore"
187
+ - ".rspec"
188
+ - ".travis.yml"
189
189
  - CHANGELOG.txt
190
190
  - Gemfile
191
191
  - MIT-LICENSE
@@ -201,6 +201,7 @@ files:
201
201
  - lib/tinder/version.rb
202
202
  - site/index.html
203
203
  - site/stylesheets/style.css
204
+ - spec/fixtures/presence.json
204
205
  - spec/fixtures/rooms.json
205
206
  - spec/fixtures/rooms/recent.json
206
207
  - spec/fixtures/rooms/room80749.json
@@ -221,21 +222,22 @@ require_paths:
221
222
  - lib
222
223
  required_ruby_version: !ruby/object:Gem::Requirement
223
224
  requirements:
224
- - - '>='
225
+ - - ">="
225
226
  - !ruby/object:Gem::Version
226
227
  version: '0'
227
228
  required_rubygems_version: !ruby/object:Gem::Requirement
228
229
  requirements:
229
- - - '>='
230
+ - - ">="
230
231
  - !ruby/object:Gem::Version
231
232
  version: 1.3.6
232
233
  requirements: []
233
234
  rubyforge_project:
234
- rubygems_version: 2.0.3
235
+ rubygems_version: 2.2.0
235
236
  signing_key:
236
237
  specification_version: 4
237
238
  summary: Ruby wrapper for the Campfire API
238
239
  test_files:
240
+ - spec/fixtures/presence.json
239
241
  - spec/fixtures/rooms.json
240
242
  - spec/fixtures/rooms/recent.json
241
243
  - spec/fixtures/rooms/room80749.json