idempotent-request 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 97567b4fefdeb4f2519df13c738a9922c47dcef9
4
- data.tar.gz: 95e8440f7d1ed1d84d0b86876609b0a2bd24b14f
2
+ SHA256:
3
+ metadata.gz: 7d7a529e3aef3790df0207b93cc2568d0796c36d01193a8309f24f815eb78a43
4
+ data.tar.gz: 6a70bedce0b0a3bd2456ed504cd2c1a266776ca50a5d7da1e89c441a92bb3a75
5
5
  SHA512:
6
- metadata.gz: 746a79896a310f59f79179c78459ed25195c30c01a695b759fc0288db9f0ac8502d70f1506e8d97acf3fb208793d665cf875f83b05f614a80ec39620893ab09c
7
- data.tar.gz: 8c333a9db17087beb9f3b7bde8bdb31f68c80951eed7b77afc90e681f462520ff6797c7f5a56bcba4dafad30fff5cd9555f1b30ec27f89786ac8fd5b8613d8d6
6
+ metadata.gz: b29abb27b091e57f83bb8f2cf241d0083653c3e4ce93138f486fd19448e64723419d78923fb662aaa21dec938b06f46cd76c353d444b59a134aa6b2919ec977c
7
+ data.tar.gz: 08b45d6a1db58c78274fe099eec5bd5af8f1549c543598b539d3004f97802c87763d8abd54e1bd8b003a75669426be4c2bd96844543e97a985a9fa7a90ec9c3f
@@ -0,0 +1,5 @@
1
+ # Idempotent Request Changelog #
2
+
3
+ ## v0.1.1 ##
4
+
5
+ * Add caching for successful responses (@gomayonqui)
@@ -19,11 +19,8 @@ module IdempotentRequest
19
19
  def write(*data)
20
20
  status, headers, response = data
21
21
  response = response.body if response.respond_to?(:body)
22
-
23
- return data unless status == 200
24
-
22
+ return data unless (200..226).include?(status)
25
23
  storage.write(key, payload(status, headers, response))
26
-
27
24
  data
28
25
  end
29
26
 
@@ -1,3 +1,3 @@
1
1
  module IdempotentRequest
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idempotent-request
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmytro Zakharov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-23 00:00:00.000000000 Z
11
+ date: 2018-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -118,6 +118,7 @@ files:
118
118
  - ".gitignore"
119
119
  - ".rspec"
120
120
  - ".travis.yml"
121
+ - CHANGELOG.md
121
122
  - CODE_OF_CONDUCT.md
122
123
  - Gemfile
123
124
  - LICENSE.txt
@@ -152,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
153
  version: '0'
153
154
  requirements: []
154
155
  rubyforge_project:
155
- rubygems_version: 2.6.13
156
+ rubygems_version: 2.7.6
156
157
  signing_key:
157
158
  specification_version: 4
158
159
  summary: Rack middleware ensuring at most once requests for mutating endpoints.