phcpresspro 1.5.3 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -28
- data/Rakefile +5 -10
- data/app/controllers/phcpresspro/application_controller.rb +1 -22
- data/app/controllers/phcpresspro/blog/posts_controller.rb +9 -6
- data/app/controllers/phcpresspro/news/posts_controller.rb +7 -5
- data/app/helpers/phcpresspro/application_helper.rb +0 -1
- data/app/models/phcpresspro/blog/post.rb +11 -5
- data/app/models/phcpresspro/news/post.rb +11 -5
- data/app/uploaders/phcpresspro/pstimage_uploader.rb +1 -1
- data/app/views/layouts/phcpresspro/application.html.erb +0 -1
- data/app/views/layouts/phcpresspro/blogpost/blog_layout.html.erb +22 -0
- data/app/views/layouts/phcpresspro/newspost/news_layout.html.erb +22 -0
- data/app/views/phcpresspro/blog/posts/_form.html.erb +1 -1
- data/app/views/phcpresspro/blog/posts/show.html.erb +4 -0
- data/app/views/phcpresspro/news/posts/_form.html.erb +1 -1
- data/app/views/phcpresspro/news/posts/show.html.erb +4 -0
- data/config/routes.rb +8 -17
- data/db/migrate/{20160219213259_create_phcpresspro_news_posts.rb → 20160316131626_create_phcpresspro_news_posts.rb} +3 -1
- data/db/migrate/{20160219213313_create_phcpresspro_blog_posts.rb → 20160316131650_create_phcpresspro_blog_posts.rb} +3 -1
- data/lib/phcpresspro/engine.rb +19 -13
- data/lib/phcpresspro/version.rb +1 -1
- metadata +40 -32
- data/app/assets/javascripts/phcpresspro/blog/posts.js +0 -0
- data/app/assets/javascripts/phcpresspro/news/posts.js +0 -0
- data/app/assets/javascripts/phcpresspro/website/pages.js +0 -2
- data/app/assets/stylesheets/phcpresspro/website/pages.scss +0 -3
- data/app/controllers/phcpresspro/website/pages_controller.rb +0 -20
- data/app/helpers/phcpresspro/website/pages_helper.rb +0 -4
- data/app/models/phcpresspro/user.rb +0 -5
- data/app/views/layouts/phcnotifi/components/_notifications.html.erb +0 -13
- data/app/views/layouts/phcnotifi/components/_validations.html.erb +0 -11
- data/app/views/layouts/phcpresspro/pagelayout.html.erb +0 -54
- data/app/views/phcpresspro/website/pages/blogpage.html.erb +0 -25
- data/app/views/phcpresspro/website/pages/newspage.html.erb +0 -25
- data/db/migrate/20160223171835_add_excerpts_to_phcpresspro_news_posts.rb +0 -5
- data/db/migrate/20160223171843_add_excerpts_to_phcpresspro_blog_posts.rb +0 -5
- data/db/migrate/20160223231247_add_attachment_pstimage_to_phcpresspro_blog_posts.rb +0 -8
- data/db/migrate/20160223231317_add_attachment_pstimage_to_phcpresspro_news_posts.rb +0 -7
- data/lib/generators/phcpresspro/views_generator.rb +0 -59
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98dd2c5501ae96e4630ab9c03b34e875af9d5240
|
4
|
+
data.tar.gz: 8eacd0caf649dc791adc3a0b1a1e10dd6b709a08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: def2762a5c45f1a375ee2e868d481a831119c33b810da4632d1b7935225f104f898e2e42c6dcfb7ad10c148d44e7cdd74a3d30ae76c1be2ddfbebadeec0c1059
|
7
|
+
data.tar.gz: c33d01cfa7352099184789e251bca5bee1210ffadb341007273456875da3cf121be971effd215c7e323fa194a7c1aa4b77d9a571900f109e69f0ebff83f5e008
|
data/README.md
CHANGED
@@ -1,28 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
#### Step 2 - Add PHCPress database migration files
|
7
|
-
|
8
|
-
rake railties:install:migrations
|
9
|
-
rake db:migrate
|
10
|
-
|
11
|
-
#### Step 3 - Mount the Engine in your Routes File
|
12
|
-
Mount the Engine in your Routes File (App must have Root route)
|
13
|
-
|
14
|
-
mount Phcpresspro::Engine, :at => '/'
|
15
|
-
|
16
|
-
#### Step 4 - Generate Views
|
17
|
-
Generate views for customization and app integration.
|
18
|
-
|
19
|
-
rails generate phcpresspro:views
|
20
|
-
|
21
|
-
#### Step 5 - Recompile Assets
|
22
|
-
PHCPress UI requires bootstrap and fontawesome to operate.
|
23
|
-
|
24
|
-
rake assets:clobber
|
25
|
-
rake assets:precompile
|
26
|
-
|
27
|
-
#### Step 5 - Setup Carrierwave (Image Uploads)
|
28
|
-
PHCPress default Carrierwave settings can be overwritten (suggested).
|
1
|
+
[![security](https://hakiri.io/github/PHCNetworks/phc-press/master.svg)](https://hakiri.io/github/PHCNetworks/phc-press/master)
|
2
|
+
[![Code Climate](https://codeclimate.com/github/PHCNetworks/phc-press/badges/gpa.svg)](https://codeclimate.com/github/PHCNetworks/phc-press)
|
3
|
+
[![Issue Count](https://codeclimate.com/github/PHCNetworks/phc-press/badges/issue_count.svg)](https://codeclimate.com/github/PHCNetworks/phc-press)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/phcpresspro.svg)](https://badge.fury.io/rb/phcpresspro)
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
begin
|
2
2
|
require 'bundler/setup'
|
3
|
-
|
3
|
+
rescue LoadError
|
4
4
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
5
|
end
|
6
6
|
|
@@ -16,16 +16,11 @@ end
|
|
16
16
|
|
17
17
|
APP_RAKEFILE = File.expand_path("../spec/test_app/Rakefile", __FILE__)
|
18
18
|
load 'rails/tasks/engine.rake'
|
19
|
+
|
20
|
+
|
19
21
|
load 'rails/tasks/statistics.rake'
|
20
22
|
|
21
|
-
Bundler::GemHelper.install_tasks
|
22
23
|
|
23
|
-
require 'rake'
|
24
|
-
# require 'rake/rdoctask'
|
25
|
-
require 'rspec/core'
|
26
|
-
require 'rspec/core/rake_task'
|
27
24
|
|
28
|
-
|
29
|
-
|
30
|
-
# RSpec::Core::RakeTask.new(:spec)
|
31
|
-
task :default => :spec
|
25
|
+
Bundler::GemHelper.install_tasks
|
26
|
+
|
@@ -1,27 +1,6 @@
|
|
1
1
|
module Phcpresspro
|
2
2
|
class ApplicationController < ActionController::Base
|
3
|
-
|
4
|
-
private
|
5
|
-
|
6
|
-
# Resolve Application Layouts
|
7
|
-
def layouts_resolver_application
|
8
|
-
case action_name
|
9
|
-
when "index"
|
10
|
-
"layouts/phcpresspro/application"
|
11
|
-
else
|
12
|
-
"layouts/phcpresspro/application"
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
# Resolve Webpage Layouts
|
17
|
-
def layouts_resolver_webpages
|
18
|
-
case action_name
|
19
|
-
when "newspage"
|
20
|
-
"layouts/phcpresspro/pagelayout"
|
21
|
-
when "blogpage"
|
22
|
-
"layouts/phcpresspro/pagelayout"
|
23
|
-
end
|
24
|
-
end
|
3
|
+
protect_from_forgery with: :exception
|
25
4
|
|
26
5
|
end
|
27
6
|
end
|
@@ -6,11 +6,13 @@ module Phcpresspro
|
|
6
6
|
class Blog::PostsController < ApplicationController
|
7
7
|
|
8
8
|
# Filters & Security
|
9
|
+
layout 'layouts/phcpresspro/blogpost/blog_layout'
|
10
|
+
#before_action :authenticate_user!
|
9
11
|
before_action :set_blog_post, only: [:edit, :update, :destroy]
|
10
12
|
|
11
13
|
# Blog Post Index (/blog/posts)
|
12
14
|
def index
|
13
|
-
@blog_posts = Blog::Post.
|
15
|
+
@blog_posts = Blog::Post.all
|
14
16
|
end
|
15
17
|
|
16
18
|
# Single Blog Post (/blog/posts/1)
|
@@ -19,7 +21,7 @@ module Phcpresspro
|
|
19
21
|
|
20
22
|
# Create a New Blog Post (/blog/posts/new)
|
21
23
|
def new
|
22
|
-
@blog_post = Blog::Post.
|
24
|
+
@blog_post = Blog::Post.new
|
23
25
|
end
|
24
26
|
|
25
27
|
# Edit Blog Post (/blog/posts/1/edit)
|
@@ -28,7 +30,8 @@ module Phcpresspro
|
|
28
30
|
|
29
31
|
# POST
|
30
32
|
def create
|
31
|
-
@blog_post =
|
33
|
+
@blog_post.user_id = current_user
|
34
|
+
@blog_post = Blog::Post.new(blog_post_params)
|
32
35
|
|
33
36
|
if @blog_post.save
|
34
37
|
redirect_to blog_posts_path, notice: 'Blog post was successfully created.'
|
@@ -39,7 +42,7 @@ module Phcpresspro
|
|
39
42
|
|
40
43
|
# PATCH/PUT
|
41
44
|
def update
|
42
|
-
if @blog_post.
|
45
|
+
if @blog_post.update(blog_post_params)
|
43
46
|
redirect_to blog_posts_path, notice: 'Blog post was successfully updated.'
|
44
47
|
else
|
45
48
|
render :edit
|
@@ -48,7 +51,7 @@ module Phcpresspro
|
|
48
51
|
|
49
52
|
# DELETE
|
50
53
|
def destroy
|
51
|
-
@blog_post.
|
54
|
+
@blog_post.destroy
|
52
55
|
redirect_to blog_posts_path, notice: 'Blog post was successfully destroyed.'
|
53
56
|
end
|
54
57
|
|
@@ -56,7 +59,7 @@ module Phcpresspro
|
|
56
59
|
|
57
60
|
# Common Callbacks
|
58
61
|
def set_blog_post
|
59
|
-
|
62
|
+
@blog_post = Blog::Post.find(params[:id])
|
60
63
|
end
|
61
64
|
|
62
65
|
# Whitelist on what can be posted
|
@@ -6,7 +6,8 @@ module Phcpresspro
|
|
6
6
|
class News::PostsController < ApplicationController
|
7
7
|
|
8
8
|
# Filters & Security
|
9
|
-
layout
|
9
|
+
layout 'layouts/phcpresspro/newspost/news_layout'
|
10
|
+
before_action :authenticate_user!
|
10
11
|
before_action :set_news_post, only: [:edit, :update, :destroy]
|
11
12
|
|
12
13
|
# News Post Index (/news/posts)
|
@@ -20,7 +21,7 @@ module Phcpresspro
|
|
20
21
|
|
21
22
|
# Create a New News Post (/news/posts/new)
|
22
23
|
def new
|
23
|
-
@news_post = News::Post.
|
24
|
+
@news_post = News::Post.new
|
24
25
|
end
|
25
26
|
|
26
27
|
# Edit News Post /news/posts/1/edit
|
@@ -29,7 +30,8 @@ module Phcpresspro
|
|
29
30
|
|
30
31
|
# POST
|
31
32
|
def create
|
32
|
-
@news_post =
|
33
|
+
@news_post.user_id = current_user
|
34
|
+
@news_post = News::Post.current_user.(news_post_params)
|
33
35
|
|
34
36
|
if @news_post.save
|
35
37
|
redirect_to news_posts_path, notice: 'News post was successfully created.'
|
@@ -40,7 +42,7 @@ module Phcpresspro
|
|
40
42
|
|
41
43
|
# PATCH/PUT
|
42
44
|
def update
|
43
|
-
if @news_post.
|
45
|
+
if @news_post.update(news_post_params)
|
44
46
|
redirect_to news_posts_path, notice: 'News post was successfully updated.'
|
45
47
|
else
|
46
48
|
render :edit
|
@@ -49,7 +51,7 @@ module Phcpresspro
|
|
49
51
|
|
50
52
|
# DELETE
|
51
53
|
def destroy
|
52
|
-
@news_post.
|
54
|
+
@news_post.destroy
|
53
55
|
redirect_to news_posts_path, notice: 'News post was successfully destroyed.'
|
54
56
|
end
|
55
57
|
|
@@ -1,13 +1,19 @@
|
|
1
1
|
module Phcpresspro
|
2
2
|
class Blog::Post < ActiveRecord::Base
|
3
3
|
|
4
|
-
#
|
5
|
-
|
6
|
-
where(:account_id => account.id)
|
7
|
-
end
|
4
|
+
# Filters Before Post
|
5
|
+
before_create :authour
|
8
6
|
|
9
|
-
#
|
7
|
+
# For Image Uploads
|
10
8
|
mount_uploader :pstimage, Phcpresspro::PstimageUploader
|
11
9
|
|
10
|
+
# Associate Post Authour to User
|
11
|
+
belongs_to :user
|
12
|
+
|
13
|
+
# Define r Devise
|
14
|
+
def authour
|
15
|
+
self.user_id = current_user.id
|
16
|
+
end
|
17
|
+
|
12
18
|
end
|
13
19
|
end
|
@@ -1,13 +1,19 @@
|
|
1
1
|
module Phcpresspro
|
2
2
|
class News::Post < ActiveRecord::Base
|
3
3
|
|
4
|
-
#
|
5
|
-
|
6
|
-
where(:account_id => account.id)
|
7
|
-
end
|
4
|
+
# Filters Before Post
|
5
|
+
before_create :authour
|
8
6
|
|
9
|
-
#
|
7
|
+
# For Image Uploads
|
10
8
|
mount_uploader :pstimage, Phcpresspro::PstimageUploader
|
9
|
+
|
10
|
+
# Associate Post Authour to User
|
11
|
+
belongs_to :user
|
12
|
+
|
13
|
+
# Define r Devise
|
14
|
+
def authour
|
15
|
+
self.user_id = current_user.id
|
16
|
+
end
|
11
17
|
|
12
18
|
end
|
13
19
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
|
5
|
+
<title>PHCPress - News Post & Blogging System</title>
|
6
|
+
|
7
|
+
<%= stylesheet_link_tag "phcpresspro/application", media: "all" %>
|
8
|
+
<%= javascript_include_tag "phcpresspro/application" %>
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
|
11
|
+
</head>
|
12
|
+
|
13
|
+
<body>
|
14
|
+
<div class="container">
|
15
|
+
<div class="row">
|
16
|
+
<%= render 'phcnotifi/notifications' %>
|
17
|
+
<%= yield %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</body>
|
21
|
+
|
22
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
|
5
|
+
<title>PHCPress - News Post & Blogging System</title>
|
6
|
+
|
7
|
+
<%= stylesheet_link_tag "phcpresspro/application", media: "all" %>
|
8
|
+
<%= javascript_include_tag "phcpresspro/application" %>
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
|
11
|
+
</head>
|
12
|
+
|
13
|
+
<body>
|
14
|
+
<div class="container">
|
15
|
+
<div class="row">
|
16
|
+
<%= render 'phcnotifi/notifications' %>
|
17
|
+
<%= yield %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</body>
|
21
|
+
|
22
|
+
</html>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= form_for(@blog_post, :html => {:multipart => true}) do |f| %>
|
3
3
|
|
4
4
|
<!-- PHC-Notifi Render Validation -->
|
5
|
-
<%= render '
|
5
|
+
<%= render 'phcnotifi/validations', :object => @blog_post %>
|
6
6
|
|
7
7
|
<div class="col-md-3">
|
8
8
|
<div class="panel panel-default">
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= form_for(@news_post, :html => {:multipart => true}) do |f| %>
|
3
3
|
|
4
4
|
<!-- PHC-Notifi Render Validation -->
|
5
|
-
<%= render '
|
5
|
+
<%= render 'phcnotifi/validations', :object => @news_post %>
|
6
6
|
|
7
7
|
<div class="col-md-3">
|
8
8
|
<div class="panel panel-default">
|
data/config/routes.rb
CHANGED
@@ -1,22 +1,13 @@
|
|
1
1
|
Phcpresspro::Engine.routes.draw do
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
resources :posts
|
12
|
-
end
|
13
|
-
|
14
|
-
# Serve Out Pages
|
15
|
-
get 'website/pages/newspage', :path => "news"
|
16
|
-
get 'website/pages/blogpage', :path => "blog"
|
3
|
+
# Blog Routes
|
4
|
+
namespace :blog do
|
5
|
+
resources :posts
|
6
|
+
end
|
7
|
+
|
8
|
+
# News Routes
|
9
|
+
namespace :news do
|
10
|
+
resources :posts
|
17
11
|
end
|
18
|
-
|
19
|
-
# Mount PHCEngines
|
20
|
-
mount Mtdevise::Engine, :at => '/'
|
21
12
|
|
22
13
|
end
|
data/lib/phcpresspro/engine.rb
CHANGED
@@ -1,13 +1,10 @@
|
|
1
1
|
module Phcpresspro
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
|
4
|
-
# Load MTDevise
|
5
|
-
require 'mtdevise'
|
6
|
-
require 'mtdevise/active_record_extensions'
|
7
|
-
require 'mtdevise/scoped_to'
|
8
|
-
|
9
4
|
# Load UI Dependecies
|
10
5
|
require 'jquery-rails'
|
6
|
+
require 'phcnotifi'
|
7
|
+
|
11
8
|
require 'sass-rails'
|
12
9
|
require 'bootstrap-sass'
|
13
10
|
require 'font-awesome-rails'
|
@@ -21,18 +18,27 @@ module Phcpresspro
|
|
21
18
|
# Testing Generator
|
22
19
|
config.generators do |g|
|
23
20
|
g.test_framework :rspec,
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
21
|
+
fixtures: true,
|
22
|
+
view_specs: false,
|
23
|
+
helper_specs: false,
|
24
|
+
routing_specs: false,
|
25
|
+
controller_specs: true,
|
26
|
+
request_specs: false
|
30
27
|
g.fixture_replacement :factory_girl, dir: "spec/factories"
|
31
28
|
end
|
32
|
-
|
33
|
-
# Load
|
29
|
+
|
30
|
+
# Load Helper Files
|
34
31
|
config.to_prepare do
|
35
32
|
ApplicationController.helper(ApplicationHelper)
|
33
|
+
ApplicationController.helper(Blog::PostsHelper)
|
34
|
+
ApplicationController.helper(News::PostsHelper)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Auto Mount Plugin
|
38
|
+
initializer "phcpresspro", before: :load_config_initializers do |app|
|
39
|
+
Rails.application.routes.append do
|
40
|
+
mount Phcpresspro::Engine, at: "/"
|
41
|
+
end
|
36
42
|
end
|
37
43
|
|
38
44
|
end
|
data/lib/phcpresspro/version.rb
CHANGED
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: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -45,25 +45,25 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 0.18.4
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: devise
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '3.5'
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
56
|
+
version: 3.5.6
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: '
|
63
|
+
version: '3.5'
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
66
|
+
version: 3.5.6
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: carrierwave
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -158,14 +158,20 @@ dependencies:
|
|
158
158
|
requirements:
|
159
159
|
- - "~>"
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version:
|
161
|
+
version: '2.0'
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: 2.0.1
|
162
165
|
type: :runtime
|
163
166
|
prerelease: false
|
164
167
|
version_requirements: !ruby/object:Gem::Requirement
|
165
168
|
requirements:
|
166
169
|
- - "~>"
|
167
170
|
- !ruby/object:Gem::Version
|
168
|
-
version:
|
171
|
+
version: '2.0'
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: 2.0.1
|
169
175
|
- !ruby/object:Gem::Dependency
|
170
176
|
name: sqlite3
|
171
177
|
requirement: !ruby/object:Gem::Requirement
|
@@ -270,9 +276,24 @@ dependencies:
|
|
270
276
|
- - "~>"
|
271
277
|
- !ruby/object:Gem::Version
|
272
278
|
version: '2.52'
|
273
|
-
|
279
|
+
- !ruby/object:Gem::Dependency
|
280
|
+
name: codeclimate-test-reporter
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - "~>"
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: 0.5.0
|
286
|
+
type: :development
|
287
|
+
prerelease: false
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - "~>"
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: 0.5.0
|
293
|
+
description: PHCPress is an open source news & blog engine built for our enterprise
|
294
|
+
app use.
|
274
295
|
email:
|
275
|
-
-
|
296
|
+
- info@phcnetworks.net
|
276
297
|
executables: []
|
277
298
|
extensions: []
|
278
299
|
extra_rdoc_files: []
|
@@ -281,55 +302,42 @@ files:
|
|
281
302
|
- README.md
|
282
303
|
- Rakefile
|
283
304
|
- app/assets/javascripts/phcpresspro/application.js
|
284
|
-
- app/assets/javascripts/phcpresspro/blog/posts.js
|
285
|
-
- app/assets/javascripts/phcpresspro/news/posts.js
|
286
|
-
- app/assets/javascripts/phcpresspro/website/pages.js
|
287
305
|
- app/assets/stylesheets/phcpresspro/application.css.scss
|
288
306
|
- app/assets/stylesheets/phcpresspro/blog/posts.css
|
289
307
|
- app/assets/stylesheets/phcpresspro/custom.css.scss
|
290
308
|
- app/assets/stylesheets/phcpresspro/news/posts.css
|
291
|
-
- app/assets/stylesheets/phcpresspro/website/pages.scss
|
292
309
|
- app/controllers/phcpresspro/application_controller.rb
|
293
310
|
- app/controllers/phcpresspro/blog/posts_controller.rb
|
294
311
|
- app/controllers/phcpresspro/news/posts_controller.rb
|
295
|
-
- app/controllers/phcpresspro/website/pages_controller.rb
|
296
312
|
- app/helpers/phcpresspro/application_helper.rb
|
297
313
|
- app/helpers/phcpresspro/blog/posts_helper.rb
|
298
314
|
- app/helpers/phcpresspro/news/posts_helper.rb
|
299
|
-
- app/helpers/phcpresspro/website/pages_helper.rb
|
300
315
|
- app/models/phcpresspro/blog.rb
|
301
316
|
- app/models/phcpresspro/blog/post.rb
|
302
317
|
- app/models/phcpresspro/news.rb
|
303
318
|
- app/models/phcpresspro/news/post.rb
|
304
|
-
- app/models/phcpresspro/user.rb
|
305
319
|
- app/uploaders/phcpresspro/pstimage_uploader.rb
|
306
|
-
- app/views/layouts/phcnotifi/components/_notifications.html.erb
|
307
|
-
- app/views/layouts/phcnotifi/components/_validations.html.erb
|
308
320
|
- app/views/layouts/phcpresspro/application.html.erb
|
309
|
-
- app/views/layouts/phcpresspro/
|
321
|
+
- app/views/layouts/phcpresspro/blogpost/blog_layout.html.erb
|
322
|
+
- app/views/layouts/phcpresspro/newspost/news_layout.html.erb
|
310
323
|
- app/views/phcpresspro/blog/posts/_form.html.erb
|
311
324
|
- app/views/phcpresspro/blog/posts/edit.html.erb
|
312
325
|
- app/views/phcpresspro/blog/posts/index.html.erb
|
313
326
|
- app/views/phcpresspro/blog/posts/new.html.erb
|
327
|
+
- app/views/phcpresspro/blog/posts/show.html.erb
|
314
328
|
- app/views/phcpresspro/news/posts/_form.html.erb
|
315
329
|
- app/views/phcpresspro/news/posts/edit.html.erb
|
316
330
|
- app/views/phcpresspro/news/posts/index.html.erb
|
317
331
|
- app/views/phcpresspro/news/posts/new.html.erb
|
318
|
-
- app/views/phcpresspro/
|
319
|
-
- app/views/phcpresspro/website/pages/newspage.html.erb
|
332
|
+
- app/views/phcpresspro/news/posts/show.html.erb
|
320
333
|
- config/routes.rb
|
321
|
-
- db/migrate/
|
322
|
-
- db/migrate/
|
323
|
-
- db/migrate/20160223171835_add_excerpts_to_phcpresspro_news_posts.rb
|
324
|
-
- db/migrate/20160223171843_add_excerpts_to_phcpresspro_blog_posts.rb
|
325
|
-
- db/migrate/20160223231247_add_attachment_pstimage_to_phcpresspro_blog_posts.rb
|
326
|
-
- db/migrate/20160223231317_add_attachment_pstimage_to_phcpresspro_news_posts.rb
|
327
|
-
- lib/generators/phcpresspro/views_generator.rb
|
334
|
+
- db/migrate/20160316131626_create_phcpresspro_news_posts.rb
|
335
|
+
- db/migrate/20160316131650_create_phcpresspro_blog_posts.rb
|
328
336
|
- lib/phcpresspro.rb
|
329
337
|
- lib/phcpresspro/engine.rb
|
330
338
|
- lib/phcpresspro/version.rb
|
331
339
|
- lib/tasks/phcpresspro_tasks.rake
|
332
|
-
homepage: http://www.phcnetworks.net/
|
340
|
+
homepage: http://www.phcnetworks.net/engine-yard
|
333
341
|
licenses:
|
334
342
|
- GPL-3.0
|
335
343
|
metadata: {}
|
@@ -352,5 +360,5 @@ rubyforge_project:
|
|
352
360
|
rubygems_version: 2.5.1
|
353
361
|
signing_key:
|
354
362
|
specification_version: 4
|
355
|
-
summary: News & Blog
|
363
|
+
summary: News & Blog Posts Engin
|
356
364
|
test_files: []
|
File without changes
|
File without changes
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require_dependency "phcpresspro/application_controller"
|
2
|
-
|
3
|
-
module Phcpresspro
|
4
|
-
class Website::PagesController < ApplicationController
|
5
|
-
|
6
|
-
# Resolve Layout for Web Pages
|
7
|
-
layout :layouts_resolver_webpages
|
8
|
-
|
9
|
-
# Retrieve News Posts for News Page
|
10
|
-
def newspage
|
11
|
-
@news_posts = News::Post.all
|
12
|
-
end
|
13
|
-
|
14
|
-
# Retrieve Blog Posts for Blog Page
|
15
|
-
def blogpage
|
16
|
-
@blog_posts = Blog::Post.all
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<div class="row">
|
2
|
-
<div class=".col-md-12">
|
3
|
-
<div class="alert alert-dismissible alert-warning hidden alert-please-update" role="alert">
|
4
|
-
<button aria-label="Close" class="close" data-dismiss="alert" type="button"><span aria-hidden="true"> ×</span></button><strong>Please update</strong>Despite the fact that the record doens't show on your screen you must save it to delete it!
|
5
|
-
</div>
|
6
|
-
<% flash.each do |key, value| %>
|
7
|
-
<div class="<%= flash_class(key) %> fade in">
|
8
|
-
<a href="#" data-dismiss="alert" class="close">×</a>
|
9
|
-
<%= value %>
|
10
|
-
</div>
|
11
|
-
<% end %>
|
12
|
-
</div>
|
13
|
-
</div>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<% if object.errors.any? %>
|
2
|
-
<div class="alert alert alert-danger alert-dismissible" role="alert">
|
3
|
-
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
4
|
-
<h4>The form contains <%= pluralize(object.errors.count, "error") %>.</h4>
|
5
|
-
<ul class="list-group">
|
6
|
-
<% object.errors.full_messages.each do |msg| %>
|
7
|
-
<li class="list-group-item list-group-item-danger borderless"><%= msg %></li>
|
8
|
-
<% end %>
|
9
|
-
</ul>
|
10
|
-
</div>
|
11
|
-
<% end %>
|
@@ -1,54 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
<title>PHCPress - News Post & Blogging System</title>
|
6
|
-
|
7
|
-
<%= stylesheet_link_tag "phcpresspro/application", media: "all" %>
|
8
|
-
<%= javascript_include_tag "phcpresspro/application" %>
|
9
|
-
<%= csrf_meta_tags %>
|
10
|
-
|
11
|
-
</head>
|
12
|
-
|
13
|
-
<body>
|
14
|
-
|
15
|
-
<!-- Start Navigation -->
|
16
|
-
<nav class="navbar navbar-default" role="navigation">
|
17
|
-
<div class="container-fluid">
|
18
|
-
<div class="navbar-header">
|
19
|
-
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
20
|
-
<span class="sr-only">Toggle navigation</span>
|
21
|
-
<span class="icon-bar"></span>
|
22
|
-
<span class="icon-bar"></span>
|
23
|
-
<span class="icon-bar"></span>
|
24
|
-
</button>
|
25
|
-
<a class="navbar-brand" href="#">PHCPress</a>
|
26
|
-
</div>
|
27
|
-
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
28
|
-
<ul class="nav navbar-nav">
|
29
|
-
<li><%= link_to "News", phcpresspro.website_pages_newspage_path %></li>
|
30
|
-
<li><%= link_to "Blog", phcpresspro.website_pages_blogpage_path %></li>
|
31
|
-
</ul>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
</nav>
|
35
|
-
<!-- End Navigation -->
|
36
|
-
|
37
|
-
<!-- Start Content -->
|
38
|
-
<div class="container">
|
39
|
-
<%= render 'layouts/phcnotifi/components/notifications' %>
|
40
|
-
<!-- Start Main Content -->
|
41
|
-
<div class="row">
|
42
|
-
<!-- Start Blog Post Content Column -->
|
43
|
-
<div class="col-lg-8">
|
44
|
-
<%= yield %>
|
45
|
-
</div>
|
46
|
-
<!-- End Blog Post Content Column -->
|
47
|
-
</div>
|
48
|
-
<!-- End Main Content -->
|
49
|
-
</div>
|
50
|
-
<!-- End Content -->
|
51
|
-
|
52
|
-
</body>
|
53
|
-
|
54
|
-
</html>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<% @blog_posts.each do |blog_post| %>
|
2
|
-
<div class="row">
|
3
|
-
<div class="col-lg-12">
|
4
|
-
<article>
|
5
|
-
<!-- Title -->
|
6
|
-
<h1><%= blog_post.blogpsttitle %></h1>
|
7
|
-
|
8
|
-
<!-- Author (Next Release)
|
9
|
-
<p class="lead">
|
10
|
-
by <a href="#">Authour</a>
|
11
|
-
</p>
|
12
|
-
-->
|
13
|
-
|
14
|
-
<!-- Date -->
|
15
|
-
<hr>
|
16
|
-
<p>
|
17
|
-
<span class="fa fa-calendar"></span> Posted on <%= blog_post.created_at %>
|
18
|
-
</p>
|
19
|
-
<hr>
|
20
|
-
<p class="lead"><%= blog_post.blogpstexcerpts %></p>
|
21
|
-
<p><%= blog_post.blogpsttext %></p>
|
22
|
-
</article>
|
23
|
-
</div>
|
24
|
-
</div>
|
25
|
-
<% end %>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<% @news_posts.each do |news_post| %>
|
2
|
-
<div class="row">
|
3
|
-
<div class="col-lg-12">
|
4
|
-
<article>
|
5
|
-
<!-- Title -->
|
6
|
-
<h1><%= news_post.newspsttitle %></h1>
|
7
|
-
|
8
|
-
<!-- Author (Next Release)
|
9
|
-
<p class="lead">
|
10
|
-
by <a href="#">Authour</a>
|
11
|
-
</p>
|
12
|
-
-->
|
13
|
-
|
14
|
-
<!-- Date -->
|
15
|
-
<hr>
|
16
|
-
<p>
|
17
|
-
<span class="fa fa-calendar"></span> Posted on <%= news_post.created_at %>
|
18
|
-
</p>
|
19
|
-
<hr>
|
20
|
-
<p class="lead"><%= news_post.newspstexcerpts %></p>
|
21
|
-
<p><%= news_post.newspsttext %></p>
|
22
|
-
</article>
|
23
|
-
</div>
|
24
|
-
</div>
|
25
|
-
<% end %>
|
@@ -1,59 +0,0 @@
|
|
1
|
-
require 'rails/generators/base'
|
2
|
-
|
3
|
-
module Phcpresspro
|
4
|
-
|
5
|
-
module Generators
|
6
|
-
|
7
|
-
module ViewPathTemplates
|
8
|
-
extend ActiveSupport::Concern
|
9
|
-
|
10
|
-
included do
|
11
|
-
class_option :views, aliases: "-v", type: :array, desc: "Select specific view directories to generate (layouts, phcpresspro)"
|
12
|
-
|
13
|
-
public_task :copy_views
|
14
|
-
end
|
15
|
-
|
16
|
-
# module ClassMethods
|
17
|
-
# def hide!
|
18
|
-
# Rails::Generators.hide_namespace self.namespace
|
19
|
-
# end
|
20
|
-
# end
|
21
|
-
|
22
|
-
def copy_views
|
23
|
-
if options[:views]
|
24
|
-
options[:views].each do |directory|
|
25
|
-
view_directory directory.to_sym
|
26
|
-
end
|
27
|
-
else
|
28
|
-
view_directory :layouts
|
29
|
-
view_directory :phcpresspro
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
protected
|
34
|
-
|
35
|
-
def view_directory(name, _target_path = nil)
|
36
|
-
directory name.to_s, _target_path || "#{target_path}/#{name}" do |content|
|
37
|
-
content
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def target_path
|
42
|
-
@target_path ||= "app/views"
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
class SharedViewsGenerator < Rails::Generators::Base
|
47
|
-
include ViewPathTemplates
|
48
|
-
source_root File.expand_path("../../../../app/views", __FILE__)
|
49
|
-
desc "Copies phcpresspro views to your application."
|
50
|
-
hide!
|
51
|
-
end
|
52
|
-
|
53
|
-
class ViewsGenerator < Rails::Generators::Base
|
54
|
-
desc "Copies phcpresspro views to your application."
|
55
|
-
invoke SharedViewsGenerator
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
end
|