rest_my_case 1.10.4 → 1.10.5

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
- ZTE5OTAwMTJjMWZjNzk3NzFkM2NmZjQyMzgwYjlkMTMxYWRjNjZjNg==
4
+ N2NlYWQyNTRmYTI5MDIyNDZiNTVjYjNlYzE0OGY1ZmFmZDJjYTVkZA==
5
5
  data.tar.gz: !binary |-
6
- MTAxZTZjNGYxZTk4NWZjMmNlMmRjMzE5YzQzOTllOGVhMmM0Mzk0ZQ==
6
+ ZDFkNzkyMGUxOTIyYTFhMDg3MzIyMDNkZjI1ZmI4NjRlY2IyNmMyMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YWJjODJjODY0ZjAwODgwYzEzMDAxZGM0ZDdjMWEyOGQ4ZDIwMzMyZGU2NjU5
10
- ZTM4OTRlZjVkZGZkODI1ZjYzY2FkMTFkNzAzOTE1NTk2ZmZiMTI5OTdhNDZm
11
- NGVjMzQyNzFmZjhlNTBkODRmZTUxN2JlZGIzN2I5MjJjMzNkOWE=
9
+ MzYzZGIzMGI3ZjQ1ZjFmYWFlODFhMTEwNzkyMjcwZjRlMTNlN2UzMTA2Zjdl
10
+ NWI1M2RiNjQzMThmZTRiZWE1OWIyNzBmNTkwYjk3MjIyNjIxMDVmOGJlZDMx
11
+ YTc3YjAwYzRlZTQwMWIyZjZjZGRjNWU1ZGNmOTE0MzU0MTEwN2I=
12
12
  data.tar.gz: !binary |-
13
- ZWE3Y2FmMjFmM2IxN2VhYmMyODQ3MWY0YWVmNjg3NTRhZWY0MzZmNzJmOTA0
14
- NmE5YmE2MjBkNzdjZTc1Mzg2MDc5ZGRlM2U1NDQzN2IzYzI4NDE5Y2IzZTI2
15
- NzkwZGYxNTZkNjZiYjQxMTU3NjZlM2NlMDRlOTgzYTVkYjIxNzk=
13
+ MjE5YWY2NTU0MGZmYjBiZjRlNjNiODcxM2E2MTMyOGJhMDI0ZTE2ZjI1NWRj
14
+ YzRmOTkxNTEyNWY0M2IyOTBjNTIwZTg1YzUwNzJjMjVkNTJhNGU4Nzk4NWI2
15
+ ZjMyNTcxMDcxNzEzODcwN2NmZWVhMThiMWUyY2RkMzQyNWE2YWM=
@@ -14,6 +14,8 @@ module RestMyCase
14
14
  error[:message] = nil
15
15
  end
16
16
 
17
+ error[:status] = error[:status].to_s
18
+
17
19
  @context.status.send("#{error[:status]}!")
18
20
 
19
21
  @last_known_error = error
@@ -1,5 +1,5 @@
1
1
  module RestMyCase
2
2
 
3
- VERSION = '1.10.4'
3
+ VERSION = '1.10.5'
4
4
 
5
5
  end
@@ -32,7 +32,7 @@ describe RestMyCase::HttpStatus do
32
32
  end
33
33
 
34
34
  it "@context.error_response should only list the class's dependencies" do
35
- expect(@context.error_response).to match a_hash_including({ status: :unprocessable_entity, http_status: 422, message: nil })
35
+ expect(@context.error_response).to match a_hash_including({ status: 'unprocessable_entity', http_status: 422, message: nil })
36
36
  end
37
37
  end
38
38
 
@@ -49,7 +49,7 @@ describe RestMyCase::HttpStatus do
49
49
  end
50
50
 
51
51
  it "@context.error_response should only list the class's dependencies" do
52
- expect(@context.error_response).to match a_hash_including({ status: :service_unavailable, http_status: 503, code: 404, message: "github could not found repo" })
52
+ expect(@context.error_response).to match a_hash_including({ status: 'service_unavailable', http_status: 503, code: 404, message: "github could not found repo" })
53
53
  end
54
54
  end
55
55
 
@@ -47,7 +47,7 @@ describe RestMyCase::Status do
47
47
  end
48
48
 
49
49
  it "context's errors should have a proper message" do
50
- expect(@context.errors).to match [a_hash_including({ status: :unprocessable_entity, message: nil, class_name: "StatusTestCase2" })]
50
+ expect(@context.errors).to match [a_hash_including({ status: 'unprocessable_entity', message: nil, class_name: "StatusTestCase2" })]
51
51
  end
52
52
  end
53
53
 
@@ -75,7 +75,7 @@ describe RestMyCase::Status do
75
75
  end
76
76
 
77
77
  it "context's errors should have a proper message" do
78
- expect(@context.errors).to match [a_hash_including({ status: :internal_server_error, message: nil, class_name: "StatusTestCase3" })]
78
+ expect(@context.errors).to match [a_hash_including({ status: 'internal_server_error', message: nil, class_name: "StatusTestCase3" })]
79
79
  end
80
80
  end
81
81
 
@@ -103,7 +103,7 @@ describe RestMyCase::Status do
103
103
  end
104
104
 
105
105
  it "context's errors should have a proper message" do
106
- expect(@context.errors).to match [a_hash_including({ status: :internal_server_error, message: 'something bad', class_name: "StatusTestCase4", yada: true })]
106
+ expect(@context.errors).to match [a_hash_including({ status: 'internal_server_error', message: 'something bad', class_name: "StatusTestCase4", yada: true })]
107
107
  end
108
108
  end
109
109
 
@@ -131,7 +131,7 @@ describe RestMyCase::Status do
131
131
  end
132
132
 
133
133
  it "context's errors should have a proper message" do
134
- expect(@context.errors).to match [a_hash_including({ status: :unprocessable_entity, message: 'invalid id', class_name: "StatusTestCase5" })]
134
+ expect(@context.errors).to match [a_hash_including({ status: 'unprocessable_entity', message: 'invalid id', class_name: "StatusTestCase5" })]
135
135
  end
136
136
  end
137
137
 
@@ -159,7 +159,7 @@ describe RestMyCase::Status do
159
159
  end
160
160
 
161
161
  it "context's errors should have a proper message" do
162
- expect(@context.errors).to match [a_hash_including({ status: :internal_server_error, message: 'while saving the resource', class_name: "StatusTestCase6" })]
162
+ expect(@context.errors).to match [a_hash_including({ status: 'internal_server_error', message: 'while saving the resource', class_name: "StatusTestCase6" })]
163
163
  end
164
164
  end
165
165
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest_my_case
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.4
4
+ version: 1.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - goncalvesjoao