pluct 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODUzYWFiYmEwMTZkNGY1ZTMxZDk5ZGZjYTI5MjAzMjJkYzU5YmRkOQ==
4
+ NmZiMjRiNWU4Y2YyMzQwYWZmZDE5ZjI0NjJmMzg3ZmI0NzY4OTBiMQ==
5
5
  data.tar.gz: !binary |-
6
- YjgwZmRiZjdjMzZiMjhiZjhkMTEwOWQ0ZjM5Yjk2MmVmOGUzOWZlZg==
6
+ OWY0Mzc4NTUxYTk3YmJhZmJlMmY2ZWI5NTM3YzhmODdlYzk1OTBmYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- M2I2YTc0Y2Y0M2FkOWFiYWFiYWRjYzU0ZGZjNDc3YjlhMDZmNGUxYWM2Yzc0
10
- MTY3MzI5YWM0Yzg3NDgyYWUxNTFlNjk2OGY4MzYxNjM2MjU3YjQxNjRjMTU0
11
- MmFiMTE5ZTlhMTExM2E5Y2JjYmU5MWIyMzBhOTBkYmNjMTJlY2U=
9
+ OTdjYzQ3M2IxNGU4NWYzMWU3YmY0MjZhM2U0OGEzNDBjYTFjMzc5NDg5MGE0
10
+ NDlkMzFmNmIxZDU4MjYzOTc5YzdiMTMzMmRjNTE0MjVkNzg1YWFmY2JmZmU4
11
+ NTRjZDM1MzUyODc1N2MyZTYwZWIwODQxMWY5ZGJmMTcwMThjMzk=
12
12
  data.tar.gz: !binary |-
13
- ODYxMWY4NzQ4OTFkNDFkZDQ3NDk2ZjQ2YzdkNTNkNWI4OTcxNTNjZTQxYzg5
14
- NTY4OTEyODk4ZWQ1ZDIyNGUzMmY3ZTcyZThmMjljZGU2MTM1MmQyYjUwYjBi
15
- ODcxMWE0NDZjODhjNGRiOTBmNzY1ZDUxMWJjZTJhYzM5OTcwZmE=
13
+ MWZhOWQzZDVkMWY5OWI2ZWRkNDE3ZmEyM2Q0MTcxYzlkZGU5MGVjMmI5MmE4
14
+ MmE0NmZiMDU5NTNmZTRlNmIyYjhiNjYxNjdhOWYyNWE4OWZiNTkwOWQxMTU4
15
+ MWM4ZGFiMzcxZDE1NmY1MDcyZTBhYWI5YzFjYzg5YmE0YWZhMmI=
@@ -19,7 +19,7 @@ module Pluct
19
19
  private
20
20
  def self.create_methods(links=[])
21
21
  links.each do |link|
22
- define_method link.rel do |*args|
22
+ define_method link["rel"] do |*args|
23
23
  query_string, *options = *args
24
24
  method = link["method"] || "GET"
25
25
  href = link["href"]
data/lib/pluct/schema.rb CHANGED
@@ -7,7 +7,7 @@ module Pluct
7
7
  def initialize(path)
8
8
  @path = path
9
9
  @data = get_content
10
- @links = @data.links
10
+ @links = @data["links"]
11
11
  end
12
12
 
13
13
  def to_s
data/lib/pluct/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pluct
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/pluct.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'addressable/template'
2
2
  require 'pluct/version'
3
3
  require 'multi_json'
4
- require 'pluct/extensions/hash'
5
4
 
6
5
  module Pluct
7
6
  autoload :Errors, "pluct/errors"
data/pluct.gemspec CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "addressable"
22
22
  spec.add_development_dependency "bundler", "~> 1.3"
23
- spec.add_development_dependency "hashie"
24
23
  spec.add_development_dependency "multi_json"
25
24
  spec.add_development_dependency "rake"
26
25
  spec.add_development_dependency "rest-client"
@@ -7,7 +7,7 @@ describe Pluct, :acceptance do
7
7
  resource_self = MultiJson.decode(resource.self)
8
8
 
9
9
  expect(resource_self).to have_key("items")
10
- expect(resource_self.item_count).to eq 2
10
+ expect(resource_self["item_count"]).to eq 2
11
11
  end
12
12
 
13
13
  it 'creates a new app', :vcr, cassette_name: 'acceptance/creates_new_app' do
@@ -23,7 +23,7 @@ describe Pluct::Resource do
23
23
  stub_request(:get, 'www.example.com/schemas/user').to_return(body: File.read('spec/assets/user_schema.json'),
24
24
  status: 200)
25
25
 
26
- schema.stub(:links).and_return(user_schema.links)
26
+ schema.stub(:links).and_return(user_schema["links"])
27
27
  end
28
28
 
29
29
  it 'has resource data' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pluct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alberto Leal
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.3'
41
- - !ruby/object:Gem::Dependency
42
- name: hashie
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ! '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: multi_json
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -179,7 +165,6 @@ files:
179
165
  - Rakefile
180
166
  - lib/pluct.rb
181
167
  - lib/pluct/errors.rb
182
- - lib/pluct/extensions/hash.rb
183
168
  - lib/pluct/helpers.rb
184
169
  - lib/pluct/helpers/request.rb
185
170
  - lib/pluct/resource.rb
@@ -1,5 +0,0 @@
1
- require 'hashie'
2
-
3
- class Hash
4
- include Hashie::Extensions::MethodAccess
5
- end