sinatra-routing-helpers 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/sinatra/routing-helpers/version.rb +1 -1
- data/lib/sinatra/routing-helpers.rb +8 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2JhNDk3ZTUzODhhMzNhYThlOWUwMjMwMmE5NDUxNWM3NGU3ZWM1MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTBjNjU5M2FlNmFkMWY4MmFmM2U2NmZjNjBlMzFkZjBkMjIwMjQ2Zg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGUyZGM1MzE3OTc5ZDRhMzY4MWUyZjI4Yjg5YzFkNjJlZDliMzRhZDE4ODk4
|
10
|
+
MDJkMmVhMjZiNzM4MDUxNjRmZTcyMGI3YjdjZDUwMjk3NTk2MjJjNzU4OGQ0
|
11
|
+
MDhmMzQwYmFkNjkzNmI2ODcyMzIwMDRiYmVkN2U1NTM0YmI4Zjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTIwMWE0YzBlYWM1YjNmZTJkMGUxYjUwZjllYjJjOTU4MzlmYTQ3ZjgwY2Yz
|
14
|
+
MjY4YjY5NTY2ZmQzZjBlYzNjZjczYjU0ZjViNDdhM2JjODVhMjA1NTgyMzRk
|
15
|
+
MzM4ZjNmYWU4NTJkMjIzOWU1ZjYxODE3MWFmOTRlZDYyYjA0NDE=
|
@@ -38,7 +38,14 @@ module Sinatra
|
|
38
38
|
|
39
39
|
# quickly build a URL with params
|
40
40
|
def url_with_params(headed_to, extra_params = {})
|
41
|
-
|
41
|
+
# pop off empty values to avoid cluttering the URL bar
|
42
|
+
cleaned_params = extra_params.reject { |key, value| value.nil? || value.empty? }
|
43
|
+
|
44
|
+
unless cleaned_params.empty?
|
45
|
+
headed_to + '?' + build_query(cleaned_params)
|
46
|
+
else
|
47
|
+
headed_to
|
48
|
+
end
|
42
49
|
end
|
43
50
|
|
44
51
|
def busted_url(headed_to)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-routing-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Lecklider
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05
|
11
|
+
date: 2013-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.0.
|
104
|
+
rubygems_version: 2.0.6
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: Some simple helpers for routing and redirection.
|