awesome_nested_set 1.4.4 → 2.0.0

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.
@@ -1,18 +0,0 @@
1
- sqlite3:
2
- adapter: sqlite3
3
- database: awesome_nested_set.sqlite3.db
4
- sqlite3mem:
5
- adapter: sqlite3
6
- database: ":memory:"
7
- postgresql:
8
- adapter: postgresql
9
- username: postgres
10
- password: postgres
11
- database: awesome_nested_set_plugin_test
12
- min_messages: ERROR
13
- mysql:
14
- adapter: mysql
15
- host: localhost
16
- username: root
17
- password:
18
- database: awesome_nested_set_plugin_test
@@ -1,30 +0,0 @@
1
- ActiveRecord::Schema.define(:version => 0) do
2
-
3
- create_table :categories, :force => true do |t|
4
- t.column :name, :string
5
- t.column :parent_id, :integer
6
- t.column :lft, :integer
7
- t.column :rgt, :integer
8
- t.column :organization_id, :integer
9
- end
10
-
11
- create_table :departments, :force => true do |t|
12
- t.column :name, :string
13
- end
14
-
15
- create_table :notes, :force => true do |t|
16
- t.column :body, :text
17
- t.column :parent_id, :integer
18
- t.column :lft, :integer
19
- t.column :rgt, :integer
20
- t.column :notable_id, :integer
21
- t.column :notable_type, :string
22
- end
23
-
24
- create_table :renamed_columns, :force => true do |t|
25
- t.column :name, :string
26
- t.column :mother_id, :integer
27
- t.column :red, :integer
28
- t.column :black, :integer
29
- end
30
- end
@@ -1,34 +0,0 @@
1
- top_level:
2
- id: 1
3
- name: Top Level
4
- lft: 1
5
- rgt: 10
6
- child_1:
7
- id: 2
8
- name: Child 1
9
- parent_id: 1
10
- lft: 2
11
- rgt: 3
12
- child_2:
13
- id: 3
14
- name: Child 2
15
- parent_id: 1
16
- lft: 4
17
- rgt: 7
18
- child_2_1:
19
- id: 4
20
- name: Child 2.1
21
- parent_id: 3
22
- lft: 5
23
- rgt: 6
24
- child_3:
25
- id: 5
26
- name: Child 3
27
- parent_id: 1
28
- lft: 8
29
- rgt: 9
30
- top_level_2:
31
- id: 6
32
- name: Top Level 2
33
- lft: 11
34
- rgt: 12
@@ -1,15 +0,0 @@
1
- class Category < ActiveRecord::Base
2
- acts_as_nested_set
3
-
4
- def to_s
5
- name
6
- end
7
-
8
- def recurse &block
9
- block.call self, lambda{
10
- self.children.each do |child|
11
- child.recurse &block
12
- end
13
- }
14
- end
15
- end
@@ -1,3 +0,0 @@
1
- top:
2
- id: 1
3
- name: Top
@@ -1,38 +0,0 @@
1
- scope1:
2
- id: 1
3
- body: Top Level
4
- lft: 1
5
- rgt: 10
6
- notable_id: 1
7
- notable_type: Category
8
- child_1:
9
- id: 2
10
- body: Child 1
11
- parent_id: 1
12
- lft: 2
13
- rgt: 3
14
- notable_id: 1
15
- notable_type: Category
16
- child_2:
17
- id: 3
18
- body: Child 2
19
- parent_id: 1
20
- lft: 4
21
- rgt: 7
22
- notable_id: 1
23
- notable_type: Category
24
- child_3:
25
- id: 4
26
- body: Child 3
27
- parent_id: 1
28
- lft: 8
29
- rgt: 9
30
- notable_id: 1
31
- notable_type: Category
32
- scope2:
33
- id: 5
34
- body: Top Level 2
35
- lft: 1
36
- rgt: 2
37
- notable_id: 1
38
- notable_type: Departments
@@ -1,29 +0,0 @@
1
- $:.unshift(File.dirname(__FILE__) + '/../lib')
2
- plugin_test_dir = File.dirname(__FILE__)
3
- RAILS_ROOT = plugin_test_dir
4
-
5
- require 'rubygems'
6
- require 'test/unit'
7
- require 'multi_rails_init'
8
- require 'test_help'
9
-
10
- require plugin_test_dir + '/../init.rb'
11
-
12
- TestCaseClass = ActiveSupport::TestCase rescue Test::Unit::TestCase
13
-
14
- ActiveRecord::Base.logger = Logger.new(plugin_test_dir + "/debug.log")
15
-
16
- ActiveRecord::Base.configurations = YAML::load(IO.read(plugin_test_dir + "/db/database.yml"))
17
- ActiveRecord::Base.establish_connection(ENV["DB"] || "sqlite3mem")
18
- ActiveRecord::Migration.verbose = false
19
- load(File.join(plugin_test_dir, "db", "schema.rb"))
20
-
21
- Dir["#{plugin_test_dir}/fixtures/*.rb"].each {|file| require file }
22
-
23
- class TestCaseClass #:nodoc:
24
- self.fixture_path = File.dirname(__FILE__) + "/fixtures/"
25
- self.use_transactional_fixtures = true
26
- self.use_instantiated_fixtures = false
27
-
28
- fixtures :categories, :notes, :departments
29
- end