acts_as_label 1.0.1 → 1.0.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/.specification +3 -8
- data/VERSION +1 -1
- data/acts_as_label.gemspec +2 -2
- data/lib/acts_as_label/base.rb +3 -3
- metadata +3 -3
data/.specification
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: acts_as_label
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash: 23
|
|
5
4
|
prerelease: false
|
|
6
5
|
segments:
|
|
7
6
|
- 1
|
|
8
7
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 1.0.
|
|
8
|
+
- 1
|
|
9
|
+
version: 1.0.1
|
|
11
10
|
platform: ruby
|
|
12
11
|
authors:
|
|
13
12
|
- Coroutine
|
|
@@ -16,7 +15,7 @@ autorequire:
|
|
|
16
15
|
bindir: bin
|
|
17
16
|
cert_chain: []
|
|
18
17
|
|
|
19
|
-
date: 2010-
|
|
18
|
+
date: 2010-12-13 00:00:00 -06:00
|
|
20
19
|
default_executable:
|
|
21
20
|
dependencies:
|
|
22
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -27,7 +26,6 @@ dependencies:
|
|
|
27
26
|
requirements:
|
|
28
27
|
- - ">="
|
|
29
28
|
- !ruby/object:Gem::Version
|
|
30
|
-
hash: 11
|
|
31
29
|
segments:
|
|
32
30
|
- 2
|
|
33
31
|
- 3
|
|
@@ -43,7 +41,6 @@ dependencies:
|
|
|
43
41
|
requirements:
|
|
44
42
|
- - ">="
|
|
45
43
|
- !ruby/object:Gem::Version
|
|
46
|
-
hash: 11
|
|
47
44
|
segments:
|
|
48
45
|
- 2
|
|
49
46
|
- 3
|
|
@@ -87,7 +84,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
87
84
|
requirements:
|
|
88
85
|
- - ">="
|
|
89
86
|
- !ruby/object:Gem::Version
|
|
90
|
-
hash: 3
|
|
91
87
|
segments:
|
|
92
88
|
- 0
|
|
93
89
|
version: "0"
|
|
@@ -96,7 +92,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
96
92
|
requirements:
|
|
97
93
|
- - ">="
|
|
98
94
|
- !ruby/object:Gem::Version
|
|
99
|
-
hash: 3
|
|
100
95
|
segments:
|
|
101
96
|
- 0
|
|
102
97
|
version: "0"
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.2
|
data/acts_as_label.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{acts_as_label}
|
|
8
|
-
s.version = "1.0.
|
|
8
|
+
s.version = "1.0.2"
|
|
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-
|
|
12
|
+
s.date = %q{2010-12-16}
|
|
13
13
|
s.description = %q{This acts_as extension implements a system label and a friendly label on a class and centralizes the logic for performing validations and accessing items by system label.}
|
|
14
14
|
s.email = %q{jdugan@coroutine.com}
|
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/acts_as_label/base.rb
CHANGED
|
@@ -112,9 +112,9 @@ module Coroutine #:nodoc:
|
|
|
112
112
|
#
|
|
113
113
|
# The method attempts rails 3 syntax. If that fails, it reverts to rails 2 syntax.
|
|
114
114
|
def self.method_missing_with_label(method, *args, &block)
|
|
115
|
-
|
|
115
|
+
if self.respond_to?(:where)
|
|
116
116
|
record = self.where("#{acts_as_label_system_label_column} = ?", method.to_s.upcase).first
|
|
117
|
-
|
|
117
|
+
else
|
|
118
118
|
record = self.find(:first, :conditions => ["#{acts_as_label_system_label_column} = ?", method.to_s.upcase])
|
|
119
119
|
end
|
|
120
120
|
if record
|
|
@@ -152,7 +152,7 @@ module Coroutine #:nodoc:
|
|
|
152
152
|
|
|
153
153
|
|
|
154
154
|
module InstanceMethods
|
|
155
|
-
|
|
155
|
+
|
|
156
156
|
# This method updates the system label attribute writer to ensure it is uppercase.
|
|
157
157
|
#
|
|
158
158
|
def system_label=(value)
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 1
|
|
7
7
|
- 0
|
|
8
|
-
-
|
|
9
|
-
version: 1.0.
|
|
8
|
+
- 2
|
|
9
|
+
version: 1.0.2
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Coroutine
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2010-12-
|
|
18
|
+
date: 2010-12-16 00:00:00 -06:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|