dm-is-counter_cacheable 0.1.0 → 0.1.1
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/ChangeLog.md +5 -0
- data/Gemfile +6 -21
- data/LICENSE.txt +1 -3
- data/README.md +7 -5
- data/dm-is-counter_cacheable.gemspec +7 -2
- data/gemspec.yml +2 -2
- data/lib/dm-is-counter_cacheable/is/counter_cacheable.rb +1 -1
- metadata +7 -28
data/ChangeLog.md
CHANGED
data/Gemfile
CHANGED
|
@@ -83,34 +83,19 @@
|
|
|
83
83
|
source :rubygems
|
|
84
84
|
|
|
85
85
|
DATAMAPPER = 'http://github.com/datamapper'
|
|
86
|
-
DM_VERSION = '~> 1.0
|
|
86
|
+
DM_VERSION = '~> 1.0'
|
|
87
87
|
DO_VERSION = '~> 0.10.2'
|
|
88
88
|
DM_DO_ADAPTERS = %w[ sqlite postgres mysql oracle sqlserver ]
|
|
89
|
-
RAILS = 'http://github.com/rails/rails.git'
|
|
90
|
-
|
|
91
|
-
if ENV['EXTLIB']
|
|
92
|
-
gem 'extlib', '~> 0.9.15', :git => '#{DATAMAPPER}/extlib.git'
|
|
93
|
-
else
|
|
94
|
-
gem 'activesupport', '~> 3.0.0', :git => RAILS,
|
|
95
|
-
:branch => '3-0-stable',
|
|
96
|
-
:require => nil
|
|
97
|
-
end
|
|
98
89
|
|
|
99
90
|
gem 'dm-core', DM_VERSION, :git => "#{DATAMAPPER}/dm-core.git"
|
|
100
91
|
|
|
101
92
|
group :development do
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
else
|
|
106
|
-
gem 'rdiscount', '~> 1.6.3'
|
|
107
|
-
end
|
|
93
|
+
gem 'rake', '~> 0.8.7'
|
|
94
|
+
gem 'ore-tasks', '~> 0.4'
|
|
95
|
+
gem 'rspec', '~> 2.4'
|
|
108
96
|
|
|
109
|
-
gem '
|
|
110
|
-
gem '
|
|
111
|
-
gem 'ore-tasks', '~> 0.1.2'
|
|
112
|
-
gem 'rspec', '~> 2.0.0'
|
|
113
|
-
gem 'yard', '~> 0.6.0'
|
|
97
|
+
gem 'kramdown', '~> 0.12'
|
|
98
|
+
gem 'yard', '~> 0.6.0'
|
|
114
99
|
end
|
|
115
100
|
|
|
116
101
|
group :datamapper do
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# dm-is-countercacheable
|
|
2
2
|
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
5
|
-
*
|
|
3
|
+
* [Source](http://github.com/postmodern/dm-is-counter_cacheable)
|
|
4
|
+
* [Issues](http://github.com/postmodern/dm-is-counter_cacheable/issues)
|
|
5
|
+
* [Docuementation](http://rubydoc.info/gems/dm-is-counter_cacheable)
|
|
6
|
+
* [Email](mailto:postmodern.mod3 at gmail.com)
|
|
6
7
|
|
|
7
8
|
## Description
|
|
8
9
|
|
|
@@ -35,7 +36,7 @@ Adds counter properties to Post and User for the number of comments:
|
|
|
35
36
|
|
|
36
37
|
## Requirements
|
|
37
38
|
|
|
38
|
-
* [dm-core](http://github.com/datamapper/dm-core/) ~> 1.0
|
|
39
|
+
* [dm-core](http://github.com/datamapper/dm-core/) ~> 1.0
|
|
39
40
|
|
|
40
41
|
## Install
|
|
41
42
|
|
|
@@ -43,5 +44,6 @@ Adds counter properties to Post and User for the number of comments:
|
|
|
43
44
|
|
|
44
45
|
## License
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
Copyright (c) 2008-2011 Hal Brodigan
|
|
47
48
|
|
|
49
|
+
See {file:LICENSE.txt} for license information.
|
|
@@ -5,6 +5,11 @@ begin
|
|
|
5
5
|
# custom logic here
|
|
6
6
|
end
|
|
7
7
|
rescue NameError
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
begin
|
|
9
|
+
require 'ore/specification'
|
|
10
|
+
retry
|
|
11
|
+
rescue LoadError
|
|
12
|
+
STDERR.puts "The 'dm-is-counter_cacheable.gemspec' file requires Ore."
|
|
13
|
+
STDERR.puts "Run `gem install ore-core` to install Ore."
|
|
14
|
+
end
|
|
10
15
|
end
|
data/gemspec.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: dm-is-counter_cacheable
|
|
2
|
-
version: 0.1.
|
|
2
|
+
version: 0.1.1
|
|
3
3
|
summary: DataMapper plugin for adding counter-caching to models.
|
|
4
4
|
description:
|
|
5
5
|
A DataMapper plugin for adding counter-cache properties to related models.
|
|
@@ -11,7 +11,7 @@ homepage: http://github.com/postmodern/dm-is-counter_cacheable
|
|
|
11
11
|
has_yard: true
|
|
12
12
|
|
|
13
13
|
dependencies:
|
|
14
|
-
dm-core: ~> 1.0
|
|
14
|
+
dm-core: ~> 1.0
|
|
15
15
|
|
|
16
16
|
development_dependencies:
|
|
17
17
|
bundler: ~> 1.0.0
|
|
@@ -33,7 +33,7 @@ module DataMapper
|
|
|
33
33
|
def counter_cacheable(relationship_name,options={})
|
|
34
34
|
@counter_cache ||= []
|
|
35
35
|
|
|
36
|
-
unless self.relationships.
|
|
36
|
+
unless self.relationships.named?(relationship_name)
|
|
37
37
|
raise(RuntimeError,"unknown relationship #{relationship_name} in #{self}",caller)
|
|
38
38
|
end
|
|
39
39
|
|
metadata
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dm-is-counter_cacheable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
prerelease:
|
|
5
|
-
|
|
6
|
-
- 0
|
|
7
|
-
- 1
|
|
8
|
-
- 0
|
|
9
|
-
version: 0.1.0
|
|
4
|
+
prerelease:
|
|
5
|
+
version: 0.1.1
|
|
10
6
|
platform: ruby
|
|
11
7
|
authors:
|
|
12
8
|
- Postmodern
|
|
@@ -14,7 +10,7 @@ autorequire:
|
|
|
14
10
|
bindir: bin
|
|
15
11
|
cert_chain: []
|
|
16
12
|
|
|
17
|
-
date:
|
|
13
|
+
date: 2011-03-22 00:00:00 -04:00
|
|
18
14
|
default_executable:
|
|
19
15
|
dependencies:
|
|
20
16
|
- !ruby/object:Gem::Dependency
|
|
@@ -24,11 +20,7 @@ dependencies:
|
|
|
24
20
|
requirements:
|
|
25
21
|
- - ~>
|
|
26
22
|
- !ruby/object:Gem::Version
|
|
27
|
-
|
|
28
|
-
- 1
|
|
29
|
-
- 0
|
|
30
|
-
- 0
|
|
31
|
-
version: 1.0.0
|
|
23
|
+
version: "1.0"
|
|
32
24
|
type: :runtime
|
|
33
25
|
prerelease: false
|
|
34
26
|
version_requirements: *id001
|
|
@@ -39,10 +31,6 @@ dependencies:
|
|
|
39
31
|
requirements:
|
|
40
32
|
- - ~>
|
|
41
33
|
- !ruby/object:Gem::Version
|
|
42
|
-
segments:
|
|
43
|
-
- 1
|
|
44
|
-
- 0
|
|
45
|
-
- 0
|
|
46
34
|
version: 1.0.0
|
|
47
35
|
type: :development
|
|
48
36
|
prerelease: false
|
|
@@ -54,16 +42,13 @@ dependencies:
|
|
|
54
42
|
requirements:
|
|
55
43
|
- - ~>
|
|
56
44
|
- !ruby/object:Gem::Version
|
|
57
|
-
segments:
|
|
58
|
-
- 0
|
|
59
|
-
- 6
|
|
60
|
-
- 0
|
|
61
45
|
version: 0.6.0
|
|
62
46
|
type: :development
|
|
63
47
|
prerelease: false
|
|
64
48
|
version_requirements: *id003
|
|
65
49
|
description: A DataMapper plugin for adding counter-cache properties to related models.
|
|
66
|
-
email:
|
|
50
|
+
email:
|
|
51
|
+
- postmodern.mod3@gmail.com
|
|
67
52
|
executables: []
|
|
68
53
|
|
|
69
54
|
extensions: []
|
|
@@ -101,23 +86,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
101
86
|
requirements:
|
|
102
87
|
- - ">="
|
|
103
88
|
- !ruby/object:Gem::Version
|
|
104
|
-
segments:
|
|
105
|
-
- 0
|
|
106
89
|
version: "0"
|
|
107
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
91
|
none: false
|
|
109
92
|
requirements:
|
|
110
93
|
- - ">="
|
|
111
94
|
- !ruby/object:Gem::Version
|
|
112
|
-
segments:
|
|
113
|
-
- 1
|
|
114
|
-
- 3
|
|
115
|
-
- 6
|
|
116
95
|
version: 1.3.6
|
|
117
96
|
requirements: []
|
|
118
97
|
|
|
119
98
|
rubyforge_project: dm-is-counter_cacheable
|
|
120
|
-
rubygems_version: 1.
|
|
99
|
+
rubygems_version: 1.6.2
|
|
121
100
|
signing_key:
|
|
122
101
|
specification_version: 3
|
|
123
102
|
summary: DataMapper plugin for adding counter-caching to models.
|