wunderbar 0.8.8 → 0.8.9
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/demo/envdump.rb +17 -1
- data/demo/helloworld.rb +1 -1
- data/demo/wiki.rb +5 -5
- data/lib/wunderbar/installation.rb +1 -0
- data/lib/wunderbar/version.rb +1 -1
- data/lib/wunderbar.rb +1 -0
- data/tools/web2script.rb +1 -1
- data/wunderbar.gemspec +2 -2
- metadata +4 -4
data/demo/envdump.rb
CHANGED
@@ -1,12 +1,28 @@
|
|
1
1
|
require 'wunderbar'
|
2
2
|
|
3
|
-
|
3
|
+
W_.html do
|
4
4
|
_head_ do
|
5
5
|
_title 'CGI Environment'
|
6
|
+
_style %{
|
7
|
+
table {border-spacing: 0}
|
8
|
+
th, td {padding: 0.2em 0.5em}
|
9
|
+
thead th {border-bottom: solid 1px #000}
|
10
|
+
tbody tr:nth-child(5n) td {border-bottom: solid 1px #888}
|
11
|
+
th:last-child, td:last-child {border-left: solid 1px #000}
|
12
|
+
tr:hover {background-color: #FF8}
|
13
|
+
}
|
6
14
|
end
|
15
|
+
|
7
16
|
_body? do
|
8
17
|
_h1 'Environment Variables'
|
9
18
|
_table do
|
19
|
+
_thead_ do
|
20
|
+
_tr do
|
21
|
+
_th 'Name'
|
22
|
+
_th 'Value'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
10
26
|
_tbody do
|
11
27
|
ENV.sort.each do |name, value|
|
12
28
|
_tr_ do
|
data/demo/helloworld.rb
CHANGED
data/demo/wiki.rb
CHANGED
@@ -11,8 +11,8 @@ Dir.chdir WIKIDATA
|
|
11
11
|
flag ||= '?' if $env.REQUEST_URI.include? '?'
|
12
12
|
file ||= 'index'
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
W_.html do
|
15
|
+
_head_ do
|
16
16
|
_title file
|
17
17
|
_style %{
|
18
18
|
body {background-color: #{(flag=='?') ? '#E0D8D8' : '#FFF'}}
|
@@ -95,7 +95,7 @@ Wunderbar.html do
|
|
95
95
|
_span 'Output', style: 'float: right; margin-right: 2em'
|
96
96
|
end
|
97
97
|
|
98
|
-
|
98
|
+
_form_ action: file, method: 'post' do
|
99
99
|
_textarea @markup, name: 'markup', class: 'input'
|
100
100
|
_input type: 'hidden', name: 'hash',
|
101
101
|
value: Digest::MD5.hexdigest(@markup)
|
@@ -125,7 +125,7 @@ Wunderbar.html do
|
|
125
125
|
|
126
126
|
#display
|
127
127
|
_ << RDiscount.new(@markup).to_html
|
128
|
-
|
128
|
+
_div_ class: 'buttons' do
|
129
129
|
if !rev or rev.empty?
|
130
130
|
_form action: "#{file}?", method: 'post' do
|
131
131
|
_input type: 'submit', value: 'edit'
|
@@ -185,7 +185,7 @@ Wunderbar.html do
|
|
185
185
|
end
|
186
186
|
|
187
187
|
# process autosave requests
|
188
|
-
|
188
|
+
W_.json do
|
189
189
|
hash = Digest::MD5.hexdigest(@markup)
|
190
190
|
if File.exist?(file) and Digest::MD5.hexdigest(File.read(file)) != @hash
|
191
191
|
{error: "Write conflict", markup: File.read(file), hash: hash}
|
data/lib/wunderbar/version.rb
CHANGED
data/lib/wunderbar.rb
CHANGED
data/tools/web2script.rb
CHANGED
@@ -98,7 +98,7 @@ def code(element, indent='')
|
|
98
98
|
end
|
99
99
|
|
100
100
|
line = "#{indent}_#{element_name}#{attributes.join(',')}"
|
101
|
-
line.sub! /^_/, '
|
101
|
+
line.sub! /^_/, 'W_.' if element_name == 'html' and indent.empty?
|
102
102
|
|
103
103
|
if element.children.empty?
|
104
104
|
flow_attrs "#{indent}_#{element_name}#{attributes.pop}", attributes, indent
|
data/wunderbar.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "wunderbar"
|
5
|
-
s.version = "0.8.
|
5
|
+
s.version = "0.8.9"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Sam Ruby"]
|
9
|
-
s.date = "2012-03-
|
9
|
+
s.date = "2012-03-20"
|
10
10
|
s.description = " Provides a number of globals, helper methods, and monkey patches which\n simplify the generation of HTML and the development of CGI scripts.\n"
|
11
11
|
s.email = "rubys@intertwingly.net"
|
12
12
|
s.extra_rdoc_files = ["COPYING", "README.md", "lib/wunderbar.rb", "lib/wunderbar/builder.rb", "lib/wunderbar/cgi-methods.rb", "lib/wunderbar/environment.rb", "lib/wunderbar/html-methods.rb", "lib/wunderbar/installation.rb", "lib/wunderbar/job-control.rb", "lib/wunderbar/logger.rb", "lib/wunderbar/version.rb"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wunderbar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 45
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 9
|
10
|
+
version: 0.8.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sam Ruby
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-03-
|
18
|
+
date: 2012-03-20 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: builder
|