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 +11 -0
- data/README.md +1 -1
- data/lib/sparks.rb +2 -6
- data/lib/sparks/version.rb +1 -1
- metadata +5 -3
data/CHANGELOG.md
ADDED
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
|
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
|
data/lib/sparks/version.rb
CHANGED
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:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
|
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-
|
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
|