phcpresspro 21.1.0 → 22.0.0

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: 63d41dba274288f2fbe98be6020cf31daeb24ef8
4
- data.tar.gz: a92ce3921a4c5f22cfcc4863d87da5c0d09a2b17
3
+ metadata.gz: b3c0a8fe52d7a866627324adda0d9a1ea9c56027
4
+ data.tar.gz: 8e0ba036c218cf72850db0db5d9ebd15be53779f
5
5
  SHA512:
6
- metadata.gz: 0137ed169140c495b2279f0326fdb534e3e594499d74b038886d4b2160c7c341aca56e32c651a875c292c8f2171598af79797412da9628ff6169fff90d440b3a
7
- data.tar.gz: f908682dd09257a15ab5ab6bd8bb9237daa3c72334c8751112f899c35037e8827120e93bb9e3834f412ccc958a68941db0122646902e1530091579dcd5b5797e
6
+ metadata.gz: 96256465b58ef696d3ce8c1af6ce1fa93bcdbbcccc3f6b683fde7f91e4759fcacb34f4541bba5e05ac49def5a1e3a782d8f08ad0de3bbfcb2b8eb2c895e6992d
7
+ data.tar.gz: 47c3f72dc744becd78bee4b895869a21ce989636134391b1f6f8e8912e5957ddcd8e719bfbab86c44ca494058b39bcf48e3577468054e39a47c3fda0a1c6973e
@@ -8,12 +8,12 @@ module Phcpresspro
8
8
 
9
9
  # Article Category API
10
10
  def index
11
- @article_posts = Article::Post.order('psttitle ASC')
11
+ @article_posts = Article::Post.where(poststatus: published).order('created_at ASC')
12
12
  end
13
13
 
14
14
  # Article Show
15
15
  def show
16
- @article_post = Article::Post.find(params[:id])
16
+ @article_post = Article::Post.where(poststatus: published).find(params[:id])
17
17
  end
18
18
 
19
19
  end
@@ -1,4 +1,5 @@
1
1
  require_dependency "phcpresspro/application_controller"
2
+ require 'httparty'
2
3
 
3
4
  module Phcpresspro
4
5
  class Frontend::ArticleController < ApplicationController
@@ -8,12 +9,12 @@ module Phcpresspro
8
9
 
9
10
  # Article Index
10
11
  def index
11
- @articles_index = Article::Post.where(pststatus: "published")
12
+ @phcpresspro_frontend_article_list = HTTParty.get("https://#{ENV["PHC_PRESSPRO_API_DOMAIN"]}/#{ENV["PHC_PRESSPRO_API_FOLDER"]}/api/v1/posts.json")
12
13
  end
13
14
 
14
- # Single Article Post
15
+ # Article Show
15
16
  def show
16
- @articles_single = Article::Post.where(pststatus: "published").friendly.find(params[:id])
17
+ @phcpresspro_frontend_article_post = HTTParty.get("https://#{ENV["PHC_PRESSPRO_API_DOMAIN"]}/#{ENV["PHC_PRESSPRO_API_FOLDER"]}/api/v1/posts.json")
17
18
  end
18
19
 
19
20
  end
@@ -1,3 +1,3 @@
1
1
  module Phcpresspro
2
- VERSION = "21.1.0"
2
+ VERSION = "22.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcpresspro
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.1.0
4
+ version: 22.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-30 00:00:00.000000000 Z
11
+ date: 2017-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paper_trail