nesta-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +48 -0
  3. data/Rakefile +38 -0
  4. data/lib/generators/nesta_generator.rb +143 -0
  5. data/lib/nesta-rails.rb +4 -0
  6. data/lib/nesta-rails/action_dispatch_patch.rb +13 -0
  7. data/lib/nesta-rails/version.rb +3 -0
  8. data/lib/tasks/nesta-rails_tasks.rake +4 -0
  9. data/test/dummy/README.rdoc +261 -0
  10. data/test/dummy/Rakefile +7 -0
  11. data/test/dummy/app/assets/javascripts/application.js +15 -0
  12. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  13. data/test/dummy/app/controllers/application_controller.rb +3 -0
  14. data/test/dummy/app/controllers/nesta_controller.rb +28 -0
  15. data/test/dummy/app/helpers/application_helper.rb +2 -0
  16. data/test/dummy/app/helpers/nesta_helper.rb +19 -0
  17. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  18. data/test/dummy/app/views/nesta/atom.haml +28 -0
  19. data/test/dummy/app/views/nesta/page.html.haml +1 -0
  20. data/test/dummy/app/views/nesta/sitemap.haml +11 -0
  21. data/test/dummy/config.ru +4 -0
  22. data/test/dummy/config/application.rb +59 -0
  23. data/test/dummy/config/boot.rb +10 -0
  24. data/test/dummy/config/database.yml +25 -0
  25. data/test/dummy/config/environment.rb +5 -0
  26. data/test/dummy/config/environments/development.rb +37 -0
  27. data/test/dummy/config/environments/production.rb +67 -0
  28. data/test/dummy/config/environments/test.rb +37 -0
  29. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  30. data/test/dummy/config/initializers/inflections.rb +15 -0
  31. data/test/dummy/config/initializers/mime_types.rb +5 -0
  32. data/test/dummy/config/initializers/nesta.rb +23 -0
  33. data/test/dummy/config/initializers/secret_token.rb +7 -0
  34. data/test/dummy/config/initializers/session_store.rb +8 -0
  35. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  36. data/test/dummy/config/locales/en.yml +5 -0
  37. data/test/dummy/config/routes.rb +65 -0
  38. data/test/dummy/content/pages/page.mdown +5 -0
  39. data/test/dummy/db/development.sqlite3 +0 -0
  40. data/test/dummy/db/test.sqlite3 +0 -0
  41. data/test/dummy/log/development.log +46 -0
  42. data/test/dummy/log/test.log +290 -0
  43. data/test/dummy/public/404.html +26 -0
  44. data/test/dummy/public/422.html +26 -0
  45. data/test/dummy/public/500.html +25 -0
  46. data/test/dummy/public/favicon.ico +0 -0
  47. data/test/dummy/script/rails +6 -0
  48. data/test/dummy/tmp/cache/assets/CB8/150/sprockets%2F54e70388adcf4fb25740386a034685e7 +0 -0
  49. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  50. data/test/dummy/tmp/cache/assets/D2C/B60/sprockets%2F5e6fb5a3a51f9123aed6ba502366a243 +0 -0
  51. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  52. data/test/dummy/tmp/cache/assets/D33/7D0/sprockets%2F393634e12da60d1edd73c961eb04a38b +0 -0
  53. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  54. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  55. data/test/dummy/tmp/cache/assets/DBF/3F0/sprockets%2F4724c5e5e48ef3fbdcf27e9fe9b97096 +0 -0
  56. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  57. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  58. data/test/dummy/tmp/capybara/capybara-201207041532021383280359.html +18 -0
  59. data/test/nesta-rails_test.rb +15 -0
  60. data/test/test_helper.rb +22 -0
  61. metadata +222 -0
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+ <title>Dummy</title>
6
+ <link href="/assets/application.css" media="all" rel="stylesheet" type="text/css">
7
+ <script src="/assets/application.js" type="text/javascript"></script>
8
+ </head>
9
+ <body>
10
+
11
+ <p># Page heading</p>
12
+ <p></p>
13
+ <p>Page body</p>
14
+
15
+
16
+
17
+ </body>
18
+ </html>
@@ -0,0 +1,15 @@
1
+ require 'test_helper'
2
+
3
+ class NestaRailsTest < ActiveSupport::IntegrationCase
4
+ test 'can render a page from content folder' do
5
+ visit '/page'
6
+ assert find('h1').has_content?('Page heading')
7
+ assert page.has_content?('Page body')
8
+ end
9
+
10
+ # test 'can render the Atom feed' do
11
+ # end
12
+
13
+ # test 'can render the XML sitemap' do
14
+ # end
15
+ end
@@ -0,0 +1,22 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end
16
+
17
+ require 'capybara/rails'
18
+
19
+ class ActiveSupport::IntegrationCase < ActiveSupport::TestCase
20
+ include Capybara::DSL
21
+ include Rails.application.routes.url_helpers
22
+ end
metadata ADDED
@@ -0,0 +1,222 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nesta-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Graham Ashton
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-04 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: nesta
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.9.13
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.9.13
30
+ - !ruby/object:Gem::Dependency
31
+ name: rails
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 3.2.6
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 3.2.6
46
+ - !ruby/object:Gem::Dependency
47
+ name: sqlite3
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: ! 'nesta-rails is a Rails plugin that seamlessly integrates Nesta CMS
63
+ into
64
+
65
+ your Rails application. Rather than mounting Nesta as a Rack application
66
+
67
+ alongside your Rails application, it replaces Nesta''s Sinatra actions
68
+
69
+ with a Rails controller that uses Nesta''s library code to render the
70
+
71
+ files in your content/pages directory.
72
+
73
+ '
74
+ email:
75
+ - graham@effectif.com
76
+ executables: []
77
+ extensions: []
78
+ extra_rdoc_files: []
79
+ files:
80
+ - lib/generators/nesta_generator.rb
81
+ - lib/nesta-rails/action_dispatch_patch.rb
82
+ - lib/nesta-rails/version.rb
83
+ - lib/nesta-rails.rb
84
+ - lib/tasks/nesta-rails_tasks.rake
85
+ - MIT-LICENSE
86
+ - Rakefile
87
+ - README.md
88
+ - test/dummy/app/assets/javascripts/application.js
89
+ - test/dummy/app/assets/stylesheets/application.css
90
+ - test/dummy/app/controllers/application_controller.rb
91
+ - test/dummy/app/controllers/nesta_controller.rb
92
+ - test/dummy/app/helpers/application_helper.rb
93
+ - test/dummy/app/helpers/nesta_helper.rb
94
+ - test/dummy/app/views/layouts/application.html.erb
95
+ - test/dummy/app/views/nesta/atom.haml
96
+ - test/dummy/app/views/nesta/page.html.haml
97
+ - test/dummy/app/views/nesta/sitemap.haml
98
+ - test/dummy/config/application.rb
99
+ - test/dummy/config/boot.rb
100
+ - test/dummy/config/database.yml
101
+ - test/dummy/config/environment.rb
102
+ - test/dummy/config/environments/development.rb
103
+ - test/dummy/config/environments/production.rb
104
+ - test/dummy/config/environments/test.rb
105
+ - test/dummy/config/initializers/backtrace_silencers.rb
106
+ - test/dummy/config/initializers/inflections.rb
107
+ - test/dummy/config/initializers/mime_types.rb
108
+ - test/dummy/config/initializers/nesta.rb
109
+ - test/dummy/config/initializers/secret_token.rb
110
+ - test/dummy/config/initializers/session_store.rb
111
+ - test/dummy/config/initializers/wrap_parameters.rb
112
+ - test/dummy/config/locales/en.yml
113
+ - test/dummy/config/routes.rb
114
+ - test/dummy/config.ru
115
+ - test/dummy/content/pages/page.mdown
116
+ - test/dummy/db/development.sqlite3
117
+ - test/dummy/db/test.sqlite3
118
+ - test/dummy/log/development.log
119
+ - test/dummy/log/test.log
120
+ - test/dummy/public/404.html
121
+ - test/dummy/public/422.html
122
+ - test/dummy/public/500.html
123
+ - test/dummy/public/favicon.ico
124
+ - test/dummy/Rakefile
125
+ - test/dummy/README.rdoc
126
+ - test/dummy/script/rails
127
+ - test/dummy/tmp/cache/assets/CB8/150/sprockets%2F54e70388adcf4fb25740386a034685e7
128
+ - test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
129
+ - test/dummy/tmp/cache/assets/D2C/B60/sprockets%2F5e6fb5a3a51f9123aed6ba502366a243
130
+ - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
131
+ - test/dummy/tmp/cache/assets/D33/7D0/sprockets%2F393634e12da60d1edd73c961eb04a38b
132
+ - test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
133
+ - test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
134
+ - test/dummy/tmp/cache/assets/DBF/3F0/sprockets%2F4724c5e5e48ef3fbdcf27e9fe9b97096
135
+ - test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
136
+ - test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
137
+ - test/dummy/tmp/capybara/capybara-201207041532021383280359.html
138
+ - test/nesta-rails_test.rb
139
+ - test/test_helper.rb
140
+ homepage: http://nestacms.com
141
+ licenses: []
142
+ post_install_message:
143
+ rdoc_options: []
144
+ require_paths:
145
+ - lib
146
+ required_ruby_version: !ruby/object:Gem::Requirement
147
+ none: false
148
+ requirements:
149
+ - - ! '>='
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ segments:
153
+ - 0
154
+ hash: -3912361479944767214
155
+ required_rubygems_version: !ruby/object:Gem::Requirement
156
+ none: false
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ segments:
162
+ - 0
163
+ hash: -3912361479944767214
164
+ requirements: []
165
+ rubyforge_project:
166
+ rubygems_version: 1.8.23
167
+ signing_key:
168
+ specification_version: 3
169
+ summary: A Rails plugin for using Nesta CMS in Rails
170
+ test_files:
171
+ - test/dummy/app/assets/javascripts/application.js
172
+ - test/dummy/app/assets/stylesheets/application.css
173
+ - test/dummy/app/controllers/application_controller.rb
174
+ - test/dummy/app/controllers/nesta_controller.rb
175
+ - test/dummy/app/helpers/application_helper.rb
176
+ - test/dummy/app/helpers/nesta_helper.rb
177
+ - test/dummy/app/views/layouts/application.html.erb
178
+ - test/dummy/app/views/nesta/atom.haml
179
+ - test/dummy/app/views/nesta/page.html.haml
180
+ - test/dummy/app/views/nesta/sitemap.haml
181
+ - test/dummy/config/application.rb
182
+ - test/dummy/config/boot.rb
183
+ - test/dummy/config/database.yml
184
+ - test/dummy/config/environment.rb
185
+ - test/dummy/config/environments/development.rb
186
+ - test/dummy/config/environments/production.rb
187
+ - test/dummy/config/environments/test.rb
188
+ - test/dummy/config/initializers/backtrace_silencers.rb
189
+ - test/dummy/config/initializers/inflections.rb
190
+ - test/dummy/config/initializers/mime_types.rb
191
+ - test/dummy/config/initializers/nesta.rb
192
+ - test/dummy/config/initializers/secret_token.rb
193
+ - test/dummy/config/initializers/session_store.rb
194
+ - test/dummy/config/initializers/wrap_parameters.rb
195
+ - test/dummy/config/locales/en.yml
196
+ - test/dummy/config/routes.rb
197
+ - test/dummy/config.ru
198
+ - test/dummy/content/pages/page.mdown
199
+ - test/dummy/db/development.sqlite3
200
+ - test/dummy/db/test.sqlite3
201
+ - test/dummy/log/development.log
202
+ - test/dummy/log/test.log
203
+ - test/dummy/public/404.html
204
+ - test/dummy/public/422.html
205
+ - test/dummy/public/500.html
206
+ - test/dummy/public/favicon.ico
207
+ - test/dummy/Rakefile
208
+ - test/dummy/README.rdoc
209
+ - test/dummy/script/rails
210
+ - test/dummy/tmp/cache/assets/CB8/150/sprockets%2F54e70388adcf4fb25740386a034685e7
211
+ - test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
212
+ - test/dummy/tmp/cache/assets/D2C/B60/sprockets%2F5e6fb5a3a51f9123aed6ba502366a243
213
+ - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
214
+ - test/dummy/tmp/cache/assets/D33/7D0/sprockets%2F393634e12da60d1edd73c961eb04a38b
215
+ - test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
216
+ - test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
217
+ - test/dummy/tmp/cache/assets/DBF/3F0/sprockets%2F4724c5e5e48ef3fbdcf27e9fe9b97096
218
+ - test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
219
+ - test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
220
+ - test/dummy/tmp/capybara/capybara-201207041532021383280359.html
221
+ - test/nesta-rails_test.rb
222
+ - test/test_helper.rb