rack-app 6.8.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 918146f8853c3deef7b9f56e1b01c5200e47f938
4
- data.tar.gz: aafdf76c3b3f8346d3479dd97baeda137a50b112
3
+ metadata.gz: 15de58a9bddb3a5eee2b5e9d926db27f95353d7a
4
+ data.tar.gz: 34f5a7ea36d028691ec5e5da7d1d1d7d83526687
5
5
  SHA512:
6
- metadata.gz: bfe4cd8db4e9b6753b402676f3a0f04f7a0377803b60d6bb1b08187e26754d397766766606704a19c492075f748a1fb573be521f92e64134a147ca808b9416de
7
- data.tar.gz: 23d411aaed8a51cd0b0f34673f06718828c10b50929b3c05ac790d367c5fc258ec51c348b3739bd6372a9492b692c9f2f46ce9c1b241aa02d73ac668bf2658f0
6
+ metadata.gz: 1db484ffb9f9d89c524e5cabb7e9f6ebeaf2fcc4bbf71690f07ae3796471f233f8e63ebcd884ef756ba9aaaa4005c973c5d28267e9f4dfe3cd4c0ee44054dd4f
7
+ data.tar.gz: 9e0c07fcb2133bdc264df3532aa1a3fea7eb6feede5ffa8d52b71dc52007210cb2cca9916b6577ab09bec949e3b31e07808a3411122bad41d6943f592c3804cb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.8.0
1
+ 7.0.0
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
  module Rack::App::InstanceMethods::Params
3
2
 
4
3
  E = ::Rack::App::Constants::ENV
@@ -11,6 +10,8 @@ module Rack::App::InstanceMethods::Params
11
10
  request.env[E::PARAMS].validated_params
12
11
  end
13
12
 
13
+ Rack::App::Utils.deprecate(self, :validated_params, :params, 2017, 07)
14
+
14
15
  def path_segments_params
15
16
  request.env[E::PARAMS].path_segments_params
16
17
  end
@@ -15,7 +15,7 @@ class Rack::App::Middlewares::Params::Parser
15
15
  protected
16
16
 
17
17
  def set_params(env)
18
- params = Rack::App::Params.new(env).to_hash
18
+ params = Rack::App::Params.new(env).merged_params
19
19
  validated_params = (env[::Rack::App::Constants::ENV::VALIDATED_PARAMS] ||= {})
20
20
  parse_params(validated_params, params)
21
21
  end
@@ -25,7 +25,7 @@ class Rack::App::Middlewares::Params::Validator
25
25
  end
26
26
 
27
27
  def validate(env)
28
- params = Rack::App::Params.new(env).to_hash
28
+ params = Rack::App::Params.new(env).merged_params
29
29
  validation_results(env, params)
30
30
  end
31
31
 
@@ -5,6 +5,10 @@ class Rack::App::Params
5
5
  E = ::Rack::App::Constants::ENV
6
6
 
7
7
  def to_hash
8
+ validated_params || merged_params
9
+ end
10
+
11
+ def merged_params
8
12
  @env[E::MERGED_PARAMS] ||= query_string_params.merge(path_segments_params)
9
13
  end
10
14
 
@@ -10,9 +10,6 @@ module Rack::App::SingletonMethods::Extensions
10
10
  Rack::App::Extension.apply_extensions(self,applied_extensions,extension_names)
11
11
  end
12
12
 
13
- alias apply_extension apply_extensions
14
- Rack::App::Utils.deprecate(self, :apply_extension, :apply_extensions, 2017, 01)
15
-
16
13
  def extensions(*extensions_names)
17
14
  apply_extensions(*extensions_names)
18
15
  applied_extensions
@@ -23,12 +23,4 @@ module Rack::App::SingletonMethods::Middleware
23
23
  @next_endpoint_middlewares
24
24
  end
25
25
 
26
- alias only_next_endpoint_middlewares next_endpoint_middlewares
27
-
28
- Rack::App::Utils.deprecate(self,
29
- :only_next_endpoint_middlewares,
30
- :next_endpoint_middlewares,
31
- 2016,9
32
- )
33
-
34
26
  end
@@ -8,6 +8,4 @@ module Rack::App::SingletonMethods::ParamsValidator
8
8
  builder.use(Rack::App::Middlewares::Params::Parser, descriptor)
9
9
  end
10
10
  end
11
- alias params validate_params
12
- Rack::App::Utils.deprecate(self, :params, :validate_params, 2016, 10)
13
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.8.0
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-16 00:00:00.000000000 Z
11
+ date: 2017-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler