campy 0.1.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +9 -4
- data/CHANGELOG.md +13 -6
- data/README.md +7 -2
- data/campy.gemspec +3 -3
- data/lib/campy/room.rb +3 -4
- data/lib/campy/version.rb +1 -1
- data/spec/campy/room_spec.rb +1 -0
- metadata +30 -23
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,22 +1,26 @@
|
|
1
|
-
##
|
1
|
+
## 1.0.0 / 2013-05-22
|
2
2
|
|
3
|
+
### Breaking changes
|
3
4
|
|
4
|
-
|
5
|
+
* Pull request [#2][]: Drop Ruby 1.8 support and drop dependency on
|
6
|
+
multi\_json. (see the pull request for rationale). ([@fnichol][])
|
7
|
+
|
8
|
+
## 0.1.3 / 2012-07-10
|
5
9
|
|
6
10
|
### New features
|
7
11
|
|
8
|
-
* Pull request [#1]
|
12
|
+
* Pull request [#1][]: Add option to
|
9
13
|
use Campfire room id rather than room name. ([@mvandenbeuken][])
|
10
14
|
|
11
15
|
|
12
|
-
## 0.1.2
|
16
|
+
## 0.1.2 / 2012-04-05
|
13
17
|
|
14
18
|
#### Bug fixes
|
15
19
|
|
16
20
|
* Add paste action to bin/campy. ([@fnichol][])
|
17
21
|
|
18
22
|
|
19
|
-
## 0.1.1
|
23
|
+
## 0.1.1 / 2012-04-05
|
20
24
|
|
21
25
|
### New features
|
22
26
|
|
@@ -24,9 +28,12 @@
|
|
24
28
|
* Allow message to be read from STDIN in bin/campy. ([@fnichol][])
|
25
29
|
|
26
30
|
|
27
|
-
## 0.1.0
|
31
|
+
## 0.1.0 / 2012-04-04
|
28
32
|
|
29
33
|
The initial release.
|
30
34
|
|
35
|
+
<!--- The following link definition list is generated by PimpMyChangelog --->
|
36
|
+
[#1]: https://github.com/fnichol/campy/issues/1
|
37
|
+
[#2]: https://github.com/fnichol/campy/issues/2
|
31
38
|
[@fnichol]: https://github.com/fnichol
|
32
39
|
[@mvandenbeuken]: https://github.com/mvandenbeuken
|
data/README.md
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
-
# <a name="title"></a> Campy
|
1
|
+
# <a name="title"></a> Campy: A Tiny Zero-Dependency Campfire Ruby client
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/campy.png)](http://badge.fury.io/rb/campy)
|
4
|
+
[![Build Status](https://secure.travis-ci.org/fnichol/campy.png)](http://travis-ci.org/fnichol/campy)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/fnichol/campy.png)](https://codeclimate.com/github/fnichol/campy)
|
6
|
+
[![Dependency Status](https://gemnasium.com/fnichol/campy.png)](https://gemnasium.com/fnichol/campy)
|
2
7
|
|
3
8
|
Tiny Campfire Ruby client so you can get on with it. It's implemented on top of
|
4
|
-
`Net::HTTP`
|
9
|
+
`Net::HTTP` with **no** external dependencies for Ruby compatibilities.
|
5
10
|
|
6
11
|
## <a name="installation"></a> Installation
|
7
12
|
|
data/campy.gemspec
CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |gem|
|
|
5
5
|
gem.authors = ["Fletcher Nichol"]
|
6
6
|
gem.email = ["fnichol@nichol.ca"]
|
7
7
|
gem.description = %q{Tiny Campfire Ruby client so you can get on with it.}
|
8
|
-
gem.summary = %q{Tiny Campfire Ruby client so you can get on with it. It's implemented on top of Net::HTTP
|
8
|
+
gem.summary = %q{Tiny Campfire Ruby client so you can get on with it. It's implemented on top of Net::HTTP with no external dependencies for Ruby compatibilities.}
|
9
9
|
gem.homepage = "http://fnichol.github.com/campy/"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
@@ -15,9 +15,9 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = Campy::VERSION
|
17
17
|
|
18
|
-
gem.
|
18
|
+
gem.required_ruby_version = ">= 1.9.2"
|
19
19
|
|
20
|
-
gem.add_development_dependency "minitest", "
|
20
|
+
gem.add_development_dependency "minitest", "< 5.0"
|
21
21
|
gem.add_development_dependency "webmock", "~> 1.8.5"
|
22
22
|
gem.add_development_dependency "simplecov", "~> 0.6.1"
|
23
23
|
end
|
data/lib/campy/room.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
require 'net/https'
|
3
|
-
require '
|
3
|
+
require 'json'
|
4
4
|
|
5
5
|
module Campy
|
6
6
|
class Room
|
@@ -107,7 +107,7 @@ module Campy
|
|
107
107
|
|
108
108
|
case response
|
109
109
|
when Net::HTTPOK
|
110
|
-
find_room_in_json(
|
110
|
+
find_room_in_json(JSON.parse(response.body))
|
111
111
|
else
|
112
112
|
raise ConnectionError
|
113
113
|
end
|
@@ -124,8 +124,7 @@ module Campy
|
|
124
124
|
def send_message(msg, type = 'TextMessage')
|
125
125
|
connect do |http|
|
126
126
|
request = http_request(:post, "/room/#{room_id}/speak.json")
|
127
|
-
request.body =
|
128
|
-
{ :message => { :body => msg, :type => type } })
|
127
|
+
request.body = { :message => { :body => msg, :type => type } }.to_json
|
129
128
|
response = http.request(request)
|
130
129
|
|
131
130
|
case response
|
data/lib/campy/version.rb
CHANGED
data/spec/campy/room_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: campy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,33 +9,27 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement:
|
15
|
+
name: minitest
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - <
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
22
|
-
type: :
|
21
|
+
version: '5.0'
|
22
|
+
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: minitest
|
27
|
-
requirement: &2155890340 !ruby/object:Gem::Requirement
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
25
|
none: false
|
29
26
|
requirements:
|
30
|
-
- -
|
27
|
+
- - <
|
31
28
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
33
|
-
type: :development
|
34
|
-
prerelease: false
|
35
|
-
version_requirements: *2155890340
|
29
|
+
version: '5.0'
|
36
30
|
- !ruby/object:Gem::Dependency
|
37
31
|
name: webmock
|
38
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
39
33
|
none: false
|
40
34
|
requirements:
|
41
35
|
- - ~>
|
@@ -43,10 +37,15 @@ dependencies:
|
|
43
37
|
version: 1.8.5
|
44
38
|
type: :development
|
45
39
|
prerelease: false
|
46
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.8.5
|
47
46
|
- !ruby/object:Gem::Dependency
|
48
47
|
name: simplecov
|
49
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
50
49
|
none: false
|
51
50
|
requirements:
|
52
51
|
- - ~>
|
@@ -54,7 +53,12 @@ dependencies:
|
|
54
53
|
version: 0.6.1
|
55
54
|
type: :development
|
56
55
|
prerelease: false
|
57
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.6.1
|
58
62
|
description: Tiny Campfire Ruby client so you can get on with it.
|
59
63
|
email:
|
60
64
|
- fnichol@nichol.ca
|
@@ -91,20 +95,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
95
|
requirements:
|
92
96
|
- - ! '>='
|
93
97
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
98
|
+
version: 1.9.2
|
95
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
100
|
none: false
|
97
101
|
requirements:
|
98
102
|
- - ! '>='
|
99
103
|
- !ruby/object:Gem::Version
|
100
104
|
version: '0'
|
105
|
+
segments:
|
106
|
+
- 0
|
107
|
+
hash: -781908355229066622
|
101
108
|
requirements: []
|
102
109
|
rubyforge_project:
|
103
|
-
rubygems_version: 1.8.
|
110
|
+
rubygems_version: 1.8.24
|
104
111
|
signing_key:
|
105
112
|
specification_version: 3
|
106
113
|
summary: Tiny Campfire Ruby client so you can get on with it. It's implemented on
|
107
|
-
top of Net::HTTP
|
114
|
+
top of Net::HTTP with no external dependencies for Ruby compatibilities.
|
108
115
|
test_files:
|
109
116
|
- spec/campy/room_spec.rb
|
110
117
|
- spec/fixtures/webmock_no_rooms.txt
|