piggybak_taxonomy 0.0.8 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2b2a52f1e600dfd25861f83638ba755ee4c31bf1
4
+ data.tar.gz: af22b45ba0bc0c91a01c511e704e3b54b4a9f98a
5
+ SHA512:
6
+ metadata.gz: f4a8f1a24dd5ce2e616277afa4fad30cb6205d1760301c604f31d0efd10a60e95710ee70e39a6950142367445d8a456eae2387e8f58051bc3cf83c20dcf88690
7
+ data.tar.gz: 20f58a4be463377ebf1e035a08e4fa6477c6c2faf0199913d23f2d9621d43b35fad3e2167fa7c3b6fc9521e1639ab4023ca18e3ececac8afdbdcf2b90d3c4cb9
@@ -1,16 +1,15 @@
1
1
  module PiggybakTaxonomy
2
2
  class NavigationNode < ActiveRecord::Base
3
- self.table_name = "navigation_nodes"
4
-
5
3
  has_many :sellable_taxonomies, :class_name => "::PiggybakTaxonomy::SellableTaxonomy"
6
4
  has_many :sellables, :through => :sellable_taxonomies, :class_name => "::Piggybak::Sellable"
7
5
  accepts_nested_attributes_for :sellable_taxonomies, :allow_destroy => true
8
- attr_accessible :title, :slug, :position, :sellable_taxonomies_attributes #sellables_ids, :sellables
6
+ # attr_accessible :title, :slug, :position, :sellable_taxonomies_attributes #sellables_ids, :sellables
7
+
8
+ validates :title, presence: true
9
+ validates :slug, presence: true
9
10
 
10
- validates_presence_of :title
11
- validates_presence_of :slug
12
-
13
- validates_format_of :slug, :with => /^[a-z_]+$/
11
+ # UPGRADE TODO
12
+ # validates_format_of :slug, :with => /^[a-z_]+$/
14
13
 
15
14
  has_ancestry
16
15
 
@@ -1,11 +1,9 @@
1
1
  module PiggybakTaxonomy
2
2
  class SellableTaxonomy < ActiveRecord::Base
3
- self.table_name = "sellable_taxonomies"
4
-
5
3
  belongs_to :navigation_node, :class_name => "::PiggybakTaxonomy::NavigationNode"
6
4
  belongs_to :sellable, :class_name => "::Piggybak::Sellable"
7
5
  default_scope order('sort ASC')
8
- attr_accessible :navigation_node_id, :sellable_id, :sort
6
+ # attr_accessible :navigation_node_id, :sellable_id, :sort
9
7
 
10
8
  validates_presence_of :sellable, :sort
11
9
 
data/config/routes.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  PiggybakTaxonomy::Engine.routes.draw do
2
- match "/n/*path" => "navigation#show", :as => :piggybak_taxonomy
2
+ get "/n/*path" => "navigation#show", :as => :piggybak_taxonomy
3
3
  end
@@ -0,0 +1,6 @@
1
+ class UpdatePiggybakTaxonomyTables < ActiveRecord::Migration
2
+ def change
3
+ rename_table :navigation_nodes, :piggybak_taxonomy_navigation_nodes
4
+ rename_table :sellable_taxonomies, :piggybak_taxonomy_sellable_taxonomies
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module PiggybakTaxonomy
2
- VERSION = "0.0.8"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,64 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piggybak_taxonomy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Steph Skardal
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-22 00:00:00.000000000 Z
11
+ date: 2014-03-27 00:00:00.000000000 Z
13
12
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rails
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 3.2.8
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 3.2.8
30
13
  - !ruby/object:Gem::Dependency
31
14
  name: ancestry
32
15
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
16
  requirements:
35
- - - ! '>='
17
+ - - ">="
36
18
  - !ruby/object:Gem::Version
37
19
  version: '0'
38
20
  type: :runtime
39
21
  prerelease: false
40
22
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
23
  requirements:
43
- - - ! '>='
24
+ - - ">="
44
25
  - !ruby/object:Gem::Version
45
26
  version: '0'
46
27
  - !ruby/object:Gem::Dependency
47
28
  name: piggybak_rails_admin_nestable
48
29
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
30
  requirements:
51
- - - ! '>='
31
+ - - '='
52
32
  - !ruby/object:Gem::Version
53
- version: '0'
33
+ version: 0.0.6
54
34
  type: :runtime
55
35
  prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
37
  requirements:
59
- - - ! '>='
38
+ - - '='
60
39
  - !ruby/object:Gem::Version
61
- version: '0'
40
+ version: 0.0.6
62
41
  description: Piggybak Taxonomy - navigation support for Piggybak.
63
42
  email:
64
43
  - steph@endpoint.com
@@ -66,53 +45,47 @@ executables: []
66
45
  extensions: []
67
46
  extra_rdoc_files: []
68
47
  files:
48
+ - LICENSE
49
+ - README.md
50
+ - Rakefile
69
51
  - app/controllers/piggybak_taxonomy/navigation_controller.rb
70
- - app/models/piggybak_taxonomy/sellable_taxonomy.rb
71
- - app/models/piggybak_taxonomy/navigation_node.rb
72
52
  - app/helpers/piggybak_taxonomy_helper.rb
73
- - app/views/piggybak_taxonomy/navigation/_pagination.html.erb
74
- - app/views/piggybak_taxonomy/navigation/show.html.erb
53
+ - app/models/piggybak_taxonomy/navigation_node.rb
54
+ - app/models/piggybak_taxonomy/sellable_taxonomy.rb
75
55
  - app/views/piggybak_taxonomy/navigation/_breadcrumb.html.erb
56
+ - app/views/piggybak_taxonomy/navigation/_pagination.html.erb
76
57
  - app/views/piggybak_taxonomy/navigation/_sellable.html.erb
58
+ - app/views/piggybak_taxonomy/navigation/show.html.erb
77
59
  - config/routes.rb
78
60
  - db/migrate/20121109164759_create_piggybak_taxonomy_navigation_nodes.rb
79
61
  - db/migrate/20121109164810_sellable_taxonomy.rb
62
+ - db/migrate/20140325200825_update_piggybak_taxonomy_tables.rb
80
63
  - lib/piggybak_taxonomy.rb
81
- - lib/piggybak_taxonomy/sellable_decorator.rb
82
64
  - lib/piggybak_taxonomy/engine.rb
65
+ - lib/piggybak_taxonomy/sellable_decorator.rb
83
66
  - lib/piggybak_taxonomy/version.rb
84
67
  - lib/tasks/piggybak_taxonomy_tasks.rake
85
- - LICENSE
86
- - Rakefile
87
- - README.md
88
68
  homepage: http://www.piggybak.org/
89
69
  licenses: []
70
+ metadata: {}
90
71
  post_install_message:
91
72
  rdoc_options: []
92
73
  require_paths:
93
74
  - lib
94
75
  required_ruby_version: !ruby/object:Gem::Requirement
95
- none: false
96
76
  requirements:
97
- - - ! '>='
77
+ - - ">="
98
78
  - !ruby/object:Gem::Version
99
79
  version: '0'
100
- segments:
101
- - 0
102
- hash: 1258028045826469775
103
80
  required_rubygems_version: !ruby/object:Gem::Requirement
104
- none: false
105
81
  requirements:
106
- - - ! '>='
82
+ - - ">="
107
83
  - !ruby/object:Gem::Version
108
84
  version: '0'
109
- segments:
110
- - 0
111
- hash: 1258028045826469775
112
85
  requirements: []
113
86
  rubyforge_project:
114
- rubygems_version: 1.8.23
87
+ rubygems_version: 2.2.2
115
88
  signing_key:
116
- specification_version: 3
89
+ specification_version: 4
117
90
  summary: Piggybak Taxonomy - navigation support for Piggybak.
118
91
  test_files: []