blog-gem 0.1.5 → 0.1.6

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: e3c22297d35a71ec554f05a2a8e69ea270b95098
4
- data.tar.gz: 6dc8d1b4ce5d693b2b92f674a1fcc24e2d558565
3
+ metadata.gz: 6030e35b6749b5b45cd53682f686465ea1c1c160
4
+ data.tar.gz: 53e0234b0cc799aea1387cc3a849d7933a8d9641
5
5
  SHA512:
6
- metadata.gz: 16ff097940495b613db0b43b5f071340f32ddfcdeca8dfdbdb66c63b6029d64207af9b8abcecbc3c8b1d77f405461441a512fd0e16f856e7057ffdeaf4bba156
7
- data.tar.gz: 0fdc7bc4cbdc67a17ba7b370e59dfbb7ca4d0dde84ac7db03c41c2a66e1a4528153f5740f64619af995c3b4938e96eda4d0f1e0319c189b8382c72d154574aab
6
+ metadata.gz: 3ddf0b8eb03af59fa71037646668119f6cdd602d8d04d8470517736cfe25ef503f7be58b5a63b24a651be2a9465d478372e8a505964c16115e0a6c81e43759f5
7
+ data.tar.gz: 63434b853097d0cf509ceeb5d72f98ebb91dd9b444c7d1b0a422d2bb1fb95ec7eba70d33443d9613ff3864dbfd59f1e9b85d78f5617b03d4c9cdc607d92e7f35
@@ -36,7 +36,7 @@ class Blog::Gem::BlogController < Blog::Gem::ApplicationController
36
36
  end
37
37
  format.json do
38
38
  @posts = posts.published.all
39
- render json: @posts.map{|x| {id: x.id, title: x.title, teaser: x.teaser, url: x.url, tags: x.tags, category: x.category, author: x.author_name, thumbnail: x.image_url}}
39
+ render json: @posts.map{|x| {id: x.id, title: x.title, teaser: x.teaser, url: x.url, tags: x.tags, category: x.category, author: x.author_name, thumbnail: x.image_url, published_at: x.published_at}}
40
40
  end
41
41
  format.html do
42
42
  @current_path = blogs_path
@@ -62,7 +62,7 @@ class Blog::Gem::BlogController < Blog::Gem::ApplicationController
62
62
  def api
63
63
  @post = Blog::Gem::Post.find_by_id(params[:id])
64
64
  if @post.present? && @post.published_at <= Time.now
65
- render json: {status: 200, id: @post.id, title: @post.title, teaser: @post.teaser, url: @post.url, tags: @post.tags, category: @post.category, author: @post.author_name, thumbnail: @post.image_url, body: @post.body}
65
+ render json: {status: 200, id: @post.id, title: @post.title, teaser: @post.teaser, url: @post.url, tags: @post.tags, category: @post.category, author: @post.author_name, thumbnail: @post.image_url, body: @post.body, published_at: @post.published_at}
66
66
  else
67
67
  render json: {status: 404}
68
68
  end
@@ -1,5 +1,5 @@
1
1
  module Blog
2
2
  module Gem
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blog-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Thelang
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-09-15 00:00:00.000000000 Z
12
+ date: 2017-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails