capistrano-campfire 0.1.2 → 0.1.3

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{capistrano-campfire}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
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 = %q{2011-01-29}
12
+ s.date = %q{2011-10-03}
13
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
14
  s.email = %q{josh@technicalpickles.com}
15
15
  s.extra_rdoc_files = [
@@ -26,21 +26,16 @@ Gem::Specification.new do |s|
26
26
  "capistrano-tinder.gemspec",
27
27
  "lib/capistrano-campfire.rb",
28
28
  "lib/capistrano/campfire.rb",
29
- "spec/capistrano-tinder_spec.rb",
29
+ "spec/capistrano-campfire_spec.rb",
30
30
  "spec/spec.opts",
31
31
  "spec/spec_helper.rb"
32
32
  ]
33
33
  s.homepage = %q{http://github.com/technicalpickles/capistrano-campfire}
34
34
  s.require_paths = ["lib"]
35
- s.rubygems_version = %q{1.3.7}
35
+ s.rubygems_version = %q{1.4.2}
36
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
37
 
42
38
  if s.respond_to? :specification_version then
43
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
44
39
  s.specification_version = 3
45
40
 
46
41
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -1,22 +1,24 @@
1
1
  require 'capistrano'
2
+ require 'tinder'
2
3
 
3
4
  module Capistrano
4
- class Campfire
5
- def self.load_into(configuration)
5
+ module Campfire
6
+ def self.extended(configuration)
6
7
  configuration.load do
7
8
  set :campfire_options, {}
8
9
 
9
10
  set :campfire_room do
10
- require 'tinder'
11
11
 
12
12
  account = campfire_options[:account]
13
13
  token = campfire_options[:token]
14
14
  ssl = campfire_options[:ssl]
15
+ ssl_verify = campfire_options[:ssl_verify]
15
16
  room_name = campfire_options[:room]
16
17
 
17
18
  campfire = ::Tinder::Campfire.new account,
18
19
  :token => token,
19
- :ssl => ssl
20
+ :ssl => ssl,
21
+ :ssl_verify => ssl_verify
20
22
 
21
23
  campfire.find_room_by_name(room_name)
22
24
  end
@@ -27,6 +29,5 @@ module Capistrano
27
29
  end
28
30
 
29
31
  if Capistrano::Configuration.instance
30
- Capistrano::Campfire.load_into(Capistrano::Configuration.instance)
32
+ Capistrano::Configuration.instance.extend(Capistrano::Campfire)
31
33
  end
32
-
@@ -0,0 +1,38 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe Capistrano::Campfire do
4
+ let :configuration do
5
+ config = Capistrano::Configuration.new
6
+
7
+ config.extend(Capistrano::Spec::ConfigurationExtension)
8
+ config.extend(Capistrano::Campfire)
9
+
10
+ config
11
+ end
12
+
13
+ context "loaded into a configuration" do
14
+
15
+ it "has no default options" do
16
+ configuration.campfire_options.should == {}
17
+ end
18
+
19
+ it "gives access to a room, given correct campfire options" do
20
+ configuration.set :campfire_options, {
21
+ :account => "awesomellc",
22
+ :token => "yyz123",
23
+ :ssl => true,
24
+ :room => "General Awesomeness"
25
+ }
26
+
27
+ campfire = stub("campfire")
28
+ ::Tinder::Campfire.should_receive(:new).with("awesomellc", :token => "yyz123", :ssl => true).and_return(campfire)
29
+
30
+ room = stub("room")
31
+ campfire.should_receive(:find_room_by_name).with("General Awesomeness").and_return(room)
32
+
33
+ configuration.campfire_room.should == room
34
+ end
35
+
36
+ end
37
+
38
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__))
2
2
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
- require 'capistrano-tinder'
3
+ require 'capistrano/campfire'
4
4
  require 'spec'
5
5
  require 'spec/autorun'
6
+ require 'capistrano/spec'
6
7
 
7
8
  Spec::Runner.configure do |config|
8
9
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-campfire
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
5
- prerelease: false
4
+ hash: 29
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joshua Nichols
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-29 00:00:00 -05:00
18
+ date: 2011-10-03 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -67,7 +67,7 @@ files:
67
67
  - capistrano-tinder.gemspec
68
68
  - lib/capistrano-campfire.rb
69
69
  - lib/capistrano/campfire.rb
70
- - spec/capistrano-tinder_spec.rb
70
+ - spec/capistrano-campfire_spec.rb
71
71
  - spec/spec.opts
72
72
  - spec/spec_helper.rb
73
73
  has_rdoc: true
@@ -100,10 +100,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  requirements: []
101
101
 
102
102
  rubyforge_project:
103
- rubygems_version: 1.3.7
103
+ rubygems_version: 1.4.2
104
104
  signing_key:
105
105
  specification_version: 3
106
106
  summary: Post to Campfire from capistrano
107
- test_files:
108
- - spec/capistrano-tinder_spec.rb
109
- - spec/spec_helper.rb
107
+ test_files: []
108
+
@@ -1,11 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe Capistrano::Campfire do
4
- let :configuration do
5
- config = Capistrano::Configuration.new
6
- configuration.extend(Capistrano::Spec::ConfigurationExtension)
7
- Moonshine::CapistranoIntegration.load_into(@configuration)
8
- end
9
-
10
- it "populates :campfire_room"
11
- end