acts_as_list_with_sti_support 0.1.2 → 0.2.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.
- data/.gitignore +1 -0
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/acts_as_list_with_sti_support.gemspec +13 -11
- data/lib/acts_as_list_with_sti_support/base.rb +6 -2
- data/rails/init.rb +1 -0
- data/test/test_helper.rb +0 -1
- metadata +24 -9
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.DS_Store
|
data/Rakefile
CHANGED
@@ -35,8 +35,8 @@ begin
|
|
35
35
|
gemspec.name = "acts_as_list_with_sti_support"
|
36
36
|
gemspec.summary = "Gem version of acts_as_list_with_sti_support Rails plugin, a smarter version of acts_as_list."
|
37
37
|
|
38
|
-
gemspec.add_dependency("activerecord")
|
39
|
-
gemspec.
|
38
|
+
gemspec.add_dependency("activerecord", ">=2.3.4")
|
39
|
+
gemspec.add_development_dependency("activesupport", ">=2.3.4")
|
40
40
|
gemspec.files.include("lib/**/*.rb")
|
41
41
|
end
|
42
42
|
Jeweler::GemcutterTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
@@ -5,18 +5,19 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{acts_as_list_with_sti_support}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Coroutine", "John Dugan"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-07-12}
|
13
13
|
s.description = %q{This acts_as extension does everything acts_as_list does, but it also works in single table inheritance designs and accepts less brain-damaged scope syntax.}
|
14
14
|
s.email = %q{jdugan@coroutine.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.rdoc"
|
17
17
|
]
|
18
18
|
s.files = [
|
19
|
-
".
|
19
|
+
".gitignore",
|
20
|
+
".specification",
|
20
21
|
"MIT-LICENSE",
|
21
22
|
"README.rdoc",
|
22
23
|
"Rakefile",
|
@@ -25,13 +26,14 @@ Gem::Specification.new do |s|
|
|
25
26
|
"init.rb",
|
26
27
|
"lib/acts_as_list_with_sti_support.rb",
|
27
28
|
"lib/acts_as_list_with_sti_support/base.rb",
|
29
|
+
"rails/init.rb",
|
28
30
|
"test/acts_as_list_with_sti_support_test.rb",
|
29
31
|
"test/test_helper.rb"
|
30
32
|
]
|
31
33
|
s.homepage = %q{http://github.com/coroutine/acts_as_list_with_sti_support}
|
32
34
|
s.rdoc_options = ["--charset=UTF-8"]
|
33
35
|
s.require_paths = ["lib"]
|
34
|
-
s.rubygems_version = %q{1.3.
|
36
|
+
s.rubygems_version = %q{1.3.7}
|
35
37
|
s.summary = %q{Gem version of acts_as_list_with_sti_support Rails plugin, a smarter version of acts_as_list.}
|
36
38
|
s.test_files = [
|
37
39
|
"test/acts_as_list_with_sti_support_test.rb",
|
@@ -42,16 +44,16 @@ Gem::Specification.new do |s|
|
|
42
44
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
43
45
|
s.specification_version = 3
|
44
46
|
|
45
|
-
if Gem::Version.new(Gem::
|
46
|
-
s.add_runtime_dependency(%q<activerecord>, [">=
|
47
|
-
s.
|
47
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
48
|
+
s.add_runtime_dependency(%q<activerecord>, [">= 2.3.4"])
|
49
|
+
s.add_development_dependency(%q<activesupport>, [">= 2.3.4"])
|
48
50
|
else
|
49
|
-
s.add_dependency(%q<activerecord>, [">=
|
50
|
-
s.add_dependency(%q<activesupport>, [">=
|
51
|
+
s.add_dependency(%q<activerecord>, [">= 2.3.4"])
|
52
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.4"])
|
51
53
|
end
|
52
54
|
else
|
53
|
-
s.add_dependency(%q<activerecord>, [">=
|
54
|
-
s.add_dependency(%q<activesupport>, [">=
|
55
|
+
s.add_dependency(%q<activerecord>, [">= 2.3.4"])
|
56
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.4"])
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
@@ -70,8 +70,12 @@ module Coroutine #:nodoc:
|
|
70
70
|
|
71
71
|
|
72
72
|
# Add callbacks
|
73
|
-
|
74
|
-
|
73
|
+
begin
|
74
|
+
before_validation :add_to_list_bottom, :on => :create # rails 3
|
75
|
+
rescue
|
76
|
+
before_validation_on_create :add_to_list_bottom # rails 2
|
77
|
+
end
|
78
|
+
before_destroy :remove_from_list
|
75
79
|
|
76
80
|
|
77
81
|
# if no default scoping, order by position
|
data/rails/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "acts_as_list_with_sti_support"
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_list_with_sti_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
|
-
- 1
|
8
8
|
- 2
|
9
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Coroutine
|
@@ -15,32 +16,40 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-
|
19
|
+
date: 2010-07-12 00:00:00 -05:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
22
23
|
name: activerecord
|
23
24
|
prerelease: false
|
24
25
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
25
27
|
requirements:
|
26
28
|
- - ">="
|
27
29
|
- !ruby/object:Gem::Version
|
30
|
+
hash: 11
|
28
31
|
segments:
|
29
|
-
-
|
30
|
-
|
32
|
+
- 2
|
33
|
+
- 3
|
34
|
+
- 4
|
35
|
+
version: 2.3.4
|
31
36
|
type: :runtime
|
32
37
|
version_requirements: *id001
|
33
38
|
- !ruby/object:Gem::Dependency
|
34
39
|
name: activesupport
|
35
40
|
prerelease: false
|
36
41
|
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
37
43
|
requirements:
|
38
44
|
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
46
|
+
hash: 11
|
40
47
|
segments:
|
41
|
-
-
|
42
|
-
|
43
|
-
|
48
|
+
- 2
|
49
|
+
- 3
|
50
|
+
- 4
|
51
|
+
version: 2.3.4
|
52
|
+
type: :development
|
44
53
|
version_requirements: *id002
|
45
54
|
description: This acts_as extension does everything acts_as_list does, but it also works in single table inheritance designs and accepts less brain-damaged scope syntax.
|
46
55
|
email: jdugan@coroutine.com
|
@@ -51,6 +60,7 @@ extensions: []
|
|
51
60
|
extra_rdoc_files:
|
52
61
|
- README.rdoc
|
53
62
|
files:
|
63
|
+
- .gitignore
|
54
64
|
- .specification
|
55
65
|
- MIT-LICENSE
|
56
66
|
- README.rdoc
|
@@ -60,6 +70,7 @@ files:
|
|
60
70
|
- init.rb
|
61
71
|
- lib/acts_as_list_with_sti_support.rb
|
62
72
|
- lib/acts_as_list_with_sti_support/base.rb
|
73
|
+
- rails/init.rb
|
63
74
|
- test/acts_as_list_with_sti_support_test.rb
|
64
75
|
- test/test_helper.rb
|
65
76
|
has_rdoc: true
|
@@ -72,23 +83,27 @@ rdoc_options:
|
|
72
83
|
require_paths:
|
73
84
|
- lib
|
74
85
|
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
75
87
|
requirements:
|
76
88
|
- - ">="
|
77
89
|
- !ruby/object:Gem::Version
|
90
|
+
hash: 3
|
78
91
|
segments:
|
79
92
|
- 0
|
80
93
|
version: "0"
|
81
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
82
96
|
requirements:
|
83
97
|
- - ">="
|
84
98
|
- !ruby/object:Gem::Version
|
99
|
+
hash: 3
|
85
100
|
segments:
|
86
101
|
- 0
|
87
102
|
version: "0"
|
88
103
|
requirements: []
|
89
104
|
|
90
105
|
rubyforge_project:
|
91
|
-
rubygems_version: 1.3.
|
106
|
+
rubygems_version: 1.3.7
|
92
107
|
signing_key:
|
93
108
|
specification_version: 3
|
94
109
|
summary: Gem version of acts_as_list_with_sti_support Rails plugin, a smarter version of acts_as_list.
|