push_type_core 0.5.0.alpha.2 → 0.5.0.alpha.3
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/asset_field.rb +5 -16
- data/app/fields/push_type/date_field.rb +2 -9
- data/app/fields/push_type/markdown_field.rb +4 -12
- data/app/fields/push_type/matrix_field.rb +11 -11
- data/app/fields/push_type/node_field.rb +22 -0
- data/app/fields/push_type/number_field.rb +3 -9
- data/app/fields/push_type/repeater_field.rb +7 -9
- data/app/fields/push_type/select_field.rb +7 -10
- data/app/fields/push_type/tag_list_field.rb +5 -11
- data/app/fields/push_type/taxonomy_field.rb +6 -47
- data/app/fields/push_type/text_field.rb +3 -3
- data/app/fields/push_type/time_field.rb +2 -9
- data/app/models/concerns/push_type/customizable.rb +8 -8
- data/db/migrate/20150531183944_add_field_store_default_values.rb +6 -0
- data/lib/generators/push_type/field/templates/field.rb +1 -1
- data/lib/push_type/field_type.rb +9 -53
- data/lib/push_type/fields/arrays.rb +23 -0
- data/lib/push_type/fields/base.rb +65 -0
- data/lib/push_type/fields/class_methods.rb +21 -0
- data/lib/push_type/fields/relations.rb +39 -0
- data/lib/push_type/fields/ui.rb +16 -0
- 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/migrate/20150601132822_add_field_store_default_values.push_type.rb +7 -0
- data/test/dummy/db/schema.rb +7 -7
- data/test/dummy/log/test.log +2390 -2383
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/-Sjd8yE8radAZWLZz1Hn9eTc5vPZke6_-U1eg-KNjy8.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/RwmiAHIoiRN917L4TQ8saQaj1DsQgMpS97RYvkK2D5M.cache +0 -0
- data/test/dummy/tmp/generators/app/models/category.rb +6 -0
- data/test/dummy/tmp/generators/app/views/taxonomies/category.html.erb +3 -0
- data/test/lib/push_type/field_type_test.rb +0 -8
- data/test/models/concerns/push_type/customizable_test.rb +1 -1
- metadata +31 -21
- data/app/fields/push_type/array_field.rb +0 -15
- data/test/dummy/tmp/generators/app/presenters/page_presenter.rb +0 -12
- /data/test/dummy/db/migrate/{20150429164551_create_push_type_users.push_type.rb → 20150601132816_create_push_type_users.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20150429164552_create_push_type_nodes.push_type.rb → 20150601132817_create_push_type_nodes.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20150429164553_create_push_type_node_hierarchies.push_type.rb → 20150601132818_create_push_type_node_hierarchies.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20150429164554_create_push_type_assets.push_type.rb → 20150601132819_create_push_type_assets.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20150429164555_create_push_type_taxonomies.push_type.rb → 20150601132820_create_push_type_taxonomies.push_type.rb} +0 -0
- /data/test/dummy/db/migrate/{20150429164556_create_push_type_taxonomy_hierarchies.push_type.rb → 20150601132821_create_push_type_taxonomy_hierarchies.push_type.rb} +0 -0
- /data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{BL-JC9Mha5EbAlzAR0-4qZvqO8u_54SF5Z2ZaoDjlfw.cache → H_FtcM4uZms6K7jOADXRW2-Q5luNbbboPJ8haQyA17A.cache} +0 -0
- /data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/{OC9Pezno0-bFKhuLASN_oxeMelP7hAYHfMDOdC916tY.cache → khjpnuHaHw24GnTbWlsRS6uIuTqIkrfvc2dY1aZWtpk.cache} +0 -0
Binary file
|
Binary file
|
@@ -43,7 +43,6 @@ module PushType
|
|
43
43
|
describe NumberField do
|
44
44
|
let(:field) { PushType::NumberField.new :foo }
|
45
45
|
it { field.form_helper.must_equal :number_field }
|
46
|
-
it { field.from_json(val).must_equal 1 }
|
47
46
|
it { field.to_json(val).must_equal 1 }
|
48
47
|
end
|
49
48
|
|
@@ -69,13 +68,6 @@ module PushType
|
|
69
68
|
end
|
70
69
|
end
|
71
70
|
|
72
|
-
describe ArrayField do
|
73
|
-
let(:field) { PushType::ArrayField.new :foo }
|
74
|
-
it { field.param.must_equal foo: [] }
|
75
|
-
it { field.to_json(val).must_equal ['1'] }
|
76
|
-
it { field.from_json(val).must_equal ['1'] }
|
77
|
-
end
|
78
|
-
|
79
71
|
describe TagListField do
|
80
72
|
let(:field) { PushType::TagListField.new :foo }
|
81
73
|
it { field.template.must_equal 'tag_list' }
|
@@ -36,7 +36,7 @@ module PushType
|
|
36
36
|
TestPage.instance_variable_set '@fields', ActiveSupport::OrderedHash.new
|
37
37
|
TestPage.field :foo
|
38
38
|
TestPage.field :bar, :text
|
39
|
-
TestPage.field :baz, :
|
39
|
+
TestPage.field :baz, :tag_list
|
40
40
|
end
|
41
41
|
after { TestPage.instance_variable_set '@fields', ActiveSupport::OrderedHash.new }
|
42
42
|
|
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.5.0.alpha.
|
4
|
+
version: 0.5.0.alpha.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: 2015-
|
11
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -140,11 +140,11 @@ files:
|
|
140
140
|
- app/controllers/front_end_controller.rb
|
141
141
|
- app/controllers/nodes_front_end_controller.rb
|
142
142
|
- app/controllers/taxonomies_front_end_controller.rb
|
143
|
-
- app/fields/push_type/array_field.rb
|
144
143
|
- app/fields/push_type/asset_field.rb
|
145
144
|
- app/fields/push_type/date_field.rb
|
146
145
|
- app/fields/push_type/markdown_field.rb
|
147
146
|
- app/fields/push_type/matrix_field.rb
|
147
|
+
- app/fields/push_type/node_field.rb
|
148
148
|
- app/fields/push_type/number_field.rb
|
149
149
|
- app/fields/push_type/repeater_field.rb
|
150
150
|
- app/fields/push_type/select_field.rb
|
@@ -176,6 +176,7 @@ files:
|
|
176
176
|
- db/migrate/20141127151930_create_push_type_assets.rb
|
177
177
|
- db/migrate/20150310115933_create_push_type_taxonomies.rb
|
178
178
|
- db/migrate/20150310123230_create_push_type_taxonomy_hierarchies.rb
|
179
|
+
- db/migrate/20150531183944_add_field_store_default_values.rb
|
179
180
|
- lib/generators/push_type/dummy/dummy_generator.rb
|
180
181
|
- lib/generators/push_type/dummy/templates/application.rb
|
181
182
|
- lib/generators/push_type/dummy/templates/boot.rb
|
@@ -200,6 +201,11 @@ files:
|
|
200
201
|
- lib/push_type/core.rb
|
201
202
|
- lib/push_type/core/engine.rb
|
202
203
|
- lib/push_type/field_type.rb
|
204
|
+
- lib/push_type/fields/arrays.rb
|
205
|
+
- lib/push_type/fields/base.rb
|
206
|
+
- lib/push_type/fields/class_methods.rb
|
207
|
+
- lib/push_type/fields/relations.rb
|
208
|
+
- lib/push_type/fields/ui.rb
|
203
209
|
- lib/push_type/menu_builder.rb
|
204
210
|
- lib/push_type/menu_builder/dsl/menu.rb
|
205
211
|
- lib/push_type/menu_builder/dsl/menu_item.rb
|
@@ -254,12 +260,13 @@ files:
|
|
254
260
|
- test/dummy/config/locales/en.yml
|
255
261
|
- test/dummy/config/routes.rb
|
256
262
|
- test/dummy/config/secrets.yml
|
257
|
-
- test/dummy/db/migrate/
|
258
|
-
- test/dummy/db/migrate/
|
259
|
-
- test/dummy/db/migrate/
|
260
|
-
- test/dummy/db/migrate/
|
261
|
-
- test/dummy/db/migrate/
|
262
|
-
- test/dummy/db/migrate/
|
263
|
+
- test/dummy/db/migrate/20150601132816_create_push_type_users.push_type.rb
|
264
|
+
- test/dummy/db/migrate/20150601132817_create_push_type_nodes.push_type.rb
|
265
|
+
- test/dummy/db/migrate/20150601132818_create_push_type_node_hierarchies.push_type.rb
|
266
|
+
- test/dummy/db/migrate/20150601132819_create_push_type_assets.push_type.rb
|
267
|
+
- test/dummy/db/migrate/20150601132820_create_push_type_taxonomies.push_type.rb
|
268
|
+
- test/dummy/db/migrate/20150601132821_create_push_type_taxonomy_hierarchies.push_type.rb
|
269
|
+
- test/dummy/db/migrate/20150601132822_add_field_store_default_values.push_type.rb
|
263
270
|
- test/dummy/db/schema.rb
|
264
271
|
- test/dummy/db/seeds.rb
|
265
272
|
- test/dummy/log/test.log
|
@@ -270,13 +277,14 @@ files:
|
|
270
277
|
- test/dummy/public/robots.txt
|
271
278
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/-Sjd8yE8radAZWLZz1Hn9eTc5vPZke6_-U1eg-KNjy8.cache
|
272
279
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/0_aw7up97T_NTvobuzf-o1Xpynz3Eqo7lyRTdE_M3kg.cache
|
273
|
-
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/BL-JC9Mha5EbAlzAR0-4qZvqO8u_54SF5Z2ZaoDjlfw.cache
|
274
280
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/H3MYWnNh74SPmIVutQpgqiLFgQBaPIZ8rUXz8S1IXfQ.cache
|
281
|
+
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/H_FtcM4uZms6K7jOADXRW2-Q5luNbbboPJ8haQyA17A.cache
|
275
282
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/I6zXuKkTIFbRK1A1tWK7nMeIhOXwx4iMRyZCdQatqy8.cache
|
276
|
-
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/OC9Pezno0-bFKhuLASN_oxeMelP7hAYHfMDOdC916tY.cache
|
277
283
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/RwmiAHIoiRN917L4TQ8saQaj1DsQgMpS97RYvkK2D5M.cache
|
278
284
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/YfvOcAtfd0a4AoZRwhfEPbutzGvytNV3PLH99tHHVec.cache
|
279
|
-
- test/dummy/tmp/
|
285
|
+
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/khjpnuHaHw24GnTbWlsRS6uIuTqIkrfvc2dY1aZWtpk.cache
|
286
|
+
- test/dummy/tmp/generators/app/models/category.rb
|
287
|
+
- test/dummy/tmp/generators/app/views/taxonomies/category.html.erb
|
280
288
|
- test/files/audio.m3u
|
281
289
|
- test/files/document.pdf
|
282
290
|
- test/files/image.png
|
@@ -367,12 +375,13 @@ test_files:
|
|
367
375
|
- test/dummy/config/routes.rb
|
368
376
|
- test/dummy/config/secrets.yml
|
369
377
|
- test/dummy/config.ru
|
370
|
-
- test/dummy/db/migrate/
|
371
|
-
- test/dummy/db/migrate/
|
372
|
-
- test/dummy/db/migrate/
|
373
|
-
- test/dummy/db/migrate/
|
374
|
-
- test/dummy/db/migrate/
|
375
|
-
- test/dummy/db/migrate/
|
378
|
+
- test/dummy/db/migrate/20150601132816_create_push_type_users.push_type.rb
|
379
|
+
- test/dummy/db/migrate/20150601132817_create_push_type_nodes.push_type.rb
|
380
|
+
- test/dummy/db/migrate/20150601132818_create_push_type_node_hierarchies.push_type.rb
|
381
|
+
- test/dummy/db/migrate/20150601132819_create_push_type_assets.push_type.rb
|
382
|
+
- test/dummy/db/migrate/20150601132820_create_push_type_taxonomies.push_type.rb
|
383
|
+
- test/dummy/db/migrate/20150601132821_create_push_type_taxonomy_hierarchies.push_type.rb
|
384
|
+
- test/dummy/db/migrate/20150601132822_add_field_store_default_values.push_type.rb
|
376
385
|
- test/dummy/db/schema.rb
|
377
386
|
- test/dummy/db/seeds.rb
|
378
387
|
- test/dummy/log/test.log
|
@@ -385,13 +394,14 @@ test_files:
|
|
385
394
|
- test/dummy/README.rdoc
|
386
395
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/-Sjd8yE8radAZWLZz1Hn9eTc5vPZke6_-U1eg-KNjy8.cache
|
387
396
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/0_aw7up97T_NTvobuzf-o1Xpynz3Eqo7lyRTdE_M3kg.cache
|
388
|
-
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/BL-JC9Mha5EbAlzAR0-4qZvqO8u_54SF5Z2ZaoDjlfw.cache
|
389
397
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/H3MYWnNh74SPmIVutQpgqiLFgQBaPIZ8rUXz8S1IXfQ.cache
|
398
|
+
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/H_FtcM4uZms6K7jOADXRW2-Q5luNbbboPJ8haQyA17A.cache
|
390
399
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/I6zXuKkTIFbRK1A1tWK7nMeIhOXwx4iMRyZCdQatqy8.cache
|
391
|
-
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/
|
400
|
+
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/khjpnuHaHw24GnTbWlsRS6uIuTqIkrfvc2dY1aZWtpk.cache
|
392
401
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/RwmiAHIoiRN917L4TQ8saQaj1DsQgMpS97RYvkK2D5M.cache
|
393
402
|
- test/dummy/tmp/cache/assets/test/sprockets/v3.0/YfvOcAtfd0a4AoZRwhfEPbutzGvytNV3PLH99tHHVec.cache
|
394
|
-
- test/dummy/tmp/generators/app/
|
403
|
+
- test/dummy/tmp/generators/app/models/category.rb
|
404
|
+
- test/dummy/tmp/generators/app/views/taxonomies/category.html.erb
|
395
405
|
- test/files/audio.m3u
|
396
406
|
- test/files/document.pdf
|
397
407
|
- test/files/image.png
|
@@ -1,12 +0,0 @@
|
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|