sparks 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Sparks changelog
2
+
3
+ ## Version 0.1.1 (9 April 2011)
4
+
5
+ - Add :ca_file option to Sparks::Campfire.new (@bleything)
6
+
7
+
8
+ ## Version 0.1 (18 March 2011)
9
+
10
+ - Initial release, basic Campfire API
11
+ - Heavily based on A Bot by @tenderlove
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Sparks
2
2
  ### a tiny campfire library
3
3
 
4
- So it turns out that Tinder requires nine gems nowadays, including EventMachine and the Twitter streaming API client gem, and that is too much for me. So, (strongly inspired by Aaron Patterson's A Bot), I wrote this extremely tiny Campfire client API. Share and enjoy.
4
+ So it turns out that Tinder requires nine gems nowadays, including EventMachine and the Twitter streaming API client gem. That is too many gems for me. So I wrote this extremely tiny Campfire client API based on Aaron Patterson's A Bot. Share and enjoy.
5
5
 
6
6
  ### Known Issues
7
7
 
data/lib/sparks.rb CHANGED
@@ -9,11 +9,6 @@ require 'net/https'
9
9
  # r = c.room_named "Room Name"
10
10
  # r.say "hi there"
11
11
  # r.paste "class Foo\nend"
12
-
13
- # Authors:
14
- # Andre Arko <andre@arko.net>
15
- # Aaron Patterson <aaron.patterson@gmail.com>
16
-
17
12
  module Sparks
18
13
  class Room
19
14
  attr_accessor :id
@@ -35,7 +30,7 @@ module Sparks
35
30
  class Campfire
36
31
  attr_reader :uri, :token, :pass
37
32
 
38
- def initialize subdomain, token
33
+ def initialize subdomain, token, opts = {}
39
34
  @uri = URI.parse("https://#{subdomain}.campfirenow.com")
40
35
  @token = token
41
36
  @pass = 'x'
@@ -43,6 +38,7 @@ module Sparks
43
38
  @http = Net::HTTP.new(uri.host, uri.port)
44
39
  @http.use_ssl = true
45
40
  @http.verify_mode = OpenSSL::SSL::VERIFY_PEER
41
+ @http.ca_file = opts[:ca_file] if opts[:ca_file]
46
42
  end
47
43
 
48
44
  def room_named name
@@ -1,3 +1,3 @@
1
1
  module Sparks
2
- VERSION = "0.1"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparks
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- version: "0.1"
9
+ - 1
10
+ version: 0.1.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - "Andr\xC3\xA9 Arko"
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-03-18 00:00:00 -07:00
18
+ date: 2011-04-09 00:00:00 -07:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -57,6 +58,7 @@ extra_rdoc_files: []
57
58
 
58
59
  files:
59
60
  - .gitignore
61
+ - CHANGELOG.md
60
62
  - README.md
61
63
  - Rakefile
62
64
  - lib/sparks.rb