mechanize_store 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/mechanize_store/product_categories_controller.rb +1 -1
  3. data/app/controllers/mechanize_store/product_sections_controller.rb +77 -0
  4. data/app/models/mechanize_store/product_category.rb +3 -4
  5. data/app/models/mechanize_store/product_section.rb +18 -0
  6. data/app/views/mechanize_store/product_sections/_form.html.erb +11 -0
  7. data/app/views/mechanize_store/product_sections/edit.html.erb +12 -0
  8. data/app/views/mechanize_store/product_sections/index.html.erb +46 -0
  9. data/app/views/mechanize_store/product_sections/new.html.erb +9 -0
  10. data/app/views/mechanize_store/product_sections/show.html.erb +15 -0
  11. data/config/routes.rb +2 -0
  12. data/db/migrate/20140606123953_create_mechanize_store_product_sections.rb +9 -0
  13. data/db/migrate/20140606124916_add_slug_to_product_section.rb +5 -0
  14. data/db/migrate/20140606130912_add_product_section_id_to_mechanize_store_product_category.rb +5 -0
  15. data/lib/mechanize_store/version.rb +1 -1
  16. data/spec/controllers/mechanize_store/product_sections_controller_spec.rb +139 -0
  17. data/spec/dummy/db/development.sqlite3 +0 -0
  18. data/spec/dummy/db/schema.rb +9 -1
  19. data/spec/dummy/db/test.sqlite3 +0 -0
  20. data/spec/dummy/log/development.log +16 -0
  21. data/spec/dummy/log/test.log +8397 -0
  22. data/spec/dummy/public/photos/1/medium.png +0 -0
  23. data/spec/dummy/public/photos/1/thumb.png +0 -0
  24. data/spec/factories/mechanize_store_product_categories.rb +1 -1
  25. data/spec/factories/mechanize_store_product_sections.rb +7 -0
  26. data/spec/models/mechanize_store/product_section_spec.rb +7 -0
  27. data/spec/routing/{store → mechanize_store}/flags_routing_spec.rb +0 -0
  28. data/spec/routing/{store → mechanize_store}/orders_routing_spec.rb +0 -0
  29. data/spec/routing/{store → mechanize_store}/product_categories_routing_spec.rb +0 -0
  30. data/spec/routing/mechanize_store/product_sections_routing_spec.rb +39 -0
  31. data/spec/routing/{store → mechanize_store}/products_photos_routing_spec.rb +0 -0
  32. data/spec/routing/{store → mechanize_store}/products_routing_spec.rb +0 -0
  33. metadata +30 -12
Binary file
Binary file
@@ -3,6 +3,6 @@
3
3
  FactoryGirl.define do
4
4
  factory :mechanize_store_product_category, :class => 'ProductCategory' do
5
5
  name "MyString"
6
- product_category nil
6
+ product_section
7
7
  end
8
8
  end
@@ -0,0 +1,7 @@
1
+ # Read about factories at https://github.com/thoughtbot/factory_girl
2
+
3
+ FactoryGirl.define do
4
+ factory :mechanize_store_product_section, :class => 'ProductSection' do
5
+ name "MyString"
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ module MechanizeStore
4
+ describe ProductSection do
5
+
6
+ end
7
+ end
@@ -0,0 +1,39 @@
1
+ require "spec_helper"
2
+
3
+ module MechanizeStore
4
+ describe ProductSectionsController do
5
+ describe "routing" do
6
+
7
+ routes { MechanizeStore::Engine.routes }
8
+
9
+ it "routes to #index" do
10
+ get("/product_sections").should route_to("mechanize_store/product_sections#index")
11
+ end
12
+
13
+ it "routes to #new" do
14
+ get("/product_sections/new").should route_to("mechanize_store/product_sections#new")
15
+ end
16
+
17
+ it "routes to #show" do
18
+ get("/product_sections/1").should route_to("mechanize_store/product_sections#show", :id => "1")
19
+ end
20
+
21
+ it "routes to #edit" do
22
+ get("/product_sections/1/edit").should route_to("mechanize_store/product_sections#edit", :id => "1")
23
+ end
24
+
25
+ it "routes to #create" do
26
+ post("/product_sections").should route_to("mechanize_store/product_sections#create")
27
+ end
28
+
29
+ it "routes to #update" do
30
+ put("/product_sections/1").should route_to("mechanize_store/product_sections#update", :id => "1")
31
+ end
32
+
33
+ it "routes to #destroy" do
34
+ delete("/product_sections/1").should route_to("mechanize_store/product_sections#destroy", :id => "1")
35
+ end
36
+
37
+ end
38
+ end
39
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mechanize_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wilbert Ribeiro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-05 00:00:00.000000000 Z
11
+ date: 2014-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -266,6 +266,7 @@ files:
266
266
  - app/controllers/mechanize_store/orders_controller.rb
267
267
  - app/controllers/mechanize_store/product_categories_controller.rb
268
268
  - app/controllers/mechanize_store/product_photos_controller.rb
269
+ - app/controllers/mechanize_store/product_sections_controller.rb
269
270
  - app/controllers/mechanize_store/products_controller.rb
270
271
  - app/helpers/mechanize_store/application_helper.rb
271
272
  - app/models/mechanize_store/flag.rb
@@ -277,6 +278,7 @@ files:
277
278
  - app/models/mechanize_store/product.rb
278
279
  - app/models/mechanize_store/product_category.rb
279
280
  - app/models/mechanize_store/product_photo.rb
281
+ - app/models/mechanize_store/product_section.rb
280
282
  - app/views/mechanize_store/flags/_form.html.erb
281
283
  - app/views/mechanize_store/flags/edit.html.erb
282
284
  - app/views/mechanize_store/flags/index.html.erb
@@ -291,6 +293,11 @@ files:
291
293
  - app/views/mechanize_store/product_categories/show.html.erb
292
294
  - app/views/mechanize_store/product_photos/create.json.jbuilder
293
295
  - app/views/mechanize_store/product_photos/index.json.jbuilder
296
+ - app/views/mechanize_store/product_sections/_form.html.erb
297
+ - app/views/mechanize_store/product_sections/edit.html.erb
298
+ - app/views/mechanize_store/product_sections/index.html.erb
299
+ - app/views/mechanize_store/product_sections/new.html.erb
300
+ - app/views/mechanize_store/product_sections/show.html.erb
294
301
  - app/views/mechanize_store/products/_form.html.erb
295
302
  - app/views/mechanize_store/products/edit.html.erb
296
303
  - app/views/mechanize_store/products/index.html.erb
@@ -312,6 +319,9 @@ files:
312
319
  - db/migrate/20140417200520_add_time_to_freight.rb
313
320
  - db/migrate/20140602124615_rename_columns.rb
314
321
  - db/migrate/20140605213358_add_slug_to_product_category.rb
322
+ - db/migrate/20140606123953_create_mechanize_store_product_sections.rb
323
+ - db/migrate/20140606124916_add_slug_to_product_section.rb
324
+ - db/migrate/20140606130912_add_product_section_id_to_mechanize_store_product_category.rb
315
325
  - lib/mechanize_store.rb
316
326
  - lib/mechanize_store/engine.rb
317
327
  - lib/mechanize_store/version.rb
@@ -326,6 +336,7 @@ files:
326
336
  - spec/controllers/mechanize_store/orders_controller_spec.rb
327
337
  - spec/controllers/mechanize_store/product_categories_controller_spec.rb
328
338
  - spec/controllers/mechanize_store/product_photos_controller_spec.rb
339
+ - spec/controllers/mechanize_store/product_sections_controller_spec.rb
329
340
  - spec/controllers/mechanize_store/products_controller_spec.rb
330
341
  - spec/dummy/README.rdoc
331
342
  - spec/dummy/Rakefile
@@ -534,6 +545,7 @@ files:
534
545
  - spec/factories/mechanize_store_payments.rb
535
546
  - spec/factories/mechanize_store_product_categories.rb
536
547
  - spec/factories/mechanize_store_product_photos.rb
548
+ - spec/factories/mechanize_store_product_sections.rb
537
549
  - spec/factories/mechanize_store_products.rb
538
550
  - spec/factories/mechanize_store_stores.rb
539
551
  - spec/features/orders_flow_spec.rb
@@ -546,13 +558,15 @@ files:
546
558
  - spec/models/mechanize_store/payment_spec.rb
547
559
  - spec/models/mechanize_store/product_category_spec.rb
548
560
  - spec/models/mechanize_store/product_photo_spec.rb
561
+ - spec/models/mechanize_store/product_section_spec.rb
549
562
  - spec/models/mechanize_store/product_spec.rb
550
563
  - spec/models/mechanize_store/store_spec.rb
551
- - spec/routing/store/flags_routing_spec.rb
552
- - spec/routing/store/orders_routing_spec.rb
553
- - spec/routing/store/product_categories_routing_spec.rb
554
- - spec/routing/store/products_photos_routing_spec.rb
555
- - spec/routing/store/products_routing_spec.rb
564
+ - spec/routing/mechanize_store/flags_routing_spec.rb
565
+ - spec/routing/mechanize_store/orders_routing_spec.rb
566
+ - spec/routing/mechanize_store/product_categories_routing_spec.rb
567
+ - spec/routing/mechanize_store/product_sections_routing_spec.rb
568
+ - spec/routing/mechanize_store/products_photos_routing_spec.rb
569
+ - spec/routing/mechanize_store/products_routing_spec.rb
556
570
  - spec/spec_helper.rb
557
571
  homepage: http://www.github.com/wilbert/mechanize-store
558
572
  licenses:
@@ -584,6 +598,7 @@ test_files:
584
598
  - spec/controllers/mechanize_store/orders_controller_spec.rb
585
599
  - spec/controllers/mechanize_store/product_categories_controller_spec.rb
586
600
  - spec/controllers/mechanize_store/product_photos_controller_spec.rb
601
+ - spec/controllers/mechanize_store/product_sections_controller_spec.rb
587
602
  - spec/controllers/mechanize_store/products_controller_spec.rb
588
603
  - spec/dummy/app/assets/javascripts/application.js
589
604
  - spec/dummy/app/assets/stylesheets/application.css
@@ -792,6 +807,7 @@ test_files:
792
807
  - spec/factories/mechanize_store_payments.rb
793
808
  - spec/factories/mechanize_store_product_categories.rb
794
809
  - spec/factories/mechanize_store_product_photos.rb
810
+ - spec/factories/mechanize_store_product_sections.rb
795
811
  - spec/factories/mechanize_store_products.rb
796
812
  - spec/factories/mechanize_store_stores.rb
797
813
  - spec/features/orders_flow_spec.rb
@@ -804,11 +820,13 @@ test_files:
804
820
  - spec/models/mechanize_store/payment_spec.rb
805
821
  - spec/models/mechanize_store/product_category_spec.rb
806
822
  - spec/models/mechanize_store/product_photo_spec.rb
823
+ - spec/models/mechanize_store/product_section_spec.rb
807
824
  - spec/models/mechanize_store/product_spec.rb
808
825
  - spec/models/mechanize_store/store_spec.rb
809
- - spec/routing/store/flags_routing_spec.rb
810
- - spec/routing/store/orders_routing_spec.rb
811
- - spec/routing/store/product_categories_routing_spec.rb
812
- - spec/routing/store/products_photos_routing_spec.rb
813
- - spec/routing/store/products_routing_spec.rb
826
+ - spec/routing/mechanize_store/flags_routing_spec.rb
827
+ - spec/routing/mechanize_store/orders_routing_spec.rb
828
+ - spec/routing/mechanize_store/product_categories_routing_spec.rb
829
+ - spec/routing/mechanize_store/product_sections_routing_spec.rb
830
+ - spec/routing/mechanize_store/products_photos_routing_spec.rb
831
+ - spec/routing/mechanize_store/products_routing_spec.rb
814
832
  - spec/spec_helper.rb