teamon-rubber 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/Rakefile +1 -1
- data/lib/rubber.rb +1 -0
- data/lib/server.ru +6 -4
- metadata +2 -2
data/README.markdown
CHANGED
data/Rakefile
CHANGED
data/lib/rubber.rb
CHANGED
data/lib/server.ru
CHANGED
@@ -3,7 +3,7 @@ require 'uri'
|
|
3
3
|
|
4
4
|
MONTHS = %w(stycznia lutego marca kwietnia maja czerwca lipa sierpnia września pażdziernika listopada grudnia)
|
5
5
|
|
6
|
-
def colorize(content)
|
6
|
+
def colorize!(content)
|
7
7
|
content.gsub!(%r|\{geshi +lang=(.+?)\}(.+?)\{/geshi\}|m) { "<pre>#{$2}</pre>" }
|
8
8
|
end
|
9
9
|
|
@@ -46,9 +46,11 @@ def parse_with_entry(body, entry, counter = 0)
|
|
46
46
|
tag body, "ENTRY_ID", rand(100)
|
47
47
|
tag body, "ENTRY_LEVEL", rand(3)
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
tag body, "
|
49
|
+
colorize!(entry[:content])
|
50
|
+
|
51
|
+
tag body, "ENTRY_CONTENT", entry[:content].sub(%r|<EXCERPT>|, "")
|
52
|
+
tag body, "ENTRY_CONTENT_LONG", entry[:content].split(%r|<EXCERPT>|).last
|
53
|
+
tag body, "ENTRY_CONTENT_SHORT", entry[:content].split(%r|<EXCERPT>|).first
|
52
54
|
body.gsub!(%r|<ENTRY_CONTENT_SHORT_EXIST>(.+?)</ENTRY_CONTENT_SHORT_EXIST>|m) { entry[:content]["<EXCERPT>"] ? parse_with_entry($1, entry) : "" }
|
53
55
|
body.gsub!(%r|<ENTRY_CONTENT_SHORT_NOT_EXIST>(.+?)</ENTRY_CONTENT_SHORT_NOT_EXIST>|m) { entry[:content]["<EXCERPT>"] ? "" : parse_with_entry($1, entry) }
|
54
56
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teamon-rubber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tymon Tobolski
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-13 00:00:00 -07:00
|
13
13
|
default_executable: rubber
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|