fugleman 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fugleman.gemspec +1 -1
- data/lib/fugleman/helpers.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 261a2f989efd63fc647687d2076196097daf845c
|
4
|
+
data.tar.gz: 75304c65320bd36b8f50fad326f0ce3842ae765a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b6f1cdae4531006c5fbea5d28eba2ad0e7e52f5457c4748064883da14d2d7450ae0f49d1814faee20a6d1d7ef13b83c7f7627764a17cee3c0ee6bd023df511b
|
7
|
+
data.tar.gz: 67d783661832ff49fd0df87f48cf6049b66180faabcd630c3b2fbc855ffc3453fbd228791378daa6dfbfecc03f808d044d71d01a226df5dd1d3ff15e541c149c
|
data/fugleman.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "fugleman"
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.4"
|
6
6
|
s.summary = "Helpers and stuff for working with sinatra. Really simple."
|
7
7
|
s.homepage = "https://bitbucket.org/technologyastronauts/fugleman"
|
8
8
|
s.authors = ['Kaspar Schiess']
|
data/lib/fugleman/helpers.rb
CHANGED
@@ -170,4 +170,17 @@ private
|
|
170
170
|
end.compact
|
171
171
|
attributes.empty? ? '' : " #{attributes * ' '}"
|
172
172
|
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# Iterate through nested values.
|
176
|
+
#
|
177
|
+
def nested_values(attribute, hash)
|
178
|
+
hash.map do |k, v|
|
179
|
+
if v.is_a?(Hash)
|
180
|
+
nested_values("#{attribute}-#{k.to_s.dasherize}", v)
|
181
|
+
else
|
182
|
+
%(#{attribute}-#{k.to_s.dasherize}="#{escape_value(v)}")
|
183
|
+
end
|
184
|
+
end * ' '
|
185
|
+
end
|
173
186
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fugleman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kaspar Schiess
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|