rewritten 0.16.2 → 0.16.3

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: 9f112eb7501e764ea51292d0185de5fe06421351
4
- data.tar.gz: 5f0fc796727a729abae3031a69b054f3af1c7b2f
3
+ metadata.gz: e4c5d5f3b82a279cbf7537015998ea7bb2d953d1
4
+ data.tar.gz: c9d424c04a59af197e4809be37512e9b8099dc76
5
5
  SHA512:
6
- metadata.gz: 2fbda39b0eec4d9373a9738565b78f4f4891b1a27a40dc077c6265a4cf8cf90f65103849a43a852d68cb7b0f6705768e945ffff097384ba869eb8e960782b45d
7
- data.tar.gz: e4c199b7a68673f1119e06d3eaf90e315227cbe1eeb716f4d272bdba2128012da910e52efd9c7c2df0f9e2dd48a6690e5321feef48098183b4f668f218a9fcb9
6
+ metadata.gz: ef7b3bb9e140229bc5d7bebe36624f80d9b65a98eb100b9044120f16989a0571af71478610263a29da7d04ccdf1a4659a5b4bd7f7ebec33ee6ef5a9ea81971df
7
+ data.tar.gz: de967382e05689032659860628760ff75debcd1d9fbee7bc9da42b6c95119ff0681c8d09c97a31fe7b0c58edbd8d083718a3c508a107b1d93114c8b58c384882
data/HISTORY.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.16.3
2
+
3
+ * Fix malformed path_info that contained query_string
4
+
1
5
  == 0.16.2
2
6
 
3
7
  * Fix bug with query parameter translations without naked path_info translations
@@ -1,3 +1,3 @@
1
1
  module Rewritten
2
- VERSION = '0.16.2'
2
+ VERSION = '0.16.3'
3
3
  end
data/lib/rewritten.rb CHANGED
@@ -247,7 +247,8 @@ module Rewritten
247
247
  def appendix(some_from)
248
248
  base = base_from(some_from) || ''
249
249
  result = some_from.partition(base).last
250
- result.chomp('/')
250
+ return '' if result == ''
251
+ result.split('?').first.chomp('/')
251
252
  end
252
253
 
253
254
  def get_flag_string(from)
@@ -265,5 +265,13 @@ describe Rack::Rewritten::Url do
265
265
  @rack.call(@initial_args)
266
266
  @initial_args['PATH_INFO'].must_equal '/embed/2'
267
267
  end
268
+
269
+ it 'must be possible to pass extra parameters not in translation' do
270
+ Rewritten.add_translation '/foo/without/params', '/embed/2'
271
+ @initial_args.merge!('QUERY_STRING' => 'w=1', 'REQUEST_URI' => '/foo/without/params', 'PATH_INFO' => '/foo/without/params')
272
+ @rack.call(@initial_args)
273
+ @initial_args['PATH_INFO'].must_equal '/embed/2'
274
+ @initial_args['QUERY_STRING'].must_equal 'w=1'
275
+ end
268
276
  end
269
277
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rewritten
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.2
4
+ version: 0.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kai Rubarth