nesta-rails 0.0.1 → 0.0.3
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.
- checksums.yaml +7 -0
- data/README.md +16 -12
- data/lib/generators/nesta_generator.rb +5 -5
- data/lib/nesta-rails/version.rb +1 -1
- data/test/dummy/app/views/nesta/atom.haml +3 -3
- data/test/dummy/app/views/nesta/sitemap.haml +2 -2
- metadata +28 -48
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 925449d998f042754618af8d7b50674f368af69d
|
4
|
+
data.tar.gz: bbde6d807ee6d3b9c74e21414705bdb7d49cd610
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bad218f6cb21b396c6c7902c60dfeba25aaa19607f59da11d377bcc7fe93852ae97bd37806c5d3aa5c5bd5fb98ebe58285ea07e3c3f494aec80a043f1c12efbc
|
7
|
+
data.tar.gz: 55d61a4059c3871aa5f6145723fc29e70a87b1d0a6a030cb5baa7ac5db1a74ee8759345a4ff44914c44db73ff6d27f5cffb87a848cedd9e283b589e8c25b5761
|
data/README.md
CHANGED
@@ -1,23 +1,26 @@
|
|
1
1
|
nesta-rails
|
2
2
|
===========
|
3
3
|
|
4
|
-
nesta-rails is a Rails plugin that seamlessly integrates Nesta CMS
|
5
|
-
your Rails application. Rather than mounting Nesta as a Rack
|
6
|
-
alongside your Rails application, it replaces Nesta's
|
7
|
-
with a Rails controller that uses Nesta's library code
|
8
|
-
files in your content/pages directory.
|
4
|
+
nesta-rails is a Rails plugin that seamlessly integrates [Nesta CMS][]
|
5
|
+
into your Rails application. Rather than mounting Nesta as a Rack
|
6
|
+
application alongside your Rails application, it replaces Nesta's
|
7
|
+
Sinatra actions with a Rails controller that uses Nesta's library code
|
8
|
+
to render the files in your content/pages directory.
|
9
|
+
|
10
|
+
[Nesta CMS]: http://nestacms.com
|
9
11
|
|
10
12
|
Installation
|
11
13
|
------------
|
12
14
|
|
13
|
-
Add `nesta-rails` to your Rails
|
15
|
+
Add the `nesta-rails` gem to your Rails project's `Gemfile` and re-run
|
16
|
+
Bundler, like this:
|
14
17
|
|
15
|
-
$ echo
|
18
|
+
$ echo "gem 'nesta-rails'" >> Gemfile
|
16
19
|
$ bundle
|
17
20
|
|
18
21
|
Now you can generate a controller, a helper, and a default template for
|
19
|
-
rendering your pages. The generator will
|
20
|
-
`config/routes.rb` for you.
|
22
|
+
rendering your pages. The generator will automatically add some routes
|
23
|
+
to `config/routes.rb` for you.
|
21
24
|
|
22
25
|
$ rails generate nesta
|
23
26
|
create config/initializers/nesta.rb
|
@@ -30,10 +33,11 @@ rendering your pages. The generator will also add some routes to
|
|
30
33
|
route match 'sitemap.xml' => 'nesta#sitemap'
|
31
34
|
route match 'articles.xml' => 'nesta#feed'
|
32
35
|
|
33
|
-
|
34
|
-
|
36
|
+
Move the new routes to the bottom of `config/routes.rb` to ensure that
|
37
|
+
Nesta isn't asked to serve pages that should be handled by other
|
38
|
+
controllers in your application.
|
35
39
|
|
36
|
-
That's it
|
40
|
+
That's it - nesta-rails is installed.
|
37
41
|
|
38
42
|
It's now up to you to update your templates/CSS accordingly, but Nesta's
|
39
43
|
content should be rendered within your Rails app's application layout...
|
@@ -95,8 +95,8 @@ end
|
|
95
95
|
%title(type='text')= @title
|
96
96
|
%generator(uri='http://nestacms.com') Nesta
|
97
97
|
%id= atom_id
|
98
|
-
%link(href="#{path_to('/articles.xml')}" rel='self')
|
99
|
-
%link(href="#{path_to('/')}" rel='alternate')
|
98
|
+
%link(href="#{path_to('/articles.xml', :uri => true)}" rel='self')
|
99
|
+
%link(href="#{path_to('/', :uri => true)}" rel='alternate')
|
100
100
|
%subtitle(type='text')= @subtitle
|
101
101
|
- if @articles[0]
|
102
102
|
%updated= @articles[0].date(:xmlschema)
|
@@ -111,7 +111,7 @@ end
|
|
111
111
|
- @articles.each do |article|
|
112
112
|
%entry
|
113
113
|
%title= article.heading
|
114
|
-
%link{ :href => path_to(article.path), :type => 'text/html', :rel => 'alternate' }
|
114
|
+
%link{ :href => path_to(article.path, :uri => true), :type => 'text/html', :rel => 'alternate' }
|
115
115
|
%id= atom_id(article)
|
116
116
|
%content(type='html')&= permit_html_escape(find_and_preserve(absolute_urls(article.body(self))))
|
117
117
|
%published= article.date(:xmlschema)
|
@@ -124,13 +124,13 @@ end
|
|
124
124
|
!!! XML
|
125
125
|
%urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
|
126
126
|
%url
|
127
|
-
%loc= path_to('/')
|
127
|
+
%loc= path_to('/', :uri => true)
|
128
128
|
%changefreq daily
|
129
129
|
%priority 1.0
|
130
130
|
%lastmod= @last.xmlschema
|
131
131
|
- @pages.each do |page|
|
132
132
|
%url
|
133
|
-
%loc= path_to(page.path)
|
133
|
+
%loc= path_to(page.path, :uri => true)
|
134
134
|
%lastmod= page.last_modified.xmlschema
|
135
135
|
EOF
|
136
136
|
end
|
data/lib/nesta-rails/version.rb
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
%title(type='text')= @title
|
4
4
|
%generator(uri='http://nestacms.com') Nesta
|
5
5
|
%id= atom_id
|
6
|
-
%link(href="#{path_to('/articles.xml')}" rel='self')
|
7
|
-
%link(href="#{path_to('/')}" rel='alternate')
|
6
|
+
%link(href="#{path_to('/articles.xml', :uri => true)}" rel='self')
|
7
|
+
%link(href="#{path_to('/', :uri => true)}" rel='alternate')
|
8
8
|
%subtitle(type='text')= @subtitle
|
9
9
|
- if @articles[0]
|
10
10
|
%updated= @articles[0].date(:xmlschema)
|
@@ -19,7 +19,7 @@
|
|
19
19
|
- @articles.each do |article|
|
20
20
|
%entry
|
21
21
|
%title= article.heading
|
22
|
-
%link{ :href => path_to(article.path), :type => 'text/html', :rel => 'alternate' }
|
22
|
+
%link{ :href => path_to(article.path, :uri => true), :type => 'text/html', :rel => 'alternate' }
|
23
23
|
%id= atom_id(article)
|
24
24
|
%content(type='html')&= permit_html_escape(find_and_preserve(absolute_urls(article.body(self))))
|
25
25
|
%published= article.date(:xmlschema)
|
@@ -1,11 +1,11 @@
|
|
1
1
|
!!! XML
|
2
2
|
%urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
|
3
3
|
%url
|
4
|
-
%loc= path_to('/')
|
4
|
+
%loc= path_to('/', :uri => true)
|
5
5
|
%changefreq daily
|
6
6
|
%priority 1.0
|
7
7
|
%lastmod= @last.xmlschema
|
8
8
|
- @pages.each do |page|
|
9
9
|
%url
|
10
|
-
%loc= path_to(page.path)
|
10
|
+
%loc= path_to(page.path, :uri => true)
|
11
11
|
%lastmod= page.last_modified.xmlschema
|
metadata
CHANGED
@@ -1,90 +1,79 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nesta-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Graham Ashton
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-07-11 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: nesta
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
19
|
+
version: 0.10.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
26
|
+
version: 0.10.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rails
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
33
|
+
version: '4.0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
40
|
+
version: '4.0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: sqlite3
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
|
-
description:
|
63
|
-
into
|
64
|
-
|
55
|
+
description: |
|
56
|
+
nesta-rails is a Rails plugin that seamlessly integrates Nesta CMS into
|
65
57
|
your Rails application. Rather than mounting Nesta as a Rack application
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
with a Rails controller that uses Nesta''s library code to render the
|
70
|
-
|
58
|
+
alongside your Rails application, it replaces Nesta's Sinatra actions
|
59
|
+
with a Rails controller that uses Nesta's library code to render the
|
71
60
|
files in your content/pages directory.
|
72
|
-
|
73
|
-
'
|
74
61
|
email:
|
75
62
|
- graham@effectif.com
|
76
63
|
executables: []
|
77
64
|
extensions: []
|
78
65
|
extra_rdoc_files: []
|
79
66
|
files:
|
67
|
+
- MIT-LICENSE
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
80
70
|
- lib/generators/nesta_generator.rb
|
71
|
+
- lib/nesta-rails.rb
|
81
72
|
- lib/nesta-rails/action_dispatch_patch.rb
|
82
73
|
- lib/nesta-rails/version.rb
|
83
|
-
- lib/nesta-rails.rb
|
84
74
|
- lib/tasks/nesta-rails_tasks.rake
|
85
|
-
-
|
86
|
-
- Rakefile
|
87
|
-
- README.md
|
75
|
+
- test/dummy/README.rdoc
|
76
|
+
- test/dummy/Rakefile
|
88
77
|
- test/dummy/app/assets/javascripts/application.js
|
89
78
|
- test/dummy/app/assets/stylesheets/application.css
|
90
79
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -95,6 +84,7 @@ files:
|
|
95
84
|
- test/dummy/app/views/nesta/atom.haml
|
96
85
|
- test/dummy/app/views/nesta/page.html.haml
|
97
86
|
- test/dummy/app/views/nesta/sitemap.haml
|
87
|
+
- test/dummy/config.ru
|
98
88
|
- test/dummy/config/application.rb
|
99
89
|
- test/dummy/config/boot.rb
|
100
90
|
- test/dummy/config/database.yml
|
@@ -111,7 +101,6 @@ files:
|
|
111
101
|
- test/dummy/config/initializers/wrap_parameters.rb
|
112
102
|
- test/dummy/config/locales/en.yml
|
113
103
|
- test/dummy/config/routes.rb
|
114
|
-
- test/dummy/config.ru
|
115
104
|
- test/dummy/content/pages/page.mdown
|
116
105
|
- test/dummy/db/development.sqlite3
|
117
106
|
- test/dummy/db/test.sqlite3
|
@@ -121,8 +110,6 @@ files:
|
|
121
110
|
- test/dummy/public/422.html
|
122
111
|
- test/dummy/public/500.html
|
123
112
|
- test/dummy/public/favicon.ico
|
124
|
-
- test/dummy/Rakefile
|
125
|
-
- test/dummy/README.rdoc
|
126
113
|
- test/dummy/script/rails
|
127
114
|
- test/dummy/tmp/cache/assets/CB8/150/sprockets%2F54e70388adcf4fb25740386a034685e7
|
128
115
|
- test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
|
@@ -139,33 +126,26 @@ files:
|
|
139
126
|
- test/test_helper.rb
|
140
127
|
homepage: http://nestacms.com
|
141
128
|
licenses: []
|
129
|
+
metadata: {}
|
142
130
|
post_install_message:
|
143
131
|
rdoc_options: []
|
144
132
|
require_paths:
|
145
133
|
- lib
|
146
134
|
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
-
none: false
|
148
135
|
requirements:
|
149
|
-
- -
|
136
|
+
- - ">="
|
150
137
|
- !ruby/object:Gem::Version
|
151
138
|
version: '0'
|
152
|
-
segments:
|
153
|
-
- 0
|
154
|
-
hash: -3912361479944767214
|
155
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
|
-
none: false
|
157
140
|
requirements:
|
158
|
-
- -
|
141
|
+
- - ">="
|
159
142
|
- !ruby/object:Gem::Version
|
160
143
|
version: '0'
|
161
|
-
segments:
|
162
|
-
- 0
|
163
|
-
hash: -3912361479944767214
|
164
144
|
requirements: []
|
165
145
|
rubyforge_project:
|
166
|
-
rubygems_version:
|
146
|
+
rubygems_version: 2.3.0
|
167
147
|
signing_key:
|
168
|
-
specification_version:
|
148
|
+
specification_version: 4
|
169
149
|
summary: A Rails plugin for using Nesta CMS in Rails
|
170
150
|
test_files:
|
171
151
|
- test/dummy/app/assets/javascripts/application.js
|