strelka-cms 0.0.1.pre.15 → 0.0.1.pre.19
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/ChangeLog +103 -1
- data/data/strelka-cms/apps/content-feeds +8 -3
- data/lib/strelka/cms/page.rb +2 -0
- data/lib/strelka/cms/pagefilter/autoindex.rb +4 -1
- data/lib/strelka/cms/pagefilter/example.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/ChangeLog
CHANGED
@@ -1,5 +1,107 @@
|
|
1
|
+
2012-08-09 Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
* data/strelka-cms/apps/content-feeds, lib/strelka/cms/page.rb,
|
4
|
+
lib/strelka/cms/pagefilter/autoindex.rb:
|
5
|
+
Merged with a31949150348
|
6
|
+
[8d4142b7bd18] [tip]
|
7
|
+
|
8
|
+
2012-08-01 Michael Granger <ged@FaerieMUD.org>
|
9
|
+
|
10
|
+
* lib/strelka/cms/page.rb:
|
11
|
+
Add a #date alias for #modified to Strelka::Page
|
12
|
+
[69163c473cea]
|
13
|
+
|
14
|
+
* data/strelka-cms/apps/content-feeds, etc/config.yml,
|
15
|
+
lib/strelka/cms/page.rb, lib/strelka/cms/pagefilter/autoindex.rb:
|
16
|
+
Various bugfixes
|
17
|
+
[fbc7cfa5e103]
|
18
|
+
|
19
|
+
* lib/strelka/cms/pagefilter/example.rb:
|
20
|
+
Make the output of example sections a bit more generically-classed
|
21
|
+
[d0cbf0a91c2d]
|
22
|
+
|
23
|
+
2012-07-20 Michael Granger <ged@FaerieMUD.org>
|
24
|
+
|
25
|
+
* data/strelka-cms/apps/content-manager, lib/strelka/cms/page.rb:
|
26
|
+
Fixes for path translation
|
27
|
+
[a31949150348]
|
28
|
+
|
29
|
+
2012-07-06 Michael Granger <ged@FaerieMUD.org>
|
30
|
+
|
31
|
+
* lib/strelka/cms/page.rb:
|
32
|
+
Open pages using UTF-8, too.
|
33
|
+
[45bf3dd4b7ba]
|
34
|
+
|
35
|
+
* data/strelka-cms/apps/content-manager:
|
36
|
+
Fix the matching pattern for content-manager non-index pages.
|
37
|
+
[cc72d806d27d]
|
38
|
+
|
39
|
+
* data/strelka-cms/apps/content-feeds, data/strelka-cms/apps/content-
|
40
|
+
manager:
|
41
|
+
Set the default internal encoding to UTF-8.
|
42
|
+
[1776e9b3cf55]
|
43
|
+
|
44
|
+
2012-07-04 Michael Granger <ged@FaerieMUD.org>
|
45
|
+
|
46
|
+
* data/strelka-cms/apps/content-feeds, lib/strelka/cms/page.rb:
|
47
|
+
Fix the feeds app.
|
48
|
+
|
49
|
+
- Update to reflect changes in the Page and PageCatalog classes.
|
50
|
+
[ea1d6e84ea16]
|
51
|
+
|
52
|
+
* data/strelka-cms/apps/content-manager, lib/strelka/cms/page.rb,
|
53
|
+
lib/strelka/cms/pagecatalog.rb:
|
54
|
+
Fix the toplevel index page in the content-manager.
|
55
|
+
|
56
|
+
- Special case the empty-path request
|
57
|
+
- Add Page#relative_html_path for cross-linking
|
58
|
+
- Strip off a leading '/' for PageCatalog patterns.
|
59
|
+
[066a60328688]
|
60
|
+
|
61
|
+
* Manifest.txt, data/strelka-cms/apps/content-feeds,
|
62
|
+
lib/strelka/cms/pagefilter/autoindex.rb,
|
63
|
+
spec/strelka/cms/pagecatalog_spec.rb:
|
64
|
+
Add specs for PageCatalog.
|
65
|
+
[0fcdc8fd6599]
|
66
|
+
|
67
|
+
* data/strelka-cms/apps/content-feeds:
|
68
|
+
Fix missing comma.
|
69
|
+
[f8e829fb333f]
|
70
|
+
|
71
|
+
* data/strelka-cms/apps/content-feeds:
|
72
|
+
Make the content-feeds default page root the same as the content-
|
73
|
+
manager.
|
74
|
+
[91e245357ae4]
|
75
|
+
|
76
|
+
* data/strelka-cms/apps/content-feeds, data/strelka-cms/apps/content-
|
77
|
+
manager:
|
78
|
+
Make the config keys match the appid.
|
79
|
+
[f1cd78c6b503]
|
80
|
+
|
81
|
+
* Rakefile:
|
82
|
+
Fix strelka dependency
|
83
|
+
[abaf9e7f8e21]
|
84
|
+
|
85
|
+
* .tm_properties:
|
86
|
+
Add a TextMate preferences file
|
87
|
+
[9d5017f235b9]
|
88
|
+
|
89
|
+
2012-07-03 Michael Granger <ged@FaerieMUD.org>
|
90
|
+
|
91
|
+
* README.rdoc:
|
92
|
+
Adding some tentative instructions to the README
|
93
|
+
[906cd44818a7]
|
94
|
+
|
95
|
+
* .hgignore:
|
96
|
+
Adding .env to the ignorefile
|
97
|
+
[361ef117b1e3]
|
98
|
+
|
1
99
|
2012-06-29 Michael Granger <ged@FaerieMUD.org>
|
2
100
|
|
101
|
+
* Manifest.txt, lib/strelka/cms.rb:
|
102
|
+
Fix the specs, update the manifest.
|
103
|
+
[e90e841548bc]
|
104
|
+
|
3
105
|
* .hgignore, .pryrc, .rvm.gems, .rvmrc, History.rdoc, Manifest.txt,
|
4
106
|
Procfile, README.rdoc, Rakefile, data/strelka-cms/apps/content-
|
5
107
|
feeds, data/strelka-cms/apps/content-manager, data/strelka-
|
@@ -30,4 +132,4 @@
|
|
30
132
|
public/stylesheets/ie.css, spec/data/test.page, spec/lib/helpers.rb,
|
31
133
|
spec/strelka/cms/page_spec.rb, spec/strelka/cms_spec.rb:
|
32
134
|
Initial commit
|
33
|
-
[5f4c4eb6ef5b]
|
135
|
+
[5f4c4eb6ef5b]
|
@@ -18,11 +18,15 @@ require 'strelka/cms/page'
|
|
18
18
|
|
19
19
|
# The Feed applet -- generate RSS and Atom feeds for various things.
|
20
20
|
class Strelka::CMS::ContentFeeds < Strelka::App
|
21
|
-
extend
|
21
|
+
extend Loggability,
|
22
|
+
Configurability,
|
22
23
|
Strelka::MethodUtilities
|
23
24
|
include UUIDTools
|
24
25
|
|
25
26
|
|
27
|
+
# Loggability API -- log to Strelka::CMS's logger
|
28
|
+
log_to :strelka_cms
|
29
|
+
|
26
30
|
# Configurability API -- configure this app with the 'feeds' section of the
|
27
31
|
# config.
|
28
32
|
config_key :content_feeds
|
@@ -87,6 +91,7 @@ class Strelka::CMS::ContentFeeds < Strelka::App
|
|
87
91
|
get 'rss' do |req|
|
88
92
|
feedpath = req.app_path[ %r{/rss/(.*)}, 1 ]
|
89
93
|
newest_pages = self.find_newest_pages( feedpath, req )
|
94
|
+
newest_page = newest_pages.first
|
90
95
|
|
91
96
|
baseuri = req.uri
|
92
97
|
baseuri.path = ''
|
@@ -112,7 +117,7 @@ class Strelka::CMS::ContentFeeds < Strelka::App
|
|
112
117
|
res = req.response
|
113
118
|
|
114
119
|
# Set the cache header and set the mimetype
|
115
|
-
res.headers.last_modified =
|
120
|
+
res.headers.last_modified = newest_page.date.httpdate
|
116
121
|
res.content_type = 'application/rss+xml'
|
117
122
|
res.body = feed.to_s
|
118
123
|
|
@@ -136,7 +141,7 @@ class Strelka::CMS::ContentFeeds < Strelka::App
|
|
136
141
|
feed.authors << Atom::Person.new( :name => 'Michael Granger' )
|
137
142
|
feed.id = @site_uuid.to_uri
|
138
143
|
|
139
|
-
newest_pages.each do |page|
|
144
|
+
newest_pages.sort_by {|page| page.modified }.reverse.each do |page|
|
140
145
|
entry_url = baseuri.dup
|
141
146
|
entry_url.path = '/' + File.join( feedpath, page.relative_html_path )
|
142
147
|
|
data/lib/strelka/cms/page.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'time'
|
4
|
+
require 'date'
|
4
5
|
require 'nokogiri'
|
5
6
|
require 'summarize'
|
6
7
|
require 'loggability'
|
@@ -270,6 +271,7 @@ class Strelka::CMS::Page
|
|
270
271
|
### if neither of those are available.
|
271
272
|
def modified
|
272
273
|
if headerdate = self.options['date']
|
274
|
+
headerdate = headerdate.to_time if headerdate.respond_to?( :to_time )
|
273
275
|
headerdate = Time.parse( headerdate ) unless headerdate.is_a?( Time )
|
274
276
|
return headerdate
|
275
277
|
elsif self.path
|
@@ -1,7 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'ostruct'
|
4
|
-
require 'configurability'
|
5
4
|
|
6
5
|
require 'strelka/cms/pagecatalog'
|
7
6
|
require 'strelka/cms/page'
|
@@ -58,6 +57,8 @@ class Strelka::CMS::PageFilter::AutoIndex < Strelka::CMS::PageFilter
|
|
58
57
|
|
59
58
|
### Process the given +source+ for <?autoindex ... ?> processing-instructions
|
60
59
|
def process( source, page )
|
60
|
+
self.log.info "Looking for autoindex directives..."
|
61
|
+
|
61
62
|
if catalog = page.catalog
|
62
63
|
self.log.debug "Processing autoindex directives."
|
63
64
|
source.gsub!( PI ) do |match|
|
@@ -79,6 +80,8 @@ class Strelka::CMS::PageFilter::AutoIndex < Strelka::CMS::PageFilter
|
|
79
80
|
|
80
81
|
### Create an HTML fragment.
|
81
82
|
def generate_index( pattern, page, catalog, options )
|
83
|
+
self.log.debug "Generating (%p) autoindex for page = %p in catalog: %p. Options = %p" %
|
84
|
+
[ pattern, page, catalog, options ]
|
82
85
|
options = self.parse_options( options )
|
83
86
|
style = options.style || DEFAULT_STYLE
|
84
87
|
|
@@ -225,7 +225,7 @@ class Strelka::CMS::PageFilter::Example < Strelka::CMS::PageFilter
|
|
225
225
|
### Highlights the given +content+ in language +lang+.
|
226
226
|
def highlight( content, lang )
|
227
227
|
source = ERB::Util.html_escape( content )
|
228
|
-
return %Q{\n\n<pre class="
|
228
|
+
return %Q{\n\n<pre><code class="#{lang}">#{source}</code></pre>\n\n}
|
229
229
|
end
|
230
230
|
|
231
231
|
end # class Strelka::CMS::PageFilter::Example
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strelka-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.pre.
|
4
|
+
version: 0.0.1.pre.19
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
YUhDS0xaZFNLai9SSHVUT3QrZ2JsUmV4OEZBaDhOZUEKY21saFhlNDZwWk5K
|
37
37
|
Z1dLYnhaYWg4NWpJang5NWhSOHZPSStOQU01aUg5a09xSzEzRHJ4YWNUS1Bo
|
38
38
|
cWo1UGp3RgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
39
|
-
date: 2012-
|
39
|
+
date: 2012-08-10 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: strelka
|
metadata.gz.sig
CHANGED
Binary file
|