disqus 0.1.1 → 1.0.0
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.tar.gz.sig +0 -0
- data/History.txt +5 -0
- data/Manifest.txt +38 -0
- data/README.rdoc +116 -0
- data/Rakefile +20 -39
- data/disqus.gemspec +46 -0
- data/init.rb +7 -1
- data/lib/disqus.rb +17 -4
- data/lib/disqus/api.rb +264 -0
- data/lib/disqus/author.rb +27 -0
- data/lib/disqus/forum.rb +126 -0
- data/lib/disqus/post.rb +51 -0
- data/lib/disqus/thread.rb +73 -0
- data/lib/disqus/version.rb +8 -0
- data/lib/disqus/widget.rb +9 -9
- data/tasks/rcov.rake +23 -0
- data/test/api_test.rb +80 -0
- data/test/config.yml +3 -0
- data/test/config.yml.sample +3 -0
- data/test/forum_test.rb +70 -0
- data/test/merb_test.rb +15 -0
- data/test/post_test.rb +18 -0
- data/test/rails_test.rb +18 -0
- data/test/responses/bad_api_key.json +1 -0
- data/test/responses/create_post.json +23 -0
- data/test/responses/get_forum_api_key.json +1 -0
- data/test/responses/get_forum_list.json +12 -0
- data/test/responses/get_num_posts.json +11 -0
- data/test/responses/get_thread_by_url.json +18 -0
- data/test/responses/get_thread_list.json +16 -0
- data/test/responses/get_thread_posts.json +37 -0
- data/test/responses/thread_by_identifier.json +17 -0
- data/test/responses/update_thread.json +5 -0
- data/test/test_helper.rb +32 -0
- data/test/thread_test.rb +28 -0
- metadata +116 -16
- metadata.gz.sig +0 -0
- data/README.textile +0 -94
metadata.gz.sig
ADDED
Binary file
|
data/README.textile
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
h1. Disqus Ruby Gem
|
2
|
-
|
3
|
-
The Disqus Gem helps you easily integrate the "Disqus":http://disqus.com
|
4
|
-
commenting system into your website. It works for any site programmed in Ruby,
|
5
|
-
and has view helpers for Rails and Merb.
|
6
|
-
|
7
|
-
h2. Get it
|
8
|
-
|
9
|
-
h3. Stable release:
|
10
|
-
|
11
|
-
<code>
|
12
|
-
gem install disqus
|
13
|
-
</code>
|
14
|
-
|
15
|
-
h3. Bleeding edge:
|
16
|
-
|
17
|
-
<code>
|
18
|
-
gem install norman-disqus --source http://gems.github.com
|
19
|
-
</code>
|
20
|
-
|
21
|
-
h2. Use it:
|
22
|
-
|
23
|
-
h3. Configure it:
|
24
|
-
|
25
|
-
<pre>
|
26
|
-
<code>
|
27
|
-
Disqus::defaults[:account] = "my_account"
|
28
|
-
</code>
|
29
|
-
</pre>
|
30
|
-
|
31
|
-
h3. Show the comment threads on a post page:
|
32
|
-
|
33
|
-
<pre>
|
34
|
-
<code>
|
35
|
-
# Loads the commenting system
|
36
|
-
disqus_thread
|
37
|
-
|
38
|
-
# Or if you're not using Rails/Merb:
|
39
|
-
Disqus::Widget::thread
|
40
|
-
|
41
|
-
# Sets the inner html to the comment count for any links on the page that
|
42
|
-
# have the anchor "disqus_thread". For example, "View Comments" below would
|
43
|
-
# be replaced by "1 comment" or "23 comments" etc.
|
44
|
-
# <a href="http://my.website/article-permalink#disqus_thread">View Comments</a>
|
45
|
-
# <a href="http://my.website/different-permalink#disqus_thread">View Comments</a>
|
46
|
-
disqus_comment_counts
|
47
|
-
|
48
|
-
# Or if you're not using Rails/Merb:
|
49
|
-
Disqus::Widget::comment_counts
|
50
|
-
</code>
|
51
|
-
</pre>
|
52
|
-
|
53
|
-
h3. Show the combo widget on a post page:
|
54
|
-
|
55
|
-
<pre>
|
56
|
-
<code>
|
57
|
-
disqus_combo(:color => "blue", :hide_mods => false, :num_items => 25)
|
58
|
-
|
59
|
-
# Or for non-Rails/Merb:
|
60
|
-
Disqus::Widget::combo(:color => "blue", :hide_mods => false, :num_items => 25)
|
61
|
-
</code>
|
62
|
-
</pre>
|
63
|
-
|
64
|
-
h3. Show the comment count on a permalink:
|
65
|
-
|
66
|
-
<pre>
|
67
|
-
<code>
|
68
|
-
link_to("Permalink", post_path(@post, :anchor => "disqus_thread"))
|
69
|
-
...
|
70
|
-
disqus_comment_counts
|
71
|
-
|
72
|
-
# Or for non-Rails/Merb:
|
73
|
-
Disqus::Widget::comment_counts
|
74
|
-
</code>
|
75
|
-
</pre>
|
76
|
-
|
77
|
-
h2. Hack it:
|
78
|
-
|
79
|
-
Github repository: http://github.com/norman/disqus
|
80
|
-
|
81
|
-
h2. Complain about it:
|
82
|
-
|
83
|
-
"norman@randomba.org":norman@randomba.org
|
84
|
-
|
85
|
-
h2. Learn more about Disqus:
|
86
|
-
|
87
|
-
"http://disqus.com":http://disqus.com
|
88
|
-
|
89
|
-
h2. Thanks to the following contributors:
|
90
|
-
|
91
|
-
* "Quin Hoxie":http://github.com/qhoxie - Merb support
|
92
|
-
|
93
|
-
Copyright (c) 2008 "Norman Clarke":norman@randomba.org, released under
|
94
|
-
the MIT license
|