capistrano-campfire 0.2.0 → 0.2.1

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.
@@ -11,7 +11,7 @@ GEM
11
11
  eventmachine (1.0.0)
12
12
  faraday (0.8.4)
13
13
  multipart-post (~> 1.1)
14
- faraday_middleware (0.8.8)
14
+ faraday_middleware (0.9.0)
15
15
  faraday (>= 0.7.4, < 0.9)
16
16
  git (1.2.5)
17
17
  hashie (1.2.0)
@@ -23,7 +23,7 @@ GEM
23
23
  rake
24
24
  json (1.7.5)
25
25
  mime-types (1.19)
26
- multi_json (1.3.6)
26
+ multi_json (1.4.0)
27
27
  multipart-post (1.1.5)
28
28
  net-scp (1.0.4)
29
29
  net-ssh (>= 1.99.1)
@@ -11,13 +11,13 @@ Install it the usual way:
11
11
  And here's a quick example for your `config/deploy.rb`:
12
12
 
13
13
  require 'capistrano/campfire'
14
-
14
+
15
15
  set :campfire_options, :account => 'zim',
16
16
  :room => 'World Conquest',
17
17
  :token => '001000101110101001011112',
18
18
  :ssl => true
19
-
20
-
19
+
20
+
21
21
  task :ohai do
22
22
  campfire_room.speak 'o hai'
23
23
  end
@@ -26,7 +26,7 @@ And here's a quick example for your `config/deploy.rb`:
26
26
  You can also be posting to multiple campfire rooms/accounts.
27
27
 
28
28
  require 'capistrano/campfire'
29
-
29
+
30
30
  set :campfire_options, :rooms => [{
31
31
  :account => 'zim',
32
32
  :room => 'World Conquest',
@@ -37,15 +37,18 @@ You can also be posting to multiple campfire rooms/accounts.
37
37
  :token => '2001000101110101001011110',
38
38
  }],
39
39
  :ssl => true
40
-
41
-
40
+
41
+
42
42
  task :ohai do
43
43
  campfire_rooms.speak 'o hai'
44
44
  end
45
45
 
46
46
 
47
+ Instead of `room` option, you can pass the `room_id` if your room name contains some special characters.
48
+
49
+
47
50
  == Note on Patches/Pull Requests
48
-
51
+
49
52
  * Fork the project.
50
53
  * Make your feature addition or bug fix.
51
54
  * Add tests for it. This is important so I don't break it in a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "capistrano-campfire"
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joshua Nichols"]
12
- s.date = "2012-10-15"
12
+ s.date = "2013-03-16"
13
13
  s.description = " capistrano-tinder is a very simple library for making a Campfire room accessible from capistrano. All it does is provide said access, and nothing more, preferring to let other gems do that trickery. "
14
14
  s.email = "josh@technicalpickles.com"
15
15
  s.extra_rdoc_files = [
@@ -25,7 +25,6 @@ Gem::Specification.new do |s|
25
25
  "Rakefile",
26
26
  "VERSION",
27
27
  "capistrano-campfire.gemspec",
28
- "capistrano-tinder.gemspec",
29
28
  "lib/capistrano-campfire.rb",
30
29
  "lib/capistrano/campfire.rb",
31
30
  "spec/capistrano-campfire_spec.rb",
@@ -34,7 +33,7 @@ Gem::Specification.new do |s|
34
33
  ]
35
34
  s.homepage = "http://github.com/technicalpickles/capistrano-campfire"
36
35
  s.require_paths = ["lib"]
37
- s.rubygems_version = "1.8.10"
36
+ s.rubygems_version = "1.8.23"
38
37
  s.summary = "Post to Campfire from capistrano"
39
38
 
40
39
  if s.respond_to? :specification_version then
@@ -19,13 +19,21 @@ module Capistrano
19
19
  ssl = room_options[:ssl] || campfire_options[:ssl]
20
20
  ssl_verify = room_options[:ssl_verify] || campfire_options[:ssl_verify]
21
21
  room_name = room_options[:room] || campfire_options[:room]
22
+ room_id = room_options[:room] || campfire_options[:room_id]
22
23
 
23
24
 
24
25
  campfire = ::Tinder::Campfire.new account,
25
26
  :token => token,
26
27
  :ssl => ssl,
27
28
  :ssl_verify => ssl_verify
28
- campfire.find_room_by_name(room_name)
29
+
30
+ if room_name
31
+ campfire.find_room_by_name(room_name)
32
+ elsif room_id
33
+ campfire.find_room_by_id(room_id)
34
+ else
35
+ raise "Please, specify room name or room_id for your Campfire room"
36
+ end
29
37
  end
30
38
  end
31
39
 
@@ -16,6 +16,44 @@ describe Capistrano::Campfire do
16
16
  configuration.campfire_options.should == {}
17
17
  end
18
18
 
19
+
20
+ context "with configuration for a single room (by room_id)" do
21
+ before do
22
+ configuration.set :campfire_options, {
23
+ :account => "awesomellc",
24
+ :token => "yyz123",
25
+ :ssl => true,
26
+ :room_id => 1
27
+ }
28
+
29
+ @campfire = stub("campfire")
30
+ ::Tinder::Campfire.should_receive(:new).with("awesomellc", :token => "yyz123", :ssl => true, :ssl_verify => nil).and_return(@campfire)
31
+
32
+ @room = stub("room")
33
+ @campfire.should_receive(:find_room_by_id).with(1).and_return(@room)
34
+
35
+ end
36
+
37
+ it "speaks in a single room using `campfire_room.speak`" do
38
+ @room.should_receive(:speak).with("IMPENDING DOOM")
39
+
40
+ configuration.campfire_room.speak "IMPENDING DOOM"
41
+ end
42
+
43
+ it "pastes in a single room using `campfire_room.paste`" do
44
+ @room.should_receive(:paste).with("IMPENDING DOOM")
45
+
46
+ configuration.campfire_room.paste "IMPENDING DOOM"
47
+ end
48
+
49
+ it "plays in a single room using `campfire_room.play`" do
50
+ @room.should_receive(:play).with("IMPENDING DOOM")
51
+
52
+ configuration.campfire_room.play "IMPENDING DOOM"
53
+ end
54
+
55
+ end
56
+
19
57
  context "with configuration for a single room" do
20
58
  before do
21
59
  configuration.set :campfire_options, {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-campfire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-15 00:00:00.000000000 Z
12
+ date: 2013-03-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
16
- requirement: &70225647408000 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70225647408000
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: tinder
27
- requirement: &70225647406840 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70225647406840
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rspec
38
- requirement: &70225647405420 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: 1.2.9
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70225647405420
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.2.9
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: jeweler
49
- requirement: &70225647549080 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *70225647549080
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: capistrano-spec
60
- requirement: &70225647548260 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,7 +85,12 @@ dependencies:
65
85
  version: '0'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *70225647548260
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
69
94
  description: ! ' capistrano-tinder is a very simple library for making a Campfire
70
95
  room accessible from capistrano. All it does is provide said access, and nothing
71
96
  more, preferring to let other gems do that trickery. '
@@ -84,7 +109,6 @@ files:
84
109
  - Rakefile
85
110
  - VERSION
86
111
  - capistrano-campfire.gemspec
87
- - capistrano-tinder.gemspec
88
112
  - lib/capistrano-campfire.rb
89
113
  - lib/capistrano/campfire.rb
90
114
  - spec/capistrano-campfire_spec.rb
@@ -102,9 +126,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
126
  - - ! '>='
103
127
  - !ruby/object:Gem::Version
104
128
  version: '0'
105
- segments:
106
- - 0
107
- hash: -4379137590683155220
108
129
  required_rubygems_version: !ruby/object:Gem::Requirement
109
130
  none: false
110
131
  requirements:
@@ -113,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
134
  version: '0'
114
135
  requirements: []
115
136
  rubyforge_project:
116
- rubygems_version: 1.8.10
137
+ rubygems_version: 1.8.23
117
138
  signing_key:
118
139
  specification_version: 3
119
140
  summary: Post to Campfire from capistrano
@@ -1,55 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{capistrano-tinder}
8
- s.version = "0.1.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Joshua Nichols"]
12
- s.date = %q{2010-08-17}
13
- s.description = %q{ capistrano-tinder is a very simple library for making a Campfire room accessible from capistrano. All it does is provide said access, and nothing more, preferring to let other gems do that trickery. }
14
- s.email = %q{josh@technicalpickles.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "capistrano-tinder.gemspec",
27
- "lib/capistrano-campfire.rb",
28
- "lib/capistrano/campfire.rb",
29
- "spec/capistrano-tinder_spec.rb",
30
- "spec/spec.opts",
31
- "spec/spec_helper.rb"
32
- ]
33
- s.homepage = %q{http://github.com/technicalpickles/capistrano-tinder}
34
- s.require_paths = ["lib"]
35
- s.rubygems_version = %q{1.3.6}
36
- s.summary = %q{Post to Campfire from capistrano}
37
- s.test_files = [
38
- "spec/capistrano-tinder_spec.rb",
39
- "spec/spec_helper.rb"
40
- ]
41
-
42
- if s.respond_to? :specification_version then
43
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
44
- s.specification_version = 3
45
-
46
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
47
- s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
48
- else
49
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
50
- end
51
- else
52
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
53
- end
54
- end
55
-