labelize 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/labelize.gemspec +4 -4
- data/lib/labelize.rb +3 -1
- metadata +9 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/labelize.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{labelize}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Juan Maiz"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-10-04}
|
13
13
|
s.description = %q{label your models, so you can have easier selects and other useful stuff}
|
14
14
|
s.email = %q{juanmaiz@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.homepage = %q{http://github.com/softa/labelize}
|
33
33
|
s.rdoc_options = ["--charset=UTF-8"]
|
34
34
|
s.require_paths = ["lib"]
|
35
|
-
s.rubygems_version = %q{1.3.
|
35
|
+
s.rubygems_version = %q{1.3.7}
|
36
36
|
s.summary = %q{label your models}
|
37
37
|
s.test_files = [
|
38
38
|
"test/helper.rb",
|
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
|
|
43
43
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
44
44
|
s.specification_version = 3
|
45
45
|
|
46
|
-
if Gem::Version.new(Gem::
|
46
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
47
|
else
|
48
48
|
end
|
49
49
|
else
|
data/lib/labelize.rb
CHANGED
@@ -29,7 +29,9 @@ module Labelize
|
|
29
29
|
def find(*args)
|
30
30
|
f = args.first
|
31
31
|
if f.is_a? String and f.to_i == 0
|
32
|
-
send("find_by_#{self._finder_label}",*args)
|
32
|
+
result = send("find_by_#{self._finder_label}",*args)
|
33
|
+
raise ActiveRecord::RecordNotFound unless result
|
34
|
+
result
|
33
35
|
else
|
34
36
|
super *args
|
35
37
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: labelize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Juan Maiz
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-10-04 00:00:00 -04:00
|
18
19
|
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
@@ -49,23 +50,27 @@ rdoc_options:
|
|
49
50
|
require_paths:
|
50
51
|
- lib
|
51
52
|
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
52
54
|
requirements:
|
53
55
|
- - ">="
|
54
56
|
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
55
58
|
segments:
|
56
59
|
- 0
|
57
60
|
version: "0"
|
58
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
59
63
|
requirements:
|
60
64
|
- - ">="
|
61
65
|
- !ruby/object:Gem::Version
|
66
|
+
hash: 3
|
62
67
|
segments:
|
63
68
|
- 0
|
64
69
|
version: "0"
|
65
70
|
requirements: []
|
66
71
|
|
67
72
|
rubyforge_project:
|
68
|
-
rubygems_version: 1.3.
|
73
|
+
rubygems_version: 1.3.7
|
69
74
|
signing_key:
|
70
75
|
specification_version: 3
|
71
76
|
summary: label your models
|