cachai 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 234339e799e8d9dcf93b45c1c9263a99cc1ff02c
4
- data.tar.gz: 98ad064f8d146f20e974855ad269ef99c4b24c5b
3
+ metadata.gz: a68c5c6afde964d4ecd799d7c2e705cde5d95807
4
+ data.tar.gz: 10102a0163b14777843eeb6c31a8e5feaa81dff7
5
5
  SHA512:
6
- metadata.gz: 20bfee40c5964d4e8df84e2e349028d17a8b12684841376654a4967d5f814b99379973dcc9457b1e9eca65208ce7829f49ad4b42d72b15e04219cbf4e7d22c42
7
- data.tar.gz: e7f6c090387caa5a6450a07d288c120d8ce4e0d4250a62d44a6aa037319d5384627c3c3239c83dd07cd841bae4a5a786705cf3ca083af026f22faafbb6ebb135
6
+ metadata.gz: 5d177b7ac254f245304d90ef4ace65ea8c80f18107e7c6e6442f9fd88b45e1ca81eef82fb5a8bc2629e67c3d02afbbfaf2cf26abbac5082319ac593ab39f89c8
7
+ data.tar.gz: 0dbba4a304b01779cbfd9d27d97c0e1f147dde0cb1f98b1dd5253a7491ff2cfe5e3c9a6f19891ef6d2007a6259372a4c30e604ab95814c16c42219bccea5ec94
data/cachai.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "cachai"
7
- spec.version = '0.0.4'
7
+ spec.version = '0.0.5'
8
8
  spec.authors = ["Tomás Pollak"]
9
9
  spec.email = ["tomas@forkhq.com"]
10
10
  spec.description = %q{Middleware for embedabble comments.}
data/lib/cachai.rb CHANGED
@@ -138,8 +138,8 @@ module Cachai
138
138
 
139
139
  def get_and_sort_comments_for(post)
140
140
  result = []
141
- top_level = post.responses.comment.top_level
142
- nested = post.responses.comment.nested
141
+ top_level = post.responses.comment.approved.top_level
142
+ nested = post.responses.comment.approved.nested
143
143
 
144
144
  top_level.each_with_index do |comment, i|
145
145
  obj = comment.as_json
data/lib/models.rb CHANGED
@@ -33,6 +33,7 @@ module Cachai
33
33
  def self.find_or_create_by_path(path)
34
34
  find_by_path(path) || create({:path => path})
35
35
  end
36
+
36
37
  end
37
38
 
38
39
  class Response < ActiveRecord::Base
@@ -45,7 +46,6 @@ module Cachai
45
46
  scope :top_level, lambda { where(:parent_id => 0) }
46
47
  scope :nested, lambda { where("parent_id != 0") }
47
48
 
48
-
49
49
  def as_json(options = {})
50
50
  {
51
51
  :id => id,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cachai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomás Pollak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-05 00:00:00.000000000 Z
11
+ date: 2015-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -148,10 +148,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  requirements: []
150
150
  rubyforge_project:
151
- rubygems_version: 2.2.0
151
+ rubygems_version: 2.4.5
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Middleware for embedabble comments.
155
155
  test_files:
156
156
  - test/app_test.rb
157
- has_rdoc: