This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge branch 'api', after merging Matt Van Horn's API work.

  • Loading branch information...
Norman Clarke
Norman Clarke committed Dec 9, 2008
2 parents d740883 + e9e0e10 commit e96b2e0648762ffa8f85300dcaad0d9896b2a957
View
@@ -1,3 +1,4 @@
.DS_Store
*.gem
coverage
+test/config.yml
View
@@ -1,121 +0,0 @@
-h1. Disqus Ruby Gem
-
-The Disqus Gem helps you easily integrate the "Disqus":http://disqus.com
-commenting system into your website. It works for any site programmed in Ruby,
-and has view helpers for Rails and Merb.
-
-At the moment it only supports Disqus Javascript widgets. An implementation of
-the Disqus API is underway (in the "api" repository branch) and will be
-released soon.
-
-h2. Get it
-
-h3. Stable release:
-
-<code>
- gem install disqus
-</code>
-
-h3. Bleeding edge:
-
-<code>
- gem install norman-disqus --source http://gems.github.com
-</code>
-
-h2. Use it:
-
-h3. Configure it:
-
-h4. Generic example:
-
-<pre>
-<code>
- # Somewhere in your code
- Disqus::defaults[:account] = "my_disqus_account"
-</code>
-</pre>
-
-h4. Rails-specific example:
-
-<pre>
-<code>
- # in config/development.rb (or production.rb, test.rb, etc.)
- config.after_initialize do
- Disqus::defaults[:account] = "my_disqus_account"
- end
-</code>
-</pre>
-Note that here the "after initialize" is necessary, otherwise your settings
-won't be set properly.
-
-
-h3. Show the comment threads on a post page:
-
-<pre>
-<code>
- # Loads the commenting system
- disqus_thread
-
- # Or if you're not using Rails/Merb:
- Disqus::Widget::thread
-
- # Sets the inner html to the comment count for any links on the page that
- # have the anchor "disqus_thread". For example, "View Comments" below would
- # be replaced by "1 comment" or "23 comments" etc.
- # <a href="http://my.website/article-permalink#disqus_thread">View Comments</a>
- # <a href="http://my.website/different-permalink#disqus_thread">View Comments</a>
- disqus_comment_counts
-
- # Or if you're not using Rails/Merb:
- Disqus::Widget::comment_counts
-</code>
-</pre>
-
-h3. Show the combo widget on a post page:
-
-<pre>
-<code>
- disqus_combo(:color => "blue", :hide_mods => false, :num_items => 20)
-
- # Or for non-Rails/Merb:
- Disqus::Widget::combo(:color => "blue", :hide_mods => false, :num_items => 20)
-</code>
-</pre>
-
-h3. Show the comment count on a permalink:
-
-<pre>
-<code>
- link_to("Permalink", post_path(@post, :anchor => "disqus_thread"))
- ...
- disqus_comment_counts
-
- # Or for non-Rails/Merb:
- Disqus::Widget::comment_counts
-</code>
-</pre>
-
-h2. Hack it:
-
-Github repository: http://github.com/norman/disqus
-
-h2. Complain about it:
-
-"norman@randomba.org":norman@randomba.org
-
-h2. Learn more about Disqus:
-
-"http://disqus.com":http://disqus.com
-
-h2. Thanks to the following contributors:
-
-* "Quin Hoxie":http://github.com/qhoxie - Merb support
-
-h2. Legal Stuff
-
-The Disqus Ruby gem was not created by, nor is officially supported by
-Disqus.com or Big Head Labs, Inc. Use it at your own risk and your own
-responsibility under the terms of the MIT License.
-
-Copyright (c) 2008 "Norman Clarke":norman@randomba.org, released under
-the MIT license
View
@@ -1,27 +1,51 @@
Gem::Specification.new do |s|
- s.name = "disqus"
+ s.name = "disqus-api"
s.version = "0.1.1"
s.date = "2008-09-03"
- s.rubyforge_project = 'disqus'
+ s.rubyforge_project = 'disqus-api'
s.summary = "Integrates Disqus commenting system into your Ruby-powered site."
s.email = 'norman@randomba.org'
s.homepage = 'http://randomba.org'
s.description = 'Integrates Disqus into your Ruby-powered site. Works with any Ruby website, and has view helpers for Rails and Merb.'
s.has_rdoc = true
- s.authors = ['Norman Clarke']
+ s.authors = ['Norman Clarke','Matt Van Horn']
s.files = [
"MIT-LICENSE",
"README.textile",
"init.rb",
"lib/disqus.rb",
- "lib/disqus/widget.rb",
+ "lib/disqus/api.rb",
+ "lib/disqus/author.rb",
+ "lib/disqus/forum.rb",
+ "lib/disqus/post.rb",
+ "lib/disqus/thread.rb",
"lib/disqus/view_helpers.rb",
- "Rakefile",
- ]
+ "lib/disqus/widget.rb",
+ "Rakefile"
+ ]
s.test_files = [
+ "test/test_helper.rb",
+ "test/config.yml.sample",
+ "test/api_test.rb",
+ "test/forum_test.rb",
+ "test/merb_test.rb",
+ "test/post_test.rb",
+ "test/rails_test.rb",
+ "test/thread_test.rb",
+ "test/view_helpers_test.rb",
"test/widget_test.rb",
- "test/view_helpers_test.rb"
+ "test/responses/bad_api_key.json",
+ "test/responses/create_post.json",
+ "test/responses/get_forum_api_key.json",
+ "test/responses/get_forum_list.json",
+ "test/responses/get_num_posts.json",
+ "test/responses/get_thread_by_url.json",
+ "test/responses/get_thread_list.json",
+ "test/responses/get_thread_posts.json",
+ "test/responses/thread_by_identifier.json",
+ "test/responses/update_thread.json"
]
s.rdoc_options = ["--main", "README.textile", "--inline-source", "--line-numbers"]
s.extra_rdoc_files = ["README.textile"]
end
+
View
@@ -1 +1,6 @@
-require 'disqus'
+require 'disqus'
+require 'disqus/api'
+require 'disqus/author'
+require 'disqus/forum'
+require 'disqus/post'
+require 'disqus/thread'
View
@@ -7,6 +7,7 @@
module Disqus
@defaults = {
+ :api_key => "",
:account => "",
:avatar_size => 48,
:color => "grey",
Oops, something went wrong.

0 comments on commit e96b2e0

Please sign in to comment.