acts_as_tree 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -1,9 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.8.7
4
3
  - 1.9.2
5
4
  - 1.9.3
6
- - rbx-18mode
7
5
  - rbx-19mode
8
- - ree
9
6
  - ruby-head
data/README.md CHANGED
@@ -8,7 +8,7 @@ parent–children relationships.
8
8
  ## Example
9
9
 
10
10
  class Category < ActiveRecord::Base
11
- include ActiveRecord::Acts:Tree
11
+ include ActiveRecord::Acts::Tree
12
12
 
13
13
  acts_as_tree order: "name"
14
14
  end
@@ -1,7 +1,7 @@
1
1
  module ActiveRecord
2
2
  module Acts
3
3
  module Tree
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
6
6
  end
7
7
  end
data/lib/acts_as_tree.rb CHANGED
@@ -1,2 +1,23 @@
1
1
  require 'acts_as_tree/active_record/acts/tree'
2
2
  require 'acts_as_tree/version'
3
+
4
+ module ActsAsTree
5
+ if defined? Rails::Railtie
6
+ require 'rails'
7
+ class Railtie < Rails::Railtie
8
+ initializer 'acts_as_tree.insert_into_active_record' do
9
+ ActiveSupport.on_load :active_record do
10
+ ActsAsTree::Railtie.insert
11
+ end
12
+ end
13
+ end
14
+ end
15
+
16
+ class Railtie
17
+ def self.insert
18
+ if defined?(ActiveRecord)
19
+ ActiveRecord::Base.send(:include, ActiveRecord::Acts::Tree)
20
+ end
21
+ end
22
+ end
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,11 +12,11 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-04-14 00:00:00.000000000 Z
15
+ date: 2012-04-18 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activerecord
19
- requirement: &70099083764900 !ruby/object:Gem::Requirement
19
+ requirement: &70288490534000 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 3.0.0
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *70099083764900
27
+ version_requirements: *70288490534000
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: sqlite3
30
- requirement: &70099083764300 !ruby/object:Gem::Requirement
30
+ requirement: &70288490533300 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: '0'
36
36
  type: :development
37
37
  prerelease: false
38
- version_requirements: *70099083764300
38
+ version_requirements: *70288490533300
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: rdoc
41
- requirement: &70099083763760 !ruby/object:Gem::Requirement
41
+ requirement: &70288490532580 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -46,7 +46,7 @@ dependencies:
46
46
  version: '0'
47
47
  type: :development
48
48
  prerelease: false
49
- version_requirements: *70099083763760
49
+ version_requirements: *70288490532580
50
50
  description: A gem that adds simple support for organizing ActiveRecord models into
51
51
  parent–children relationships.
52
52
  email: