attribute_predicates 0.1.1 → 0.1.2
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/CHANGELOG.rdoc +5 -1
- data/Rakefile +2 -2
- data/lib/attribute_predicates/extensions/active_record.rb +1 -1
- metadata +7 -7
data/CHANGELOG.rdoc
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
== master
|
2
2
|
|
3
|
+
== 0.1.2 / 2008-11-29
|
4
|
+
|
5
|
+
* Fix empty strings in ActiveRecord 2.2+ returning nil instead of false
|
6
|
+
|
3
7
|
== 0.1.1 / 2008-07-06
|
4
8
|
|
5
9
|
* Remove dependency on active_support for non-ActiveRecord predicates
|
@@ -14,7 +18,7 @@
|
|
14
18
|
|
15
19
|
== 0.0.4 / 2008-05-05
|
16
20
|
|
17
|
-
* Support for
|
21
|
+
* Support for ActiveRecord 2.1
|
18
22
|
* Update documentation
|
19
23
|
|
20
24
|
== 0.0.3 / 2007-09-18
|
data/Rakefile
CHANGED
@@ -5,11 +5,11 @@ require 'rake/contrib/sshpublisher'
|
|
5
5
|
|
6
6
|
spec = Gem::Specification.new do |s|
|
7
7
|
s.name = 'attribute_predicates'
|
8
|
-
s.version = '0.1.
|
8
|
+
s.version = '0.1.2'
|
9
9
|
s.platform = Gem::Platform::RUBY
|
10
10
|
s.summary = 'Adds automatic generation of predicate methods for attributes.'
|
11
11
|
|
12
|
-
s.files = FileList['{lib,test}/**/*']
|
12
|
+
s.files = FileList['{lib,test}/**/*'] + %w(CHANGELOG.rdoc init.rb LICENSE Rakefile README.rdoc)
|
13
13
|
s.require_path = 'lib'
|
14
14
|
s.has_rdoc = true
|
15
15
|
s.test_files = Dir['test/**/*_test.rb']
|
@@ -40,7 +40,7 @@ module PluginAWeek #:nodoc:
|
|
40
40
|
# * 1
|
41
41
|
def attr_predicate(symbol)
|
42
42
|
define_method("#{symbol}?") do
|
43
|
-
::ActiveRecord::ConnectionAdapters::Column.value_to_boolean(instance_variable_get("@#{symbol}"))
|
43
|
+
::ActiveRecord::ConnectionAdapters::Column.value_to_boolean(instance_variable_get("@#{symbol}")) == true
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attribute_predicates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Pfeifer
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-11-29 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -22,14 +22,14 @@ extensions: []
|
|
22
22
|
extra_rdoc_files: []
|
23
23
|
|
24
24
|
files:
|
25
|
-
- lib/attribute_predicates.rb
|
26
25
|
- lib/attribute_predicates
|
27
26
|
- lib/attribute_predicates/extensions
|
28
27
|
- lib/attribute_predicates/extensions/active_record.rb
|
29
28
|
- lib/attribute_predicates/extensions/module.rb
|
30
|
-
-
|
31
|
-
- test/test_helper.rb
|
29
|
+
- lib/attribute_predicates.rb
|
32
30
|
- test/module_test.rb
|
31
|
+
- test/test_helper.rb
|
32
|
+
- test/active_record_test.rb
|
33
33
|
- CHANGELOG.rdoc
|
34
34
|
- init.rb
|
35
35
|
- LICENSE
|
@@ -57,10 +57,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements: []
|
58
58
|
|
59
59
|
rubyforge_project: pluginaweek
|
60
|
-
rubygems_version: 1.
|
60
|
+
rubygems_version: 1.2.0
|
61
61
|
signing_key:
|
62
62
|
specification_version: 2
|
63
63
|
summary: Adds automatic generation of predicate methods for attributes.
|
64
64
|
test_files:
|
65
|
-
- test/active_record_test.rb
|
66
65
|
- test/module_test.rb
|
66
|
+
- test/active_record_test.rb
|