jeanine 0.5.0 → 0.6.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
- SHA256:
3
- metadata.gz: dab8651a092f6e68e49ce6774d3c1c3156e1cf51aed9e266a4afbc438c62c041
4
- data.tar.gz: defb2a775a5ae99a7e19deca237f778a7795525339c35f6d1da2cdb917d64179
2
+ SHA1:
3
+ metadata.gz: 605777e016821bd0a6bd5e400d84dc6c5ad1e2fd
4
+ data.tar.gz: 5547bdb35a9a9612f6f1d327c3fc0fa14bae5f83
5
5
  SHA512:
6
- metadata.gz: dfd4e2901c604b06a262da1d05a660ade74e4810ba25d4917ae1f873bf9f306213ca28b20b2a3c028f4ca5f95706e90d51566edff3bbe10c8559dec735d36377
7
- data.tar.gz: 92e87f254903c370d1708fdd09dff0921e77ff3d5fa804fb424cfae86febc7aab1419bbde3665b9813c0801d89d567eb4e8e1a36cd2aba4e90531bfb9620d354
6
+ metadata.gz: e83f8c437da8c145fd618d425e8e1dcf6fb223b492daab6c0ddcb8c24cea734a3d6e0a529ea67713aff2148dd88e13de0f0d5f26f397d06fc66dca7cf6c86995
7
+ data.tar.gz: b87de6a104f9b2b7ebd09e10a53aee551dd81b5ea9bcbadd43af7a599e472aeb76b5bb927067c5e0f05cac64286e09387ceca0966c04a02b23429f0eea703c3e
@@ -5,4 +5,19 @@ class Hash
5
5
  def reverse_merge!(other_hash)
6
6
  replace(reverse_merge(other_hash))
7
7
  end
8
+ def deep_transform_keys(&block)
9
+ result = {}
10
+ each do |key, value|
11
+ result[yield(key)] = value.is_a?(Hash) ? value.deep_transform_keys(&block) : value
12
+ end
13
+ result
14
+ end
15
+
16
+ def deep_transform_keys!(&block)
17
+ keys.each do |key|
18
+ value = delete(key)
19
+ self[yield(key)] = value.is_a?(Hash) ? value.deep_transform_keys!(&block) : value
20
+ end
21
+ self
22
+ end
8
23
  end
@@ -16,6 +16,10 @@ module Jeanine
16
16
  super
17
17
  end
18
18
 
19
+ def params
20
+ super.deep_transform_keys!(&:to_sym)
21
+ end
22
+
19
23
  def post?
20
24
  request_method == 'POST'
21
25
  end
@@ -1,5 +1,5 @@
1
1
  module Jeanine
2
- module Rescuing
2
+ module Rescuable
3
3
  def self.included(base)
4
4
  base.extend ClassMethods
5
5
  base.prepend InstanceMethods
@@ -1,3 +1,3 @@
1
1
  module Jeanine
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jeanine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Brody
@@ -129,7 +129,7 @@ files:
129
129
  - lib/jeanine/path_proxy.rb
130
130
  - lib/jeanine/rendering.rb
131
131
  - lib/jeanine/request.rb
132
- - lib/jeanine/rescuing.rb
132
+ - lib/jeanine/rescuable.rb
133
133
  - lib/jeanine/response.rb
134
134
  - lib/jeanine/router.rb
135
135
  - lib/jeanine/routing.rb
@@ -161,7 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubygems_version: 3.0.3
164
+ rubyforge_project:
165
+ rubygems_version: 2.6.14.3
165
166
  signing_key:
166
167
  specification_version: 4
167
168
  summary: A framework.