acts_as_singleton 0.0.6.beta → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +4 -15
- data/lib/acts_as_singleton.rb +2 -2
- metadata +48 -54
data/Rakefile
CHANGED
@@ -1,28 +1,17 @@
|
|
1
|
-
$: << File.
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require "acts_as_singleton"
|
1
|
+
$: << File.expand_path('../lib', __FILE__)
|
2
|
+
require 'active_record'
|
3
|
+
require 'acts_as_singleton'
|
5
4
|
|
6
5
|
require 'rake'
|
7
6
|
require 'rake/testtask'
|
8
|
-
require 'rake/rdoctask'
|
9
7
|
|
10
8
|
desc 'Default: run unit tests.'
|
11
9
|
task :default => :test
|
12
10
|
|
13
11
|
desc 'Test the acts_as_singleton plugin.'
|
14
|
-
Rake::TestTask.new
|
12
|
+
Rake::TestTask.new do |t|
|
15
13
|
t.libs << 'lib'
|
16
14
|
t.libs << 'test'
|
17
15
|
t.pattern = 'test/**/*_test.rb'
|
18
16
|
t.verbose = true
|
19
17
|
end
|
20
|
-
|
21
|
-
desc 'Generate documentation for the acts_as_singleton plugin.'
|
22
|
-
Rake::RDocTask.new(:rdoc) do |rdoc|
|
23
|
-
rdoc.rdoc_dir = 'rdoc'
|
24
|
-
rdoc.title = 'acts_as_singleton'
|
25
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
26
|
-
rdoc.rdoc_files.include('README.txt')
|
27
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
28
|
-
end
|
data/lib/acts_as_singleton.rb
CHANGED
@@ -21,8 +21,8 @@ module ActiveRecord
|
|
21
21
|
|
22
22
|
# This pattern matches methods that should be made private because they
|
23
23
|
# should not be used in singleton classes.
|
24
|
-
|
25
|
-
|
24
|
+
PRIVATE = \
|
25
|
+
/^all$|create(?!_reflection)|find(?!er)|firs|mini|max|new|d_sco|^upd/
|
26
26
|
|
27
27
|
def self.included(model)
|
28
28
|
model.class_eval do
|
metadata
CHANGED
@@ -1,62 +1,60 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_singleton
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.7
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Stephen Celis
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-09-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: activerecord
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70338633858140 !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
18
|
+
requirements:
|
22
19
|
- - ~>
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: 3.1.0
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.1.0
|
25
22
|
type: :runtime
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
23
|
prerelease: false
|
30
|
-
|
24
|
+
version_requirements: *70338633858140
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rake
|
27
|
+
requirement: &70338633857700 !ruby/object:Gem::Requirement
|
31
28
|
none: false
|
32
|
-
requirements:
|
33
|
-
- -
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version:
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
36
33
|
type: :development
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: sqlite3-ruby
|
40
34
|
prerelease: false
|
41
|
-
|
35
|
+
version_requirements: *70338633857700
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: sqlite3-ruby
|
38
|
+
requirement: &70338633857180 !ruby/object:Gem::Requirement
|
42
39
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
47
44
|
type: :development
|
48
|
-
|
49
|
-
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70338633857180
|
47
|
+
description: ! 'It just makes sense to store mutable, site-wide, admin-level settings
|
48
|
+
in the database. Right? A key-value table may be more flexible, but maybe we don''t
|
49
|
+
want to be flexible! If you truly want that flexibility: http://github.com/stephencelis/kvc'
|
50
50
|
email: stephen@stephencelis.com
|
51
51
|
executables: []
|
52
|
-
|
53
52
|
extensions: []
|
54
|
-
|
55
|
-
extra_rdoc_files:
|
53
|
+
extra_rdoc_files:
|
56
54
|
- History.rdoc
|
57
55
|
- Manifest.txt
|
58
56
|
- README.rdoc
|
59
|
-
files:
|
57
|
+
files:
|
60
58
|
- History.rdoc
|
61
59
|
- Manifest.txt
|
62
60
|
- README.rdoc
|
@@ -64,34 +62,30 @@ files:
|
|
64
62
|
- init.rb
|
65
63
|
- lib/acts_as_singleton.rb
|
66
64
|
- test/acts_as_singleton_test.rb
|
67
|
-
has_rdoc: true
|
68
65
|
homepage: http://github.com/stephencelis/acts_as_singleton
|
69
66
|
licenses: []
|
70
|
-
|
71
67
|
post_install_message:
|
72
|
-
rdoc_options:
|
68
|
+
rdoc_options:
|
73
69
|
- --main
|
74
70
|
- README.rdoc
|
75
|
-
require_paths:
|
71
|
+
require_paths:
|
76
72
|
- lib
|
77
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
78
74
|
none: false
|
79
|
-
requirements:
|
80
|
-
- -
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version:
|
83
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
80
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version:
|
81
|
+
requirements:
|
82
|
+
- - ! '>='
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
89
85
|
requirements: []
|
90
|
-
|
91
86
|
rubyforge_project:
|
92
|
-
rubygems_version: 1.
|
87
|
+
rubygems_version: 1.8.7
|
93
88
|
signing_key:
|
94
89
|
specification_version: 3
|
95
90
|
summary: A lightweight singleton library for your Active Record models.
|
96
91
|
test_files: []
|
97
|
-
|