serpscan 0.1.0 → 0.1.1

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: 0fa2b2c96a5b8eca42bc29d44aeddff048b7dd2e
4
- data.tar.gz: f1a11e1f12b2fd289b6efe9c8e47e5b9d8b51ff1
3
+ metadata.gz: 81052b0479b6d7e0502592206e3317c75df57b4b
4
+ data.tar.gz: 1a8e30767f104a101be79c2c838c307f8a532f29
5
5
  SHA512:
6
- metadata.gz: 74ab5935e4d450715fe760c8f4d942f187242a2193f81aecb7960889d370915f5eb861b8e57e455d69ebb946ffdcca33d3b83b2248835a7d798739c443e53ede
7
- data.tar.gz: e8fb6813327094250d3ffd7c318fab961531c2987d43f78d74fc7d2cc72c4fed86ec92a802cbfc7c520375cec4b839f2efc4ffba749a99fcd02a7ce6e77f35a8
6
+ metadata.gz: a78d51affc97650eb75eb7e824ec381836e82026c59e65b2f6423df3174fa979ebde680e32725911694038027c03e2c0d7bbaad431463ac851444ea66fe96bb1
7
+ data.tar.gz: 8cb634145192dc928265eb182186624cc0b2fc6bca49a2436bc5789ad12c47acfc78765ea8f58b5665eda2f5d93a1565c0024d0176e488f220950f9305b33b88
@@ -8,6 +8,7 @@ require 'serpscan/search_engine'
8
8
  require 'serpscan/website'
9
9
  require 'serpscan/errors'
10
10
  require 'queryparams'
11
+ require 'json'
11
12
 
12
13
  module Serpscan
13
14
  class << self
@@ -3,7 +3,9 @@ module Serpscan
3
3
  attr_accessor :parent
4
4
 
5
5
  def initialize(options = {})
6
- @parent = options[:parent]
6
+ dup_options = options.dup
7
+ @parent = dup_options.delete(:parent)
8
+ @raw_json = dup_options
7
9
  super
8
10
  end
9
11
 
@@ -1,6 +1,7 @@
1
1
  module Serpscan
2
2
  class SerpscanObject
3
3
  def initialize(options = {})
4
+ @raw_json ||= options
4
5
  assign_attributes(options)
5
6
  end
6
7
 
@@ -17,6 +18,10 @@ module Serpscan
17
18
  true
18
19
  end
19
20
 
21
+ def to_json
22
+ @raw_json.to_json
23
+ end
24
+
20
25
  class << self
21
26
  def api_path(object = self)
22
27
  "/#{Serpscan::Utilities.object_to_string(object)}s"
@@ -1,3 +1,3 @@
1
1
  module Serpscan
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -23,6 +23,7 @@ describe Serpscan::Website, vcr: true do
23
23
  it 'should return a keyword object' do
24
24
  website = subject.class.find(1)
25
25
  keyword = website.create_keyword(phrase)
26
+
26
27
  expect(keyword.class).to eq Serpscan::Keyword
27
28
  expect(keyword.website).to eq website
28
29
  expect(keyword.phrase).to eq phrase
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.1.0
4
+ version: 0.1.1
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-04-08 00:00:00.000000000 Z
11
+ date: 2015-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler