serpscan 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/serpscan/api.rb +2 -1
  4. data/lib/serpscan/keyword.rb +2 -1
  5. data/lib/serpscan/version.rb +1 -1
  6. data/spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_creatable_object/should_return_object_after_creation.yml +11 -10
  7. data/spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_deletable_object/should_return_true_after_delete.yml +25 -19
  8. data/spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_alltime_change.yml +8 -8
  9. data/spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_current_rank.yml +8 -8
  10. data/spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_day_change.yml +8 -8
  11. data/spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_id.yml +8 -8
  12. data/spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_initial_rank.yml +8 -8
  13. data/spec/fixtures/vcr_cassettes/{Serpscan_SearchEngine/it_should_behave_like_a_listable_object/should_return_an_array_of_objects.yml → Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_month_change.yml} +8 -8
  14. data/spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_phrase.yml +8 -8
  15. data/spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_search_engine_country_id.yml +8 -8
  16. data/spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_search_volume.yml +8 -8
  17. data/spec/fixtures/vcr_cassettes/{Serpscan_Website/it_should_behave_like_a_listable_object/should_return_an_array_of_objects.yml → Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_website_id.yml} +8 -8
  18. data/spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_week_change.yml +8 -8
  19. data/spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_findable_object/should_return_a_value_for_countries.yml +5 -5
  20. data/spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_findable_object/should_return_a_value_for_id.yml +5 -5
  21. data/spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_findable_object/should_return_a_value_for_title.yml +5 -5
  22. data/spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_listable_object/should_return_an_array_of_Serpscan_SearchEngine_objects.yml +5 -5
  23. data/spec/fixtures/vcr_cassettes/Serpscan_Website/create_keyword/should_return_a_keyword_object.yml +19 -19
  24. data/spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_creatable_object/should_return_object_after_creation.yml +8 -8
  25. data/spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_deletable_object/should_return_true_after_delete.yml +25 -19
  26. data/spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_findable_object/should_return_a_value_for_id.yml +8 -8
  27. data/spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_findable_object/should_return_a_value_for_url.yml +8 -8
  28. data/spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_listable_object/should_return_an_array_of_Serpscan_Website_objects.yml +8 -8
  29. data/spec/fixtures/vcr_cassettes/Serpscan_Website/keywords/should_return_a_paginated_array_of_keyword_objects.yml +18 -590
  30. data/spec/lib/serpscan/keyword_spec.rb +1 -1
  31. data/spec/lib/serpscan/website_spec.rb +1 -1
  32. data/spec/spec_helper.rb +2 -1
  33. metadata +6 -8
  34. data/spec/fixtures/vcr_cassettes/Serpscan_Website/keywords/should_return_an_array_of_keyword_objects.yml +0 -90
@@ -4,5 +4,5 @@ describe Serpscan::Keyword, vcr: true do
4
4
  it_should_behave_like 'a creatable object', keyword: 'example keyword', website_id: 1, search_engine_country_id: 1
5
5
 
6
6
  it_should_behave_like 'a findable object', 1, Serpscan::Keyword::ATTRIBUTES
7
- it_should_behave_like 'a deletable object', 1
7
+ it_should_behave_like 'a deletable object', 2
8
8
  end
@@ -9,7 +9,7 @@ describe Serpscan::Website, vcr: true do
9
9
 
10
10
  describe 'keywords' do
11
11
  it 'should return a paginated array of keyword objects' do
12
- website = subject.class.find(3)
12
+ website = subject.class.find(1)
13
13
  keywords = website.keywords
14
14
  expect(keywords.class).to eq Array
15
15
  expect(keywords.first.class).to eq Serpscan::Keyword
@@ -11,6 +11,7 @@ VCR.configure do |c|
11
11
  c.hook_into :webmock
12
12
  c.ignore_localhost = false
13
13
  c.configure_rspec_metadata!
14
+ c.default_cassette_options = { record: :once }
14
15
  end
15
16
 
16
17
  RSpec.configure do |config|
@@ -19,6 +20,6 @@ RSpec.configure do |config|
19
20
  end
20
21
 
21
22
  config.before(:each) do
22
- stub_const 'Serpscan::API::BASE_URL', 'http://localhost:5055/api/v1'
23
+ stub_const 'Serpscan::API::BASE_URL', 'http://localhost:5055/api/v2'
23
24
  end
24
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serpscan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Montgomery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-25 00:00:00.000000000 Z
11
+ date: 2015-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -154,24 +154,23 @@ files:
154
154
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_day_change.yml
155
155
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_id.yml
156
156
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_initial_rank.yml
157
+ - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_month_change.yml
157
158
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_phrase.yml
158
159
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_search_engine_country_id.yml
159
160
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_search_volume.yml
161
+ - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_website_id.yml
160
162
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_week_change.yml
161
163
  - spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_findable_object/should_return_a_value_for_countries.yml
162
164
  - spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_findable_object/should_return_a_value_for_id.yml
163
165
  - spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_findable_object/should_return_a_value_for_title.yml
164
166
  - spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_listable_object/should_return_an_array_of_Serpscan_SearchEngine_objects.yml
165
- - spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_listable_object/should_return_an_array_of_objects.yml
166
167
  - spec/fixtures/vcr_cassettes/Serpscan_Website/create_keyword/should_return_a_keyword_object.yml
167
168
  - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_creatable_object/should_return_object_after_creation.yml
168
169
  - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_deletable_object/should_return_true_after_delete.yml
169
170
  - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_findable_object/should_return_a_value_for_id.yml
170
171
  - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_findable_object/should_return_a_value_for_url.yml
171
172
  - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_listable_object/should_return_an_array_of_Serpscan_Website_objects.yml
172
- - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_listable_object/should_return_an_array_of_objects.yml
173
173
  - spec/fixtures/vcr_cassettes/Serpscan_Website/keywords/should_return_a_paginated_array_of_keyword_objects.yml
174
- - spec/fixtures/vcr_cassettes/Serpscan_Website/keywords/should_return_an_array_of_keyword_objects.yml
175
174
  - spec/lib/serpscan/keyword_spec.rb
176
175
  - spec/lib/serpscan/search_engine_spec.rb
177
176
  - spec/lib/serpscan/website_spec.rb
@@ -212,24 +211,23 @@ test_files:
212
211
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_day_change.yml
213
212
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_id.yml
214
213
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_initial_rank.yml
214
+ - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_month_change.yml
215
215
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_phrase.yml
216
216
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_search_engine_country_id.yml
217
217
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_search_volume.yml
218
+ - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_website_id.yml
218
219
  - spec/fixtures/vcr_cassettes/Serpscan_Keyword/it_should_behave_like_a_findable_object/should_return_a_value_for_week_change.yml
219
220
  - spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_findable_object/should_return_a_value_for_countries.yml
220
221
  - spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_findable_object/should_return_a_value_for_id.yml
221
222
  - spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_findable_object/should_return_a_value_for_title.yml
222
223
  - spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_listable_object/should_return_an_array_of_Serpscan_SearchEngine_objects.yml
223
- - spec/fixtures/vcr_cassettes/Serpscan_SearchEngine/it_should_behave_like_a_listable_object/should_return_an_array_of_objects.yml
224
224
  - spec/fixtures/vcr_cassettes/Serpscan_Website/create_keyword/should_return_a_keyword_object.yml
225
225
  - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_creatable_object/should_return_object_after_creation.yml
226
226
  - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_deletable_object/should_return_true_after_delete.yml
227
227
  - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_findable_object/should_return_a_value_for_id.yml
228
228
  - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_findable_object/should_return_a_value_for_url.yml
229
229
  - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_listable_object/should_return_an_array_of_Serpscan_Website_objects.yml
230
- - spec/fixtures/vcr_cassettes/Serpscan_Website/it_should_behave_like_a_listable_object/should_return_an_array_of_objects.yml
231
230
  - spec/fixtures/vcr_cassettes/Serpscan_Website/keywords/should_return_a_paginated_array_of_keyword_objects.yml
232
- - spec/fixtures/vcr_cassettes/Serpscan_Website/keywords/should_return_an_array_of_keyword_objects.yml
233
231
  - spec/lib/serpscan/keyword_spec.rb
234
232
  - spec/lib/serpscan/search_engine_spec.rb
235
233
  - spec/lib/serpscan/website_spec.rb
@@ -1,90 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:5055/api/v1/websites/1?token=123
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: 'OK '
20
- headers:
21
- Content-Type:
22
- - application/json; charset=utf-8
23
- X-Ua-Compatible:
24
- - IE=Edge
25
- Etag:
26
- - '"c959b5255215b9b0a60282ec6a65f51d"'
27
- Cache-Control:
28
- - max-age=0, private, must-revalidate
29
- X-Request-Id:
30
- - 8f36bffc1a857fcc8f3a66ace6bddb91
31
- X-Runtime:
32
- - '0.022261'
33
- Server:
34
- - WEBrick/1.3.1 (Ruby/1.9.3/2013-01-15)
35
- Date:
36
- - Sun, 22 Feb 2015 20:52:37 GMT
37
- Content-Length:
38
- - '28'
39
- Connection:
40
- - Keep-Alive
41
- body:
42
- encoding: UTF-8
43
- string: '{"id":1,"url":"example.com"}'
44
- http_version:
45
- recorded_at: Sun, 22 Feb 2015 20:52:37 GMT
46
- - request:
47
- method: get
48
- uri: http://localhost:5055/api/v1/websites/1/keywords?token=123
49
- body:
50
- encoding: US-ASCII
51
- string: ''
52
- headers:
53
- Accept:
54
- - "*/*; q=0.5, application/xml"
55
- Accept-Encoding:
56
- - gzip, deflate
57
- User-Agent:
58
- - Ruby
59
- response:
60
- status:
61
- code: 200
62
- message: 'OK '
63
- headers:
64
- Content-Type:
65
- - application/json; charset=utf-8
66
- X-Ua-Compatible:
67
- - IE=Edge
68
- Etag:
69
- - '"4b29feb9b5591e6d4942ed04b043122e"'
70
- Cache-Control:
71
- - max-age=0, private, must-revalidate
72
- X-Request-Id:
73
- - 8ccddba541fcaa47d67e17e4b45cf814
74
- X-Runtime:
75
- - '0.081146'
76
- Server:
77
- - WEBrick/1.3.1 (Ruby/1.9.3/2013-01-15)
78
- Date:
79
- - Sun, 22 Feb 2015 20:52:37 GMT
80
- Content-Length:
81
- - '239'
82
- Connection:
83
- - Keep-Alive
84
- body:
85
- encoding: UTF-8
86
- string: '{"website_id":"1","page":1,"total_pages":1,"results":[{"id":3,"phrase":"example
87
- keyword","current_rank":null,"initial_rank":null,"day_change":null,"week_change":null,"alltime_change":"_","search_volume":null,"search_engine_country_id":1}]}'
88
- http_version:
89
- recorded_at: Sun, 22 Feb 2015 20:52:37 GMT
90
- recorded_with: VCR 2.9.3