push_type_core 0.8.0.beta.1 → 0.8.0.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/fields/push_type/relation_field.rb +6 -1
- data/app/models/concerns/push_type/customizable.rb +10 -0
- data/lib/push_type/core/engine.rb +0 -3
- data/lib/push_type/primitives/object_type.rb +1 -7
- data/lib/push_type/version.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/schema.rb +1 -1
- data/test/dummy/log/test.log +8609 -8227
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/0ANSDcZJu9gPyqtYPIW729qm1kriQ29Vn9LU8T2SGQU.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/_d65qW7wxRtKVSYpmfSenECz5QUWVI9pppUgV7TA1Rk.cache +0 -0
- data/test/fields/push_type/relation_field_test.rb +10 -0
- data/test/lib/push_type/primitives_test.rb +1 -0
- data/test/models/concerns/push_type/customizable_test.rb +4 -0
- data/test/models/push_type/node_test.rb +7 -0
- metadata +18 -18
- /data/test/dummy/db/migrate/{20160206155134_create_push_type_users.push_type.rb → 20160215150602_create_push_type_users.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20160206155135_create_push_type_nodes.push_type.rb → 20160215150603_create_push_type_nodes.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20160206155136_create_push_type_node_hierarchies.push_type.rb → 20160215150604_create_push_type_node_hierarchies.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20160206155137_create_push_type_assets.push_type.rb → 20160215150605_create_push_type_assets.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20160206155138_add_field_store_default_values.push_type.rb → 20160215150606_add_field_store_default_values.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20160206155139_drop_legacy_push_type_taxonomies.push_type.rb → 20160215150607_drop_legacy_push_type_taxonomies.push_type.rb} +0 -0
- /data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{BXXMCMRu7JahLHdf-HLwTSs6u6Pfn4DhDNK5wg5hgy0.cache → BbdqmNmo_cMpT3dnntuUSQnMCU3FOU0qEbTy3ESfBHE.cache} +0 -0
- /data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{TUwu9oRcnc80mNVFDhhX5AqieKa5hmp5Ro9HIoQjdA4.cache → HbQzCpEE_QUF4m04TN_zIYyaX1ZCcx171j2td0cH-Vk.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: cce81b8f071f23bb075704f861dc34e79662bb80
|
4
|
+
data.tar.gz: d4b74e25ecaedafe986876b434c3d02b0b75ef8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa4f954451fb99136dccd62b0f5988b39cbc94900de07fb9ea4b49afb2956369222d1b80af9b7769d792106c96eb26be8a599c43819a377f58c091d161a780cc
|
7
|
+
data.tar.gz: 17bdef0e2959c0c48cee41064fa9607813097b478e2e564f320d86411f15a7b8abe13524a01efd1d1c9d8ff7575c87fe55055198db1338de4932afced16e15c7
|
@@ -75,7 +75,12 @@ module PushType
|
|
75
75
|
on_instance do |object, field|
|
76
76
|
object.class_eval do
|
77
77
|
define_method(field.relation_name.to_sym) do
|
78
|
-
|
78
|
+
return nil if field.json_value.blank?
|
79
|
+
if field.multiple?
|
80
|
+
field.relation_class.where id: field.json_value
|
81
|
+
else
|
82
|
+
field.relation_class.find field.json_value
|
83
|
+
end
|
79
84
|
end unless method_defined?(field.relation_name.to_sym)
|
80
85
|
end
|
81
86
|
end
|
@@ -10,6 +10,16 @@ module PushType
|
|
10
10
|
@fields ||= {}
|
11
11
|
end
|
12
12
|
|
13
|
+
# Overrides ActiveRecord::Base#attribute_for_inspect
|
14
|
+
# Minimises field_store value for more readable inspect
|
15
|
+
def attribute_for_inspect(attr_name)
|
16
|
+
if attr_name.to_s == 'field_store'
|
17
|
+
fields.keys.inspect
|
18
|
+
else
|
19
|
+
super
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
13
23
|
private
|
14
24
|
|
15
25
|
def initialize_fields
|
@@ -11,9 +11,6 @@ module PushType
|
|
11
11
|
g.hidden_namespaces << 'push_type:dummy' << 'push_type:field'
|
12
12
|
end
|
13
13
|
|
14
|
-
config.autoload_paths << config.root.join('app', 'fields')
|
15
|
-
config.autoload_paths << config.root.join('app', 'presenters')
|
16
|
-
|
17
14
|
config.assets.precompile += %w(
|
18
15
|
*.gif *.jpg *.png *.svg *.eot *.ttf *.woff *.woff2
|
19
16
|
)
|
data/lib/push_type/version.rb
CHANGED
@@ -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 = 'cff3d8baa5f163bd349a990d21afdb87e1040201b79d4ee60b85de437612f500'
|
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: 5df41ef57c375934ba904132a0360ce33bb93049c03a1462004c02fd169c11a54d4772ac444b5410e201e9d746d474010e1021e3d60abf16c5f20dcc36b26015
|
15
15
|
|
16
16
|
test:
|
17
|
-
secret_key_base:
|
17
|
+
secret_key_base: eb5539a1682d363d661859b59a0e2045f318d3a4de8303015cad1b36d47a99d971cf517885c4f8f3228c5e06864cfb650e2acabc21d8fb9de8d8c11535f35be7
|
18
18
|
|
19
19
|
# Do not keep production secrets in the repository,
|
20
20
|
# instead read values from the environment.
|
data/test/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20160215150607) do
|
15
15
|
|
16
16
|
# These are extensions that must be enabled in order to support this database
|
17
17
|
enable_extension "plpgsql"
|