push_type_core 0.10.4 → 0.11.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/push_type/presentable.rb +2 -3
- data/db/migrate/20141117170533_create_push_type_users.rb +1 -1
- data/db/migrate/20141117204630_create_push_type_nodes.rb +1 -1
- data/db/migrate/20141117210644_create_push_type_node_hierarchies.rb +1 -1
- data/db/migrate/20141127151930_create_push_type_assets.rb +1 -1
- data/db/migrate/20150531183944_add_field_store_default_values.rb +1 -1
- data/db/migrate/20160201150228_drop_legacy_push_type_taxonomies.rb +1 -1
- data/lib/push_type/core_ext/to_bool.rb +1 -1
- data/lib/push_type/testing/common_rake.rb +2 -0
- data/lib/push_type/testing/setup.rb +2 -0
- data/lib/push_type/version.rb +1 -1
- data/test/dummy/app/presenters/page_presenter.rb +12 -0
- data/test/dummy/config/initializers/new_framework_defaults.rb +1 -1
- data/test/dummy/config/initializers/push_type.rb +1 -1
- data/test/dummy/config/secrets.yml +2 -2
- data/test/dummy/db/migrate/{20170130110706_create_push_type_users.push_type.rb → 20170407124941_create_push_type_users.push_type.rb} +1 -1
- data/test/dummy/db/migrate/{20170130110707_create_push_type_nodes.push_type.rb → 20170407124942_create_push_type_nodes.push_type.rb} +1 -1
- data/test/dummy/db/migrate/{20170130110708_create_push_type_node_hierarchies.push_type.rb → 20170407124943_create_push_type_node_hierarchies.push_type.rb} +1 -1
- data/test/dummy/db/migrate/{20170130110709_create_push_type_assets.push_type.rb → 20170407124944_create_push_type_assets.push_type.rb} +1 -1
- data/test/dummy/db/migrate/{20170130110710_add_field_store_default_values.push_type.rb → 20170407124945_add_field_store_default_values.push_type.rb} +1 -1
- data/test/dummy/db/migrate/{20170130110711_drop_legacy_push_type_taxonomies.push_type.rb → 20170407124946_drop_legacy_push_type_taxonomies.push_type.rb} +1 -1
- data/test/dummy/db/schema.rb +1 -1
- data/test/dummy/log/test.log +9196 -8251
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/1N/1NNyrLTivkL3hdlxBCXmY6iPuav17Zf_HEok9VWTl9Q.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/{ju/juq2pRoKArM9djBKKp0UVEvC1-DOnZC_9m_C5NzYw6Y.cache → 3Q/3QXhvNrvPooX-Tz3azDUIanQpmTOnNqaiua5vV9cRLs.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/63/63SLH-WYBSKsVbXlO_ussUx7A7uyKTGmBwUGdAYytlg.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/7a/7aRzafVCYl8iUvhtC98x4lDfOVsxtR6jTRMCEHhJEDY.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/{18/18dz1Q7HxdmdXOLUDZIBmJsMrS-UjkTBckfjwwPeuy0.cache → Bp/BpTIRhA-GS10QrpUHsZja1dAjjGnUgKyDLICDiOhnRo.cache} +2 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ev/evdY6EM6tdxsMC0SkTHJlHl2KXPmxFugKHYW4De7150.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/g2/g2ChIdW29D1jUIexFQvW8kjbszkdixbAYIEudlI_WTA.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/{du/duD181BDwQ_-mqj8kFgYtv-uO0UIiKc2tlilPxBUxOc.cache → mo/movXRh1yhXnoSxtCk5yMkXQkBKUOBDZ9c2o4bKTQOAI.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/{Km/KmWNTOX1s_-TvpqmX-X6Fw65vQt4m95mKig2Dk3PiOc.cache → mx/mxlxz9ERHkX5e8UxqYRkLMOCgd2LZPKAXHx9n6E_Gl0.cache} +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/{Lb/LbbWeqaG4K1CMhBNZcK8Pkh70xk7QcBiJ8rGEbYThoU.cache → p_/p_C2472u4AgNrKfyOmuc3iErM-p7EWvSP8sYOJU4Hes.cache} +0 -0
- data/test/dummy/tmp/generators/app/presenters/page_presenter.rb +12 -0
- data/test/fields/push_type/tag_list_field_test.rb +1 -1
- data/test/models/concerns/push_type/presentable_test.rb +22 -0
- metadata +54 -54
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/0N/0NPeHRLLlSt4sMy7neLezHN8nLTrTnuzBXCExGOoKxs.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Dj/DjkZZ0bYHBy9yN_77SEGLPoRNWXOgJT68Hg6wQiq7JA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/K9/K9lx-kimyW906rSFFeolUny3qYPaq-KPVcVh-8LouNc.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ST/STVCwvSaGT6imMs-7Hd-EOpnJ7TVJ1tnJmqjDS00KbA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/_8/_8-gybmYphPEXoBFNQMOjgOegzE4ejRh2WT3qKxlES4.cache +0 -1
- data/test/dummy/tmp/generators/config/initializers/push_type.rb +0 -50
- data/test/dummy/tmp/generators/config/routes.rb +0 -15
- /data/test/dummy/tmp/cache/assets/sprockets/v3.0/{n1/n1cmW8jt4yQEndq0Z3WRnnYwPxBigvs5cFyNQ3iUlhU.cache → eu/eucS-DO7l97Vq6N1vBZsb8P5L25_WFoXYcmcEFWWSic.cache} +0 -0
- /data/test/dummy/tmp/cache/assets/sprockets/v3.0/{wD/wDHi4RI7wfKyh0rWAdz_lLBxcnEC5dMOKpmOgKB15ec.cache → hV/hVCLQc9G-AVrZlFolUenJrX5l6Nstlu-EcZQn2_mNeY.cache} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c6acbbc561b96d9daa2fbb2d1e7b7f8c8b71db7
|
4
|
+
data.tar.gz: 275dd7cc6c6cb5b42ef411b20e5f32a133b0cdcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52dea4a02579eca3fdc4892798554361402442f87073c0d8a339fb73feb335b1ba14df31dbb7b93e288c951b8ff170757eabe85f2b15d7e1ff3b870894236bf5
|
7
|
+
data.tar.gz: 706b27ccd9b082686e2b310f3404ac2b29bfec6ce5e5f2fbae5bdce62a66a0892bc5fd962596417f57a684233ec10b2fbd3560ca89609af04581b00a491b3e89
|
@@ -17,10 +17,9 @@ module PushType
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def presenter_class
|
20
|
-
unless Object.const_defined?(presenter_class_name)
|
21
|
-
Object.const_set presenter_class_name, Class.new(PushType::Presenter)
|
22
|
-
end
|
23
20
|
Object.const_get presenter_class_name
|
21
|
+
rescue NameError
|
22
|
+
Object.const_set presenter_class_name, Class.new(PushType::Presenter)
|
24
23
|
end
|
25
24
|
|
26
25
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreatePushTypeUsers < ActiveRecord::Migration
|
1
|
+
class CreatePushTypeUsers < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
enable_extension 'uuid-ossp' unless extension_enabled?('uuid-ossp')
|
4
4
|
create_table :push_type_users, id: :uuid, default: 'uuid_generate_v4()' do |t|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreatePushTypeNodes < ActiveRecord::Migration
|
1
|
+
class CreatePushTypeNodes < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
enable_extension 'uuid-ossp' unless extension_enabled?('uuid-ossp')
|
4
4
|
create_table :push_type_nodes, id: :uuid, default: 'uuid_generate_v4()' do |t|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreatePushTypeAssets < ActiveRecord::Migration
|
1
|
+
class CreatePushTypeAssets < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
enable_extension 'uuid-ossp' unless extension_enabled?('uuid-ossp')
|
4
4
|
create_table :push_type_assets, id: :uuid, default: 'uuid_generate_v4()' do |t|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddFieldStoreDefaultValues < ActiveRecord::Migration
|
1
|
+
class AddFieldStoreDefaultValues < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
change_column :push_type_nodes, :field_store, :jsonb, default: {}, null: false
|
4
4
|
change_column :push_type_users, :field_store, :jsonb, default: {}, null: false
|
@@ -2,6 +2,7 @@ require 'generators/push_type/dummy/dummy_generator'
|
|
2
2
|
require 'generators/push_type/install/install_generator'
|
3
3
|
require 'generators/push_type/node/node_generator'
|
4
4
|
require 'generators/push_type/structure/structure_generator'
|
5
|
+
require 'generators/push_type/presenter/presenter_generator'
|
5
6
|
|
6
7
|
namespace :common do
|
7
8
|
|
@@ -18,6 +19,7 @@ namespace :common do
|
|
18
19
|
system 'bin/rails db:drop db:create'
|
19
20
|
PushType::InstallGenerator.start ['--quiet']
|
20
21
|
PushType::NodeGenerator.start ['page', '--quiet']
|
22
|
+
PushType::PresenterGenerator.start ['page', '--quiet']
|
21
23
|
PushType::StructureGenerator.start ['location', '--quiet']
|
22
24
|
end
|
23
25
|
end
|
@@ -12,6 +12,8 @@ DatabaseCleaner.strategy = :transaction
|
|
12
12
|
DatabaseCleaner.clean_with :truncation
|
13
13
|
Dragonfly.app.use_datastore :memory
|
14
14
|
|
15
|
+
ActiveSupport::Deprecation.silenced = true
|
16
|
+
|
15
17
|
class ActiveSupport::TestCase
|
16
18
|
# Due to test weirdness / dodgy code need to reference some classes
|
17
19
|
Page && Location
|
data/lib/push_type/version.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
class PagePresenter < PushType::Presenter
|
2
|
+
|
3
|
+
# This class delegates to the model, Page
|
4
|
+
# Override any methods to add custom presentation logic
|
5
|
+
# View helpers are accessible from the `h` method
|
6
|
+
|
7
|
+
# Example:
|
8
|
+
# def title
|
9
|
+
# h.content_tag :strong, super()
|
10
|
+
# end
|
11
|
+
|
12
|
+
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# This file contains migration options to ease your Rails 5.0 upgrade.
|
4
4
|
#
|
5
|
-
# Read the
|
5
|
+
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
6
6
|
|
7
7
|
# Enable per-form CSRF tokens. Previous versions had false.
|
8
8
|
Rails.application.config.action_controller.per_form_csrf_tokens = true
|
@@ -45,6 +45,6 @@ PushType.setup do |config|
|
|
45
45
|
# secret_access_key: ENV['SECRET_ACCESS_KEY_ID']
|
46
46
|
# }
|
47
47
|
|
48
|
-
# config.dragonfly_secret = '
|
48
|
+
# config.dragonfly_secret = '655a69bb08735d80f0fa9164db17001b33a9e766d36528934c1479581fadeb3f'
|
49
49
|
|
50
50
|
end
|
@@ -11,10 +11,10 @@
|
|
11
11
|
# if you're sharing your code publicly.
|
12
12
|
|
13
13
|
development:
|
14
|
-
secret_key_base:
|
14
|
+
secret_key_base: d8d456664fb0736090a5585f75da05aef02fdf954863e56d7c9b5ea9c1165377753235337d40df50f0d5dbbc38782ab46aec63ff12474fb809c1dc58ac553937
|
15
15
|
|
16
16
|
test:
|
17
|
-
secret_key_base:
|
17
|
+
secret_key_base: 40226bbd20ed738fb5b3954b37bd9ac52a612df1682ee7c23f3e285d25692c50428ba6dda4097394b9ba33084501e1cdc3e0791763aa12ba4971763a140b931f
|
18
18
|
|
19
19
|
# Do not keep production secrets in the repository,
|
20
20
|
# instead read values from the environment.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# This migration comes from push_type (originally 20141117170533)
|
2
|
-
class CreatePushTypeUsers < ActiveRecord::Migration
|
2
|
+
class CreatePushTypeUsers < ActiveRecord::Migration[4.2]
|
3
3
|
def change
|
4
4
|
enable_extension 'uuid-ossp' unless extension_enabled?('uuid-ossp')
|
5
5
|
create_table :push_type_users, id: :uuid, default: 'uuid_generate_v4()' do |t|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# This migration comes from push_type (originally 20141117204630)
|
2
|
-
class CreatePushTypeNodes < ActiveRecord::Migration
|
2
|
+
class CreatePushTypeNodes < ActiveRecord::Migration[4.2]
|
3
3
|
def change
|
4
4
|
enable_extension 'uuid-ossp' unless extension_enabled?('uuid-ossp')
|
5
5
|
create_table :push_type_nodes, id: :uuid, default: 'uuid_generate_v4()' do |t|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# This migration comes from push_type (originally 20141117210644)
|
2
|
-
class CreatePushTypeNodeHierarchies < ActiveRecord::Migration
|
2
|
+
class CreatePushTypeNodeHierarchies < ActiveRecord::Migration[4.2]
|
3
3
|
def change
|
4
4
|
create_table :push_type_node_hierarchies, id: false do |t|
|
5
5
|
t.uuid :ancestor_id, null: false
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# This migration comes from push_type (originally 20141127151930)
|
2
|
-
class CreatePushTypeAssets < ActiveRecord::Migration
|
2
|
+
class CreatePushTypeAssets < ActiveRecord::Migration[4.2]
|
3
3
|
def change
|
4
4
|
enable_extension 'uuid-ossp' unless extension_enabled?('uuid-ossp')
|
5
5
|
create_table :push_type_assets, id: :uuid, default: 'uuid_generate_v4()' do |t|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# This migration comes from push_type (originally 20150531183944)
|
2
|
-
class AddFieldStoreDefaultValues < ActiveRecord::Migration
|
2
|
+
class AddFieldStoreDefaultValues < ActiveRecord::Migration[4.2]
|
3
3
|
def change
|
4
4
|
change_column :push_type_nodes, :field_store, :jsonb, default: {}, null: false
|
5
5
|
change_column :push_type_users, :field_store, :jsonb, default: {}, null: false
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# This migration comes from push_type (originally 20160201150228)
|
2
|
-
class DropLegacyPushTypeTaxonomies < ActiveRecord::Migration
|
2
|
+
class DropLegacyPushTypeTaxonomies < ActiveRecord::Migration[4.2]
|
3
3
|
def up
|
4
4
|
if ActiveRecord::Base.connection.table_exists? :push_type_taxonomies
|
5
5
|
drop_table :push_type_taxonomies
|
data/test/dummy/db/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 20170407124946) do
|
14
14
|
|
15
15
|
# These are extensions that must be enabled in order to support this database
|
16
16
|
enable_extension "plpgsql"
|