pyre 0.1.0 → 0.1.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.
data/README.txt CHANGED
@@ -1,5 +1,5 @@
1
1
  = pyre
2
- by Christopher Shea
2
+ by Christopher Shea (chris@ruby.tie-rack.org)
3
3
  http://pyre.rubyforge.org/
4
4
 
5
5
  == DESCRIPTION:
@@ -39,7 +39,9 @@ Patches awfully welcome.
39
39
 
40
40
  == INSTALL:
41
41
 
42
- * sudo gem install pyre
42
+ sudo gem install pyre
43
+
44
+ You can also grab the current trunk from http://pyre.rubyforge.org/svn/pyre/trunk
43
45
 
44
46
  == LICENSE:
45
47
 
@@ -1,7 +1,7 @@
1
1
  # Pyre: Because there isn't a real API for Campfire.
2
2
  module Pyre
3
3
  # :stopdoc:
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
6
6
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
7
7
  # :startdoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pyre
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Shea
@@ -77,7 +77,5 @@ rubygems_version: 1.0.1
77
77
  signing_key:
78
78
  specification_version: 2
79
79
  summary: Pyre is a library for interacting with Campfire, the web-based group chat site from 37signals
80
- test_files:
81
- - test/test_pyre_private.rb
82
- - test/test_pyre_rooms_private.rb
83
- - test/test_ssl_private.rb
80
+ test_files: []
81
+
@@ -1,53 +0,0 @@
1
- require 'test/unit'
2
-
3
- require 'pyre'
4
-
5
- class TestPyre < Test::Unit::TestCase
6
- def setup
7
- @pyre_campfire = Pyre::Campfire.new('pyre')
8
- @pyre_email = 'bot@tie-rack.org'
9
- @pyre_password = 'pyre99bts'
10
- end
11
-
12
- def login
13
- @pyre_campfire.login(@pyre_email, @pyre_password)
14
- end
15
-
16
- def test_001_subdomain
17
- assert_equal('pyre', @pyre_campfire.subdomain)
18
- end
19
-
20
- def test_002_uri
21
- assert_equal('http://pyre.campfirenow.com', @pyre_campfire.uri)
22
- end
23
-
24
- def test_003_agent
25
- assert_kind_of(WWW::Mechanize, @pyre_campfire.instance_variable_get('@agent'))
26
- end
27
-
28
- def test_004_login
29
- assert_equal(false, @pyre_campfire.logged_in?)
30
- login
31
- assert(@pyre_campfire.logged_in?, 'Campfire#login failed.')
32
- end
33
-
34
- def test_005_login_fails_with_bad_credentials
35
- assert_equal(false, @pyre_campfire.logged_in?)
36
- @pyre_campfire.login('not an email', 'not a password')
37
- assert_equal(false, @pyre_campfire.logged_in?, 'Campfire#login succeeded with bad credentials!')
38
- end
39
-
40
- def test_006_rooms
41
- login
42
- rooms = @pyre_campfire.rooms
43
- assert_kind_of(Array, rooms)
44
- assert_equal(false, rooms.empty?, 'Rooms returns an empty array.')
45
- end
46
-
47
- def test_007_logout
48
- login
49
- assert(@pyre_campfire.logged_in?, 'Campfire#login failed.')
50
- @pyre_campfire.logout
51
- assert_equal(false, @pyre_campfire.logged_in?, 'Campfire#logout failed!')
52
- end
53
- end
@@ -1,42 +0,0 @@
1
- require 'test/unit'
2
-
3
- require 'pyre'
4
-
5
- class TestPyreRooms < Test::Unit::TestCase
6
- def setup
7
- @pyre_campfire = Pyre::Campfire.new('pyre')
8
- @pyre_email = 'bot@tie-rack.org'
9
- @pyre_password = 'pyre99bts'
10
-
11
- @pyre_campfire.login(@pyre_email, @pyre_password)
12
-
13
- @pyre_test = @pyre_campfire.find_room_by_name('Pyre Test')
14
- end
15
-
16
- def teardown
17
- @pyre_campfire.logout
18
- end
19
-
20
- def test_001_find_room_by_name
21
- assert_kind_of(Pyre::Room, @pyre_test)
22
- end
23
-
24
- def test_002_enter_and_leave_room
25
- assert_equal(false, @pyre_test.joined?, 'Somehow in the room before joining!')
26
- @pyre_test.join
27
- assert(@pyre_test.joined?, 'Room#join failed')
28
- @pyre_test.leave
29
- assert_equal(false, @pyre_test.joined?, 'Room#leave failed!')
30
- assert(@pyre_campfire.logged_in?, 'Room#leave did\'t redirect.')
31
- end
32
-
33
- def test_003_interact_with_room
34
- @pyre_test.join
35
- assert(@pyre_test.speak("I am speaking at #{Time.now}"))
36
- assert(@pyre_test.joined?, 'Didn\'t return to room after speaking!')
37
- assert(@pyre_test.paste("I am pasting\n at #{Time.now}"))
38
- assert(@pyre_test.joined?, 'Didn\'t return to room after pasting!')
39
- @pyre_test.leave
40
- assert_equal(false, @pyre_test.joined?, 'Room#leave failed!')
41
- end
42
- end
@@ -1,47 +0,0 @@
1
- require 'test/unit'
2
-
3
- require 'pyre'
4
-
5
- class TestPyreSSL < Test::Unit::TestCase
6
- def setup
7
- @qval_campfire = Pyre::Campfire.new('qval', :ssl => true)
8
- @qval_email = 'chris@myqval.com'
9
- @qval_password = 'd0rkc0ntr0l'
10
-
11
- @qval_campfire.login(@qval_email, @qval_password)
12
- end
13
-
14
- def teardown
15
- @qval_campfire.logout
16
- end
17
-
18
- def test_001_uri
19
- assert_equal('https://qval.campfirenow.com', @qval_campfire.uri)
20
- end
21
-
22
- def test_002_rooms
23
- rooms = @qval_campfire.rooms
24
- assert_kind_of(Array, rooms)
25
- assert_equal(false, rooms.empty?)
26
- assert_kind_of(Pyre::Room, rooms.first)
27
- end
28
-
29
- def test_004_find_room_by_name
30
- assert_not_nil(@qval_campfire.find_room_by_name('Qval Development'))
31
- assert_nil(@qval_campfire.find_room_by_name('Chris is the new owner of Qval'))
32
- end
33
-
34
- def test_005_interact_with_room
35
- tinder_test = @qval_campfire.find_room_by_name('Tinder Test')
36
- assert_equal(true, tinder_test.join)
37
- assert_equal(true, tinder_test.speak('Hello from the test suite!'))
38
- tinder_test.leave
39
- end
40
-
41
- def test_006_paste
42
- tinder_test = @qval_campfire.find_room_by_name('Tinder Test')
43
- assert_equal(true, tinder_test.join)
44
- assert_equal(true, tinder_test.paste("Two Liner\nat #{Time.now}"))
45
- tinder_test.leave
46
- end
47
- end