cadmus 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +8 -1
- data/Gemfile +2 -0
- data/README.md +6 -35
- data/Rakefile +33 -2
- data/app/helpers/cadmus/rendering_helper.rb +24 -0
- data/app/views/cadmus/layouts/_form.html.erb +11 -0
- data/app/views/cadmus/layouts/edit.html.erb +5 -0
- data/app/views/cadmus/layouts/index.html.erb +25 -0
- data/app/views/cadmus/layouts/new.html.erb +5 -0
- data/app/views/cadmus/pages/index.html.erb +2 -2
- data/app/views/cadmus/pages/show.html.erb +1 -1
- data/app/views/cadmus/partials/_form.html.erb +35 -0
- data/app/views/cadmus/partials/edit.html.erb +5 -0
- data/app/views/cadmus/partials/index.html.erb +25 -0
- data/app/views/cadmus/partials/new.html.erb +5 -0
- data/app/views/cadmus/partials/show.html.erb +4 -0
- data/bin/rake +16 -0
- data/cadmus.gemspec +2 -2
- data/lib/cadmus.rb +23 -6
- data/lib/cadmus/concerns/controller_with_parent.rb +70 -0
- data/lib/cadmus/concerns/liquid_template_field.rb +33 -0
- data/lib/cadmus/concerns/model_with_parent.rb +14 -0
- data/lib/cadmus/concerns/other_class_accessor.rb +50 -0
- data/lib/cadmus/engine.rb +9 -0
- data/lib/cadmus/layout.rb +32 -0
- data/lib/cadmus/layouts_controller.rb +70 -0
- data/lib/cadmus/page.rb +22 -7
- data/lib/cadmus/{controller_extensions.rb → pages_controller.rb} +8 -60
- data/lib/cadmus/partial.rb +32 -0
- data/lib/cadmus/partial_file_system.rb +28 -0
- data/lib/cadmus/partials_controller.rb +70 -0
- data/lib/cadmus/renderers.rb +1 -1
- data/lib/cadmus/version.rb +1 -1
- data/test/cadmus_test.rb +7 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +4 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/javascripts/cable.js +13 -0
- data/test/dummy/app/assets/javascripts/channels/.keep +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/application_record.rb +3 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +38 -0
- data/test/dummy/bin/update +29 -0
- data/test/dummy/bin/yarn +10 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/config/application.rb +18 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +54 -0
- data/test/dummy/config/environments/production.rb +91 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/test/dummy/config/initializers/assets.rb +14 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +33 -0
- data/test/dummy/config/puma.rb +56 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/config/secrets.yml +32 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/log/development.log +5 -0
- data/test/dummy/package.json +5 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/test_helper.rb +17 -0
- metadata +150 -9
- data/lib/cadmus/liquid_template_field.rb +0 -19
File without changes
|
File without changes
|
File without changes
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
2
|
+
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
3
|
+
require "rails/test_help"
|
4
|
+
|
5
|
+
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
6
|
+
# to be shown.
|
7
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
8
|
+
|
9
|
+
Rails::TestUnitReporter.executable = 'bin/test'
|
10
|
+
|
11
|
+
# Load fixtures from the engine
|
12
|
+
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
13
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
14
|
+
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
|
15
|
+
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files"
|
16
|
+
ActiveSupport::TestCase.fixtures :all
|
17
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cadmus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nat Budin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 5.0.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: 5.0.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: liquid
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -57,23 +57,104 @@ files:
|
|
57
57
|
- README.md
|
58
58
|
- Rakefile
|
59
59
|
- app/assets/javascripts/cadmus.previewablehtml.js
|
60
|
+
- app/helpers/cadmus/rendering_helper.rb
|
61
|
+
- app/views/cadmus/layouts/_form.html.erb
|
62
|
+
- app/views/cadmus/layouts/edit.html.erb
|
63
|
+
- app/views/cadmus/layouts/index.html.erb
|
64
|
+
- app/views/cadmus/layouts/new.html.erb
|
60
65
|
- app/views/cadmus/pages/_form.html.erb
|
61
66
|
- app/views/cadmus/pages/edit.html.erb
|
62
67
|
- app/views/cadmus/pages/index.html.erb
|
63
68
|
- app/views/cadmus/pages/new.html.erb
|
64
69
|
- app/views/cadmus/pages/show.html.erb
|
70
|
+
- app/views/cadmus/partials/_form.html.erb
|
71
|
+
- app/views/cadmus/partials/edit.html.erb
|
72
|
+
- app/views/cadmus/partials/index.html.erb
|
73
|
+
- app/views/cadmus/partials/new.html.erb
|
74
|
+
- app/views/cadmus/partials/show.html.erb
|
75
|
+
- bin/rake
|
65
76
|
- cadmus.gemspec
|
66
77
|
- lib/cadmus.rb
|
67
|
-
- lib/cadmus/
|
68
|
-
- lib/cadmus/liquid_template_field.rb
|
78
|
+
- lib/cadmus/concerns/controller_with_parent.rb
|
79
|
+
- lib/cadmus/concerns/liquid_template_field.rb
|
80
|
+
- lib/cadmus/concerns/model_with_parent.rb
|
81
|
+
- lib/cadmus/concerns/other_class_accessor.rb
|
82
|
+
- lib/cadmus/engine.rb
|
83
|
+
- lib/cadmus/layout.rb
|
84
|
+
- lib/cadmus/layouts_controller.rb
|
69
85
|
- lib/cadmus/markdown.rb
|
70
86
|
- lib/cadmus/page.rb
|
87
|
+
- lib/cadmus/pages_controller.rb
|
88
|
+
- lib/cadmus/partial.rb
|
89
|
+
- lib/cadmus/partial_file_system.rb
|
90
|
+
- lib/cadmus/partials_controller.rb
|
71
91
|
- lib/cadmus/renderers.rb
|
72
92
|
- lib/cadmus/routing.rb
|
73
93
|
- lib/cadmus/slugs.rb
|
74
94
|
- lib/cadmus/tags.rb
|
75
95
|
- lib/cadmus/version.rb
|
76
96
|
- lib/generators/cadmus/views_generator.rb
|
97
|
+
- test/cadmus_test.rb
|
98
|
+
- test/dummy/Rakefile
|
99
|
+
- test/dummy/app/assets/config/manifest.js
|
100
|
+
- test/dummy/app/assets/images/.keep
|
101
|
+
- test/dummy/app/assets/javascripts/application.js
|
102
|
+
- test/dummy/app/assets/javascripts/cable.js
|
103
|
+
- test/dummy/app/assets/javascripts/channels/.keep
|
104
|
+
- test/dummy/app/assets/stylesheets/application.css
|
105
|
+
- test/dummy/app/channels/application_cable/channel.rb
|
106
|
+
- test/dummy/app/channels/application_cable/connection.rb
|
107
|
+
- test/dummy/app/controllers/application_controller.rb
|
108
|
+
- test/dummy/app/controllers/concerns/.keep
|
109
|
+
- test/dummy/app/helpers/application_helper.rb
|
110
|
+
- test/dummy/app/jobs/application_job.rb
|
111
|
+
- test/dummy/app/mailers/application_mailer.rb
|
112
|
+
- test/dummy/app/models/application_record.rb
|
113
|
+
- test/dummy/app/models/concerns/.keep
|
114
|
+
- test/dummy/app/views/layouts/application.html.erb
|
115
|
+
- test/dummy/app/views/layouts/mailer.html.erb
|
116
|
+
- test/dummy/app/views/layouts/mailer.text.erb
|
117
|
+
- test/dummy/bin/bundle
|
118
|
+
- test/dummy/bin/rails
|
119
|
+
- test/dummy/bin/rake
|
120
|
+
- test/dummy/bin/setup
|
121
|
+
- test/dummy/bin/update
|
122
|
+
- test/dummy/bin/yarn
|
123
|
+
- test/dummy/config.ru
|
124
|
+
- test/dummy/config/application.rb
|
125
|
+
- test/dummy/config/boot.rb
|
126
|
+
- test/dummy/config/cable.yml
|
127
|
+
- test/dummy/config/database.yml
|
128
|
+
- test/dummy/config/environment.rb
|
129
|
+
- test/dummy/config/environments/development.rb
|
130
|
+
- test/dummy/config/environments/production.rb
|
131
|
+
- test/dummy/config/environments/test.rb
|
132
|
+
- test/dummy/config/initializers/application_controller_renderer.rb
|
133
|
+
- test/dummy/config/initializers/assets.rb
|
134
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
135
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
136
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
137
|
+
- test/dummy/config/initializers/inflections.rb
|
138
|
+
- test/dummy/config/initializers/mime_types.rb
|
139
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
140
|
+
- test/dummy/config/locales/en.yml
|
141
|
+
- test/dummy/config/puma.rb
|
142
|
+
- test/dummy/config/routes.rb
|
143
|
+
- test/dummy/config/secrets.yml
|
144
|
+
- test/dummy/config/spring.rb
|
145
|
+
- test/dummy/db/development.sqlite3
|
146
|
+
- test/dummy/db/test.sqlite3
|
147
|
+
- test/dummy/lib/assets/.keep
|
148
|
+
- test/dummy/log/.keep
|
149
|
+
- test/dummy/log/development.log
|
150
|
+
- test/dummy/package.json
|
151
|
+
- test/dummy/public/404.html
|
152
|
+
- test/dummy/public/422.html
|
153
|
+
- test/dummy/public/500.html
|
154
|
+
- test/dummy/public/apple-touch-icon-precomposed.png
|
155
|
+
- test/dummy/public/apple-touch-icon.png
|
156
|
+
- test/dummy/public/favicon.ico
|
157
|
+
- test/test_helper.rb
|
77
158
|
homepage: http://github.com/gively/cadmus
|
78
159
|
licenses:
|
79
160
|
- MIT
|
@@ -94,9 +175,69 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
175
|
version: '0'
|
95
176
|
requirements: []
|
96
177
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
178
|
+
rubygems_version: 2.7.3
|
98
179
|
signing_key:
|
99
180
|
specification_version: 4
|
100
181
|
summary: Embeddable CMS for Rails 3 apps
|
101
|
-
test_files:
|
102
|
-
|
182
|
+
test_files:
|
183
|
+
- test/cadmus_test.rb
|
184
|
+
- test/dummy/Rakefile
|
185
|
+
- test/dummy/app/assets/config/manifest.js
|
186
|
+
- test/dummy/app/assets/images/.keep
|
187
|
+
- test/dummy/app/assets/javascripts/application.js
|
188
|
+
- test/dummy/app/assets/javascripts/cable.js
|
189
|
+
- test/dummy/app/assets/javascripts/channels/.keep
|
190
|
+
- test/dummy/app/assets/stylesheets/application.css
|
191
|
+
- test/dummy/app/channels/application_cable/channel.rb
|
192
|
+
- test/dummy/app/channels/application_cable/connection.rb
|
193
|
+
- test/dummy/app/controllers/application_controller.rb
|
194
|
+
- test/dummy/app/controllers/concerns/.keep
|
195
|
+
- test/dummy/app/helpers/application_helper.rb
|
196
|
+
- test/dummy/app/jobs/application_job.rb
|
197
|
+
- test/dummy/app/mailers/application_mailer.rb
|
198
|
+
- test/dummy/app/models/application_record.rb
|
199
|
+
- test/dummy/app/models/concerns/.keep
|
200
|
+
- test/dummy/app/views/layouts/application.html.erb
|
201
|
+
- test/dummy/app/views/layouts/mailer.html.erb
|
202
|
+
- test/dummy/app/views/layouts/mailer.text.erb
|
203
|
+
- test/dummy/bin/bundle
|
204
|
+
- test/dummy/bin/rails
|
205
|
+
- test/dummy/bin/rake
|
206
|
+
- test/dummy/bin/setup
|
207
|
+
- test/dummy/bin/update
|
208
|
+
- test/dummy/bin/yarn
|
209
|
+
- test/dummy/config.ru
|
210
|
+
- test/dummy/config/application.rb
|
211
|
+
- test/dummy/config/boot.rb
|
212
|
+
- test/dummy/config/cable.yml
|
213
|
+
- test/dummy/config/database.yml
|
214
|
+
- test/dummy/config/environment.rb
|
215
|
+
- test/dummy/config/environments/development.rb
|
216
|
+
- test/dummy/config/environments/production.rb
|
217
|
+
- test/dummy/config/environments/test.rb
|
218
|
+
- test/dummy/config/initializers/application_controller_renderer.rb
|
219
|
+
- test/dummy/config/initializers/assets.rb
|
220
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
221
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
222
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
223
|
+
- test/dummy/config/initializers/inflections.rb
|
224
|
+
- test/dummy/config/initializers/mime_types.rb
|
225
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
226
|
+
- test/dummy/config/locales/en.yml
|
227
|
+
- test/dummy/config/puma.rb
|
228
|
+
- test/dummy/config/routes.rb
|
229
|
+
- test/dummy/config/secrets.yml
|
230
|
+
- test/dummy/config/spring.rb
|
231
|
+
- test/dummy/db/development.sqlite3
|
232
|
+
- test/dummy/db/test.sqlite3
|
233
|
+
- test/dummy/lib/assets/.keep
|
234
|
+
- test/dummy/log/.keep
|
235
|
+
- test/dummy/log/development.log
|
236
|
+
- test/dummy/package.json
|
237
|
+
- test/dummy/public/404.html
|
238
|
+
- test/dummy/public/422.html
|
239
|
+
- test/dummy/public/500.html
|
240
|
+
- test/dummy/public/apple-touch-icon-precomposed.png
|
241
|
+
- test/dummy/public/apple-touch-icon.png
|
242
|
+
- test/dummy/public/favicon.ico
|
243
|
+
- test/test_helper.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Cadmus
|
2
|
-
module LiquidTemplateField
|
3
|
-
extend ActiveSupport::Concern
|
4
|
-
|
5
|
-
module ClassMethods
|
6
|
-
def liquid_template_field(method_name, field_name)
|
7
|
-
define_method method_name do
|
8
|
-
content = send(field_name)
|
9
|
-
|
10
|
-
begin
|
11
|
-
Liquid::Template.parse(content)
|
12
|
-
rescue Exception => exception
|
13
|
-
Liquid::Template.parse("#{exception.class.name}: #{exception.message}")
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|