allegro 0.0.0pre1 → 0.0.0pre2

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/lib/allegro.rb CHANGED
@@ -10,8 +10,6 @@ require 'open-uri'
10
10
  require 'rdiscount'
11
11
  require 'builder'
12
12
  require 'fileutils'
13
- require 'coderay'
14
- require 'rack/codehighlighter'
15
13
 
16
14
  require 'allegro/ext/ext'
17
15
  require 'allegro/version'
@@ -1,3 +1,3 @@
1
1
  module Allegro
2
- Version = VERSION = '0.0.0pre1'
2
+ Version = VERSION = '0.0.0pre2'
3
3
  end
@@ -5,11 +5,3 @@ date: 1900/05/17
5
5
  Dorothy lived in the midst of the great Kansas prairies, with Uncle Henry,
6
6
  who was a farmer, and Aunt Em, who was the farmer's wife.
7
7
 
8
- Tasty test:
9
-
10
- :::ruby
11
- # it's 4 spaces indentation, don't forget that
12
- def test
13
- puts "test !" if super(nil)
14
- end
15
-
@@ -1,10 +1,9 @@
1
+
1
2
  require 'allegro'
2
3
 
3
4
  # Rack config
4
5
  use Rack::Static, :urls => ['/css', '/js', '/images', '/favicon.ico'], :root => 'public'
5
6
  use Rack::CommonLogger
6
- use Rack::Codehighlighter, :coderay, :markdown => true, :element => "pre>code", :pattern => /\A:::(\w+)\s*(\n|
)/i, :logging => true
7
-
8
7
 
9
8
  if ENV['RACK_ENV'] == 'development'
10
9
  use Rack::ShowExceptions
@@ -3,7 +3,6 @@
3
3
  <head>
4
4
  <link rel="stylesheet" type="text/css" href="/css/main.css">
5
5
  <link rel="alternate" type="application/atom+xml" title="<%= title %> - feed" href="/index.xml" />
6
- <link rel="stylesheet" type="text/css" href="/css/coderay.css">
7
6
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
8
7
  <title><%= title %></title>
9
8
  </head>
@@ -12,7 +11,7 @@
12
11
  <%= yield %>
13
12
  </section>
14
13
  <footer>
15
- powered by <a href="http://cloudhead.io/toto">toto</a>
14
+ powered by <a href="http://github.com/fyskij/allegro">allegro</a>
16
15
  </footer>
17
16
  </body>
18
17
  </html>
metadata CHANGED
@@ -5,11 +5,11 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 0pre1
9
- version: 0.0.0pre1
8
+ - 0pre2
9
+ version: 0.0.0pre2
10
10
  platform: ruby
11
11
  authors:
12
- - Ermenegildo Fiorito (fyskij)
12
+ - Ermenegildo Fiorito
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
@@ -31,7 +31,7 @@ dependencies:
31
31
  type: :runtime
32
32
  version_requirements: *id001
33
33
  - !ruby/object:Gem::Dependency
34
- name: rack-codehighlighter
34
+ name: rack
35
35
  prerelease: false
36
36
  requirement: &id002 !ruby/object:Gem::Requirement
37
37
  none: false
@@ -44,7 +44,7 @@ dependencies:
44
44
  type: :runtime
45
45
  version_requirements: *id002
46
46
  - !ruby/object:Gem::Dependency
47
- name: coderay
47
+ name: rdiscount
48
48
  prerelease: false
49
49
  requirement: &id003 !ruby/object:Gem::Requirement
50
50
  none: false
@@ -56,32 +56,6 @@ dependencies:
56
56
  version: "0"
57
57
  type: :runtime
58
58
  version_requirements: *id003
59
- - !ruby/object:Gem::Dependency
60
- name: rack
61
- prerelease: false
62
- requirement: &id004 !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- segments:
68
- - 0
69
- version: "0"
70
- type: :runtime
71
- version_requirements: *id004
72
- - !ruby/object:Gem::Dependency
73
- name: rdiscount
74
- prerelease: false
75
- requirement: &id005 !ruby/object:Gem::Requirement
76
- none: false
77
- requirements:
78
- - - ">="
79
- - !ruby/object:Gem::Version
80
- segments:
81
- - 0
82
- version: "0"
83
- type: :runtime
84
- version_requirements: *id005
85
59
  description: a pure ruby blog system based on cloudhead's toto
86
60
  email: fiorito.g@gmail.com
87
61
  executables:
@@ -93,7 +67,6 @@ extra_rdoc_files: []
93
67
  files:
94
68
  - README.md
95
69
  - lib/template/public/css/main.css
96
- - lib/template/public/css/coderay.css
97
70
  - lib/template/Rakefile
98
71
  - lib/template/articles/1900-05-17-the-wonderful-wizard-of-oz.txt
99
72
  - lib/template/templates/pages/article.rhtml
@@ -107,7 +80,6 @@ files:
107
80
  - lib/allegro.rb
108
81
  - lib/allegro/version.rb
109
82
  - lib/allegro/template.rb
110
- - lib/allegro/config.rb
111
83
  - lib/allegro/site.rb
112
84
  - lib/allegro/ext/ext.rb
113
85
  - lib/allegro/context.rb
@@ -1,36 +0,0 @@
1
- module Allegro
2
-
3
- class Config < Hash
4
- Defaults = {
5
- :author => ENV['USER'], # blog author
6
- :title => Dir.pwd.split('/').last, # site title
7
- :root => "index", # site index
8
- :url => "http://127.0.0.1", # root URL of the site
9
- :prefix => "", # common path prefix for the blog
10
- :date => lambda {|now| now.strftime("%d/%m/%Y") }, # date function
11
- :markdown => :smart, # use markdown
12
- :disqus => false, # disqus name
13
- :summary => {:max => 150, :delim => /~\n/}, # length of summary and delimiter
14
- :ext => 'txt', # extension for articles
15
- :cache => 28800, # cache duration (seconds)
16
- :github => {:user => "", :repos => [], :ext => 'md'}, # Github username and list of repos
17
- :to_html => lambda {|path, page, ctx| # returns an html, from a path & context
18
- ERB.new(File.read("#{path}/#{page}.rhtml")).result(ctx)
19
- },
20
- :error => lambda {|code| # The HTML for your error page
21
- "<font style='font-size:300%'>allegro, we're not in Kansas anymore (#{code})</font>"
22
- }
23
- }
24
- def initialize obj
25
- self.update Defaults
26
- self.update obj
27
- end
28
-
29
- def set key, val = nil, &blk
30
- if val.is_a? Hash
31
- self[key].update val
32
- else
33
- self[key] = block_given?? blk : val
34
- end
35
- end
36
- end
@@ -1,130 +0,0 @@
1
- .CodeRay {
2
- background-color: #f8f8f8;
3
- border: 1px solid silver;
4
- font-family: 'Courier New', 'Terminal', monospace;
5
- color: #000;
6
- }
7
- .CodeRay pre { margin: 0px }
8
-
9
- div.CodeRay { }
10
-
11
- span.CodeRay { white-space: pre; border: 0px; padding: 2px }
12
-
13
- table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px }
14
- table.CodeRay td { padding: 2px 4px; vertical-align: top }
15
-
16
- .CodeRay .line_numbers, .CodeRay .no {
17
- background-color: #def;
18
- color: gray;
19
- text-align: right;
20
- }
21
- .CodeRay .line_numbers tt { font-weight: bold }
22
- .CodeRay .line_numbers .highlighted { color: red }
23
- .CodeRay .no { padding: 0px 4px }
24
- .CodeRay .code { width: 100% }
25
-
26
- ol.CodeRay { font-size: 10pt }
27
- ol.CodeRay li { white-space: pre }
28
-
29
- .CodeRay .code pre { overflow: auto }
30
-
31
- .CodeRay .debug { color:white ! important; background:blue ! important; }
32
-
33
- .CodeRay .af { color:#00C }
34
- .CodeRay .an { color:#007 }
35
- .CodeRay .at { color:#f08 }
36
- .CodeRay .av { color:#700 }
37
- .CodeRay .aw { color:#C00 }
38
- .CodeRay .bi { color:#509; font-weight:bold }
39
- .CodeRay .c { color:#888; }
40
-
41
- .CodeRay .ch { color:#04D }
42
- .CodeRay .ch .k { color:#04D }
43
- .CodeRay .ch .dl { color:#039 }
44
-
45
- .CodeRay .cl { color:#B06; font-weight:bold }
46
- .CodeRay .cm { color:#A08; font-weight:bold }
47
- .CodeRay .co { color:#036; font-weight:bold }
48
- .CodeRay .cr { color:#0A0 }
49
- .CodeRay .cv { color:#369 }
50
- .CodeRay .de { color:#B0B; }
51
- .CodeRay .df { color:#099; font-weight:bold }
52
- .CodeRay .di { color:#088; font-weight:bold }
53
- .CodeRay .dl { color:black }
54
- .CodeRay .do { color:#970 }
55
- .CodeRay .dt { color:#34b }
56
- .CodeRay .ds { color:#D42; font-weight:bold }
57
- .CodeRay .e { color:#666; font-weight:bold }
58
- .CodeRay .en { color:#800; font-weight:bold }
59
- .CodeRay .er { color:#F00; background-color:#FAA }
60
- .CodeRay .ex { color:#C00; font-weight:bold }
61
- .CodeRay .fl { color:#60E; font-weight:bold }
62
- .CodeRay .fu { color:#06B; font-weight:bold }
63
- .CodeRay .gv { color:#d70; font-weight:bold }
64
- .CodeRay .hx { color:#058; font-weight:bold }
65
- .CodeRay .i { color:#00D; font-weight:bold }
66
- .CodeRay .ic { color:#B44; font-weight:bold }
67
-
68
- .CodeRay .il { background: #ddd; color: black }
69
- .CodeRay .il .il { background: #ccc }
70
- .CodeRay .il .il .il { background: #bbb }
71
- .CodeRay .il .idl { background: #ddd; font-weight: bold; color: #666 }
72
- .CodeRay .idl { background-color: #bbb; font-weight: bold; color: #666; }
73
-
74
- .CodeRay .im { color:#f00; }
75
- .CodeRay .in { color:#B2B; font-weight:bold }
76
- .CodeRay .iv { color:#33B }
77
- .CodeRay .la { color:#970; font-weight:bold }
78
- .CodeRay .lv { color:#963 }
79
- .CodeRay .oc { color:#40E; font-weight:bold }
80
- .CodeRay .of { color:#000; font-weight:bold }
81
- .CodeRay .op { }
82
- .CodeRay .pc { color:#038; font-weight:bold }
83
- .CodeRay .pd { color:#369; font-weight:bold }
84
- .CodeRay .pp { color:#579; }
85
- .CodeRay .ps { color:#00C; font-weight:bold }
86
- .CodeRay .pt { color:#074; font-weight:bold }
87
- .CodeRay .r, .kw { color:#080; font-weight:bold }
88
-
89
- .CodeRay .ke { color: #808; }
90
- .CodeRay .ke .dl { color: #606; }
91
- .CodeRay .ke .ch { color: #80f; }
92
- .CodeRay .vl { color: #088; }
93
-
94
- .CodeRay .rx { background-color:#fff0ff }
95
- .CodeRay .rx .k { color:#808 }
96
- .CodeRay .rx .dl { color:#404 }
97
- .CodeRay .rx .mod { color:#C2C }
98
- .CodeRay .rx .fu { color:#404; font-weight: bold }
99
-
100
- .CodeRay .s { background-color:#fff0f0; color: #D20; }
101
- .CodeRay .s .s { background-color:#ffe0e0 }
102
- .CodeRay .s .s .s { background-color:#ffd0d0 }
103
- .CodeRay .s .k { }
104
- .CodeRay .s .ch { color: #b0b; }
105
- .CodeRay .s .dl { color: #710; }
106
-
107
- .CodeRay .sh { background-color:#f0fff0; color:#2B2 }
108
- .CodeRay .sh .k { }
109
- .CodeRay .sh .dl { color:#161 }
110
-
111
- .CodeRay .sy { color:#A60 }
112
- .CodeRay .sy .k { color:#A60 }
113
- .CodeRay .sy .dl { color:#630 }
114
-
115
- .CodeRay .ta { color:#070 }
116
- .CodeRay .tf { color:#070; font-weight:bold }
117
- .CodeRay .ts { color:#D70; font-weight:bold }
118
- .CodeRay .ty { color:#339; font-weight:bold }
119
- .CodeRay .v { color:#036 }
120
- .CodeRay .xt { color:#444 }
121
-
122
- .CodeRay .ins { background: #afa; }
123
- .CodeRay .del { background: #faa; }
124
- .CodeRay .chg { color: #aaf; background: #007; }
125
- .CodeRay .head { color: #f8f; background: #505 }
126
-
127
- .CodeRay .ins .ins { color: #080; font-weight:bold }
128
- .CodeRay .del .del { color: #800; font-weight:bold }
129
- .CodeRay .chg .chg { color: #66f; }
130
- .CodeRay .head .head { color: #f4f; }