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.
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009 - 2010 Mickael Riga
1
+ Copyright (c) 2009 - 2011 Mickael Riga
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -115,5 +115,5 @@ Maybe I'll try to find a way to deal both situations...
115
115
  (C)
116
116
  ---
117
117
 
118
- Copyright (c) 2009 - 2010 Mickael Riga - See MIT_LICENCE for more details
118
+ Copyright (c) 2009 - 2011 Mickael Riga - See MIT_LICENCE for more details
119
119
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  banner__file: my_picture.jpeg
3
+ report__file: report.pdf
3
4
  publish__boolean: "false"
4
5
  logo__data:
5
6
  box_content__text:
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'yamlade'
3
- s.version = "0.0.1"
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: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
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: 2010-06-02 00:00:00 +01:00
18
+ date: 2011-01-04 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies: []
21
21