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 CHANGED
@@ -1 +1 @@
1
- 0.0.4
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 }
@@ -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.4"
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{2010-11-15}
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.3.7}
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
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
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
- date: 2010-11-15 00:00:00.000000000 -08:00
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
- requirement: &70167964633200 !ruby/object:Gem::Requirement
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: '1.5'
23
+ - !ruby/object:Gem::Version
24
+ version: "1.5"
23
25
  type: :runtime
24
- prerelease: false
25
- version_requirements: *70167964633200
26
- - !ruby/object:Gem::Dependency
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
27
28
  name: rails
28
- requirement: &70167964632720 !ruby/object:Gem::Requirement
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
- prerelease: false
36
- version_requirements: *70167964632720
37
- - !ruby/object:Gem::Dependency
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
38
39
  name: sqlite3
39
- requirement: &70167964632240 !ruby/object:Gem::Requirement
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
40
42
  none: false
41
- requirements:
42
- - - ! '>='
43
- - !ruby/object:Gem::Version
44
- version: '0'
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
45
47
  type: :development
46
- prerelease: false
47
- version_requirements: *70167964632240
48
- description: This plugin, greatly inspired by Jim Morris' blog post (http://blog.wolfman.com/articles/2007/08/07/bit-vector-preferences),
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
- extra_rdoc_files:
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
- require_paths:
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: '0'
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: '0'
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: 4
99
- summary: Rails 3 compatible plugin gem for boolean preferences for an ActiveRecord
100
- model
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