disqus_api 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94064c79aa3d3d6496c03ea346cc067cdd9a3bef
4
- data.tar.gz: 4f26931c8cb89148feac62ca8e2a1003ccb505ef
3
+ metadata.gz: 769f50840efa5768cca4a732b479d8373b05d504
4
+ data.tar.gz: 164e1da0c1030901bfbadfff2d02f81f1aebb9f5
5
5
  SHA512:
6
- metadata.gz: 248ac9a87774b6cfcbc2dd7b2266980cbe3cf342a7994acaec1ebc1960a6d94a90d65af947ddc9c75b8015661d0554156d773d75ab6de16e62568644663a75f1
7
- data.tar.gz: 8c1cbe082f3dbbf3480e95a9f7b207f001f57d600d026ca9381feb334c2854dce2430465bfcd7e31519668979fe7b3fbae4f9bdd7d801994c751dd462ffeb516
6
+ metadata.gz: 5e661a1ca4277bfd1fa5066897b386be717f06cff40b970024a67dc69aadfc209adaa6e27914dd6323493cc30fb19a317414b7dd5862e1bb9e5ddb6146207a05
7
+ data.tar.gz: da7f5c8664a7055529a77369481a247543cb8e1c9a34bc39f91b1274eaf85a88b8601fa6f3077fcfd222be4335de5a2ca765ffdcd6bee580ccd4238f7a15fe5d
@@ -1,4 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - "1.9.3"
4
- - "2.0.0"
4
+ - "2.0.0"
5
+ - "2.1.1"
6
+ - "2.2.0"
data/Gemfile CHANGED
@@ -2,6 +2,3 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- group :test do
6
- gem "rspec"
7
- end
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 einzige
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -29,16 +29,16 @@ For **Rails** users:
29
29
 
30
30
  Put in your `config/disqus_api.yml`:
31
31
 
32
- ```ruby
32
+ ```yaml
33
33
  development:
34
34
  api_secret: development_secret_key
35
- api_key: 'public key',
36
- access_token: 'token from app settings'}
35
+ api_key: 'public key'
36
+ access_token: 'token from app settings'
37
37
 
38
38
  production:
39
39
  api_secret: production_secret_key
40
- api_key: 'public key',
41
- access_token: 'token from app settings'}
40
+ api_key: 'public key'
41
+ access_token: 'token from app settings'
42
42
 
43
43
  # ... any other env
44
44
  ```
@@ -100,7 +100,7 @@ first_page = DisqusApi.v3.posts.list(forum: 'my_forum', limit: 10)
100
100
 
101
101
  second_page = first_page.next
102
102
  third_page = second_page.next
103
- first_page = thrid_page.prev.prev
103
+ first_page = third_page.prev.prev
104
104
  # ...
105
105
  ```
106
106
 
@@ -186,7 +186,7 @@ rspec
186
186
  rake # rake gem must be installed
187
187
  ```
188
188
 
189
- In order to test on a real Discus account
189
+ In order to test on a real Disqus account
190
190
  - specify `spec/config/disqus.yml` (see `spec/config/disqus.yml.example` for details)
191
191
  - run specs passing `USE_DISQUS_ACCOUNT` environment variable:
192
192
 
@@ -203,3 +203,7 @@ USE_DISQUS_ACCOUNT=1 rspec
203
203
  - Commit and push until you are happy with your contribution
204
204
  - Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
205
205
  - Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
206
+
207
+ ------------
208
+
209
+ This project is licensed under the terms of the [MIT license](https://github.com/toptal/disqus_api/blob/master/LICENSE.txt).
@@ -1,8 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/version', __FILE__)
2
3
 
3
4
  Gem::Specification.new do |s|
4
5
  s.name = %q{disqus_api}
5
- s.version = "0.0.4"
6
+ s.version = DisqusApi::VERSION
6
7
 
7
8
  s.date = %q{2013-12-09}
8
9
  s.authors = ["Sergei Zinin (einzige)"]
@@ -19,8 +20,10 @@ Gem::Specification.new do |s|
19
20
  s.summary = %q{Disqus API for Ruby}
20
21
 
21
22
  s.add_runtime_dependency 'activesupport', ">= 3.0.0"
22
- s.add_runtime_dependency 'faraday', ">= 0.8"
23
- s.add_runtime_dependency 'faraday_middleware', ">= 0.9"
23
+ s.add_runtime_dependency 'faraday', "~> 0.9.2"
24
+ s.add_runtime_dependency 'faraday_middleware', "~> 0.10.0"
24
25
  s.add_development_dependency 'rspec'
26
+ s.add_development_dependency 'rspec-its'
27
+ s.add_development_dependency 'rake'
25
28
  end
26
29
 
@@ -29,6 +29,7 @@ posts:
29
29
  report: post
30
30
  highlight: post
31
31
  approve: post
32
+ update: post
32
33
  blacklists:
33
34
  add: post
34
35
  list: get
@@ -11,10 +11,9 @@ require 'disqus_api/namespace'
11
11
  require 'disqus_api/request'
12
12
  require 'disqus_api/response'
13
13
  require 'disqus_api/invalid_api_request_error'
14
- require 'disqus_api/rails'
14
+ require 'disqus_api/railtie' if defined?(Rails)
15
15
 
16
16
  module DisqusApi
17
- VERSION = '0.0.4'
18
17
 
19
18
  def self.adapter
20
19
  @adapter || Faraday.default_adapter
@@ -0,0 +1,15 @@
1
+ module DisqusApi
2
+ class Railtie < Rails::Railtie
3
+ initializer 'disqus_api.initialize' do
4
+ config_path = File.join(Rails.root, 'config', "disqus_api.yml")
5
+
6
+ if File.exist?(config_path)
7
+ DisqusApi.config = YAML.load_file(File.join(Rails.root, 'config', "disqus_api.yml"))[Rails.env]
8
+ else
9
+ unless Rails.env.test?
10
+ puts "WARNING: No config/disqus_api.yml provided for Disqus API. Make sure to set configuration manually."
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module DisqusApi
2
+ VERSION = "0.0.5"
3
+ end
@@ -6,24 +6,24 @@ describe DisqusApi::Api do
6
6
  let(:version) { '3.0' }
7
7
  let(:specifications) { {'users' => 'details'} }
8
8
 
9
- its(:version) { should == version }
10
- its(:specifications) { should == specifications }
9
+ its(:version) { should eq(version) }
10
+ its(:specifications) { should eq(specifications) }
11
11
  its(:namespaces) { should have_key(:users) }
12
- its(:endpoint) { should == 'https://disqus.com/api/3.0/' }
12
+ its(:endpoint) { should eq('https://disqus.com/api/3.0/') }
13
13
  it { should respond_to(:users) }
14
14
  its(:users) { should be_a(DisqusApi::Namespace) }
15
- its(:connection_options) { should == {headers: {"Accept"=>"application/json", "User-Agent"=>"DisqusAgent"},
16
- ssl: {verify: false},
17
- url: "https://disqus.com/api/3.0/"} }
15
+ its(:connection_options) { should eq ({headers: {"Accept"=>"application/json", "User-Agent"=>"DisqusAgent"},
16
+ ssl: {verify: false},
17
+ url: "https://disqus.com/api/3.0/"}) }
18
18
 
19
19
  describe "unregistered namespace metacalls" do
20
- it { should_not respond_to(:foo) }
20
+ it { is_expected.not_to respond_to(:foo) }
21
21
  specify { expect { api.foo }.to raise_error(ArgumentError) }
22
22
  end
23
23
 
24
24
  describe "#connection" do
25
25
  subject { api.connection }
26
- it { should be_a(Faraday::Connection) }
26
+ it { is_expected.to be_a(Faraday::Connection) }
27
27
  its(:params) { should have_key('api_key') }
28
28
  its(:params) { should have_key('api_secret') }
29
29
  its(:params) { should have_key('access_token') }
@@ -33,7 +33,7 @@ describe DisqusApi::Api do
33
33
  let(:request_path) { '/api/3.0/users/details.json' }
34
34
 
35
35
  it 'performs GET request' do
36
- api.get(request_path)['code'].should == 0
36
+ expect(api.get(request_path)['code']).to eq(0)
37
37
  end
38
38
 
39
39
  context "invalid request" do
@@ -49,10 +49,11 @@ describe DisqusApi::Api do
49
49
  describe "#post", perform_requests: true do
50
50
  let(:request_type) { :post }
51
51
  let(:request_path) { '/api/3.0/forums/create.json' }
52
+ let(:request_args) { {name: 'TestRspec', short_name: 'tspec', website: 'http://disqus.com'} } # no way!
52
53
 
53
- context local: true do
54
+ context "local", local: true do
54
55
  it 'performs POST request' do
55
- api.post(request_path)['code'].should == 0
56
+ expect(api.post(request_path, request_args)['code']).to eq(0)
56
57
  end
57
58
  end
58
59
 
@@ -65,4 +66,4 @@ describe DisqusApi::Api do
65
66
  end
66
67
  end
67
68
  end
68
- end
69
+ end
@@ -6,11 +6,11 @@ describe DisqusApi::Namespace do
6
6
  let(:specifications) { {'users' => {'details' => 'get'}} }
7
7
 
8
8
  let(:namespace_name) { 'users' }
9
- subject(:namespace) { described_class.new(api, namespace_name) }
9
+ subject(:namespace) { DisqusApi::Namespace.new(api, namespace_name) }
10
10
 
11
- its(:api) { should == api }
12
- its(:specification) { should == {'details' => 'get'} }
13
- its(:name) { should == namespace_name }
11
+ its(:api) { is_expected.to eq(api) }
12
+ its(:specification) { is_expected.to eq({'details' => 'get'}) }
13
+ its(:name) { is_expected.to eq(namespace_name) }
14
14
 
15
15
  it { should respond_to :details }
16
16
 
@@ -21,26 +21,26 @@ describe DisqusApi::Namespace do
21
21
 
22
22
  describe "#build_action_request" do
23
23
  subject(:request) { namespace.build_action_request('details', {args: true}) }
24
- its(:path) { should == 'users/details.json' }
25
- its(:api) { should == api }
26
- its(:arguments) { should == {args: true} }
24
+ its(:path) { is_expected.to eq('users/details.json') }
25
+ its(:api) { is_expected.to eq(api) }
26
+ its(:arguments) { is_expected.to eq({args: true}) }
27
27
  end
28
28
 
29
- context perform_requests: true do
29
+ context 'requests', perform_requests: true do
30
30
  let(:request_path) { '/api/3.0/users/details.json' }
31
31
 
32
32
  its(:details) { should be_a(Hash) }
33
33
  its(:details) { should be_a(::DisqusApi::Response) }
34
34
 
35
35
  it 'performs requests' do
36
- namespace.details['code'].should == 0
36
+ expect(namespace.details['code']).to eq(0)
37
37
  end
38
38
 
39
39
  describe "#request_action" do
40
40
  let(:response) { namespace.request_action('details') }
41
41
 
42
42
  it 'performs action request' do
43
- response['code'].should == 0
43
+ expect(response['code']).to eq(0)
44
44
  end
45
45
 
46
46
  context "invalid request" do
@@ -50,4 +50,4 @@ describe DisqusApi::Namespace do
50
50
  end
51
51
  end
52
52
  end
53
- end
53
+ end
@@ -33,13 +33,13 @@ describe DisqusApi::Request do
33
33
 
34
34
  describe "#perform" do
35
35
  it 'sends request through API' do
36
- request.perform['code'].should == 0
36
+ expect(request.perform['code']).to eq(0)
37
37
  end
38
38
  end
39
39
 
40
40
  describe ".perform" do
41
41
  it 'sends request through API' do
42
- described_class.perform(api, namespace, action, arguments)['code'].should == 0
42
+ expect(described_class.perform(api, namespace, action, arguments)['code']).to eq(0)
43
43
  end
44
44
  end
45
- end
45
+ end
@@ -14,30 +14,30 @@ describe DisqusApi::Response do
14
14
  let(:response_body) { {} }
15
15
 
16
16
  before do
17
- request.should_receive(:perform).with(arguments).and_return(response_body)
17
+ expect(request).to receive(:perform).with(arguments).and_return(response_body)
18
18
  end
19
19
 
20
20
  describe "#has_next?" do
21
21
  context "has" do
22
22
  let(:response_body) { {'cursor' => {'hasNext' => true}} }
23
- its(:has_next?) { should be_true }
23
+ its(:has_next?) { is_expected.to be true }
24
24
  end
25
25
 
26
26
  context 'has not' do
27
27
  let(:response_body) { {'cursor' => {'hasNext' => false}} }
28
- its(:has_next?) { should be_false }
28
+ its(:has_next?) { is_expected.to be false }
29
29
  end
30
30
  end
31
31
 
32
32
  describe "#has_prev?" do
33
33
  context "has" do
34
34
  let(:response_body) { {'cursor' => {'hasPrev' => true}} }
35
- its(:has_prev?) { should be_true }
35
+ its(:has_prev?) { is_expected.to be true }
36
36
  end
37
37
 
38
38
  context 'has not' do
39
39
  let(:response_body) { {'cursor' => {'hasPrev' => false}} }
40
- its(:has_prev?) { should be_false }
40
+ its(:has_prev?) { is_expected.to be false }
41
41
  end
42
42
  end
43
43
 
@@ -67,7 +67,7 @@ describe DisqusApi::Response do
67
67
  let(:next_page_response) { double('next_page_response') }
68
68
 
69
69
  before do
70
- request.should_receive(:response).with({limit: 1, cursor: 'another_page'}).and_return(next_page_response)
70
+ expect(request).to receive(:response).with({limit: 1, cursor: 'another_page'}).and_return(next_page_response)
71
71
  end
72
72
 
73
73
  its(:next) { should == next_page_response }
@@ -85,7 +85,7 @@ describe DisqusApi::Response do
85
85
  let(:prev_page_response) { double('prev_page_response') }
86
86
 
87
87
  before do
88
- request.should_receive(:response).with({limit: 1, cursor: 'another_page'}).and_return(prev_page_response)
88
+ expect(request).to receive(:response).with({limit: 1, cursor: 'another_page'}).and_return(prev_page_response)
89
89
  end
90
90
 
91
91
  its(:prev) { should == prev_page_response }
@@ -102,9 +102,9 @@ describe DisqusApi::Response do
102
102
 
103
103
  context "building a enumerator" do
104
104
  before do
105
- request.should_not_receive(:prev)
106
- request.should_not_receive(:next)
107
- request.should_not_receive(:perform)
105
+ expect(request).not_to receive(:prev)
106
+ expect(request).not_to receive(:next)
107
+ expect(request).not_to receive(:perform)
108
108
  end
109
109
 
110
110
  describe "#each_page" do
@@ -118,7 +118,7 @@ describe DisqusApi::Response do
118
118
 
119
119
  context "multiple pages" do
120
120
  before do
121
- request.should_receive(:perform).with(arguments.merge(cursor: 'another_page')).and_return(another_page_response_body)
121
+ expect(request).to receive(:perform).with(arguments.merge(cursor: 'another_page')).and_return(another_page_response_body)
122
122
  end
123
123
 
124
124
  let(:page_1_elem_1) { double('page_1_elem_1') }
@@ -134,17 +134,17 @@ describe DisqusApi::Response do
134
134
 
135
135
  describe "#next!" do
136
136
  before { response.next! }
137
- it { should be_a(described_class) }
137
+ it { is_expected.to be_a(described_class) }
138
138
 
139
139
  it 'steps on next page' do
140
- response['page'].should == 2
140
+ expect(response['page']).to eq(2)
141
141
  end
142
142
 
143
143
  context "no next" do
144
144
  before { response.next! }
145
145
 
146
146
  it 'does nothing' do
147
- response['page'].should == 2
147
+ expect(response['page']).to eq(2)
148
148
  end
149
149
  end
150
150
  end
@@ -158,29 +158,29 @@ describe DisqusApi::Response do
158
158
  }
159
159
 
160
160
  before { response.prev! }
161
- it { should be_a(described_class) }
161
+ it { is_expected.to be_a(described_class) }
162
162
 
163
163
  it 'steps on previous page' do
164
- response['page'].should == 1
164
+ expect(response['page']).to eq(1)
165
165
  end
166
166
 
167
167
  context "no previous" do
168
168
  before { response.prev! }
169
169
 
170
170
  it 'does nothing' do
171
- response['page'].should == 1
171
+ expect(response['page']).to eq(1)
172
172
  end
173
173
  end
174
174
  end
175
175
 
176
176
  describe "#each_page" do
177
177
  it 'returns each page' do
178
- subject.each_page.to_a.should == [[page_1_elem_1], [page_2_elem_1]]
178
+ expect(subject.each_page.to_a).to eq([[page_1_elem_1], [page_2_elem_1]])
179
179
  end
180
180
 
181
181
  it 'iterates through each page' do
182
- page_1_elem_1.should_receive(:get_block_message)
183
- page_2_elem_1.should_receive(:get_block_message)
182
+ expect(page_1_elem_1).to receive(:get_block_message)
183
+ expect(page_2_elem_1).to receive(:get_block_message)
184
184
 
185
185
  subject.each_page { |page| page.each(&:get_block_message) }
186
186
  end
@@ -188,16 +188,16 @@ describe DisqusApi::Response do
188
188
 
189
189
  describe "#each_resource" do
190
190
  it 'returns each record iterator' do
191
- subject.each_resource.to_a.should == [page_1_elem_1, page_2_elem_1]
191
+ expect(subject.each_resource.to_a).to eq([page_1_elem_1, page_2_elem_1])
192
192
  end
193
193
 
194
194
  it 'iterates through each resource' do
195
- page_1_elem_1.should_receive(:get_block_message)
196
- page_2_elem_1.should_receive(:get_block_message)
195
+ expect(page_1_elem_1).to receive(:get_block_message)
196
+ expect(page_2_elem_1).to receive(:get_block_message)
197
197
 
198
198
  subject.each_resource(&:get_block_message)
199
199
  end
200
200
  end
201
201
  end
202
202
  end
203
- end
203
+ end
@@ -5,7 +5,7 @@ describe DisqusApi, perform_requests: true do
5
5
  let(:request_path) { '/api/3.0/users/details.json' }
6
6
 
7
7
  it 'performs requests' do
8
- DisqusApi.v3.users.details['code'].should == 0
8
+ expect(DisqusApi.v3.users.details['code']).to eq(0)
9
9
  end
10
10
  end
11
11
 
@@ -18,7 +18,7 @@ describe DisqusApi, perform_requests: true do
18
18
  end
19
19
 
20
20
  it 'fetches all comments' do
21
- DisqusApi.v3.posts.list(forum: 'my_forum', limit: 1).all.should == %w{first_one second_one third_one}
21
+ expect(DisqusApi.v3.posts.list(forum: 'my_forum', limit: 1).all).to eq(%w{first_one second_one third_one})
22
22
  end
23
23
  end
24
- end
24
+ end
@@ -1,4 +1,5 @@
1
1
  require 'disqus_api'
2
+ require 'rspec/its'
2
3
 
3
4
  def load_disqus_config(fname)
4
5
  DisqusApi.config = YAML.load_file(File.join(File.dirname(__FILE__), "config/#{fname}"))
@@ -33,7 +34,7 @@ end
33
34
 
34
35
  RSpec.configure do |config|
35
36
  config.mock_with :rspec
36
- config.color_enabled = true
37
+ config.color = true
37
38
  config.formatter = :documentation
38
39
 
39
40
  if ENV['USE_DISQUS_ACCOUNT']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: disqus_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergei Zinin (einzige)
@@ -28,30 +28,30 @@ dependencies:
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: '0.8'
33
+ version: 0.9.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: '0.8'
40
+ version: 0.9.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faraday_middleware
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: '0.9'
47
+ version: 0.10.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: '0.9'
54
+ version: 0.10.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +66,34 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec-its
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  description: Provides clean Disqus API for your Ruby app with a nice interface.
70
98
  email: szinin@gmail.com
71
99
  executables: []
@@ -77,6 +105,7 @@ files:
77
105
  - .travis.yml
78
106
  - Gemfile
79
107
  - Guardfile
108
+ - LICENSE.txt
80
109
  - README.md
81
110
  - Rakefile
82
111
  - disqus_api.gemspec
@@ -85,9 +114,10 @@ files:
85
114
  - lib/disqus_api/api.rb
86
115
  - lib/disqus_api/invalid_api_request_error.rb
87
116
  - lib/disqus_api/namespace.rb
88
- - lib/disqus_api/rails.rb
117
+ - lib/disqus_api/railtie.rb
89
118
  - lib/disqus_api/request.rb
90
119
  - lib/disqus_api/response.rb
120
+ - lib/version.rb
91
121
  - spec/config/disqus.yml.example
92
122
  - spec/disqus_api/api_spec.rb
93
123
  - spec/disqus_api/namespace_spec.rb
@@ -115,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
145
  version: '0'
116
146
  requirements: []
117
147
  rubyforge_project:
118
- rubygems_version: 2.1.5
148
+ rubygems_version: 2.4.5
119
149
  signing_key:
120
150
  specification_version: 4
121
151
  summary: Disqus API for Ruby
@@ -1,17 +0,0 @@
1
- if defined?(Rails)
2
- module DisqusApi
3
- class Railtie < Rails::Railtie
4
- initializer 'disqus_api.initialize' do
5
- config_path = File.join(Rails.root, 'config', "disqus_api.yml")
6
-
7
- if File.exist?(config_path)
8
- DisqusApi.config = YAML.load_file(File.join(Rails.root, 'config', "disqus_api.yml"))[Rails.env]
9
- else
10
- unless Rails.env.test?
11
- puts "WARNING: No config/disqus_api.yml provided for Disqus API. Make sure to set configuration manually."
12
- end
13
- end
14
- end
15
- end
16
- end
17
- end