push_type_core 0.7.0.beta.1 → 0.7.0
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 +4 -4
- data/app/fields/push_type/matrix_field.rb +1 -1
- data/app/fields/push_type/repeater_field.rb +2 -2
- data/app/models/push_type/structure.rb +4 -0
- data/lib/generators/push_type/install/templates/push_type.rb +0 -5
- data/lib/generators/push_type/taxonomy/taxonomy_generator.rb +1 -1
- data/lib/push_type/version.rb +1 -1
- data/test/dummy/config/initializers/push_type.rb +1 -6
- data/test/dummy/config/secrets.yml +2 -2
- data/test/dummy/db/migrate/{20160108132348_create_push_type_users.push_type.rb → 20160122151524_create_push_type_users.push_type.rb} +0 -0
- data/test/dummy/db/migrate/{20160108132349_create_push_type_nodes.push_type.rb → 20160122151525_create_push_type_nodes.push_type.rb} +0 -0
- data/test/dummy/db/migrate/{20160108132350_create_push_type_node_hierarchies.push_type.rb → 20160122151526_create_push_type_node_hierarchies.push_type.rb} +0 -0
- data/test/dummy/db/migrate/{20160108132351_create_push_type_assets.push_type.rb → 20160122151527_create_push_type_assets.push_type.rb} +0 -0
- data/test/dummy/db/migrate/{20160108132352_create_push_type_taxonomies.push_type.rb → 20160122151528_create_push_type_taxonomies.push_type.rb} +0 -0
- data/test/dummy/db/migrate/{20160108132353_create_push_type_taxonomy_hierarchies.push_type.rb → 20160122151529_create_push_type_taxonomy_hierarchies.push_type.rb} +0 -0
- data/test/dummy/db/migrate/{20160108132354_add_field_store_default_values.push_type.rb → 20160122151530_add_field_store_default_values.push_type.rb} +0 -0
- data/test/dummy/db/schema.rb +1 -1
- data/test/dummy/log/test.log +8903 -8903
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/0ANSDcZJu9gPyqtYPIW729qm1kriQ29Vn9LU8T2SGQU.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{8FGH_ku24FOYEa6ACm3vyk_rZwODpSzv3MjZU4irm7M.cache → A0UfNVcNn48aSCOiAvcHrJ1BASyXJCELidVIQ6drqQM.cache} +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{o8jETQIOAUNl34ED3ZTGdlVAlYRSl8zt6mfx4Wr1_Hs.cache → RLSLZQ8zubBDFwRzJo2WPXEPjX3gpp-T1h5FK-UnAYo.cache} +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/_d65qW7wxRtKVSYpmfSenECz5QUWVI9pppUgV7TA1Rk.cache +0 -0
- data/test/dummy/tmp/generators/config/initializers/push_type.rb +50 -0
- data/test/dummy/tmp/generators/config/routes.rb +59 -0
- data/test/fields/push_type/matrix_field_test.rb +7 -3
- metadata +26 -26
- data/test/dummy/tmp/generators/app/models/category.rb +0 -7
- data/test/dummy/tmp/generators/app/views/taxonomies/category.html.erb +0 -3
Binary file
|
File without changes
|
File without changes
|
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 = '8c3e3fb27e27c63b1346a970c95d8dc6b11bae9f219136fdc81c3c18dd7c62e6'
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
|
3
|
+
mount_push_type
|
4
|
+
|
5
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
6
|
+
# See how all your routes lay out with "rake routes".
|
7
|
+
|
8
|
+
# You can have the root of your site routed with "root"
|
9
|
+
# root 'welcome#index'
|
10
|
+
|
11
|
+
# Example of regular route:
|
12
|
+
# get 'products/:id' => 'catalog#view'
|
13
|
+
|
14
|
+
# Example of named route that can be invoked with purchase_url(id: product.id)
|
15
|
+
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
16
|
+
|
17
|
+
# Example resource route (maps HTTP verbs to controller actions automatically):
|
18
|
+
# resources :products
|
19
|
+
|
20
|
+
# Example resource route with options:
|
21
|
+
# resources :products do
|
22
|
+
# member do
|
23
|
+
# get 'short'
|
24
|
+
# post 'toggle'
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
# collection do
|
28
|
+
# get 'sold'
|
29
|
+
# end
|
30
|
+
# end
|
31
|
+
|
32
|
+
# Example resource route with sub-resources:
|
33
|
+
# resources :products do
|
34
|
+
# resources :comments, :sales
|
35
|
+
# resource :seller
|
36
|
+
# end
|
37
|
+
|
38
|
+
# Example resource route with more complex sub-resources:
|
39
|
+
# resources :products do
|
40
|
+
# resources :comments
|
41
|
+
# resources :sales do
|
42
|
+
# get 'recent', on: :collection
|
43
|
+
# end
|
44
|
+
# end
|
45
|
+
|
46
|
+
# Example resource route with concerns:
|
47
|
+
# concern :toggleable do
|
48
|
+
# post 'toggle'
|
49
|
+
# end
|
50
|
+
# resources :posts, concerns: :toggleable
|
51
|
+
# resources :photos, concerns: :toggleable
|
52
|
+
|
53
|
+
# Example resource route within a namespace:
|
54
|
+
# namespace :admin do
|
55
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
56
|
+
# # (app/controllers/admin/products_controller.rb)
|
57
|
+
# resources :products
|
58
|
+
# end
|
59
|
+
end
|
@@ -3,15 +3,19 @@ require 'test_helper'
|
|
3
3
|
module PushType
|
4
4
|
class MatrixFieldTest < ActiveSupport::TestCase
|
5
5
|
|
6
|
+
class TestLocation < PushType::Structure
|
7
|
+
field :key
|
8
|
+
end
|
9
|
+
|
6
10
|
class TestPage < PushType::Node
|
7
11
|
field :foo, :matrix, grid: false do
|
8
12
|
field :key, :string
|
9
13
|
field :val, :text
|
10
14
|
end
|
11
|
-
field :bar, :matrix, class:
|
15
|
+
field :bar, :matrix, class: 'push_type/matrix_field_test/test_location'
|
12
16
|
end
|
13
17
|
|
14
|
-
let(:node) { TestPage.create FactoryGirl.attributes_for(:node, foo: val, bar: [
|
18
|
+
let(:node) { TestPage.create FactoryGirl.attributes_for(:node, foo: val, bar: [{key: '123'}]) }
|
15
19
|
let(:val) { [{ key: 'a', val: 'b' }, { key: 'x', val: 'y' }] }
|
16
20
|
let(:field) { node.fields[:foo] }
|
17
21
|
|
@@ -24,7 +28,7 @@ module PushType
|
|
24
28
|
it { field.value[0].key.must_equal 'a' }
|
25
29
|
it { field.value[1].val.must_equal 'y' }
|
26
30
|
|
27
|
-
it { node.bar.first.must_be_instance_of
|
31
|
+
it { node.bar.first.must_be_instance_of TestLocation }
|
28
32
|
it { node.bar.first.class.ancestors.must_include PushType::Structure }
|
29
33
|
it { node.fields[:bar].grid?.must_equal true }
|
30
34
|
it { node.fields[:foo].grid?.must_equal false }
|
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.7.0
|
4
|
+
version: 0.7.0
|
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-01-
|
11
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -280,13 +280,13 @@ files:
|
|
280
280
|
- test/dummy/config/locales/en.yml
|
281
281
|
- test/dummy/config/routes.rb
|
282
282
|
- test/dummy/config/secrets.yml
|
283
|
-
- test/dummy/db/migrate/
|
284
|
-
- test/dummy/db/migrate/
|
285
|
-
- test/dummy/db/migrate/
|
286
|
-
- test/dummy/db/migrate/
|
287
|
-
- test/dummy/db/migrate/
|
288
|
-
- test/dummy/db/migrate/
|
289
|
-
- test/dummy/db/migrate/
|
283
|
+
- test/dummy/db/migrate/20160122151524_create_push_type_users.push_type.rb
|
284
|
+
- test/dummy/db/migrate/20160122151525_create_push_type_nodes.push_type.rb
|
285
|
+
- test/dummy/db/migrate/20160122151526_create_push_type_node_hierarchies.push_type.rb
|
286
|
+
- test/dummy/db/migrate/20160122151527_create_push_type_assets.push_type.rb
|
287
|
+
- test/dummy/db/migrate/20160122151528_create_push_type_taxonomies.push_type.rb
|
288
|
+
- test/dummy/db/migrate/20160122151529_create_push_type_taxonomy_hierarchies.push_type.rb
|
289
|
+
- test/dummy/db/migrate/20160122151530_add_field_store_default_values.push_type.rb
|
290
290
|
- test/dummy/db/schema.rb
|
291
291
|
- test/dummy/db/seeds.rb
|
292
292
|
- test/dummy/log/test.log
|
@@ -298,13 +298,13 @@ files:
|
|
298
298
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/0ANSDcZJu9gPyqtYPIW729qm1kriQ29Vn9LU8T2SGQU.cache
|
299
299
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/3T6ioyhwSsEzte_a9viHBvfmuKgORQ019srIEoUYkVs.cache
|
300
300
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache
|
301
|
-
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/
|
301
|
+
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/A0UfNVcNn48aSCOiAvcHrJ1BASyXJCELidVIQ6drqQM.cache
|
302
302
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/IYzwMwq7DWWSuojH6oXsrP__pcD7O8TQieMFSzQiwnc.cache
|
303
303
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache
|
304
|
+
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/RLSLZQ8zubBDFwRzJo2WPXEPjX3gpp-T1h5FK-UnAYo.cache
|
304
305
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/_d65qW7wxRtKVSYpmfSenECz5QUWVI9pppUgV7TA1Rk.cache
|
305
|
-
- test/dummy/tmp/
|
306
|
-
- test/dummy/tmp/generators/
|
307
|
-
- test/dummy/tmp/generators/app/views/taxonomies/category.html.erb
|
306
|
+
- test/dummy/tmp/generators/config/initializers/push_type.rb
|
307
|
+
- test/dummy/tmp/generators/config/routes.rb
|
308
308
|
- test/fields/push_type/asset_field_test.rb
|
309
309
|
- test/fields/push_type/boolean_field_test.rb
|
310
310
|
- test/fields/push_type/date_field_test.rb
|
@@ -367,9 +367,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
367
367
|
version: '0'
|
368
368
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
369
369
|
requirements:
|
370
|
-
- - "
|
370
|
+
- - ">="
|
371
371
|
- !ruby/object:Gem::Version
|
372
|
-
version:
|
372
|
+
version: '0'
|
373
373
|
requirements: []
|
374
374
|
rubyforge_project:
|
375
375
|
rubygems_version: 2.4.2
|
@@ -412,13 +412,13 @@ test_files:
|
|
412
412
|
- test/dummy/config/routes.rb
|
413
413
|
- test/dummy/config/secrets.yml
|
414
414
|
- test/dummy/config.ru
|
415
|
-
- test/dummy/db/migrate/
|
416
|
-
- test/dummy/db/migrate/
|
417
|
-
- test/dummy/db/migrate/
|
418
|
-
- test/dummy/db/migrate/
|
419
|
-
- test/dummy/db/migrate/
|
420
|
-
- test/dummy/db/migrate/
|
421
|
-
- test/dummy/db/migrate/
|
415
|
+
- test/dummy/db/migrate/20160122151524_create_push_type_users.push_type.rb
|
416
|
+
- test/dummy/db/migrate/20160122151525_create_push_type_nodes.push_type.rb
|
417
|
+
- test/dummy/db/migrate/20160122151526_create_push_type_node_hierarchies.push_type.rb
|
418
|
+
- test/dummy/db/migrate/20160122151527_create_push_type_assets.push_type.rb
|
419
|
+
- test/dummy/db/migrate/20160122151528_create_push_type_taxonomies.push_type.rb
|
420
|
+
- test/dummy/db/migrate/20160122151529_create_push_type_taxonomy_hierarchies.push_type.rb
|
421
|
+
- test/dummy/db/migrate/20160122151530_add_field_store_default_values.push_type.rb
|
422
422
|
- test/dummy/db/schema.rb
|
423
423
|
- test/dummy/db/seeds.rb
|
424
424
|
- test/dummy/log/test.log
|
@@ -432,13 +432,13 @@ test_files:
|
|
432
432
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/0ANSDcZJu9gPyqtYPIW729qm1kriQ29Vn9LU8T2SGQU.cache
|
433
433
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/3T6ioyhwSsEzte_a9viHBvfmuKgORQ019srIEoUYkVs.cache
|
434
434
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache
|
435
|
-
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/8FGH_ku24FOYEa6ACm3vyk_rZwODpSzv3MjZU4irm7M.cache
|
436
435
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/_d65qW7wxRtKVSYpmfSenECz5QUWVI9pppUgV7TA1Rk.cache
|
436
|
+
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/A0UfNVcNn48aSCOiAvcHrJ1BASyXJCELidVIQ6drqQM.cache
|
437
437
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/IYzwMwq7DWWSuojH6oXsrP__pcD7O8TQieMFSzQiwnc.cache
|
438
|
-
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/o8jETQIOAUNl34ED3ZTGdlVAlYRSl8zt6mfx4Wr1_Hs.cache
|
439
438
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache
|
440
|
-
- test/dummy/tmp/
|
441
|
-
- test/dummy/tmp/generators/
|
439
|
+
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/RLSLZQ8zubBDFwRzJo2WPXEPjX3gpp-T1h5FK-UnAYo.cache
|
440
|
+
- test/dummy/tmp/generators/config/initializers/push_type.rb
|
441
|
+
- test/dummy/tmp/generators/config/routes.rb
|
442
442
|
- test/fields/push_type/asset_field_test.rb
|
443
443
|
- test/fields/push_type/boolean_field_test.rb
|
444
444
|
- test/fields/push_type/date_field_test.rb
|