acts_as_singleton 0.0.5 → 0.0.6.beta
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/acts_as_singleton.rb +5 -5
- metadata +30 -18
data/lib/acts_as_singleton.rb
CHANGED
@@ -22,7 +22,7 @@ module ActiveRecord
|
|
22
22
|
# This pattern matches methods that should be made private because they
|
23
23
|
# should not be used in singleton classes.
|
24
24
|
# PRIVATE = /^all(?:oc.*)?$|alloc|create|find|firs|mini|max|new|d_sco|^upd/
|
25
|
-
PRIVATE = /^all$|create|find|firs|mini|max|new|d_sco|^upd/
|
25
|
+
PRIVATE = /^all$|create(?!_reflection)|find|firs|mini|max|new|d_sco|^upd/
|
26
26
|
|
27
27
|
def self.included(model)
|
28
28
|
model.class_eval do
|
@@ -47,20 +47,20 @@ module ActiveRecord
|
|
47
47
|
super.sub(/id: .+?, /) {} # Irrelevant.
|
48
48
|
end
|
49
49
|
|
50
|
-
def find(*
|
50
|
+
def find(*)
|
51
51
|
unless caller.first.include?("lib/active_record")
|
52
52
|
raise NoMethodError,
|
53
53
|
"private method `find' called for #{inspect}"
|
54
54
|
end
|
55
|
-
super
|
55
|
+
super
|
56
56
|
end
|
57
57
|
|
58
|
-
def find_by_sql(
|
58
|
+
def find_by_sql(*)
|
59
59
|
unless caller.first.include?("lib/active_record")
|
60
60
|
raise NoMethodError,
|
61
61
|
"private method `find_by_sql' called for #{inspect}"
|
62
62
|
end
|
63
|
-
super
|
63
|
+
super
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_singleton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 5
|
9
|
-
version: 0.0.5
|
4
|
+
prerelease: 6
|
5
|
+
version: 0.0.6.beta
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Stephen Celis
|
@@ -14,7 +10,7 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date: 2010-07-28 00:00:00 -
|
13
|
+
date: 2010-07-28 00:00:00 -07:00
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
@@ -23,13 +19,33 @@ dependencies:
|
|
23
19
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
20
|
none: false
|
25
21
|
requirements:
|
26
|
-
- -
|
22
|
+
- - ~>
|
27
23
|
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
- 0
|
30
|
-
version: "0"
|
24
|
+
version: 3.1.0.rc4
|
31
25
|
type: :runtime
|
32
26
|
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: "0"
|
36
|
+
type: :development
|
37
|
+
version_requirements: *id002
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: sqlite3-ruby
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: "0"
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id003
|
33
49
|
description: "It just makes sense to store mutable, site-wide, admin-level settings in the database. Right? A key-value table may be more flexible, but maybe we don't want to be flexible! If you truly want that flexibility: http://github.com/stephencelis/kvc"
|
34
50
|
email: stephen@stephencelis.com
|
35
51
|
executables: []
|
@@ -63,21 +79,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
79
|
requirements:
|
64
80
|
- - ">="
|
65
81
|
- !ruby/object:Gem::Version
|
66
|
-
segments:
|
67
|
-
- 0
|
68
82
|
version: "0"
|
69
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
84
|
none: false
|
71
85
|
requirements:
|
72
|
-
- - "
|
86
|
+
- - ">"
|
73
87
|
- !ruby/object:Gem::Version
|
74
|
-
|
75
|
-
- 0
|
76
|
-
version: "0"
|
88
|
+
version: 1.3.1
|
77
89
|
requirements: []
|
78
90
|
|
79
91
|
rubyforge_project:
|
80
|
-
rubygems_version: 1.3.
|
92
|
+
rubygems_version: 1.3.9.1
|
81
93
|
signing_key:
|
82
94
|
specification_version: 3
|
83
95
|
summary: A lightweight singleton library for your Active Record models.
|