teamon-rubber 0.0.6 → 0.0.7

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/README.markdown CHANGED
@@ -1,4 +1,4 @@
1
- rubber v. 0.0.5
1
+ rubber v. 0.0.6
2
2
  ===============
3
3
  Edytor szablonów Joggera
4
4
 
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake/gempackagetask'
3
3
 
4
4
  PLUGIN = "rubber"
5
5
  GEM_NAME = "rubber"
6
- GEM_VERSION = "0.0.6"
6
+ GEM_VERSION = "0.0.7"
7
7
  AUTHOR = "Tymon Tobolski"
8
8
  EMAIL = "i@teamon.eu"
9
9
  HOMEPAGE = "http://blog.teamon.eu/projekty/"
data/lib/rubber.rb CHANGED
@@ -162,6 +162,7 @@ rubber [action]
162
162
  Actions:
163
163
  download (--force)
164
164
  upload [file]
165
+ server
165
166
  USAGE
166
167
  exit
167
168
  end
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
- tag body, "ENTRY_CONTENT", colorize(entry[:content].sub(%r|<EXCERPT>|, ""))
50
- tag body, "ENTRY_CONTENT_LONG", colorize(entry[:content].split(%r|<EXCERPT>|).last)
51
- tag body, "ENTRY_CONTENT_SHORT", colorize(entry[:content].split(%r|<EXCERPT>|).first)
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.6
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-05-29 00:00:00 -07:00
12
+ date: 2009-06-13 00:00:00 -07:00
13
13
  default_executable: rubber
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency