disqus 1.0.1 → 1.0.2

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.
@@ -1,3 +1,8 @@
1
+ == 1.0.2 2009-10-05
2
+ 2 bug fixes:
3
+ * The Disqus::API.post method now returns the response body rather than the response object (Nat Budin)
4
+ * Disqus::API.create_post now complies with DISQUS's API requirements (Nat Budin)
5
+
1
6
  == 1.0.1 2009-01-19
2
7
  2 minor enhancements:
3
8
  * Improve docs (Quin Hoxie)
@@ -4,7 +4,6 @@ Manifest.txt
4
4
  README.rdoc
5
5
  Rakefile
6
6
  config/website.yml
7
- disqus.gemspec
8
7
  init.rb
9
8
  lib/disqus.rb
10
9
  lib/disqus/api.rb
data/Rakefile CHANGED
@@ -1,10 +1,11 @@
1
1
  require 'newgem'
2
+ require 'hoe'
2
3
  require 'lib/disqus/version'
3
4
 
4
5
  $hoe = Hoe.new("disqus", Disqus::Version::STRING) do |p|
5
6
  p.rubyforge_name = "disqus"
6
7
  p.author = ['Norman Clarke', 'Matthew Van Horn']
7
- p.email = ['norman@randomba.org', 'mattvanhorn@gmail.com']
8
+ p.email = ['norman@njclarke.com', 'mattvanhorn@gmail.com']
8
9
  p.summary = "Integrates Disqus commenting system into your Ruby-powered site."
9
10
  p.description = 'Integrates Disqus into your Ruby-powered site. Works with any Ruby website, and has view helpers for Rails and Merb.'
10
11
  p.url = 'http://disqus.rubyforge.org'
@@ -20,4 +21,4 @@ $hoe = Hoe.new("disqus", Disqus::Version::STRING) do |p|
20
21
  end
21
22
 
22
23
  require 'newgem/tasks'
23
- Dir['tasks/**/*.rake'].each { |t| load t }
24
+ Dir['tasks/**/*.rake'].each { |t| load t }
@@ -64,17 +64,17 @@ module Disqus
64
64
  # * <tt>:ip_address</tt> - the author's IP address
65
65
  def create_post(opts = {})
66
66
  opts[:api_key] ||= Disqus::defaults[:api_key]
67
- JSON.parse(post('create_post',
67
+ post_data = {
68
68
  :forum_api_key => opts[:forum_api_key],
69
69
  :thread_id => opts[:thread_id],
70
70
  :message => opts[:message],
71
71
  :author_name => opts[:author_name],
72
- :author_email => opts[:author_email],
73
- :parent_post => opts[:parent_post],
74
- :created_at => opts[:created_at], #UTC timestring, format: %Y-%m-%dT%H:%M
75
- :author_url => opts[:author_url],
76
- :ip_address => opts[:ip_address])
77
- )
72
+ :author_email => opts[:author_email]
73
+ }
74
+ [:parent_post, :created_at, :author_url, :ip_address].each do |key|
75
+ post_data[key] = opts[key] if opts[key]
76
+ end
77
+ JSON.parse(post('create_post/', post_data))
78
78
  end
79
79
 
80
80
  # Returns an array of hashes representing all forums the user owns. The
@@ -244,7 +244,7 @@ module Disqus
244
244
  url = ROOT + '/' + args.shift
245
245
  post_params = {}
246
246
  args.shift.each { |k, v| post_params[k.to_s]=v.to_s }
247
- Net::HTTP.post_form(URI.parse(url),post_params)
247
+ Net::HTTP.post_form(URI.parse(url),post_params).body
248
248
  end
249
249
 
250
250
  def make_url(*args)
@@ -2,7 +2,7 @@ module Disqus #:nodoc:
2
2
  module Version #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 2
6
6
  STRING = [MAJOR, MINOR, TINY].join('.')
7
7
  end
8
- end
8
+ end
metadata CHANGED
@@ -1,37 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: disqus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norman Clarke
8
8
  - Matthew Van Horn
9
9
  autorequire:
10
10
  bindir: bin
11
- cert_chain:
12
- - |
13
- -----BEGIN CERTIFICATE-----
14
- MIIDNDCCAhygAwIBAgIBADANBgkqhkiG9w0BAQUFADBAMQ8wDQYDVQQDDAZub3Jt
15
- YW4xGDAWBgoJkiaJk/IsZAEZFghyYW5kb21iYTETMBEGCgmSJomT8ixkARkWA29y
16
- ZzAeFw0wODA3MjUxOTEyMDJaFw0wOTA3MjUx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:00
13
+ date: 2009-10-19 00:00:00 -03:00
35
14
  default_executable:
36
15
  dependencies:
37
16
  - !ruby/object:Gem::Dependency
@@ -52,7 +31,7 @@ dependencies:
52
31
  requirements:
53
32
  - - ">="
54
33
  - !ruby/object:Gem::Version
55
- version: 1.2.3
34
+ version: 1.5.2
56
35
  version:
57
36
  - !ruby/object:Gem::Dependency
58
37
  name: mocha
@@ -72,11 +51,11 @@ dependencies:
72
51
  requirements:
73
52
  - - ">="
74
53
  - !ruby/object:Gem::Version
75
- version: 1.8.0
54
+ version: 2.3.3
76
55
  version:
77
56
  description: Integrates Disqus into your Ruby-powered site. Works with any Ruby website, and has view helpers for Rails and Merb.
78
57
  email:
79
- - norman@randomba.org
58
+ - norman@njclarke.com
80
59
  - mattvanhorn@gmail.com
81
60
  executables: []
82
61
 
@@ -85,7 +64,6 @@ extensions: []
85
64
  extra_rdoc_files:
86
65
  - History.txt
87
66
  - Manifest.txt
88
- - README.rdoc
89
67
  files:
90
68
  - History.txt
91
69
  - MIT-LICENSE
@@ -93,7 +71,6 @@ files:
93
71
  - README.rdoc
94
72
  - Rakefile
95
73
  - config/website.yml
96
- - disqus.gemspec
97
74
  - init.rb
98
75
  - lib/disqus.rb
99
76
  - lib/disqus/api.rb
@@ -127,10 +104,12 @@ files:
127
104
  - test/widget_test.rb
128
105
  has_rdoc: true
129
106
  homepage: http://disqus.rubyforge.org
107
+ licenses: []
108
+
130
109
  post_install_message:
131
110
  rdoc_options:
132
111
  - --main
133
- - README.rdoc
112
+ - README.txt
134
113
  require_paths:
135
114
  - lib
136
115
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -148,9 +127,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
127
  requirements: []
149
128
 
150
129
  rubyforge_project: disqus
151
- rubygems_version: 1.3.1
130
+ rubygems_version: 1.3.5
152
131
  signing_key:
153
- specification_version: 2
132
+ specification_version: 3
154
133
  summary: Integrates Disqus commenting system into your Ruby-powered site.
155
134
  test_files:
156
135
  - test/api_test.rb
data.tar.gz.sig DELETED
@@ -1,2 +0,0 @@
1
- *Fk��s�������ܵ���Ө<Q,J��RH
2
- �zE��%_ϰ���&��
@@ -1,44 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- Gem::Specification.new do |s|
4
- s.name = %q{disqus}
5
- s.version = "1.0.0"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Norman Clarke", "Matthew Van Horn"]
9
- s.date = %q{2009-01-12}
10
- s.description = %q{Integrates Disqus into your Ruby-powered site. Works with any Ruby website, and has view helpers for Rails and Merb.}
11
- s.email = ["norman@randomba.org", "mattvanhorn@gmail.com"]
12
- s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc"]
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"]
14
- s.has_rdoc = true
15
- s.homepage = %q{http://disqus.rubyforge.org}
16
- s.rdoc_options = ["--main", "README.rdoc"]
17
- s.require_paths = ["lib"]
18
- s.rubyforge_project = %q{disqus}
19
- s.rubygems_version = %q{1.3.1}
20
- s.summary = %q{Integrates Disqus commenting system into your Ruby-powered site.}
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"]
22
-
23
- if s.respond_to? :specification_version then
24
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
25
- s.specification_version = 2
26
-
27
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
- s.add_runtime_dependency(%q<json>, [">= 0"])
29
- s.add_development_dependency(%q<newgem>, [">= 1.2.3"])
30
- s.add_development_dependency(%q<mocha>, [">= 0"])
31
- s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
32
- else
33
- s.add_dependency(%q<json>, [">= 0"])
34
- s.add_dependency(%q<newgem>, [">= 1.2.3"])
35
- s.add_dependency(%q<mocha>, [">= 0"])
36
- s.add_dependency(%q<hoe>, [">= 1.8.0"])
37
- end
38
- else
39
- s.add_dependency(%q<json>, [">= 0"])
40
- s.add_dependency(%q<newgem>, [">= 1.2.3"])
41
- s.add_dependency(%q<mocha>, [">= 0"])
42
- s.add_dependency(%q<hoe>, [">= 1.8.0"])
43
- end
44
- end
metadata.gz.sig DELETED
Binary file