showoff 0.9.10.1 → 0.9.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/showoff.rb +13 -5
- data/lib/showoff/version.rb +1 -1
- 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: 8278ed3a8a49ffcc69242c6222609050aa7f80ba
|
4
|
+
data.tar.gz: 147263ae3d5b911b2740f9a5b6f925536aea961d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50c3cb9cb6c37c7c3c773bce7e296e41e86f4af88bc7810c17af8e768a61c36563314c369cbe8bf8276b8dd55d26109b5bb6040b77adcdf9d4323f9c8f26b685
|
7
|
+
data.tar.gz: 882e602571a0c1de74e3b75eb359951571bf9990cd363fdbbcf0260d40b41a28897dfb7f13e7f89e301a071b3e01b1239391d2e97ce904634802fa8872c0f800
|
data/lib/showoff.rb
CHANGED
@@ -438,9 +438,9 @@ class ShowOff < Sinatra::Application
|
|
438
438
|
str << form_element_radio(id, name, rhs.scan(/\((x?)\)\s*([^()]+)\s*/))
|
439
439
|
when /^\[x?\]/ # value = [x] option one [] opt2 [] opt3 -> option 3 (checkboxes)
|
440
440
|
str << form_element_checkboxes(id, name, rhs.scan(/\[(x?)\] ?([^\[\]]+)/))
|
441
|
-
when
|
441
|
+
when /^\{(.*)\}$/ # value = {BOS, SFO, (NYC)} (select shorthand)
|
442
442
|
str << form_element_select(id, name, rhs.scan(/\(?\w+\)?/))
|
443
|
-
when
|
443
|
+
when /^\{$/ # value = { (select)
|
444
444
|
str << form_element_select_multiline(id, name, text)
|
445
445
|
when '' # value = (radio/checkbox list)
|
446
446
|
str << form_element_multiline(id, name, text)
|
@@ -939,7 +939,7 @@ class ShowOff < Sinatra::Application
|
|
939
939
|
# Now copy all the js and css
|
940
940
|
my_path = File.join( File.dirname(__FILE__), '..', 'public')
|
941
941
|
["js", "css"].each { |dir|
|
942
|
-
FileUtils.copy_entry("#{my_path}/#{dir}", "#{out}/#{dir}")
|
942
|
+
FileUtils.copy_entry("#{my_path}/#{dir}", "#{out}/#{dir}", false, false, true)
|
943
943
|
}
|
944
944
|
# And copy the directory
|
945
945
|
Dir.glob("#{my_path}/#{name}/*").each { |subpath|
|
@@ -964,7 +964,11 @@ class ShowOff < Sinatra::Application
|
|
964
964
|
data.scan(regex).flatten.each do |path|
|
965
965
|
dir = File.dirname(path)
|
966
966
|
FileUtils.makedirs(File.join(file_dir, dir))
|
967
|
-
|
967
|
+
begin
|
968
|
+
FileUtils.copy(File.join(pres_dir, path), File.join(file_dir, path))
|
969
|
+
rescue Errno::ENOENT => e
|
970
|
+
puts "Missing source file: #{path}"
|
971
|
+
end
|
968
972
|
end
|
969
973
|
end
|
970
974
|
# copy images from css too
|
@@ -977,7 +981,11 @@ class ShowOff < Sinatra::Application
|
|
977
981
|
logger.debug path
|
978
982
|
dir = File.dirname(path)
|
979
983
|
FileUtils.makedirs(File.join(file_dir, dir))
|
980
|
-
|
984
|
+
begin
|
985
|
+
FileUtils.copy(File.join(pres_dir, path), File.join(file_dir, path))
|
986
|
+
rescue Errno::ENOENT => e
|
987
|
+
puts "Missing source file: #{path}"
|
988
|
+
end
|
981
989
|
end
|
982
990
|
end
|
983
991
|
end
|
data/lib/showoff/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: showoff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.10.
|
4
|
+
version: 0.9.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Chacon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|