preference_fu 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/preference_fu.rb +2 -2
- data/preference_fu.gemspec +4 -5
- metadata +51 -50
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/lib/preference_fu.rb
CHANGED
@@ -88,7 +88,7 @@ module PreferenceFu
|
|
88
88
|
@options = instance.class.preference_options
|
89
89
|
|
90
90
|
# setup defaults if prefs is nil
|
91
|
-
if @instance.new_record?
|
91
|
+
if prefs.nil? || @instance.new_record?
|
92
92
|
@options.each do |idx, hsh|
|
93
93
|
instance_variable_set("@#{hsh[:key]}", hsh[:default])
|
94
94
|
end
|
@@ -162,4 +162,4 @@ module PreferenceFu
|
|
162
162
|
end
|
163
163
|
|
164
164
|
end
|
165
|
-
ActiveRecord::Base.class_eval { include PreferenceFu }
|
165
|
+
ActiveRecord::Base.class_eval { include PreferenceFu }
|
data/preference_fu.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{preference_fu}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brennan Dunn"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-08-02}
|
13
13
|
s.description = %q{This plugin, greatly inspired by Jim Morris' blog post (http://blog.wolfman.com/articles/2007/08/07/bit-vector-preferences), aims to make it easy and flexible to store boolean preferences for an ActiveRecord model.This can be also used as a very quick way to setup an ACL. Because the values are stored within a bit vector, a virtually unlimited number of preferences can be created without additional migrations.}
|
14
14
|
s.email = %q{}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
|
|
35
35
|
]
|
36
36
|
s.homepage = %q{http://github.com/g5search/preference_fu}
|
37
37
|
s.require_paths = ["lib"]
|
38
|
-
s.rubygems_version = %q{1.
|
38
|
+
s.rubygems_version = %q{1.6.2}
|
39
39
|
s.summary = %q{Rails 3 compatible plugin gem for boolean preferences for an ActiveRecord model}
|
40
40
|
s.test_files = [
|
41
41
|
"test/abstract_unit.rb",
|
@@ -44,8 +44,7 @@ Gem::Specification.new do |s|
|
|
44
44
|
]
|
45
45
|
|
46
46
|
if s.respond_to? :specification_version then
|
47
|
-
|
48
|
-
s.specification_version = 4
|
47
|
+
s.specification_version = 3
|
49
48
|
|
50
49
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
51
50
|
s.add_runtime_dependency(%q<jeweler>, ["~> 1.5"])
|
metadata
CHANGED
@@ -1,61 +1,60 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: preference_fu
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.4
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 0.0.5
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Brennan Dunn
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
12
|
+
|
13
|
+
date: 2011-08-02 00:00:00 -07:00
|
13
14
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
16
17
|
name: jeweler
|
17
|
-
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
20
|
none: false
|
19
|
-
requirements:
|
21
|
+
requirements:
|
20
22
|
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version:
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: "1.5"
|
23
25
|
type: :runtime
|
24
|
-
|
25
|
-
|
26
|
-
- !ruby/object:Gem::Dependency
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
27
28
|
name: rails
|
28
|
-
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
29
31
|
none: false
|
30
|
-
requirements:
|
32
|
+
requirements:
|
31
33
|
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
34
|
+
- !ruby/object:Gem::Version
|
33
35
|
version: 3.0.1
|
34
36
|
type: :development
|
35
|
-
|
36
|
-
|
37
|
-
- !ruby/object:Gem::Dependency
|
37
|
+
version_requirements: *id002
|
38
|
+
- !ruby/object:Gem::Dependency
|
38
39
|
name: sqlite3
|
39
|
-
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
42
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version:
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: "0"
|
45
47
|
type: :development
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
aims to make it easy and flexible to store boolean preferences for an ActiveRecord
|
50
|
-
model.This can be also used as a very quick way to setup an ACL. Because the values
|
51
|
-
are stored within a bit vector, a virtually unlimited number of preferences can
|
52
|
-
be created without additional migrations.
|
53
|
-
email: ''
|
48
|
+
version_requirements: *id003
|
49
|
+
description: This plugin, greatly inspired by Jim Morris' blog post (http://blog.wolfman.com/articles/2007/08/07/bit-vector-preferences), aims to make it easy and flexible to store boolean preferences for an ActiveRecord model.This can be also used as a very quick way to setup an ACL. Because the values are stored within a bit vector, a virtually unlimited number of preferences can be created without additional migrations.
|
50
|
+
email: ""
|
54
51
|
executables: []
|
52
|
+
|
55
53
|
extensions: []
|
56
|
-
|
54
|
+
|
55
|
+
extra_rdoc_files:
|
57
56
|
- README
|
58
|
-
files:
|
57
|
+
files:
|
59
58
|
- .rvmrc
|
60
59
|
- Gemfile
|
61
60
|
- Gemfile.lock
|
@@ -75,30 +74,32 @@ files:
|
|
75
74
|
has_rdoc: true
|
76
75
|
homepage: http://github.com/g5search/preference_fu
|
77
76
|
licenses: []
|
77
|
+
|
78
78
|
post_install_message:
|
79
79
|
rdoc_options: []
|
80
|
-
|
80
|
+
|
81
|
+
require_paths:
|
81
82
|
- lib
|
82
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
84
|
none: false
|
84
|
-
requirements:
|
85
|
-
- -
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version:
|
88
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: "0"
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
90
|
none: false
|
90
|
-
requirements:
|
91
|
-
- -
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version:
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: "0"
|
94
95
|
requirements: []
|
96
|
+
|
95
97
|
rubyforge_project:
|
96
98
|
rubygems_version: 1.6.2
|
97
99
|
signing_key:
|
98
|
-
specification_version:
|
99
|
-
summary: Rails 3 compatible plugin gem for boolean preferences for an ActiveRecord
|
100
|
-
|
101
|
-
test_files:
|
100
|
+
specification_version: 3
|
101
|
+
summary: Rails 3 compatible plugin gem for boolean preferences for an ActiveRecord model
|
102
|
+
test_files:
|
102
103
|
- test/abstract_unit.rb
|
103
104
|
- test/person.rb
|
104
105
|
- test/preference_fu_test.rb
|