rack-indifferent 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +5 -1
  3. data/lib/rack/indifferent.rb +3 -1
  4. metadata +4 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c481dbbe8d6de8bbaede50165f6c9ce34d10a91
4
- data.tar.gz: 43a868b0b34f4475aa3de517227680bdc3026582
3
+ metadata.gz: 4dc197e706d48727ac52eefbba3f0ce795e123ca
4
+ data.tar.gz: b485a599d9fef549149db6aa1bd845d4d26d58a0
5
5
  SHA512:
6
- metadata.gz: 69eca9378656660ea3a18f8f07cb4e0281f44d91bb78a51b800609dca18cbbeab4921979206821c3e04cb29ea458d0069c4cca6bdeb4a88db60c734b5f84112b
7
- data.tar.gz: 8733c5ac401ceef069dc9870c3f23ce2bb4a73ef38191df500a7d5bb7807ba8327c6ce4fe581d9a77481536b17fa2f8178218464e45aa9c60f3a7b856d128d29
6
+ metadata.gz: 85e5b41de703623d69b7a3d10aafda2443f37278e99547e82cbb6f5e71fa6602b47491c7b418f5ae52ac9abca57f901b3a1ef1f74f4cb9060fbdab0819d5892d
7
+ data.tar.gz: 8c2da5241b89361057cb043d682004c59fe1431e89da79e676cebc146fed86184db2a7f52eec8dbec4450e9a76cddb648181df162bd2e6414dea089f00df55f5
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
- = 1.0.0 (2015-03-08)
1
+ = 1.1.0 (2015-03-08)
2
+
3
+ * Reduce the number of procs created (jeremyevans)
4
+
5
+ = 1.0.0 (2015-03-07)
2
6
 
3
7
  * Initial public release
@@ -1,10 +1,12 @@
1
1
  require 'rack/utils'
2
2
 
3
3
  class Rack::Utils::KeySpaceConstrainedParams
4
+ INDIFFERENT_PROC = lambda{|h,k| h[k.to_s] if k.is_a?(Symbol)}
5
+
4
6
  def initialize(limit = Rack::Utils.key_space_limit)
5
7
  @limit = limit
6
8
  @size = 0
7
- @params = Hash.new{|h,k| h[k.to_s] if k.is_a?(Symbol)}
9
+ @params = Hash.new(&INDIFFERENT_PROC)
8
10
  end
9
11
  end
10
12
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-indifferent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-08 00:00:00.000000000 Z
11
+ date: 2015-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -46,10 +46,7 @@ description: |
46
46
  email: code@jeremyevans.net
47
47
  executables: []
48
48
  extensions: []
49
- extra_rdoc_files:
50
- - README.rdoc
51
- - CHANGELOG
52
- - MIT-LICENSE
49
+ extra_rdoc_files: []
53
50
  files:
54
51
  - CHANGELOG
55
52
  - MIT-LICENSE
@@ -62,14 +59,7 @@ licenses:
62
59
  - MIT
63
60
  metadata: {}
64
61
  post_install_message:
65
- rdoc_options:
66
- - "--quiet"
67
- - "--line-numbers"
68
- - "--inline-source"
69
- - "--title"
70
- - 'rack-indifferent: Fast indifferent access to request params'
71
- - "--main"
72
- - README.rdoc
62
+ rdoc_options: []
73
63
  require_paths:
74
64
  - lib
75
65
  required_ruby_version: !ruby/object:Gem::Requirement