fugleman 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README +10 -2
- data/fugleman.gemspec +1 -1
- data/lib/fugleman/namespace.rb +15 -4
- 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: a8b7f9e029866e00952688f6a4697d18557bb341
|
4
|
+
data.tar.gz: 63a88f5893751c3328215c044cbf79672397d161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd28d509534bb598f526d0a78f2dd7b3f1c07eaae0395d04ddf0ecf80bc9e8d3dff4882d1366fc55318273825e66824be7ea027cac600cbbc3f24cd3b7371ad3
|
7
|
+
data.tar.gz: ebe8debf2c22042ff4f929b77037697cb427a17d6d371a65cf6da3addc44597fbf8e5b2c51d5b37a6a445a69debad882a679d8ae9cca80c0ce3f21e9ce4b2f43
|
data/README
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
SYNOPSIS
|
3
3
|
|
4
4
|
HTML helper code. But simpler.
|
5
5
|
|
@@ -13,7 +13,15 @@ HTML helper code. But simpler.
|
|
13
13
|
input_tag :text, :foo # => <input type="text" name="foo" />
|
14
14
|
...
|
15
15
|
|
16
|
-
|
16
|
+
RATIONALE
|
17
|
+
|
18
|
+
Padrino disturbed our zen. Now we set things right. This lib contains the bare
|
19
|
+
minimum for web application development without the conveniences.
|
20
|
+
|
21
|
+
And if you say that we're bound to become big, you underestimate our need for
|
22
|
+
simplicity.
|
23
|
+
|
24
|
+
LICENSING
|
17
25
|
|
18
26
|
Some of the code in here started its life out as part of padrino-helpers. It
|
19
27
|
was then copied and heavily modified. This means that we take the blame for
|
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.7"
|
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/namespace.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
|
2
|
-
|
3
2
|
module Fugleman
|
4
3
|
class Namespace
|
5
4
|
attr_reader :path
|
@@ -15,13 +14,25 @@ class Namespace
|
|
15
14
|
@context.input_tag type, full_name(name), opts
|
16
15
|
end
|
17
16
|
|
17
|
+
def checkbox name, opts={}
|
18
|
+
input_tag :checkbox, name, '', {
|
19
|
+
placeholder: nil,
|
20
|
+
class: nil,
|
21
|
+
value: 'true',
|
22
|
+
checked: value(name) }.merge(opts)
|
23
|
+
end
|
24
|
+
def textarea name, opts={}
|
25
|
+
@context.content_tag :textarea,
|
26
|
+
@context.h(value(name)), {
|
27
|
+
name: full_name(name) }.merge(opts)
|
28
|
+
end
|
29
|
+
|
18
30
|
def full_name something
|
19
31
|
@path.to_s + "[#{something}]"
|
20
32
|
end
|
21
33
|
def value name
|
22
|
-
|
23
|
-
|
24
|
-
end
|
34
|
+
return nil unless @obj
|
35
|
+
return @obj.send(name)
|
25
36
|
end
|
26
37
|
end
|
27
38
|
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.7
|
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-06-
|
11
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|