preference_fu 0.0.3 → 0.0.4

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.3
1
+ 0.0.4
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 prefs.nil?
91
+ if @instance.new_record?
92
92
  @options.each do |idx, hsh|
93
93
  instance_variable_set("@#{hsh[:key]}", hsh[:default])
94
94
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{preference_fu}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
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"]
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
45
45
 
46
46
  if s.respond_to? :specification_version then
47
47
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
48
- s.specification_version = 3
48
+ s.specification_version = 4
49
49
 
50
50
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
51
51
  s.add_runtime_dependency(%q<jeweler>, ["~> 1.5"])
metadata CHANGED
@@ -1,73 +1,61 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: preference_fu
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 3
9
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Brennan Dunn
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2010-11-15 00:00:00 -08:00
12
+ date: 2010-11-15 00:00:00.000000000 -08:00
18
13
  default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
21
16
  name: jeweler
22
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &70167964633200 !ruby/object:Gem::Requirement
23
18
  none: false
24
- requirements:
19
+ requirements:
25
20
  - - ~>
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 1
29
- - 5
30
- version: "1.5"
21
+ - !ruby/object:Gem::Version
22
+ version: '1.5'
31
23
  type: :runtime
32
24
  prerelease: false
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
25
+ version_requirements: *70167964633200
26
+ - !ruby/object:Gem::Dependency
35
27
  name: rails
36
- requirement: &id002 !ruby/object:Gem::Requirement
28
+ requirement: &70167964632720 !ruby/object:Gem::Requirement
37
29
  none: false
38
- requirements:
30
+ requirements:
39
31
  - - ~>
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 3
43
- - 0
44
- - 1
32
+ - !ruby/object:Gem::Version
45
33
  version: 3.0.1
46
34
  type: :development
47
35
  prerelease: false
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *70167964632720
37
+ - !ruby/object:Gem::Dependency
50
38
  name: sqlite3
51
- requirement: &id003 !ruby/object:Gem::Requirement
39
+ requirement: &70167964632240 !ruby/object:Gem::Requirement
52
40
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- segments:
57
- - 0
58
- version: "0"
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
59
45
  type: :development
60
46
  prerelease: false
61
- version_requirements: *id003
62
- 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.
63
- email: ""
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: ''
64
54
  executables: []
65
-
66
55
  extensions: []
67
-
68
- extra_rdoc_files:
56
+ extra_rdoc_files:
69
57
  - README
70
- files:
58
+ files:
71
59
  - .rvmrc
72
60
  - Gemfile
73
61
  - Gemfile.lock
@@ -87,37 +75,30 @@ files:
87
75
  has_rdoc: true
88
76
  homepage: http://github.com/g5search/preference_fu
89
77
  licenses: []
90
-
91
78
  post_install_message:
92
79
  rdoc_options: []
93
-
94
- require_paths:
80
+ require_paths:
95
81
  - lib
96
- required_ruby_version: !ruby/object:Gem::Requirement
82
+ required_ruby_version: !ruby/object:Gem::Requirement
97
83
  none: false
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- hash: -3753918124169257309
102
- segments:
103
- - 0
104
- version: "0"
105
- required_rubygems_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ required_rubygems_version: !ruby/object:Gem::Requirement
106
89
  none: false
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- segments:
111
- - 0
112
- version: "0"
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
113
94
  requirements: []
114
-
115
95
  rubyforge_project:
116
- rubygems_version: 1.3.7
96
+ rubygems_version: 1.6.2
117
97
  signing_key:
118
- specification_version: 3
119
- summary: Rails 3 compatible plugin gem for boolean preferences for an ActiveRecord model
120
- test_files:
98
+ specification_version: 4
99
+ summary: Rails 3 compatible plugin gem for boolean preferences for an ActiveRecord
100
+ model
101
+ test_files:
121
102
  - test/abstract_unit.rb
122
103
  - test/person.rb
123
104
  - test/preference_fu_test.rb