campy 0.1.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,15 @@
1
1
  language: ruby
2
+
2
3
  rvm:
4
+ - 2.0.0
5
+ - 1.9.3
3
6
  - 1.9.3
4
7
  - 1.9.2
8
+ - jruby-19mode
5
9
  - rbx-19mode
6
- - 1.8.7
7
- - ree
8
- - rbx-18mode
9
- - jruby-18mode
10
10
  - jruby-head
11
+ - ruby-head
12
+
13
+ matrix:
14
+ allow_failures:
15
+ - rvm: ruby-head
@@ -1,22 +1,26 @@
1
- ## 0.1.4.dev (unreleased)
1
+ ## 1.0.0 / 2013-05-22
2
2
 
3
+ ### Breaking changes
3
4
 
4
- ## 0.1.3 (July 10, 2012)
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](https://github.com/fnichol/campy/pull/1): Add option to
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 (April 5, 2012)
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 (April 5, 2012)
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 (April 4, 2012)
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 [![Build Status](https://secure.travis-ci.org/fnichol/campy.png)](http://travis-ci.org/fnichol/campy) [![Dependency Status](https://gemnasium.com/fnichol/campy.png)](https://gemnasium.com/fnichol/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` and only requires the `multi_json` gem for Ruby compatibilities.
9
+ `Net::HTTP` with **no** external dependencies for Ruby compatibilities.
5
10
 
6
11
  ## <a name="installation"></a> Installation
7
12
 
@@ -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 and only requires the multi_json gem for Ruby compatibilities.}
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.add_dependency "multi_json", "~> 1.0"
18
+ gem.required_ruby_version = ">= 1.9.2"
19
19
 
20
- gem.add_development_dependency "minitest", "~> 2.12.0"
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
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  require 'net/https'
3
- require 'multi_json'
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(MultiJson.decode(response.body))
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 = MultiJson.encode(
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
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module Campy
4
- VERSION = "0.1.3"
4
+ VERSION = "1.0.0"
5
5
  end
@@ -7,6 +7,7 @@ unless defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
7
7
  SimpleCov.adapters.define 'gem' do
8
8
  command_name 'Specs'
9
9
 
10
+ add_filter '.gem/'
10
11
  add_filter '/spec/'
11
12
 
12
13
  add_group 'Binaries', '/bin/'
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.1.3
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: 2012-07-11 00:00:00.000000000 Z
12
+ date: 2013-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: multi_json
16
- requirement: &2155891020 !ruby/object:Gem::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: '1.0'
22
- type: :runtime
21
+ version: '5.0'
22
+ type: :development
23
23
  prerelease: false
24
- version_requirements: *2155891020
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: 2.12.0
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: &2155889700 !ruby/object:Gem::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: *2155889700
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: &2155888960 !ruby/object:Gem::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: *2155888960
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: '0'
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.17
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 and only requires the multi_json gem for Ruby compatibilities.
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