caseblocks_api 0.2.11 → 0.2.12

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.11
1
+ 0.2.12
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "caseblocks_api"
8
- s.version = "0.2.11"
8
+ s.version = "0.2.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mark Provan"]
12
- s.date = "2013-01-17"
12
+ s.date = "2013-02-07"
13
13
  s.email = "development@emergeadapt.com"
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
@@ -30,10 +30,12 @@ Gem::Specification.new do |s|
30
30
  "lib/caseblocks_api/authentication_exception.rb",
31
31
  "lib/caseblocks_api/bucket_results.rb",
32
32
  "lib/caseblocks_api/finder.rb",
33
+ "lib/caseblocks_api/get_cases.rb",
33
34
  "lib/caseblocks_api/update_case.rb",
34
35
  "spec/caseblocks_api_spec.rb",
35
36
  "spec/lib/caseblocks_api/bucket_results_spec.rb",
36
37
  "spec/lib/caseblocks_api/find_case_by_property_spec.rb",
38
+ "spec/lib/caseblocks_api/get_cases_spec.rb",
37
39
  "spec/lib/caseblocks_api/update_case_spec.rb",
38
40
  "spec/spec_helper.rb",
39
41
  "spec/support/fake_http_party.rb"
@@ -7,6 +7,7 @@ module CaseblocksAPI
7
7
  require 'caseblocks_api/bucket_results'
8
8
  require 'caseblocks_api/finder'
9
9
  require 'caseblocks_api/update_case'
10
+ require 'caseblocks_api/get_cases'
10
11
 
11
12
  class Client
12
13
  include HTTParty
@@ -0,0 +1,21 @@
1
+ require 'caseblocks_api'
2
+ require 'active_support/inflector'
3
+
4
+ module CaseblocksAPI
5
+ class GetCases
6
+ def initialize(client)
7
+ @client = client
8
+ end
9
+
10
+ def execute(ids)
11
+ url = "/case_blocks/cases"
12
+ @client.get(url, query: {ids: ids})
13
+ end
14
+ end
15
+
16
+ class Client
17
+ def get_cases(ids)
18
+ GetCases.new(self.class).execute(ids)
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe CaseblocksAPI::GetCases do
4
+
5
+ it "should call the API with a list of ids" do
6
+ ids = ['1', '2']
7
+ client = double('client')
8
+ client.should_receive(:get).with('/case_blocks/cases', {query: {ids: ids}})
9
+ CaseblocksAPI::GetCases.new(client).execute(ids)
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caseblocks_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-17 00:00:00.000000000 Z
12
+ date: 2013-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -193,10 +193,12 @@ files:
193
193
  - lib/caseblocks_api/authentication_exception.rb
194
194
  - lib/caseblocks_api/bucket_results.rb
195
195
  - lib/caseblocks_api/finder.rb
196
+ - lib/caseblocks_api/get_cases.rb
196
197
  - lib/caseblocks_api/update_case.rb
197
198
  - spec/caseblocks_api_spec.rb
198
199
  - spec/lib/caseblocks_api/bucket_results_spec.rb
199
200
  - spec/lib/caseblocks_api/find_case_by_property_spec.rb
201
+ - spec/lib/caseblocks_api/get_cases_spec.rb
200
202
  - spec/lib/caseblocks_api/update_case_spec.rb
201
203
  - spec/spec_helper.rb
202
204
  - spec/support/fake_http_party.rb
@@ -215,7 +217,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
215
217
  version: '0'
216
218
  segments:
217
219
  - 0
218
- hash: 3224870814932925849
220
+ hash: -453322463455403595
219
221
  required_rubygems_version: !ruby/object:Gem::Requirement
220
222
  none: false
221
223
  requirements: