matsimitsu-tinder 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,192 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Chat rooms</title>
7
+ <link href="/stylesheets/screen.css?1224558404" media="all" rel="stylesheet" type="text/css" />
8
+ <!--[if lte IE 6]>
9
+ <style type="text/css">
10
+ @import url("/stylesheets/screen-ie.css?1224558404");
11
+ </style>
12
+ <![endif]-->
13
+ <!--[if IE 7]>
14
+ <style type="text/css">
15
+ @import url("/stylesheets/screen-ie-7.css?1224558404");
16
+ </style>
17
+ <![endif]-->
18
+
19
+ <link href="/stylesheets/print.css?1224558404" media="print" rel="stylesheet" type="text/css" />
20
+ <link href="/stylesheets/blue.css?1224558404" media="screen" rel="stylesheet" title="Theme" type="text/css" />
21
+ <script src="/javascripts/prototype.js?1224558404" type="text/javascript"></script>
22
+ <script src="/javascripts/effects.js?1224558404" type="text/javascript"></script>
23
+ <script src="/javascripts/application.js?1224558404" type="text/javascript"></script>
24
+ <script src="/javascripts/nubbins.js?1224558404" type="text/javascript"></script>
25
+ <script src="/javascripts/campfire.js?1224558404" type="text/javascript"></script>
26
+ <script src="/javascripts/javascript_flash_gateway.js?1224558404" type="text/javascript"></script>
27
+ </head>
28
+
29
+ <body class="lobby">
30
+
31
+
32
+
33
+
34
+ <div id="Header">
35
+ <div id="Tabs">
36
+ <ul id="MainTabs">
37
+ <li><a href="http://fish.campfirenow.com/" class="current">Lobby</a></li>
38
+
39
+
40
+
41
+ <li><a href="http://fish.campfirenow.com/room/179715" class="chat" id="room_tab-17715">Just Fishin</a></li>
42
+
43
+
44
+
45
+
46
+ <li><a href="http://fish.campfirenow.com/files+transcripts" class="" style="margin-left: 8px">Files, Transcripts &amp; Search</a></li>
47
+
48
+ <li style="float: right;" class="logout"><a href="http://fish.campfirenow.com/logout">Logout</a></li>
49
+ <li style="float: right" class="logout"><a href="/member/edit">My account</a></li>
50
+
51
+
52
+ </ul>
53
+ </div>
54
+ </div>
55
+
56
+
57
+ <div id="Wrapper">
58
+ <div id="Container">
59
+
60
+
61
+
62
+
63
+ <div class="Full">
64
+ <div class="col">
65
+
66
+ <div id="lobby">
67
+ <h1>
68
+ <span><a class="admin toggle show_hide_toggler_new_room" href="#" id="create_room_link" onclick="$('new_room').showHide.toggle(); return false;">Create a new room</a></span>
69
+ Chat rooms
70
+ </h1>
71
+
72
+ <div class="currentChatters">
73
+ 3 people currently chatting
74
+ <span>
75
+ <br />You're near your simultaneous chatter limit of 4.
76
+ Ask <a href="mailto:bob@billy.com">Billy Bob</a> to upgrade the account.
77
+ </span>
78
+
79
+ </div>
80
+ <div class="show_hide_wrapper"><div class=" showhide" id="new_room" style="display: none"><div class="basic_form_wrapper">
81
+ <div class="basic_form">
82
+ <div class="explanation">
83
+ <h3>Create a new room</h3>
84
+ <p>All chats take place in rooms. You can create as many rooms as you'd like.</p>
85
+ <p>Consider making rooms for client projects, general discussions, specific meetings/events, and more.</p>
86
+ <div class="spinner" id="new_room_spinner" style="display: none">&nbsp;</div>
87
+ </div>
88
+ <div id="new_room_form_errors"></div>
89
+ <div class="body">
90
+ <form action="http://fish.campfirenow.com/account/create/room?from=lobby" id="new_room_form" method="post" onsubmit="$(this).down('input[type=submit]').disable(); Element.hide('new_room_cancel_link'); new Ajax.Request('http://fish.campfirenow.com/account/create/room?from=lobby', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;"> <h3>Name the room</h3>
91
+ <p><input class="big expanded" id="room_name" name="room[name]" size="30" type="text" /></p>
92
+ <h3 style="font-weight: normal;">Optional: Give the room a topic or description</h3>
93
+ <p><textarea class="expanded" cols="40" id="room_topic" name="room[topic]" rows="20"></textarea></p>
94
+ <p class="submit"><input class="primary" name="commit" type="submit" value="Create the room" />
95
+ <span id="new_room_cancel_link"> or
96
+ <a class="admin show_hide_toggler_new_room" href="#" onclick="$('new_room').showHide.toggle(); return false;">Cancel</a></span></p>
97
+ </form> </div>
98
+ </div>
99
+ </div>
100
+ </div><script type="text/javascript">
101
+ //<![CDATA[
102
+ new ShowHide('new_room', {"beforeToggle": function(showHide) {Form.reset('new_room_form'); Element.update('new_room_form_errors', '')}, "afterToggle": function(showHide) {if (/MSIE/.test(navigator.userAgent)) {Element.hide(document.body);Element.show(document.body);};Field.activate('room_name')}})
103
+ //]]>
104
+ </script></div>
105
+
106
+ <div id="rooms">
107
+ <table class="lobby">
108
+ <tr>
109
+ <td class="lobby_room" style="vertical-align: top; width: 33%;"><div id="room_17715" class="room shaded">
110
+ <h2>
111
+
112
+ <a href="http://fish.campfirenow.com/room/17715">Just Fishin</a>
113
+ </h2>
114
+
115
+ <div class="updated">
116
+ <span class="active"> Active 12 minutes ago</span>
117
+ </div>
118
+ <p>Sargasm: Deriving far too much satisfaction from glibly berating another with sarcasm.
119
+
120
+ Ex: &quot;Oh, thanks a lot for drinking my last beer! No, it's my fault... if I wanted it for myself, I shouldn't have put it in the fridge!&quot;
121
+ &quot;Dude, don't have a sargasm</p>
122
+
123
+
124
+ <ul class="participant-list" id="participant_list-17715">
125
+ <li class="user nubbin_region" id="user_38447">
126
+
127
+ <span class="name">Caribou Barbie</span>
128
+
129
+ </li>
130
+ <li class="user nubbin_region" id="user_38449">
131
+
132
+ <span class="name">Joe Sixpack</span>
133
+
134
+ </li>
135
+ <li class="user nubbin_region" id="user_38445">
136
+
137
+ <span class="name">Billy Bob</span>
138
+
139
+ </li>
140
+ </ul>
141
+
142
+ </div>
143
+ </td>
144
+ <td class="lobby_room" style="vertical-align: top; width: 33%;">&nbsp;</td>
145
+ <td class="lobby_room" style="vertical-align: top; width: 33%;">&nbsp;</td>
146
+ </tr>
147
+ </table>
148
+
149
+ </div>
150
+ </div>
151
+
152
+ <script type="text/javascript">
153
+ //<![CDATA[
154
+ Ajax.Responders.register({
155
+ onCreate: function() {
156
+ if (Ajax.activeRequestCount > 0)
157
+ Element.show('new_room_spinner');
158
+ },
159
+ onComplete: function() {
160
+ if (Ajax.activeRequestCount == 0)
161
+ Element.hide('new_room_spinner');
162
+ }
163
+ });
164
+
165
+ //]]>
166
+ </script>
167
+ <script type="text/javascript">
168
+ //<![CDATA[
169
+ new PeriodicalExecuter(function() {new Ajax.Request('http://fish.campfirenow.com/rooms', {asynchronous:true, evalScripts:true})}, 60)
170
+ //]]>
171
+ </script>
172
+
173
+ <p style="clear: both;">&nbsp;</p>
174
+
175
+ </div>
176
+
177
+ <div class="bottom">&nbsp;</div>
178
+ <div id="Footer">
179
+ <strong><a href="http://www.campfirenow.com/help" target=_blank>FAQs and Help</a></strong> |
180
+ <a href="http://www.campfirenow.com/privacy.html" target=_blank>Privacy Policy</a> |
181
+ <a href="http://www.campfirenow.com/terms.html" target=_blank>Terms of Service</a>
182
+ </div>
183
+
184
+ </div>
185
+
186
+
187
+ </div>
188
+ </div>
189
+
190
+
191
+ </body>
192
+ </html>
@@ -0,0 +1,133 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Campfire: Today, May 5</title>
7
+ <link href="/stylesheets/screen.css?1238215612" media="all" rel="stylesheet" type="text/css" />
8
+ <!--[if lte IE 6]>
9
+ <style type="text/css">
10
+ @import url("/stylesheets/screen-ie.css?1238215612");
11
+ </style>
12
+ <![endif]-->
13
+ <!--[if IE 7]>
14
+ <style type="text/css">
15
+ @import url("/stylesheets/screen-ie-7.css?1238215612");
16
+ </style>
17
+ <![endif]-->
18
+
19
+ <!--[if lte IE 6]>
20
+ <style type="text/css">
21
+ @import url("/stylesheets/transcript-ie.css?1238215612");
22
+ </style>
23
+ <![endif]-->
24
+ <!--[if IE 7]>
25
+ <style type="text/css">
26
+ @import url("/stylesheets/transcript-ie-7.css?1238215612");
27
+ </style>
28
+ <![endif]-->
29
+
30
+ <link href="/stylesheets/print.css?1238215612" media="print" rel="stylesheet" type="text/css" />
31
+ <link href="/stylesheets/pink.css?1238215612" media="screen" rel="stylesheet" title="Theme" type="text/css" />
32
+ <script src="/javascripts/prototype.js?1238215612" type="text/javascript"></script>
33
+ <script src="/javascripts/effects.js?1238215612" type="text/javascript"></script>
34
+ <script src="/javascripts/sound.js?1238215612" type="text/javascript"></script>
35
+ <script src="/javascripts/application.js?1238215612" type="text/javascript"></script>
36
+ <script src="/javascripts/nubbins.js?1238215612" type="text/javascript"></script>
37
+ <script src="/javascripts/campfire.js?1238215612" type="text/javascript"></script>
38
+ <script src="/javascripts/javascript_flash_gateway.js?1238215612" type="text/javascript"></script>
39
+ <script type="text/javascript">
40
+ soundManager.url = "/movies/";
41
+ </script>
42
+ </head>
43
+
44
+ <body class="transcript">
45
+
46
+
47
+
48
+
49
+
50
+ <div id="Wrapper">
51
+ <div id="Container">
52
+
53
+
54
+
55
+
56
+ <div class="Left">
57
+ <div class="col">
58
+
59
+ <h1 class="date"><span class="print_only">Desk:Marcel &mdash;</span> Today, May 5</h1>
60
+
61
+ <p class="adjacent_transcripts">&larr; <a href="https://care2.campfirenow.com/room/214625/transcript/2009/05/04">Yesterday, May 4</a></p>
62
+
63
+
64
+ <div id="chat-wrapper">
65
+ <table class="chat">
66
+ <tbody id="chat">
67
+ <tr class="timestamp_message message" id="message_128062968" style="">
68
+ <td class="date"><span>May 5</span></td>
69
+ <td class="time"><div> 9:35 AM</div></td>
70
+ </tr>
71
+
72
+ <tr class="enter_message message user_407349" id="message_128062969" style="">
73
+ <td class="person">Marcel</td>
74
+ <td class="body"><div>has entered the room</div></td>
75
+ </tr>
76
+ <tr class="timestamp_message message" id="message_128093469" style="">
77
+ <td class="date"><span style="display:none">May 5</span></td>
78
+ <td class="time"><div>11:20 AM</div></td>
79
+ </tr>
80
+
81
+ <tr class="text_message message user_407349 you" id="message_128093470" style="">
82
+ <td class="person"><span>Marcel</span></td>
83
+ <td class="body"><div>Hello World</div></td>
84
+ </tr>
85
+
86
+ </tbody>
87
+ </table>
88
+ <style type="text/css">#chat td.body div {}</style>
89
+
90
+
91
+ <p class="adjacent_transcripts">&larr; <a href="https://care2.campfirenow.com/room/214625/transcript/2009/05/04">Yesterday, May 4</a></p>
92
+
93
+ </div>
94
+
95
+
96
+ </div>
97
+ <div class="bottom">&nbsp;</div>
98
+ </div>
99
+
100
+ <script type="text/javascript">
101
+ Campfire.Responders = ['Transcript', 'WindowManager', 'SoundManager'];
102
+ window.chat = new Campfire.Chat({transcriptElement: 'chat', sounds: {"crickets": "hears crickets chirping", "trombone": "plays a sad trombone", "rimshot": "plays a rimshot"}, soundsEnabled: true});
103
+ </script>
104
+
105
+
106
+ <div class="Right">
107
+ <div class="col">
108
+ <div id="Title">
109
+ <div id="room_title">
110
+ <h1>Desk:Marcel</h1>
111
+ </div>
112
+ </div>
113
+
114
+ <div class="participants">
115
+ <h3>People in this transcript</h3>
116
+
117
+ <ul id="participants">
118
+ <li>Marcel</li>
119
+ </ul>
120
+ </div>
121
+
122
+ <div class="files">
123
+ </div>
124
+
125
+ </div>
126
+ </div>
127
+
128
+ </div>
129
+ </div>
130
+
131
+
132
+ </body>
133
+ </html>
@@ -0,0 +1 @@
1
+ --colour
@@ -0,0 +1,3 @@
1
+ require 'rubygems'
2
+ require 'spec'
3
+ require 'tinder'
@@ -0,0 +1,4 @@
1
+ # Rename to credentials.rb
2
+ SUBDOMAIN = 'test'
3
+ USER, PASS = 'user@example.com', 'secret'
4
+ SSL = false
@@ -0,0 +1,59 @@
1
+ require 'test_helper'
2
+ require 'remote/credentials'
3
+
4
+ class RemoteCampfireTest < Test::Unit::TestCase
5
+
6
+ def setup
7
+ @subdomain = SUBDOMAIN
8
+ @user, @pass = USER, PASS
9
+ @ssl = SSL
10
+ raise "Set your campfire credentials in /test/remote/credentials.rb before running the remote tests" unless @user && @pass && @subdomain
11
+ @campfire = Tinder::Campfire.new @subdomain, :ssl => @ssl
12
+ end
13
+
14
+ def test_ssl_required
15
+ if @ssl
16
+ campfire = Tinder::Campfire.new @subdomain
17
+ assert_raises(Tinder::SSLRequiredError) do
18
+ campfire.login(@user, @pass)
19
+ end
20
+ end
21
+ end
22
+
23
+ def test_create_and_delete_room
24
+ assert login
25
+ assert @campfire.logged_in?
26
+
27
+ room = @campfire.create_room("Testing#{Time.now.to_i}")
28
+
29
+ assert_instance_of Tinder::Room, room
30
+ assert_not_nil room.id
31
+
32
+ room.name = "new name"
33
+ assert_equal "new name", room.name
34
+
35
+ room.destroy
36
+ assert_nil @campfire.find_room_by_name(room.name)
37
+
38
+ assert @campfire.logout
39
+ ensure
40
+ room.destroy rescue nil
41
+ end
42
+
43
+ def test_failed_login
44
+ assert_raises(Tinder::Error) { @campfire.login(@user, 'notmypassword') }
45
+ assert !@campfire.logged_in?
46
+ end
47
+
48
+ def test_find_nonexistent_room
49
+ login
50
+ assert_nil @campfire.find_room_by_name('No Room Should Have This Name')
51
+ end
52
+
53
+ private
54
+
55
+ def login(user = @user, pass = @pass)
56
+ @campfire.login(user, pass)
57
+ end
58
+
59
+ end
@@ -0,0 +1,2 @@
1
+ require 'test/unit'
2
+ require 'tinder'
@@ -0,0 +1,78 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{tinder}
8
+ s.version = "1.3.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Brandon Keepers"]
12
+ s.date = %q{2009-12-17}
13
+ s.description = %q{An API for interfacing with Campfire, the 37Signals chat application.}
14
+ s.email = %q{brandon@opensoul.org}
15
+ s.extra_rdoc_files = [
16
+ "README.txt"
17
+ ]
18
+ s.files = [
19
+ ".gitignore",
20
+ "CHANGELOG.txt",
21
+ "Manifest.txt",
22
+ "README.txt",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "init.rb",
26
+ "lib/tinder.rb",
27
+ "lib/tinder/campfire.rb",
28
+ "lib/tinder/connection.rb",
29
+ "lib/tinder/multipart.rb",
30
+ "lib/tinder/room.rb",
31
+ "site/index.html",
32
+ "site/stylesheets/style.css",
33
+ "spec/campfire_spec.rb",
34
+ "spec/html/full_lobby.html",
35
+ "spec/html/normal_lobby.html",
36
+ "spec/html/transcript.html",
37
+ "spec/spec.opts",
38
+ "spec/spec_helper.rb",
39
+ "test/remote/credentials.rb.example",
40
+ "test/remote/remote_campfire_test.rb",
41
+ "test/test_helper.rb",
42
+ "tinder.gemspec"
43
+ ]
44
+ s.homepage = %q{http://github.com/collectiveidea/tinder}
45
+ s.rdoc_options = ["--charset=UTF-8"]
46
+ s.require_paths = ["lib"]
47
+ s.rubyforge_project = %q{tinder}
48
+ s.rubygems_version = %q{1.3.5}
49
+ s.summary = %q{An (unofficial) Campfire API}
50
+ s.test_files = [
51
+ "spec/campfire_spec.rb",
52
+ "spec/spec_helper.rb",
53
+ "test/remote/remote_campfire_test.rb",
54
+ "test/test_helper.rb"
55
+ ]
56
+
57
+ if s.respond_to? :specification_version then
58
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
59
+ s.specification_version = 3
60
+
61
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
62
+ s.add_runtime_dependency(%q<activesupport>, [">= 0"])
63
+ s.add_runtime_dependency(%q<httparty>, [">= 0"])
64
+ s.add_runtime_dependency(%q<mime-types>, [">= 0"])
65
+ s.add_development_dependency(%q<rspec>, [">= 0"])
66
+ else
67
+ s.add_dependency(%q<activesupport>, [">= 0"])
68
+ s.add_dependency(%q<httparty>, [">= 0"])
69
+ s.add_dependency(%q<mime-types>, [">= 0"])
70
+ s.add_dependency(%q<rspec>, [">= 0"])
71
+ end
72
+ else
73
+ s.add_dependency(%q<activesupport>, [">= 0"])
74
+ s.add_dependency(%q<httparty>, [">= 0"])
75
+ s.add_dependency(%q<mime-types>, [">= 0"])
76
+ s.add_dependency(%q<rspec>, [">= 0"])
77
+ end
78
+ end