mm-commentable 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/lib/mongo_mapper/plugins/commentable.rb +1 -2
- data/mm-commentable.gemspec +2 -2
- data/spec/mm-commentable_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -30
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -30,7 +30,7 @@ You must implement the on_add_comment callback! - however it can be an empty imp
|
|
30
30
|
@post = Post.create
|
31
31
|
@commentor = User.create
|
32
32
|
|
33
|
-
@post.add_comment("great post..", @user)
|
33
|
+
@post.add_comment!("great post..", @user)
|
34
34
|
|
35
35
|
@post.comments_count = 1
|
36
36
|
@posts.comments = [<Comment>]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
data/mm-commentable.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mm-commentable}
|
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 = ["Luke Cunningham"]
|
12
|
-
s.date = %q{2010-11-
|
12
|
+
s.date = %q{2010-11-18}
|
13
13
|
s.description = %q{A very simple mongomapper plugin to make you models commentable}
|
14
14
|
s.email = %q{luke@icaruswings.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/mm-commentable_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -16,36 +16,6 @@ require 'mm-commentable'
|
|
16
16
|
# in ./support/ and its subdirectories.
|
17
17
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
18
18
|
|
19
|
-
def Doc(name=nil, &block)
|
20
|
-
klass = Class.new do
|
21
|
-
include MongoMapper::Document
|
22
|
-
set_collection_name :test
|
23
|
-
|
24
|
-
if name
|
25
|
-
class_eval "def self.name; '#{name}' end"
|
26
|
-
class_eval "def self.to_s; '#{name}' end"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
klass.class_eval(&block) if block_given?
|
31
|
-
klass.collection.remove
|
32
|
-
klass
|
33
|
-
end
|
34
|
-
|
35
|
-
def EDoc(name=nil, &block)
|
36
|
-
klass = Class.new do
|
37
|
-
include MongoMapper::EmbeddedDocument
|
38
|
-
|
39
|
-
if name
|
40
|
-
class_eval "def self.name; '#{name}' end"
|
41
|
-
class_eval "def self.to_s; '#{name}' end"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
klass.class_eval(&block) if block_given?
|
46
|
-
klass
|
47
|
-
end
|
48
|
-
|
49
19
|
log_dir = File.expand_path('../../log', __FILE__)
|
50
20
|
FileUtils.mkdir_p(log_dir) unless File.exist?(log_dir)
|
51
21
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mm-commentable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luke Cunningham
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-18 00:00:00 +11:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|