push_type_core 0.9.5 → 0.10.0.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +1 -1
- data/app/controllers/concerns/push_type/filterable.rb +12 -27
- data/app/controllers/front_end_controller.rb +3 -3
- data/app/helpers/push_type/media_url_helper.rb +25 -0
- data/app/helpers/push_type/node_url_helper.rb +15 -0
- data/app/models/concerns/push_type/nestable.rb +14 -0
- data/app/views/push_type/setup.html.erb +1 -3
- data/lib/generators/push_type/install/install_generator.rb +19 -1
- data/lib/push_type/core/engine.rb +13 -2
- data/lib/push_type/core.rb +15 -1
- data/lib/push_type/rails/routes.rb +26 -19
- data/lib/push_type/testing/setup.rb +0 -4
- data/lib/push_type/version.rb +1 -1
- data/test/controllers/front_end_controller_test.rb +4 -2
- data/test/dummy/config/initializers/push_type.rb +1 -1
- data/test/dummy/config/routes.rb +10 -1
- data/test/dummy/config/secrets.yml +2 -2
- data/test/dummy/db/schema.rb +1 -1
- data/test/dummy/log/test.log +7791 -7607
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/VT/VT0xDh7gu1K3uYidKny01QY0vyaeQDbHoPICVlZmQQc.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/YC/YCmmKydZG1FxHcFZiHcaSZhbT44fV2vJglp5i1fOvAc.cache +0 -0
- data/test/dummy/tmp/generators/config/initializers/push_type.rb +50 -0
- data/test/dummy/tmp/generators/config/routes.rb +15 -0
- data/test/helpers/push_type/media_url_helper_test.rb +32 -0
- data/test/helpers/push_type/node_url_helper_test.rb +19 -0
- data/test/lib/push_type/core_test.rb +1 -1
- data/test/models/concerns/push_type/nestable_test.rb +20 -0
- data/test/models/push_type/node_test.rb +4 -4
- metadata +30 -24
- data/test/dummy/tmp/generators/app/models/home_page.rb +0 -12
- data/test/dummy/tmp/generators/app/views/nodes/home_page.html.erb +0 -13
- /data/test/dummy/db/migrate/{20161024153920_create_push_type_users.push_type.rb → 20161116222801_create_push_type_users.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20161024153921_create_push_type_nodes.push_type.rb → 20161116222802_create_push_type_nodes.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20161024153922_create_push_type_node_hierarchies.push_type.rb → 20161116222803_create_push_type_node_hierarchies.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20161024153923_create_push_type_assets.push_type.rb → 20161116222804_create_push_type_assets.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20161024153924_add_field_store_default_values.push_type.rb → 20161116222805_add_field_store_default_values.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20161024153925_drop_legacy_push_type_taxonomies.push_type.rb → 20161116222806_drop_legacy_push_type_taxonomies.push_type.rb} +0 -0
- /data/test/dummy/tmp/cache/assets/sprockets/v3.0/{o_/o_sN8dpdlBAPBdNlPQdGh2ZlzC13OFBPyj6CC2iAQ6g.cache → 3D/3DiLOA9ufk-bm1-9-hOFWYmGKMgJWxv8xBbSS2pKDN4.cache} +0 -0
- /data/test/dummy/tmp/cache/assets/sprockets/v3.0/{A8/A8KFzRgbkc1okm6dqN_A9dp76mPyemmS15wUg70Kr2U.cache → tn/tnKqEfyTQNEMuWAhX3xym0TbSoUwIe8XlKbKLmN8oPA.cache} +0 -0
data/test/dummy/tmp/cache/assets/sprockets/v3.0/VT/VT0xDh7gu1K3uYidKny01QY0vyaeQDbHoPICVlZmQQc.cache
CHANGED
Binary file
|
data/test/dummy/tmp/cache/assets/sprockets/v3.0/YC/YCmmKydZG1FxHcFZiHcaSZhbT44fV2vJglp5i1fOvAc.cache
CHANGED
Binary file
|
@@ -0,0 +1,50 @@
|
|
1
|
+
PushType.setup do |config|
|
2
|
+
|
3
|
+
# By default all node types can be placed at the root of the
|
4
|
+
# content tree. Alternatively, set an array of node type symbols
|
5
|
+
# to whiltelist acceptable root nodes.
|
6
|
+
config.root_nodes = :all
|
7
|
+
|
8
|
+
# Set the slug of the node that the `NodesFrontEndContoller` will
|
9
|
+
# render when visting the root URL of the site (the homepage).
|
10
|
+
# This setting can be overridden in config/routes.rb.
|
11
|
+
config.home_slug = 'home'
|
12
|
+
|
13
|
+
# Set an array of node type symbols which will not be exposed to
|
14
|
+
# the `NodesFrontEndContoller`. These nodes will not be accessible
|
15
|
+
# through their permalink.
|
16
|
+
config.unexposed_nodes = []
|
17
|
+
|
18
|
+
# Media styles allow you to predefine a collection of geometry
|
19
|
+
# strings for resizing images on the fly with the `Asset#media`
|
20
|
+
# method. Example: `image.media(:large)`
|
21
|
+
config.media_styles = {
|
22
|
+
large: '1024x1024>',
|
23
|
+
medium: '512x512>',
|
24
|
+
small: '256x256>'
|
25
|
+
}
|
26
|
+
|
27
|
+
# Configure the email address to be used as the "from" address
|
28
|
+
# for PushType's build in mailers.
|
29
|
+
config.mailer_sender = 'pushtype@example.com'
|
30
|
+
|
31
|
+
# PushType uses Dragonfly for managing uploaded images/assets.
|
32
|
+
# Dragonfly datastore configuration
|
33
|
+
config.dragonfly_datastore = :file
|
34
|
+
config.dragonfly_datastore_options = {
|
35
|
+
root_path: Rails.root.join('public/system/dragonfly', Rails.env),
|
36
|
+
server_root: Rails.root.join('public')
|
37
|
+
}
|
38
|
+
|
39
|
+
# For S3 storage, remember to add to Gemfile:
|
40
|
+
# gem 'dragonfly-s3_data_store'
|
41
|
+
# config.dragonfly_datastore = :s3
|
42
|
+
# config.dragonfly_datastore_options = {
|
43
|
+
# bucket_name: ENV['S3_BUCKET'],
|
44
|
+
# access_key_id: ENV['S3_ACCESS_KEY_ID'],
|
45
|
+
# secret_access_key: ENV['SECRET_ACCESS_KEY_ID']
|
46
|
+
# }
|
47
|
+
|
48
|
+
# config.dragonfly_secret = 'dc1920e3931b436af827ff34f1699c971fcb6a83c5ca566e2e5991d81c65bd97'
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
|
3
|
+
# Mount all the registered PushType Rails Engines. This should be placed
|
4
|
+
# at the end of your routes.rb file to ensure your application routes are
|
5
|
+
# not overidden by PushType.
|
6
|
+
#
|
7
|
+
# Overide the default mount points by passing a hash of options.
|
8
|
+
# Example:
|
9
|
+
#
|
10
|
+
# mount_push_type admin: 'cms', front_end: 'blog'
|
11
|
+
#
|
12
|
+
mount_push_type
|
13
|
+
|
14
|
+
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
15
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module PushType
|
4
|
+
class MediaUrlHelperTest < ActionView::TestCase
|
5
|
+
|
6
|
+
let(:asset) { FactoryGirl.create :asset }
|
7
|
+
|
8
|
+
describe '#media_path' do
|
9
|
+
it { media_path(asset).must_equal "/media/#{ asset.file_uid }" }
|
10
|
+
it { media_path('test2.jpg').must_equal '/media/test2.jpg' }
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#media_url' do
|
14
|
+
it { media_url(asset).must_equal "http://test.host/media/#{ asset.file_uid }" }
|
15
|
+
it { media_url('test2.jpg').must_equal 'http://test.host/media/test2.jpg' }
|
16
|
+
end
|
17
|
+
|
18
|
+
describe 'with asset_host set' do
|
19
|
+
it '#media_path' do
|
20
|
+
stub :compute_asset_host, 'https://cdn.test.host' do
|
21
|
+
media_path(asset).must_equal "https://cdn.test.host/media/#{ asset.file_uid }"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
it '#media_url' do
|
25
|
+
stub :compute_asset_host, 'https://cdn.test.host' do
|
26
|
+
media_url(asset).must_equal "https://cdn.test.host/media/#{ asset.file_uid }"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module PushType
|
4
|
+
class NodeUrlHelperTest < ActionView::TestCase
|
5
|
+
|
6
|
+
let(:node) { FactoryGirl.create :node, slug: 'test1' }
|
7
|
+
|
8
|
+
describe '#node_path' do
|
9
|
+
it { node_path(node).must_equal '/test1' }
|
10
|
+
it { node_path('test2').must_equal '/test2' }
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#node_url' do
|
14
|
+
it { node_url(node).must_equal 'http://test.host/test1' }
|
15
|
+
it { node_url('test2').must_equal 'http://test.host/test2' }
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -76,7 +76,27 @@ module PushType
|
|
76
76
|
it { page.wont_be :sortable? }
|
77
77
|
it { page.children.order_values.must_equal ['published_at DESC', 'created_at DESC'] }
|
78
78
|
end
|
79
|
+
end
|
80
|
+
|
81
|
+
describe 'parent validation' do
|
82
|
+
let(:parent) { TestPage.create title: 'parent', slug: 'parent' }
|
83
|
+
subject { Page.new title: 'child', slug: 'child', parent: parent }
|
79
84
|
|
85
|
+
describe 'with invalid child' do
|
86
|
+
before { TestPage.has_child_nodes false }
|
87
|
+
it 'should not be valid' do
|
88
|
+
subject.wont_be :valid?
|
89
|
+
subject.errors.keys.must_include :parent_id
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
describe 'with valid child' do
|
94
|
+
before { TestPage.has_child_nodes :page }
|
95
|
+
it 'should be valid' do
|
96
|
+
subject.must_be :valid?
|
97
|
+
subject.errors.keys.wont_include :parent_id
|
98
|
+
end
|
99
|
+
end
|
80
100
|
end
|
81
101
|
|
82
102
|
end
|
@@ -20,14 +20,14 @@ module PushType
|
|
20
20
|
|
21
21
|
describe '#permalink' do
|
22
22
|
before do
|
23
|
-
%w(one two three).each { |slug| @node = FactoryGirl.
|
23
|
+
%w(one two three).each { |slug| @node = FactoryGirl.build(:node, slug: slug, parent: @node); @node.save(validate: false); @node }
|
24
24
|
end
|
25
25
|
it { @node.permalink.must_equal 'one/two/three' }
|
26
26
|
end
|
27
27
|
|
28
28
|
describe '#orphan?' do
|
29
29
|
let(:parent) { FactoryGirl.create :node }
|
30
|
-
let(:child) { FactoryGirl.
|
30
|
+
let(:child) { n = FactoryGirl.build(:node, parent: parent); n.save(validate: false); n }
|
31
31
|
before { child && parent.trash! }
|
32
32
|
it { parent.wont_be :orphan? }
|
33
33
|
it { child.must_be :orphan? }
|
@@ -35,10 +35,10 @@ module PushType
|
|
35
35
|
|
36
36
|
describe '#trash!' do
|
37
37
|
let(:parent) { FactoryGirl.create :node }
|
38
|
-
let(:child) { FactoryGirl.
|
38
|
+
let(:child) { n = FactoryGirl.build(:node, parent: parent); n.save(validate: false); n }
|
39
39
|
before { child && parent.trash! }
|
40
40
|
it { parent.must_be :trashed? }
|
41
|
-
it {
|
41
|
+
it { child.reload.must_be :trashed? }
|
42
42
|
end
|
43
43
|
|
44
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: push_type_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0.beta.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Russell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -124,6 +124,8 @@ files:
|
|
124
124
|
- app/fields/push_type/time_field.rb
|
125
125
|
- app/fields/push_type/wysiwyg_field.rb
|
126
126
|
- app/helpers/push_type/application_helper.rb
|
127
|
+
- app/helpers/push_type/media_url_helper.rb
|
128
|
+
- app/helpers/push_type/node_url_helper.rb
|
127
129
|
- app/models/concerns/push_type/customizable.rb
|
128
130
|
- app/models/concerns/push_type/nestable.rb
|
129
131
|
- app/models/concerns/push_type/presentable.rb
|
@@ -240,12 +242,12 @@ files:
|
|
240
242
|
- test/dummy/config/routes.rb
|
241
243
|
- test/dummy/config/secrets.yml
|
242
244
|
- test/dummy/config/spring.rb
|
243
|
-
- test/dummy/db/migrate/
|
244
|
-
- test/dummy/db/migrate/
|
245
|
-
- test/dummy/db/migrate/
|
246
|
-
- test/dummy/db/migrate/
|
247
|
-
- test/dummy/db/migrate/
|
248
|
-
- test/dummy/db/migrate/
|
245
|
+
- test/dummy/db/migrate/20161116222801_create_push_type_users.push_type.rb
|
246
|
+
- test/dummy/db/migrate/20161116222802_create_push_type_nodes.push_type.rb
|
247
|
+
- test/dummy/db/migrate/20161116222803_create_push_type_node_hierarchies.push_type.rb
|
248
|
+
- test/dummy/db/migrate/20161116222804_create_push_type_assets.push_type.rb
|
249
|
+
- test/dummy/db/migrate/20161116222805_add_field_store_default_values.push_type.rb
|
250
|
+
- test/dummy/db/migrate/20161116222806_drop_legacy_push_type_taxonomies.push_type.rb
|
249
251
|
- test/dummy/db/schema.rb
|
250
252
|
- test/dummy/db/seeds.rb
|
251
253
|
- test/dummy/log/test.log
|
@@ -256,9 +258,9 @@ files:
|
|
256
258
|
- test/dummy/public/apple-touch-icon.png
|
257
259
|
- test/dummy/public/favicon.ico
|
258
260
|
- test/dummy/public/robots.txt
|
261
|
+
- test/dummy/tmp/cache/assets/sprockets/v3.0/3D/3DiLOA9ufk-bm1-9-hOFWYmGKMgJWxv8xBbSS2pKDN4.cache
|
259
262
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/4V/4V4h35yOMMC6CxoIsHSNeCpxS4Ljmip4Hl2_ZZ0CDac.cache
|
260
263
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/9v/9vnNjAebssmz7XPUIgssBZbkNcX-l446wdMdLtHbbyQ.cache
|
261
|
-
- test/dummy/tmp/cache/assets/sprockets/v3.0/A8/A8KFzRgbkc1okm6dqN_A9dp76mPyemmS15wUg70Kr2U.cache
|
262
264
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/Bh/Bhp0_DYasdK0hX0mRKWCZpQTU5CN7XMmpm_kLGhQ-mY.cache
|
263
265
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/Hc/HcdeXL_NQCzwkHwn5IOfrZzULmR3Di7_rbRmKJcUxd0.cache
|
264
266
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/IU/IUrx_cz11W6a7Js_I-zzSgQEpw58K2zYnJsvznf71Pg.cache
|
@@ -274,10 +276,10 @@ files:
|
|
274
276
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/n-/n-AVacTIOztKN9mPiB3ZELfidOz1W5urnRN4AsSujqA.cache
|
275
277
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache
|
276
278
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache
|
277
|
-
- test/dummy/tmp/cache/assets/sprockets/v3.0/o_/o_sN8dpdlBAPBdNlPQdGh2ZlzC13OFBPyj6CC2iAQ6g.cache
|
278
279
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/qN/qNOz7Rvtjul20-XTH3jifHnv-ypnSVomm2Q1nckbmqQ.cache
|
279
|
-
- test/dummy/tmp/
|
280
|
-
- test/dummy/tmp/generators/
|
280
|
+
- test/dummy/tmp/cache/assets/sprockets/v3.0/tn/tnKqEfyTQNEMuWAhX3xym0TbSoUwIe8XlKbKLmN8oPA.cache
|
281
|
+
- test/dummy/tmp/generators/config/initializers/push_type.rb
|
282
|
+
- test/dummy/tmp/generators/config/routes.rb
|
281
283
|
- test/fields/push_type/asset_field_test.rb
|
282
284
|
- test/fields/push_type/boolean_field_test.rb
|
283
285
|
- test/fields/push_type/date_field_test.rb
|
@@ -297,6 +299,8 @@ files:
|
|
297
299
|
- test/files/document.pdf
|
298
300
|
- test/files/image.png
|
299
301
|
- test/files/video.mp4
|
302
|
+
- test/helpers/push_type/media_url_helper_test.rb
|
303
|
+
- test/helpers/push_type/node_url_helper_test.rb
|
300
304
|
- test/lib/generators/push_type/field_generator_test.rb
|
301
305
|
- test/lib/generators/push_type/install_generator_test.rb
|
302
306
|
- test/lib/generators/push_type/node_generator_test.rb
|
@@ -339,9 +343,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
339
343
|
version: '0'
|
340
344
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
341
345
|
requirements:
|
342
|
-
- - "
|
346
|
+
- - ">"
|
343
347
|
- !ruby/object:Gem::Version
|
344
|
-
version:
|
348
|
+
version: 1.3.1
|
345
349
|
requirements: []
|
346
350
|
rubyforge_project:
|
347
351
|
rubygems_version: 2.5.1
|
@@ -395,12 +399,12 @@ test_files:
|
|
395
399
|
- test/dummy/config/secrets.yml
|
396
400
|
- test/dummy/config/spring.rb
|
397
401
|
- test/dummy/config.ru
|
398
|
-
- test/dummy/db/migrate/
|
399
|
-
- test/dummy/db/migrate/
|
400
|
-
- test/dummy/db/migrate/
|
401
|
-
- test/dummy/db/migrate/
|
402
|
-
- test/dummy/db/migrate/
|
403
|
-
- test/dummy/db/migrate/
|
402
|
+
- test/dummy/db/migrate/20161116222801_create_push_type_users.push_type.rb
|
403
|
+
- test/dummy/db/migrate/20161116222802_create_push_type_nodes.push_type.rb
|
404
|
+
- test/dummy/db/migrate/20161116222803_create_push_type_node_hierarchies.push_type.rb
|
405
|
+
- test/dummy/db/migrate/20161116222804_create_push_type_assets.push_type.rb
|
406
|
+
- test/dummy/db/migrate/20161116222805_add_field_store_default_values.push_type.rb
|
407
|
+
- test/dummy/db/migrate/20161116222806_drop_legacy_push_type_taxonomies.push_type.rb
|
404
408
|
- test/dummy/db/schema.rb
|
405
409
|
- test/dummy/db/seeds.rb
|
406
410
|
- test/dummy/log/test.log
|
@@ -413,9 +417,9 @@ test_files:
|
|
413
417
|
- test/dummy/public/robots.txt
|
414
418
|
- test/dummy/Rakefile
|
415
419
|
- test/dummy/README.md
|
420
|
+
- test/dummy/tmp/cache/assets/sprockets/v3.0/3D/3DiLOA9ufk-bm1-9-hOFWYmGKMgJWxv8xBbSS2pKDN4.cache
|
416
421
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/4V/4V4h35yOMMC6CxoIsHSNeCpxS4Ljmip4Hl2_ZZ0CDac.cache
|
417
422
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/9v/9vnNjAebssmz7XPUIgssBZbkNcX-l446wdMdLtHbbyQ.cache
|
418
|
-
- test/dummy/tmp/cache/assets/sprockets/v3.0/A8/A8KFzRgbkc1okm6dqN_A9dp76mPyemmS15wUg70Kr2U.cache
|
419
423
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/Bh/Bhp0_DYasdK0hX0mRKWCZpQTU5CN7XMmpm_kLGhQ-mY.cache
|
420
424
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/bY/bY6iFXjb4GQ6vQhngFtUw77t8vuS5vo_X5acqWO_pxU.cache
|
421
425
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/co/coq7bDnirlRe5Ubmus12avMdwG5atjZpOOc0fS6JeLs.cache
|
@@ -426,15 +430,15 @@ test_files:
|
|
426
430
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/n-/n-AVacTIOztKN9mPiB3ZELfidOz1W5urnRN4AsSujqA.cache
|
427
431
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache
|
428
432
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache
|
429
|
-
- test/dummy/tmp/cache/assets/sprockets/v3.0/o_/o_sN8dpdlBAPBdNlPQdGh2ZlzC13OFBPyj6CC2iAQ6g.cache
|
430
433
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/qN/qNOz7Rvtjul20-XTH3jifHnv-ypnSVomm2Q1nckbmqQ.cache
|
431
434
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/Rw/RwQxsln4oXkMhlSGY35qm1h9zc0CS5B2ArFvT7oG2a4.cache
|
435
|
+
- test/dummy/tmp/cache/assets/sprockets/v3.0/tn/tnKqEfyTQNEMuWAhX3xym0TbSoUwIe8XlKbKLmN8oPA.cache
|
432
436
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/VT/VT0xDh7gu1K3uYidKny01QY0vyaeQDbHoPICVlZmQQc.cache
|
433
437
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/VT/vTiVJlF_TNDD87ZATW7HFaFu8lZXC3ZvESmDE-QbR6k.cache
|
434
438
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/XM/XM3DBlByPxBkHmk_0YnTMQRksSqlxv1pXVEhlfudgp8.cache
|
435
439
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/YC/YCmmKydZG1FxHcFZiHcaSZhbT44fV2vJglp5i1fOvAc.cache
|
436
|
-
- test/dummy/tmp/generators/
|
437
|
-
- test/dummy/tmp/generators/
|
440
|
+
- test/dummy/tmp/generators/config/initializers/push_type.rb
|
441
|
+
- test/dummy/tmp/generators/config/routes.rb
|
438
442
|
- test/fields/push_type/asset_field_test.rb
|
439
443
|
- test/fields/push_type/boolean_field_test.rb
|
440
444
|
- test/fields/push_type/date_field_test.rb
|
@@ -454,6 +458,8 @@ test_files:
|
|
454
458
|
- test/files/document.pdf
|
455
459
|
- test/files/image.png
|
456
460
|
- test/files/video.mp4
|
461
|
+
- test/helpers/push_type/media_url_helper_test.rb
|
462
|
+
- test/helpers/push_type/node_url_helper_test.rb
|
457
463
|
- test/lib/generators/push_type/field_generator_test.rb
|
458
464
|
- test/lib/generators/push_type/install_generator_test.rb
|
459
465
|
- test/lib/generators/push_type/node_generator_test.rb
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class HomePage < PushType::Node
|
2
|
-
|
3
|
-
# By default a node can have children of any other node type.
|
4
|
-
# Optionally pass a list of acceptable node types or prevent
|
5
|
-
# any descendents by passing false.
|
6
|
-
has_child_nodes :all
|
7
|
-
|
8
|
-
# Model the content by adding custom fields to the node.
|
9
|
-
field :foo, :string
|
10
|
-
field :bar, :text
|
11
|
-
|
12
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<h1><%= @node.title %></h1>
|
2
|
-
<p>This is a generated HomePage template.</p>
|
3
|
-
<p>Find me at: app/views/nodes/home_page.html.erb</p>
|
4
|
-
|
5
|
-
<div>
|
6
|
-
<div>Foo:</div>
|
7
|
-
<div><%= @node.foo %></div>
|
8
|
-
</div>
|
9
|
-
<div>
|
10
|
-
<div>Bar:</div>
|
11
|
-
<div><%= @node.bar %></div>
|
12
|
-
</div>
|
13
|
-
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|