smooth_operator 0.3.11 → 0.3.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,12 +10,12 @@ module SmoothOperator
10
10
  @object_class = object_class
11
11
  end
12
12
 
13
- def make_the_call(http_verb, options, id, &block)
13
+ def make_the_call(http_verb, options, relative_path, &block)
14
14
  injected_hydra = options[:hydra]
15
15
  hydra = injected_hydra || ::Typhoeus::Hydra::hydra
16
16
  options[:hydra] = hydra
17
17
 
18
- remote_call = @object_class.make_the_call(http_verb, id, options)
18
+ remote_call = @object_class.make_the_call(http_verb, relative_path, options)
19
19
 
20
20
  remote_call.request.on_complete do |typhoeus_response|
21
21
  remote_call.raw_response = typhoeus_response
@@ -13,7 +13,7 @@ module SmoothOperator
13
13
 
14
14
  def find(id, options = {})
15
15
  if id == :all
16
- find_each(options)
16
+ find_each('', options)
17
17
  else
18
18
  find_one(id, options)
19
19
  end
@@ -37,10 +37,8 @@ module SmoothOperator
37
37
  new_object
38
38
  end
39
39
 
40
- protected ####################### protected #######################
41
-
42
- def find_each(options)
43
- http_handler_orm.make_the_call(:get, options, '') do |remote_call|
40
+ def find_each(relative_path, options)
41
+ http_handler_orm.make_the_call(:get, options, relative_path) do |remote_call|
44
42
  objects_list = remote_call.get_attributes(table_name)
45
43
 
46
44
  if objects_list.kind_of?(Array)
@@ -51,8 +49,8 @@ module SmoothOperator
51
49
  end
52
50
  end
53
51
 
54
- def find_one(id, options)
55
- http_handler_orm.make_the_call(:get, options, id) do |remote_call|
52
+ def find_one(relative_path, options)
53
+ http_handler_orm.make_the_call(:get, options, relative_path) do |remote_call|
56
54
  remote_call.response = new remote_call.get_attributes(model_name_downcase)
57
55
  end
58
56
  end
@@ -1,3 +1,3 @@
1
1
  module SmoothOperator
2
- VERSION = "0.3.11"
2
+ VERSION = "0.3.12"
3
3
  end
@@ -20,6 +20,4 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
-
24
- spec.add_dependency(%q<httparty>, [">= 0.11.0"])
25
23
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smooth_operator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.12
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - João Gonçalves
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-09-18 00:00:00.000000000 Z
12
+ date: 2013-09-20 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,24 +38,11 @@ dependencies:
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: httparty
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ! '>='
46
- - !ruby/object:Gem::Version
47
- version: 0.11.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: 0.11.0
55
46
  description: ActiveResource alternative
56
47
  email:
57
48
  - goncalves.joao@gmail.com
@@ -79,27 +70,27 @@ files:
79
70
  homepage: https://github.com/goncalvesjoao/smooth_operator
80
71
  licenses:
81
72
  - MIT
82
- metadata: {}
83
73
  post_install_message:
84
74
  rdoc_options: []
85
75
  require_paths:
86
76
  - lib
87
77
  required_ruby_version: !ruby/object:Gem::Requirement
78
+ none: false
88
79
  requirements:
89
80
  - - ! '>='
90
81
  - !ruby/object:Gem::Version
91
82
  version: '0'
92
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
+ none: false
93
85
  requirements:
94
86
  - - ! '>='
95
87
  - !ruby/object:Gem::Version
96
88
  version: '0'
97
89
  requirements: []
98
90
  rubyforge_project:
99
- rubygems_version: 2.0.7
91
+ rubygems_version: 1.8.25
100
92
  signing_key:
101
- specification_version: 4
93
+ specification_version: 3
102
94
  summary: Simple and fully customizable alternative to ActiveResource, based on httparty
103
95
  gem
104
96
  test_files: []
105
- has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YzNmNDAzZWQyOGI1ZTkwNWY0NTRmOTAzNjczMGI1NTFkMWRkZTVjYg==
5
- data.tar.gz: !binary |-
6
- MGZiY2I1ZTAzMTdjMDkwY2E3ZjY0Y2IzYjdjYzcxYTcwZmZiM2QyYQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- YjFhYmE4YjRkNWIwODhjZTEyODdjNDE1ZDc0YjI1ODJiMDk3NzliYjVmMTcw
10
- YjU0NjI1ZjkzM2QyNGYyODUzNTdkY2NkNjNlY2IyODVmY2IzZWU0Zjg1ZDI4
11
- NGU2MmExMmEzYWM3NTc4YzYyYjBlZjI0NjRiNGVkOWU4MTBmNGE=
12
- data.tar.gz: !binary |-
13
- YmVmMjUzYTRjMmQ3ZDRhNWJhMzYwNGFhNTdlZTNhMmFhZWQ2YzFlOWQ0ZGI0
14
- MzU0MWUzNjMzYmM4MGI4Yzc0Y2MzMmI5MmE5MzJjNGQ0MDBkNGJlZjY3YjYz
15
- ZDJkYjRhYmNiZDkyNjU0NDhlMThiYWMyNjAzMDBlNzU5YTRkMTc=