caseblocks_api 0.2.14 → 0.2.15
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/caseblocks_api.gemspec +1 -1
- data/lib/caseblocks_api.rb +1 -1
- data/spec/caseblocks_api_spec.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.15
|
data/caseblocks_api.gemspec
CHANGED
data/lib/caseblocks_api.rb
CHANGED
@@ -32,7 +32,7 @@ module CaseblocksAPI
|
|
32
32
|
def create_case(params, case_type=nil)
|
33
33
|
params.merge!(:case_type_id => fetch_case_type_id(case_type))
|
34
34
|
response = self.class.post("/case_blocks/cases", :body => {:case => params}.to_json)
|
35
|
-
raise CaseblocksAPI::CaseCreationError, "Unable to create case - received response code #{response.code}" if response.code !=
|
35
|
+
raise CaseblocksAPI::CaseCreationError, "Unable to create case - received response code #{response.code}" if response.code != 201
|
36
36
|
end
|
37
37
|
|
38
38
|
private
|
data/spec/caseblocks_api_spec.rb
CHANGED
@@ -35,7 +35,7 @@ describe "CaseblocksAPI" do
|
|
35
35
|
it "should call post" do
|
36
36
|
stub = stub_request(:post, "example.com/case_blocks/cases?auth_token=")
|
37
37
|
.with({body: { 'case' => {'my' => 'params', 'case_type_id' => 1}}.to_json })
|
38
|
-
.to_return(:status =>
|
38
|
+
.to_return(:status => 201, :body => "", :headers => {})
|
39
39
|
caseblocks_client.create_case({'my' => 'params'}, 'some_case')
|
40
40
|
stub.should have_been_made.times(1)
|
41
41
|
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.
|
4
|
+
version: 0.2.15
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -218,7 +218,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
218
218
|
version: '0'
|
219
219
|
segments:
|
220
220
|
- 0
|
221
|
-
hash:
|
221
|
+
hash: 4348810465325384927
|
222
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
223
223
|
none: false
|
224
224
|
requirements:
|