disqus 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.txt +5 -0
- data/Manifest.txt +1 -1
- data/README.rdoc +29 -2
- data/config/website.yml +2 -0
- data/disqus.gemspec +3 -5
- data/lib/disqus.rb +3 -1
- data/lib/disqus/version.rb +1 -1
- data/lib/disqus/widget.rb +6 -2
- metadata +3 -3
- metadata.gz.sig +0 -0
- data/test/config.yml +0 -3
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -3,6 +3,7 @@ MIT-LICENSE
|
|
3
3
|
Manifest.txt
|
4
4
|
README.rdoc
|
5
5
|
Rakefile
|
6
|
+
config/website.yml
|
6
7
|
disqus.gemspec
|
7
8
|
init.rb
|
8
9
|
lib/disqus.rb
|
@@ -16,7 +17,6 @@ lib/disqus/view_helpers.rb
|
|
16
17
|
lib/disqus/widget.rb
|
17
18
|
tasks/rcov.rake
|
18
19
|
test/api_test.rb
|
19
|
-
test/config.yml
|
20
20
|
test/config.yml.sample
|
21
21
|
test/forum_test.rb
|
22
22
|
test/merb_test.rb
|
data/README.rdoc
CHANGED
@@ -36,7 +36,7 @@ connecting websites and commenters across a thriving discussion community."
|
|
36
36
|
# Optional, only if you're using the API
|
37
37
|
Disqus::defaults[:api_key] = "my_disqus_api_key"
|
38
38
|
|
39
|
-
===== Rails
|
39
|
+
===== Rails example:
|
40
40
|
|
41
41
|
# in config/development.rb (or production.rb, test.rb, etc.)
|
42
42
|
config.after_initialize do
|
@@ -48,6 +48,33 @@ connecting websites and commenters across a thriving discussion community."
|
|
48
48
|
Note that here the "after initialize" is necessary, otherwise your settings
|
49
49
|
won't be set properly.
|
50
50
|
|
51
|
+
===== Merb example:
|
52
|
+
|
53
|
+
# in config/init.rb
|
54
|
+
Merb::BootLoader.after_app_loads do
|
55
|
+
Disqus::defaults[:account] = "my_disqus_account"
|
56
|
+
# Optional, only if you're using the API
|
57
|
+
Disqus::defaults[:api_key] = "my_disqus_api_key"
|
58
|
+
end
|
59
|
+
|
60
|
+
Note that here the "after_app_loads" is necessary, otherwise your settings
|
61
|
+
won't be set properly.
|
62
|
+
|
63
|
+
===== Options
|
64
|
+
|
65
|
+
:api_key => "" # your api key
|
66
|
+
:account => "", # your disqus account
|
67
|
+
:developer => false, # allows for threads to work on localhost
|
68
|
+
:container_id => 'disqus_thread', # desired thread container
|
69
|
+
:avatar_size => 48, # squared pixel size of avatars
|
70
|
+
:color => "grey", # theme color
|
71
|
+
:default_tab => "popular", # default widget tab
|
72
|
+
:hide_avatars => false, # hide or show avatars
|
73
|
+
:hide_mods => true, # hide or show moderation
|
74
|
+
:num_items => 15, # number of comments to display
|
75
|
+
:show_powered_by => true, # show or hide powered by line
|
76
|
+
:orientation => "horizontal" # comment orientation
|
77
|
+
|
51
78
|
==== Show the comment threads widget on a post page:
|
52
79
|
|
53
80
|
# Loads the commenting system
|
@@ -113,4 +140,4 @@ Disqus.com or Big Head Labs, Inc. Use it at your own risk and your own
|
|
113
140
|
responsibility under the terms of the MIT License.
|
114
141
|
|
115
142
|
Copyright (c) 2008 {Norman Clarke}[mailto:norman@randomba.org], released under
|
116
|
-
the MIT license
|
143
|
+
the MIT license
|
data/config/website.yml
ADDED
data/disqus.gemspec
CHANGED
@@ -6,21 +6,19 @@ Gem::Specification.new do |s|
|
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Norman Clarke", "Matthew Van Horn"]
|
9
|
-
s.
|
10
|
-
s.date = %q{2009-01-05}
|
9
|
+
s.date = %q{2009-01-12}
|
11
10
|
s.description = %q{Integrates Disqus into your Ruby-powered site. Works with any Ruby website, and has view helpers for Rails and Merb.}
|
12
11
|
s.email = ["norman@randomba.org", "mattvanhorn@gmail.com"]
|
13
12
|
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc"]
|
14
|
-
s.files = ["History.txt", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "disqus.gemspec", "init.rb", "lib/disqus.rb", "lib/disqus/api.rb", "lib/disqus/author.rb", "lib/disqus/forum.rb", "lib/disqus/post.rb", "lib/disqus/thread.rb", "lib/disqus/version.rb", "lib/disqus/view_helpers.rb", "lib/disqus/widget.rb", "tasks/rcov.rake", "test/api_test.rb", "test/config.yml
|
13
|
+
s.files = ["History.txt", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "config/website.yml", "disqus.gemspec", "init.rb", "lib/disqus.rb", "lib/disqus/api.rb", "lib/disqus/author.rb", "lib/disqus/forum.rb", "lib/disqus/post.rb", "lib/disqus/thread.rb", "lib/disqus/version.rb", "lib/disqus/view_helpers.rb", "lib/disqus/widget.rb", "tasks/rcov.rake", "test/api_test.rb", "test/config.yml.sample", "test/forum_test.rb", "test/merb_test.rb", "test/post_test.rb", "test/rails_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", "test/test_helper.rb", "test/thread_test.rb", "test/view_helpers_test.rb", "test/widget_test.rb"]
|
15
14
|
s.has_rdoc = true
|
16
15
|
s.homepage = %q{http://disqus.rubyforge.org}
|
17
16
|
s.rdoc_options = ["--main", "README.rdoc"]
|
18
17
|
s.require_paths = ["lib"]
|
19
18
|
s.rubyforge_project = %q{disqus}
|
20
19
|
s.rubygems_version = %q{1.3.1}
|
21
|
-
s.signing_key = %q{/Users/norman/.gem/gem-private_key.pem}
|
22
20
|
s.summary = %q{Integrates Disqus commenting system into your Ruby-powered site.}
|
23
|
-
s.test_files = ["test/
|
21
|
+
s.test_files = ["test/rails_test.rb", "test/view_helpers_test.rb", "test/thread_test.rb", "test/post_test.rb", "test/api_test.rb", "test/widget_test.rb", "test/forum_test.rb", "test/merb_test.rb"]
|
24
22
|
|
25
23
|
if s.respond_to? :specification_version then
|
26
24
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
data/lib/disqus.rb
CHANGED
@@ -21,6 +21,8 @@ module Disqus
|
|
21
21
|
@defaults = {
|
22
22
|
:api_key => "",
|
23
23
|
:account => "",
|
24
|
+
:developer => false,
|
25
|
+
:container_id => 'disqus_thread',
|
24
26
|
:avatar_size => 48,
|
25
27
|
:color => "grey",
|
26
28
|
:default_tab => "popular",
|
@@ -67,4 +69,4 @@ end
|
|
67
69
|
|
68
70
|
if defined?(Merb)
|
69
71
|
Disqus::enable_merb
|
70
|
-
end
|
72
|
+
end
|
data/lib/disqus/version.rb
CHANGED
data/lib/disqus/widget.rb
CHANGED
@@ -30,7 +30,11 @@ module Disqus
|
|
30
30
|
opts = Disqus::defaults.merge(opts)
|
31
31
|
opts[:view_thread_text] ||= "View the discussion thread"
|
32
32
|
validate_opts!(opts)
|
33
|
-
s = '
|
33
|
+
s = ''
|
34
|
+
if opts[:developer]
|
35
|
+
s << '<script type="text/javascript">var disqus_developer = 1;</script>'
|
36
|
+
end
|
37
|
+
s << '<div id="disqus_thread"></div>'
|
34
38
|
s << '<script type="text/javascript" src="' + THREAD + '"></script>'
|
35
39
|
s << '<noscript><a href="http://%s.disqus.com/?url=ref">'
|
36
40
|
s << opts[:view_thread_text]
|
@@ -178,4 +182,4 @@ module Disqus
|
|
178
182
|
|
179
183
|
end
|
180
184
|
|
181
|
-
end
|
185
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: disqus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Norman Clarke
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
h7fbBRfStxI=
|
32
32
|
-----END CERTIFICATE-----
|
33
33
|
|
34
|
-
date: 2009-01-
|
34
|
+
date: 2009-01-19 00:00:00 -02:00
|
35
35
|
default_executable:
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- Manifest.txt
|
93
93
|
- README.rdoc
|
94
94
|
- Rakefile
|
95
|
+
- config/website.yml
|
95
96
|
- disqus.gemspec
|
96
97
|
- init.rb
|
97
98
|
- lib/disqus.rb
|
@@ -105,7 +106,6 @@ files:
|
|
105
106
|
- lib/disqus/widget.rb
|
106
107
|
- tasks/rcov.rake
|
107
108
|
- test/api_test.rb
|
108
|
-
- test/config.yml
|
109
109
|
- test/config.yml.sample
|
110
110
|
- test/forum_test.rb
|
111
111
|
- test/merb_test.rb
|
metadata.gz.sig
CHANGED
Binary file
|
data/test/config.yml
DELETED