yamlade 0.0.1 → 0.0.2
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.
- data/MIT_LICENCE +1 -1
- data/README.md +1 -1
- data/examples/options.yml +1 -0
- data/yamlade.gemspec +1 -1
- data/yamlade.rb +1 -1
- metadata +4 -4
data/MIT_LICENCE
CHANGED
data/README.md
CHANGED
data/examples/options.yml
CHANGED
data/yamlade.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'yamlade'
|
|
3
|
-
s.version = "0.0.
|
|
3
|
+
s.version = "0.0.2"
|
|
4
4
|
s.platform = Gem::Platform::RUBY
|
|
5
5
|
s.summary = "Use YAML files to cook configuration Marmelade through HTML forms"
|
|
6
6
|
s.description = "Do a YAML file, and Yamlade take care of the HTML forms for you"
|
data/yamlade.rb
CHANGED
|
@@ -18,7 +18,7 @@ class Yamlade
|
|
|
18
18
|
when 'text'
|
|
19
19
|
"<textarea cols='40' rows='5' name='yaml[#{k}]'>#{v}</textarea>"
|
|
20
20
|
when 'file'
|
|
21
|
-
preview = (v.nil? || v=='') ? '' : "<img src='/#{v}' width='100' /><br />"
|
|
21
|
+
preview = (v.nil? || v=='' || !v[/(\.gif|\.png|\.jpg|\.jpeg)$/]) ? '' : "<img src='/#{v}' width='100' /><br />"
|
|
22
22
|
"#{preview}<input type='file' name='yaml[#{k}]' />"
|
|
23
23
|
when 'data'
|
|
24
24
|
"<input type='file' name='yaml[#{k}]' />"
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yamlade
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 27
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.0.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Mickael Riga
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date:
|
|
18
|
+
date: 2011-01-04 00:00:00 +00:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies: []
|
|
21
21
|
|