lazy_comments 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b57224b58d14d49177fb6264d35bb976fa32676e
4
- data.tar.gz: 4a50b45a8bc095b005243b2adaee2e8df4861fb4
3
+ metadata.gz: 365f9d03c229568fab1f860572a87a2742281276
4
+ data.tar.gz: b3f1cbca2110aed5755990cde92af1680adb6300
5
5
  SHA512:
6
- metadata.gz: e207acfca9cff7f3d10b4cd119e19262ae004cac605c834ff10ee54b29269a09b24cc3d3f523e4c29a70b1c1609e54fc1355243b96287671db7e3970aa332b96
7
- data.tar.gz: 5f0e8a8987a186ffbdf92ba818dadbe0e58d6113a9d5e4a1b833560597c4c6b9ec4a2693a4c24718d4befacb5976da99311585b8b2083fa3b0a21d0c76675b96
6
+ metadata.gz: 7a316251b05ebc4bbd2aff1faa7a7be724215bd3dbab0f6f7b6b4af5cb3f961c2517bd4ea09cf761a3ef135e17a2daaf211ebd78d2d5e5f60c93a1ec142f6353
7
+ data.tar.gz: dace0b22623dd011a9940a9f685590906fc9ae6888180c9f64e46f2311f647e6e1d88ee096b3af99eed5eb9f33f6c24170da7027e5a71164c308f5d96a728259
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'lazy_comments'
3
- s.version = '0.1.0'
3
+ s.version = '0.1.1'
4
4
  s.date = '2013-08-18'
5
5
  s.summary = "A Rails commenting gem that handles mentions"
6
6
  s.description = "Hello world version of a commenting gem"
data/lib/commentable.rb CHANGED
@@ -3,8 +3,8 @@ module Lazy
3
3
  module Commentable
4
4
  def self.included(comment_model)
5
5
  comment_model.extend Finders
6
- comment_model.scope :owned_by_user, ->(user) { comment_model.where(user: user) }
7
- comment_model.scope :latest_first, -> { comment_model.reorder("created_at DESC")}
6
+ comment_model.scope :owned_by_user, -> (user) { comment_model.where(user: user) }
7
+ comment_model.scope :latest_first, -> { comment_model.reorder("created_at DESC")}
8
8
  end
9
9
 
10
10
  module Finders
@@ -15,10 +15,6 @@ module Lazy
15
15
  def for_topic(topic)
16
16
  where(topic: topic)
17
17
  end
18
-
19
- def in_group(group)
20
- group.present? ? where(group: group) : self
21
- end
22
18
  end
23
19
  end
24
20
  end
@@ -62,23 +62,6 @@ describe "Lazy Comment" do
62
62
  expect(comments.size).to eq 2
63
63
  end
64
64
  end
65
-
66
- describe "#in_groups" do
67
- before(:each) do
68
- @dorian_gray = Post.create(title: "A picture of Dorian Gray", body: "The story goes...")
69
- @dorian_gray.comments.create(body: "lovely story", group: "haters")
70
- @dorian_gray.comments.create(body: "lovely story", group: :fans)
71
- end
72
-
73
- it "filters by group" do
74
- haters_comments = @dorian_gray.comments.in_group(:haters)
75
- expect(haters_comments.size).to eq 1
76
-
77
- fan_comments = @dorian_gray.comments.in_group(:fans)
78
- expect(fan_comments.size).to eq 1
79
- end
80
-
81
- end
82
65
  end
83
66
  end
84
67
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazy_comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damon Aw