push_type_core 0.3.3 → 0.4.0.beta.3

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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/push_type/application_controller_methods.rb +15 -50
  3. data/app/controllers/concerns/push_type/filterable.rb +69 -0
  4. data/app/controllers/front_end_controller.rb +1 -33
  5. data/app/controllers/nodes_front_end_controller.rb +21 -0
  6. data/app/controllers/taxonomies_front_end_controller.rb +25 -0
  7. data/app/models/concerns/push_type/nestable.rb +1 -1
  8. data/app/models/concerns/push_type/publishable.rb +3 -3
  9. data/app/models/concerns/push_type/templatable.rb +1 -1
  10. data/app/models/concerns/push_type/unexposable.rb +22 -4
  11. data/app/models/push_type/taxonomy.rb +39 -0
  12. data/db/migrate/20141117170533_create_push_type_users.rb +1 -1
  13. data/db/migrate/20141117204630_create_push_type_nodes.rb +1 -1
  14. data/db/migrate/20141117210644_create_push_type_node_hierarchies.rb +2 -2
  15. data/db/migrate/20141127151930_create_push_type_assets.rb +1 -1
  16. data/db/migrate/20150310115933_create_push_type_taxonomies.rb +18 -0
  17. data/db/migrate/20150310123230_create_push_type_taxonomy_hierarchies.rb +16 -0
  18. data/lib/generators/push_type/install/templates/push_type.rb +2 -0
  19. data/lib/generators/push_type/node/node_generator.rb +1 -1
  20. data/lib/generators/push_type/taxonomy/USAGE +8 -0
  21. data/lib/generators/push_type/taxonomy/taxonomy_generator.rb +13 -0
  22. data/lib/generators/push_type/taxonomy/templates/taxonomy.html.erb +3 -0
  23. data/lib/generators/push_type/taxonomy/templates/taxonomy.rb +6 -0
  24. data/lib/push_type/config.rb +3 -0
  25. data/lib/push_type/core.rb +11 -11
  26. data/lib/push_type/rails/routes.rb +7 -1
  27. data/lib/push_type/tag_list_query.rb +1 -1
  28. data/lib/push_type/testing/common_rake.rb +2 -0
  29. data/lib/push_type/testing/factories.rb +10 -0
  30. data/lib/push_type/testing/setup.rb +3 -0
  31. data/lib/push_type/version.rb +1 -1
  32. data/test/controllers/{front_end_controller_test.rb → nodes_front_end_controller_test.rb} +8 -7
  33. data/test/controllers/taxonomies_front_end_controller_test.rb +58 -0
  34. data/test/dummy/app/models/category.rb +6 -0
  35. data/test/dummy/app/views/taxonomies/category.html.erb +3 -0
  36. data/test/dummy/config/initializers/push_type.rb +3 -1
  37. data/test/dummy/config/secrets.yml +2 -2
  38. data/test/dummy/db/migrate/{20150310192149_create_push_type_users.push_type.rb → 20150406131539_create_push_type_users.push_type.rb} +1 -1
  39. data/test/dummy/db/migrate/{20150310192150_create_push_type_nodes.push_type.rb → 20150406131540_create_push_type_nodes.push_type.rb} +1 -1
  40. data/test/dummy/db/migrate/{20150310192151_create_push_type_node_hierarchies.push_type.rb → 20150406131541_create_push_type_node_hierarchies.push_type.rb} +2 -2
  41. data/test/dummy/db/migrate/{20150310192152_create_push_type_assets.push_type.rb → 20150406131542_create_push_type_assets.push_type.rb} +1 -1
  42. data/test/dummy/db/migrate/20150406131543_create_push_type_taxonomies.push_type.rb +19 -0
  43. data/test/dummy/db/migrate/20150406131544_create_push_type_taxonomy_hierarchies.push_type.rb +17 -0
  44. data/test/dummy/db/schema.rb +29 -9
  45. data/test/dummy/log/test.log +2963 -2021
  46. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  47. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  48. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  49. data/test/dummy/tmp/generators/app/presenters/page_presenter.rb +12 -0
  50. data/test/lib/generators/push_type/taxonomy_generator_test.rb +17 -0
  51. data/test/lib/push_type/core_test.rb +64 -39
  52. data/test/models/concerns/push_type/templatable_test.rb +3 -3
  53. data/test/models/concerns/push_type/unexposable_test.rb +30 -10
  54. data/test/models/push_type/taxonomy_test.rb +35 -0
  55. metadata +41 -19
  56. data/test/dummy/tmp/generators/config/initializers/push_type.rb +0 -36
  57. data/test/dummy/tmp/generators/config/routes.rb +0 -59
  58. /data/lib/generators/push_type/node/templates/{template.html.erb → node.html.erb} +0 -0
@@ -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
@@ -0,0 +1,17 @@
1
+ require "test_helper"
2
+ require "generators/push_type/taxonomy/taxonomy_generator"
3
+
4
+ module PushType
5
+ describe TaxonomyGenerator do
6
+ tests TaxonomyGenerator
7
+ destination Rails.root.join('tmp/generators')
8
+
9
+ before :all do
10
+ prepare_destination
11
+ run_generator ['category']
12
+ end
13
+
14
+ it { assert_file 'app/models/category.rb', %r{class Category < PushType::Taxonomy} }
15
+ it { assert_file 'app/views/taxonomies/category.html.erb', %r{<h1><%= @taxonomy.title %></h1>} }
16
+ end
17
+ end
@@ -10,57 +10,82 @@ module PushType
10
10
 
11
11
  describe '.config' do
12
12
  subject { PushType.config }
13
- it { subject.root_nodes.wont_be_nil }
14
- it { subject.home_slug.wont_be_nil }
13
+ it { subject.must_respond_to :root_nodes }
14
+ it { subject.must_respond_to :home_slug }
15
+ it { subject.must_respond_to :unexposed_nodes }
16
+ it { subject.must_respond_to :unexposed_taxonomies }
17
+ it { subject.must_respond_to :media_styles }
18
+ it { subject.must_respond_to :mailer_sender }
19
+ it { subject.must_respond_to :home_slug }
20
+ it { subject.must_respond_to :dragonfly_datastore }
21
+ it { subject.must_respond_to :dragonfly_datastore_options }
22
+ it { subject.must_respond_to :dragonfly_secret }
15
23
  end
16
24
 
17
25
  describe '.root_nodes' do
18
- subject { PushType.root_nodes }
19
- describe 'defaults' do
20
- before { PushType.config.root_nodes = :all }
21
- it { subject.must_be_instance_of Array }
22
- it { subject.must_equal ['page', 'test_page'] }
23
- end
24
- describe 'specified single value' do
25
- before { PushType.config.root_nodes = :page }
26
- it { subject.must_equal ['page'] }
27
- end
28
- describe 'specified array with nonsense values' do
29
- before { PushType.config.root_nodes = [:page, :test_page, :foo, :bar] }
30
- it { subject.must_equal ['page', 'test_page'] }
26
+ let(:config) { MiniTest::Mock.new }
27
+ it 'should return all nodes by default' do
28
+ config.expect :root_nodes, :all
29
+ PushType.stub :config, config do
30
+ PushType.root_nodes.must_equal ['page', 'test_page']
31
+ end
32
+ assert config.verify
31
33
  end
32
34
  end
33
35
 
34
36
  describe '.unexposed_nodes' do
35
- subject { PushType.unexposed_nodes }
36
- describe 'defaults' do
37
- before { PushType.config.unexposed_nodes = [] }
38
- it { subject.must_be_instance_of Array }
39
- it { subject.must_be_empty }
40
- end
41
- describe 'specified single value' do
42
- before { PushType.config.unexposed_nodes = :page }
43
- it { subject.must_equal ['Page'] }
44
- end
45
- describe 'specified array with nonsense values' do
46
- before { PushType.config.unexposed_nodes = [:page, :test_page, :foo, :bar] }
47
- it { subject.must_equal ['Page', 'TestPage'] }
37
+ let(:config) { MiniTest::Mock.new }
38
+ it 'should return empty array by default' do
39
+ config.expect :unexposed_nodes, []
40
+ PushType.stub :config, config do
41
+ PushType.unexposed_nodes.must_be_empty
42
+ end
43
+ assert config.verify
48
44
  end
49
45
  end
50
46
 
51
- describe '.node_types_from_list' do
52
- subject { PushType.node_types_from_list list }
53
- describe ':all' do
54
- let(:list) { :all }
55
- it { subject.must_equal ['page', 'test_page'] }
47
+ describe '.unexposed_taxonomies' do
48
+ let(:config) { MiniTest::Mock.new }
49
+ it 'should return empty array by default' do
50
+ config.expect :unexposed_taxonomies, []
51
+ PushType.stub :config, config do
52
+ PushType.unexposed_taxonomies.must_be_empty
53
+ end
54
+ assert config.verify
56
55
  end
57
- describe 'false' do
58
- let(:list) { false }
59
- it { subject.must_equal [] }
56
+ end
57
+
58
+ describe '.subclasses_from_list' do
59
+ subject { PushType.subclasses_from_list scope, list }
60
+ describe 'scoped by :node' do
61
+ let(:scope) { :node }
62
+ describe 'searching for :all' do
63
+ let(:list) { :all }
64
+ it { subject.must_equal ['page', 'test_page'] }
65
+ end
66
+ describe 'searching for single type' do
67
+ let(:list) { :page }
68
+ it { subject.must_equal ['page'] }
69
+ end
70
+ describe 'searching for array with nonexisting types' do
71
+ let(:list) { [:page, :test_page, :foo, :bar] }
72
+ it { subject.must_equal ['page', 'test_page'] }
73
+ end
60
74
  end
61
- describe 'specified array with nonsense values' do
62
- let(:list) { [:page, :foo] }
63
- it { subject.must_equal ['page'] }
75
+ describe 'scoped by :taxonomy' do
76
+ let(:scope) { :taxonomy }
77
+ describe 'searching for :all' do
78
+ let(:list) { :all }
79
+ it { subject.must_equal ['category'] }
80
+ end
81
+ describe 'searching for single type' do
82
+ let(:list) { :category }
83
+ it { subject.must_equal ['category'] }
84
+ end
85
+ describe 'searching for array with nonexisting types' do
86
+ let(:list) { [:category, :foo, :bar] }
87
+ it { subject.must_equal ['category'] }
88
+ end
64
89
  end
65
90
  end
66
91
 
@@ -26,9 +26,9 @@ module PushType
26
26
  end
27
27
 
28
28
  describe 'set template with args' do
29
- before { TestPage.template :foo, layout: 'my_layout' }
30
- before { page.template.must_equal 'nodes/foo' }
31
- before { page.template_args.must_equal ['nodes/foo', { layout: 'my_layout' }] }
29
+ before { TestPage.template :foo, path: 'bar', layout: 'my_layout' }
30
+ before { page.template.must_equal 'bar/foo' }
31
+ before { page.template_args.must_equal ['bar/foo', { layout: 'my_layout' }] }
32
32
  end
33
33
 
34
34
  end
@@ -5,27 +5,47 @@ module PushType
5
5
 
6
6
  describe '.exposed' do
7
7
  let(:new_node!) { TestPage.create! FactoryGirl.attributes_for(:node) }
8
- it 'it should scope all exposed nodes' do
8
+ it 'should scope all exposed nodes' do
9
9
  PushType.stub :unexposed_nodes, [] do
10
10
  proc { new_node! }.must_change 'PushType::Node.exposed.count', 1
11
11
  end
12
12
  end
13
- it 'it should omit any unexposed nodes' do
14
- PushType.stub :unexposed_nodes, ['TestPage'] do
13
+ it 'should omit any unexposed nodes' do
14
+ PushType.stub :unexposed_nodes, ['test_page'] do
15
15
  proc { new_node! }.wont_change 'PushType::Node.exposed.count', 1
16
16
  end
17
17
  end
18
18
  end
19
19
 
20
20
  describe 'exposed?' do
21
- describe 'when exposed' do
22
- it { TestPage.must_be :exposed? }
23
- it { TestPage.new.must_be :exposed? }
21
+ it 'should be true when not unexposed' do
22
+ PushType.stub :unexposed_nodes, [] do
23
+ TestPage.must_be :exposed?
24
+ TestPage.new.must_be :exposed?
25
+ end
26
+ end
27
+ it 'should be false when unexposed' do
28
+ PushType.stub :unexposed_nodes, ['test_page'] do
29
+ TestPage.wont_be :exposed?
30
+ TestPage.new.wont_be :exposed?
31
+ end
32
+ end
33
+ end
34
+
35
+ describe '.descendants' do
36
+ it 'should include subject when not unexposed' do
37
+ PushType.stub :unexposed_nodes, [] do
38
+ PushType::Node.descendants.must_include TestPage
39
+ PushType::Node.descendants(exposed: true).must_include TestPage
40
+ PushType::Node.descendants(exposed: false).wont_include TestPage
41
+ end
24
42
  end
25
- describe 'when unexposed' do
26
- before { TestPage.unexpose! }
27
- it { TestPage.wont_be :exposed? }
28
- it { TestPage.new.wont_be :exposed? }
43
+ it 'should not include subject when not unexposed' do
44
+ PushType.stub :unexposed_nodes, ['test_page'] do
45
+ PushType::Node.descendants.must_include TestPage
46
+ PushType::Node.descendants(exposed: true).wont_include TestPage
47
+ PushType::Node.descendants(exposed: false).must_include TestPage
48
+ end
29
49
  end
30
50
  end
31
51
 
@@ -0,0 +1,35 @@
1
+ require "test_helper"
2
+
3
+ module PushType
4
+ describe Taxonomy do
5
+ let(:taxonomy) { Taxonomy.new }
6
+
7
+ it { taxonomy.wont_be :valid? }
8
+
9
+ it 'should be valid with required attributes' do
10
+ taxonomy.attributes = FactoryGirl.attributes_for :taxonomy
11
+ taxonomy.must_be :valid?
12
+ end
13
+
14
+ describe '.base_slug' do
15
+ it 'should by default be the class name' do
16
+ taxonomy.base_slug.must_equal 'push_type/taxonomy'
17
+ end
18
+ describe 'setting the base_slug' do
19
+ before { Taxonomy.base_slug :foo_bar }
20
+ after { Taxonomy.base_slug nil }
21
+ it { Taxonomy.base_slug.must_equal 'foo_bar' }
22
+ end
23
+ end
24
+
25
+ describe '#permalink' do
26
+ before do
27
+ Taxonomy.base_slug :cat
28
+ %w(one two three).each { |slug| @tax = FactoryGirl.create :taxonomy, slug: slug, parent: @tax }
29
+ end
30
+ after { Taxonomy.base_slug nil }
31
+ it { @tax.permalink.must_equal 'cat/one/two/three' }
32
+ end
33
+
34
+ end
35
+ 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.3.3
4
+ version: 0.4.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: 2015-03-10 00:00:00.000000000 Z
11
+ date: 2015-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -136,7 +136,10 @@ files:
136
136
  - app/assets/images/push_type/pushtype-logo.png
137
137
  - app/assets/images/push_type/pushtype-logo.svg
138
138
  - app/controllers/concerns/push_type/application_controller_methods.rb
139
+ - app/controllers/concerns/push_type/filterable.rb
139
140
  - app/controllers/front_end_controller.rb
141
+ - app/controllers/nodes_front_end_controller.rb
142
+ - app/controllers/taxonomies_front_end_controller.rb
140
143
  - app/fields/push_type/array_field.rb
141
144
  - app/fields/push_type/date_field.rb
142
145
  - app/fields/push_type/markdown_field.rb
@@ -154,6 +157,7 @@ files:
154
157
  - app/models/concerns/push_type/unexposable.rb
155
158
  - app/models/push_type/asset.rb
156
159
  - app/models/push_type/node.rb
160
+ - app/models/push_type/taxonomy.rb
157
161
  - app/models/push_type/user.rb
158
162
  - app/views/layouts/push_type/application.html.erb
159
163
  - app/views/push_type/setup.html.erb
@@ -164,6 +168,8 @@ files:
164
168
  - db/migrate/20141117204630_create_push_type_nodes.rb
165
169
  - db/migrate/20141117210644_create_push_type_node_hierarchies.rb
166
170
  - db/migrate/20141127151930_create_push_type_assets.rb
171
+ - db/migrate/20150310115933_create_push_type_taxonomies.rb
172
+ - db/migrate/20150310123230_create_push_type_taxonomy_hierarchies.rb
167
173
  - lib/generators/push_type/dummy/dummy_generator.rb
168
174
  - lib/generators/push_type/dummy/templates/application.rb
169
175
  - lib/generators/push_type/dummy/templates/boot.rb
@@ -175,11 +181,15 @@ files:
175
181
  - lib/generators/push_type/install/templates/push_type.rb
176
182
  - lib/generators/push_type/node/USAGE
177
183
  - lib/generators/push_type/node/node_generator.rb
184
+ - lib/generators/push_type/node/templates/node.html.erb
178
185
  - lib/generators/push_type/node/templates/node.rb
179
- - lib/generators/push_type/node/templates/template.html.erb
180
186
  - lib/generators/push_type/presenter/USAGE
181
187
  - lib/generators/push_type/presenter/presenter_generator.rb
182
188
  - lib/generators/push_type/presenter/templates/presenter.rb
189
+ - lib/generators/push_type/taxonomy/USAGE
190
+ - lib/generators/push_type/taxonomy/taxonomy_generator.rb
191
+ - lib/generators/push_type/taxonomy/templates/taxonomy.html.erb
192
+ - lib/generators/push_type/taxonomy/templates/taxonomy.rb
183
193
  - lib/push_type/config.rb
184
194
  - lib/push_type/core.rb
185
195
  - lib/push_type/core/engine.rb
@@ -202,15 +212,18 @@ files:
202
212
  - lib/push_type/version.rb
203
213
  - lib/push_type_core.rb
204
214
  - lib/tasks/push_type_tasks.rake
205
- - test/controllers/front_end_controller_test.rb
215
+ - test/controllers/nodes_front_end_controller_test.rb
216
+ - test/controllers/taxonomies_front_end_controller_test.rb
206
217
  - test/dummy/README.rdoc
207
218
  - test/dummy/Rakefile
208
219
  - test/dummy/app/assets/stylesheets/application.css
209
220
  - test/dummy/app/controllers/application_controller.rb
210
221
  - test/dummy/app/helpers/application_helper.rb
222
+ - test/dummy/app/models/category.rb
211
223
  - test/dummy/app/models/page.rb
212
224
  - test/dummy/app/views/layouts/application.html.erb
213
225
  - test/dummy/app/views/nodes/page.html.erb
226
+ - test/dummy/app/views/taxonomies/category.html.erb
214
227
  - test/dummy/bin/bundle
215
228
  - test/dummy/bin/rails
216
229
  - test/dummy/bin/rake
@@ -235,10 +248,12 @@ files:
235
248
  - test/dummy/config/locales/en.yml
236
249
  - test/dummy/config/routes.rb
237
250
  - test/dummy/config/secrets.yml
238
- - test/dummy/db/migrate/20150310192149_create_push_type_users.push_type.rb
239
- - test/dummy/db/migrate/20150310192150_create_push_type_nodes.push_type.rb
240
- - test/dummy/db/migrate/20150310192151_create_push_type_node_hierarchies.push_type.rb
241
- - test/dummy/db/migrate/20150310192152_create_push_type_assets.push_type.rb
251
+ - test/dummy/db/migrate/20150406131539_create_push_type_users.push_type.rb
252
+ - test/dummy/db/migrate/20150406131540_create_push_type_nodes.push_type.rb
253
+ - test/dummy/db/migrate/20150406131541_create_push_type_node_hierarchies.push_type.rb
254
+ - test/dummy/db/migrate/20150406131542_create_push_type_assets.push_type.rb
255
+ - test/dummy/db/migrate/20150406131543_create_push_type_taxonomies.push_type.rb
256
+ - test/dummy/db/migrate/20150406131544_create_push_type_taxonomy_hierarchies.push_type.rb
242
257
  - test/dummy/db/schema.rb
243
258
  - test/dummy/db/seeds.rb
244
259
  - test/dummy/log/test.log
@@ -250,8 +265,7 @@ files:
250
265
  - test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
251
266
  - test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
252
267
  - test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
253
- - test/dummy/tmp/generators/config/initializers/push_type.rb
254
- - test/dummy/tmp/generators/config/routes.rb
268
+ - test/dummy/tmp/generators/app/presenters/page_presenter.rb
255
269
  - test/files/audio.m3u
256
270
  - test/files/document.pdf
257
271
  - test/files/image.png
@@ -260,6 +274,7 @@ files:
260
274
  - test/lib/generators/push_type/install_generator_test.rb
261
275
  - test/lib/generators/push_type/node_generator_test.rb
262
276
  - test/lib/generators/push_type/presenter_generator_test.rb
277
+ - test/lib/generators/push_type/taxonomy_generator_test.rb
263
278
  - test/lib/push_type/core_test.rb
264
279
  - test/lib/push_type/field_type_test.rb
265
280
  - test/lib/push_type/menu_builder/menu_dsl_test.rb
@@ -279,6 +294,7 @@ files:
279
294
  - test/models/concerns/push_type/unexposable_test.rb
280
295
  - test/models/push_type/asset_test.rb
281
296
  - test/models/push_type/node_test.rb
297
+ - test/models/push_type/taxonomy_test.rb
282
298
  - test/models/push_type/user_test.rb
283
299
  - test/test_helper.rb
284
300
  homepage: http://type.pushcode.com
@@ -296,9 +312,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
296
312
  version: '0'
297
313
  required_rubygems_version: !ruby/object:Gem::Requirement
298
314
  requirements:
299
- - - ">="
315
+ - - ">"
300
316
  - !ruby/object:Gem::Version
301
- version: '0'
317
+ version: 1.3.1
302
318
  requirements: []
303
319
  rubyforge_project:
304
320
  rubygems_version: 2.4.2
@@ -306,13 +322,16 @@ signing_key:
306
322
  specification_version: 4
307
323
  summary: The core engine for the PushType content management system.
308
324
  test_files:
309
- - test/controllers/front_end_controller_test.rb
325
+ - test/controllers/nodes_front_end_controller_test.rb
326
+ - test/controllers/taxonomies_front_end_controller_test.rb
310
327
  - test/dummy/app/assets/stylesheets/application.css
311
328
  - test/dummy/app/controllers/application_controller.rb
312
329
  - test/dummy/app/helpers/application_helper.rb
330
+ - test/dummy/app/models/category.rb
313
331
  - test/dummy/app/models/page.rb
314
332
  - test/dummy/app/views/layouts/application.html.erb
315
333
  - test/dummy/app/views/nodes/page.html.erb
334
+ - test/dummy/app/views/taxonomies/category.html.erb
316
335
  - test/dummy/bin/bundle
317
336
  - test/dummy/bin/rails
318
337
  - test/dummy/bin/rake
@@ -337,10 +356,12 @@ test_files:
337
356
  - test/dummy/config/routes.rb
338
357
  - test/dummy/config/secrets.yml
339
358
  - test/dummy/config.ru
340
- - test/dummy/db/migrate/20150310192149_create_push_type_users.push_type.rb
341
- - test/dummy/db/migrate/20150310192150_create_push_type_nodes.push_type.rb
342
- - test/dummy/db/migrate/20150310192151_create_push_type_node_hierarchies.push_type.rb
343
- - test/dummy/db/migrate/20150310192152_create_push_type_assets.push_type.rb
359
+ - test/dummy/db/migrate/20150406131539_create_push_type_users.push_type.rb
360
+ - test/dummy/db/migrate/20150406131540_create_push_type_nodes.push_type.rb
361
+ - test/dummy/db/migrate/20150406131541_create_push_type_node_hierarchies.push_type.rb
362
+ - test/dummy/db/migrate/20150406131542_create_push_type_assets.push_type.rb
363
+ - test/dummy/db/migrate/20150406131543_create_push_type_taxonomies.push_type.rb
364
+ - test/dummy/db/migrate/20150406131544_create_push_type_taxonomy_hierarchies.push_type.rb
344
365
  - test/dummy/db/schema.rb
345
366
  - test/dummy/db/seeds.rb
346
367
  - test/dummy/log/test.log
@@ -354,8 +375,7 @@ test_files:
354
375
  - test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
355
376
  - test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
356
377
  - test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
357
- - test/dummy/tmp/generators/config/initializers/push_type.rb
358
- - test/dummy/tmp/generators/config/routes.rb
378
+ - test/dummy/tmp/generators/app/presenters/page_presenter.rb
359
379
  - test/files/audio.m3u
360
380
  - test/files/document.pdf
361
381
  - test/files/image.png
@@ -364,6 +384,7 @@ test_files:
364
384
  - test/lib/generators/push_type/install_generator_test.rb
365
385
  - test/lib/generators/push_type/node_generator_test.rb
366
386
  - test/lib/generators/push_type/presenter_generator_test.rb
387
+ - test/lib/generators/push_type/taxonomy_generator_test.rb
367
388
  - test/lib/push_type/core_test.rb
368
389
  - test/lib/push_type/field_type_test.rb
369
390
  - test/lib/push_type/menu_builder/menu_dsl_test.rb
@@ -383,5 +404,6 @@ test_files:
383
404
  - test/models/concerns/push_type/unexposable_test.rb
384
405
  - test/models/push_type/asset_test.rb
385
406
  - test/models/push_type/node_test.rb
407
+ - test/models/push_type/taxonomy_test.rb
386
408
  - test/models/push_type/user_test.rb
387
409
  - test/test_helper.rb
@@ -1,36 +0,0 @@
1
- PushType.setup do |config|
2
-
3
- config.root_nodes = :all
4
-
5
- config.unexposed_nodes = []
6
-
7
- config.home_slug = 'home'
8
-
9
- config.media_styles = {
10
- large: '1024x1024>',
11
- medium: '512x512>',
12
- small: '256x256>'
13
- }
14
-
15
- # Configure the default mailer "from" address
16
- config.mailer_sender = 'pushtype@example.com'
17
-
18
- # Dragonfly datastore configuration
19
- config.dragonfly_datastore = :file
20
- config.dragonfly_datastore_options = {
21
- root_path: Rails.root.join('public/system/dragonfly', Rails.env),
22
- server_root: Rails.root.join('public')
23
- }
24
-
25
- # For S3 storage, remember to add to Gemfile:
26
- # gem 'dragonfly-s3_data_store'
27
- # config.dragonfly_datastore = :s3
28
- # config.dragonfly_datastore_options = {
29
- # bucket_name: ENV['S3_BUCKET'],
30
- # access_key_id: ENV['S3_ACCESS_KEY_ID'],
31
- # secret_access_key: ENV['SECRET_ACCESS_KEY_ID']
32
- # }
33
-
34
- # config.dragonfly_secret = '3764b84c0b63ebfbca0285d9f74cde7a89cdd9efe70ddf64256f004eb2d81af8'
35
-
36
- end
@@ -1,59 +0,0 @@
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