hanami-controller 1.1.0.rc1 → 1.1.0

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
2
  SHA1:
3
- metadata.gz: c3ba6247e5c06e09517a39a84ef093870a93473c
4
- data.tar.gz: 2bd6f5581dcb905928184baa7685b93d1ba55742
3
+ metadata.gz: e43dfef6c8d6484a6ef636194dd0369b7780274b
4
+ data.tar.gz: f8d80e3ab997981d7dff0beecf372359334bf484
5
5
  SHA512:
6
- metadata.gz: 202ccc4ae7c12a82f54bcf15ffdb2ba2120c3b857299babfaf04096caf1be72423c4902172e7728bb24972dc8078aef6c9a31c0e965a734067e1b9a355484906
7
- data.tar.gz: 481deb6ead85dc4e1db5738ba6cc7e8194ec187dc34e37e529c0443ac94ddc873978270d6520a3ecf6ddc4ff4af19730c35662131a7c357744429b7a897ca8fb
6
+ metadata.gz: fc087535ca74c735b55c7fe5fbeb618b3e6fb974e85b28163092ab5db3da74334ef7111431fa1a3dbfaa7afab4c8dac46fdf0e0f7af377d6829886db355309a4
7
+ data.tar.gz: 9ab870daa9fed48f56ffa14a8efa6138bc9c4cba09a03f8788d278f99f5d82eab1084e0315307c79fb1e475ce7da5585ca222a96e8dc42d92b4c18556ee1bd56
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Hanami::Controller
2
2
  Complete, fast and testable actions for Rack
3
3
 
4
+ ## v1.1.0 - 2017-10-25
5
+ ### Added
6
+ - [Luca Guidi] Introduce `Hanami::Action::CookieJar#each` to iterate through action's `cookies`
7
+
4
8
  ## v1.1.0.rc1 - 2017-10-16
5
9
 
6
10
  ## v1.1.0.beta3 - 2017-10-04
@@ -20,10 +20,10 @@ Gem::Specification.new do |spec|
20
20
  spec.required_ruby_version = '>= 2.3.0'
21
21
 
22
22
  spec.add_dependency 'rack', '~> 2.0'
23
- spec.add_dependency 'hanami-utils', '1.1.0.rc1'
23
+ spec.add_dependency 'hanami-utils', '~> 1.1'
24
24
 
25
25
  spec.add_development_dependency 'bundler', '~> 1.6'
26
26
  spec.add_development_dependency 'rack-test', '~> 0.6'
27
27
  spec.add_development_dependency 'rake', '~> 12'
28
- spec.add_development_dependency 'rspec', '~> 3.6'
28
+ spec.add_development_dependency 'rspec', '~> 3.7'
29
29
  end
@@ -91,6 +91,7 @@ module Hanami
91
91
  # @param key [Symbol] the key
92
92
  # @param value [#to_s,Hash] value that can be serialized as a string or
93
93
  # expressed as a Hash
94
+ # @option value [String] :value - Value of the cookie
94
95
  # @option value [String] :domain - The domain
95
96
  # @option value [String] :path - The path
96
97
  # @option value [Integer] :max_age - Duration expressed in seconds
@@ -110,6 +111,31 @@ module Hanami
110
111
  @cookies[key] = value
111
112
  end
112
113
 
114
+ # Iterates cookies
115
+ #
116
+ # @param blk [Proc] the block to be yielded
117
+ # @yield [key, value] the key/value pair for each cookie
118
+ #
119
+ # @return [void]
120
+ #
121
+ # @since 1.1.0
122
+ #
123
+ # @example
124
+ # require "hanami/controller"
125
+ # class MyAction
126
+ # include Hanami::Action
127
+ # include Hanami::Action::Cookies
128
+ #
129
+ # def call(params)
130
+ # cookies.each do |key, value|
131
+ # # ...
132
+ # end
133
+ # end
134
+ # end
135
+ def each(&blk)
136
+ @cookies.each(&blk)
137
+ end
138
+
113
139
  private
114
140
 
115
141
  # Keep track of changed keys
@@ -3,6 +3,6 @@ module Hanami
3
3
  # Defines the version
4
4
  #
5
5
  # @since 0.1.0
6
- VERSION = '1.1.0.rc1'.freeze
6
+ VERSION = '1.1.0'.freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanami-controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.rc1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-16 00:00:00.000000000 Z
11
+ date: 2017-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: hanami-utils
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '='
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.1.0.rc1
33
+ version: '1.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '='
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.1.0.rc1
40
+ version: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.6'
89
+ version: '3.7'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.6'
96
+ version: '3.7'
97
97
  description: Complete, fast and testable actions for Rack
98
98
  email:
99
99
  - me@lucaguidi.com
@@ -153,9 +153,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
153
153
  version: 2.3.0
154
154
  required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  requirements:
156
- - - ">"
156
+ - - ">="
157
157
  - !ruby/object:Gem::Version
158
- version: 1.3.1
158
+ version: '0'
159
159
  requirements: []
160
160
  rubyforge_project:
161
161
  rubygems_version: 2.6.13