trusty-cms 3.0.8 → 3.0.9

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: d6ebe8fcd153e149f08eec67dbdcc44e23b50f30
4
- data.tar.gz: dfaff5d25baef6ed75e7f0d1e9d17bd8072a426f
3
+ metadata.gz: 0ccd0b6b41ce1e02420af580c501c2a581985f3d
4
+ data.tar.gz: 3c10ca1244abaa09b83ec6756560f8860357a146
5
5
  SHA512:
6
- metadata.gz: bfdf645ed79a45b6ee8a8ceaa57c9d6d01478939ee2a34c0402492749b5d09fc857092a679742a35856933f4efcb086cea020435f14084f4f48a8e669e036ea2
7
- data.tar.gz: 6649e139dfa185309c435ffbc4378eaddae63c6a997ee9bb047b7ae5c743e91514b1d10efc867d2d1ae156e96abc150956c3dfa08aae4cc1552d5349d977b706
6
+ metadata.gz: 174cb8782f0707ee753e0c02ae4020e47f034e8d840d90b9eb41a8a8a1e134fe9ef23e2f5f2c12945cb93b8237d932b3c9243c028f4acb96edebf1167ee9a322
7
+ data.tar.gz: 3e6700961794fa3c92d948a71effb78d9918248b6f2c390a7745629886888f9d99a2121119498ea7c7d6ec4d61add41448e2a095dcae8953d0ef3c8958e17cff
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- trusty-cms (3.0.8)
11
+ trusty-cms (3.0.9)
12
12
  RedCloth (~> 4.3.2)
13
13
  acts_as_tree (~> 2.6.1)
14
14
  bundler (~> 1.7)
@@ -24,7 +24,7 @@ PATH
24
24
  rack (~> 2.0.1)
25
25
  rack-cache (~> 1.7)
26
26
  radius (~> 0.7)
27
- rails (~> 5.0.2)
27
+ rails (~> 5.0.1)
28
28
  rake (< 11.0)
29
29
  rdoc (~> 5.1)
30
30
  roadie-rails (~> 1.2.1)
@@ -39,39 +39,39 @@ GEM
39
39
  remote: https://rubygems.org/
40
40
  specs:
41
41
  RedCloth (4.3.2)
42
- actioncable (5.0.4)
43
- actionpack (= 5.0.4)
42
+ actioncable (5.0.5)
43
+ actionpack (= 5.0.5)
44
44
  nio4r (>= 1.2, < 3.0)
45
45
  websocket-driver (~> 0.6.1)
46
- actionmailer (5.0.4)
47
- actionpack (= 5.0.4)
48
- actionview (= 5.0.4)
49
- activejob (= 5.0.4)
46
+ actionmailer (5.0.5)
47
+ actionpack (= 5.0.5)
48
+ actionview (= 5.0.5)
49
+ activejob (= 5.0.5)
50
50
  mail (~> 2.5, >= 2.5.4)
51
51
  rails-dom-testing (~> 2.0)
52
- actionpack (5.0.4)
53
- actionview (= 5.0.4)
54
- activesupport (= 5.0.4)
52
+ actionpack (5.0.5)
53
+ actionview (= 5.0.5)
54
+ activesupport (= 5.0.5)
55
55
  rack (~> 2.0)
56
56
  rack-test (~> 0.6.3)
57
57
  rails-dom-testing (~> 2.0)
58
58
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
59
- actionview (5.0.4)
60
- activesupport (= 5.0.4)
59
+ actionview (5.0.5)
60
+ activesupport (= 5.0.5)
61
61
  builder (~> 3.1)
62
62
  erubis (~> 2.7.0)
63
63
  rails-dom-testing (~> 2.0)
64
64
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
65
- activejob (5.0.4)
66
- activesupport (= 5.0.4)
65
+ activejob (5.0.5)
66
+ activesupport (= 5.0.5)
67
67
  globalid (>= 0.3.6)
68
- activemodel (5.0.4)
69
- activesupport (= 5.0.4)
70
- activerecord (5.0.4)
71
- activemodel (= 5.0.4)
72
- activesupport (= 5.0.4)
68
+ activemodel (5.0.5)
69
+ activesupport (= 5.0.5)
70
+ activerecord (5.0.5)
71
+ activemodel (= 5.0.5)
72
+ activesupport (= 5.0.5)
73
73
  arel (~> 7.0)
74
- activesupport (5.0.4)
74
+ activesupport (5.0.5)
75
75
  concurrent-ruby (~> 1.0, >= 1.0.2)
76
76
  i18n (~> 0.7)
77
77
  minitest (~> 5.1)
@@ -135,7 +135,7 @@ GEM
135
135
  ffi (1.9.18)
136
136
  globalid (0.4.0)
137
137
  activesupport (>= 4.2.0)
138
- haml (5.0.1)
138
+ haml (5.0.2)
139
139
  temple (>= 0.8.0)
140
140
  tilt
141
141
  haml-rails (1.0.0)
@@ -168,7 +168,7 @@ GEM
168
168
  mime-types-data (~> 3.2015)
169
169
  mime-types-data (3.2016.0521)
170
170
  mini_portile2 (2.2.0)
171
- minitest (5.10.2)
171
+ minitest (5.10.3)
172
172
  multi_json (1.12.1)
173
173
  mysql2 (0.4.8)
174
174
  nio4r (2.1.0)
@@ -195,26 +195,26 @@ GEM
195
195
  rack-test (0.6.3)
196
196
  rack (>= 1.0)
197
197
  radius (0.7.4)
198
- rails (5.0.4)
199
- actioncable (= 5.0.4)
200
- actionmailer (= 5.0.4)
201
- actionpack (= 5.0.4)
202
- actionview (= 5.0.4)
203
- activejob (= 5.0.4)
204
- activemodel (= 5.0.4)
205
- activerecord (= 5.0.4)
206
- activesupport (= 5.0.4)
207
- bundler (>= 1.3.0, < 2.0)
208
- railties (= 5.0.4)
198
+ rails (5.0.5)
199
+ actioncable (= 5.0.5)
200
+ actionmailer (= 5.0.5)
201
+ actionpack (= 5.0.5)
202
+ actionview (= 5.0.5)
203
+ activejob (= 5.0.5)
204
+ activemodel (= 5.0.5)
205
+ activerecord (= 5.0.5)
206
+ activesupport (= 5.0.5)
207
+ bundler (>= 1.3.0)
208
+ railties (= 5.0.5)
209
209
  sprockets-rails (>= 2.0.0)
210
210
  rails-dom-testing (2.0.3)
211
211
  activesupport (>= 4.2.0)
212
212
  nokogiri (>= 1.6)
213
213
  rails-html-sanitizer (1.0.3)
214
214
  loofah (~> 2.0)
215
- railties (5.0.4)
216
- actionpack (= 5.0.4)
217
- activesupport (= 5.0.4)
215
+ railties (5.0.5)
216
+ actionpack (= 5.0.5)
217
+ activesupport (= 5.0.5)
218
218
  method_source
219
219
  rake (>= 0.8.7)
220
220
  thor (>= 0.18.1, < 2.0)
data/INSTALL.md CHANGED
@@ -2,17 +2,22 @@
2
2
 
3
3
  From within the directory containing your TrustyCMS instance:
4
4
 
5
- 1. Create a new Rails 4 application (i.e. `rails new [project_name]`)
5
+ 1. Create a new Rails 5.0 application (i.e. `rails new [project_name]`)
6
6
 
7
- 2. Replace most of your Gemfile with these gems:
8
- - gem "trusty-cms", "~>2.0.0-beta"
9
- - gem "mysql2"
7
+ 2. Add the following gems to your Gemfile:
8
+ - gem 'trusty-cms'
10
9
  - gem 'rails-observers'
11
- - gem 'protected_attributes'
12
10
 
13
- 3. Run `bundle install`
11
+ 3. Add any additional CMS dependencies. TrustyCMS currently supports:
14
12
 
15
- 4. Run the Trusty CMS generator to get the project into shape: `rails g trusty_cms [project_name]`.
13
+ * gem 'trusty-clipped-extension'
14
+ * gem 'trusty-snippets-extension'
15
+ * gem 'trusty-layouts-extension'
16
+ * gem 'trusty-multi-site-extension'
17
+
18
+ 4. Run `bundle install`
19
+
20
+ 5. Run the Trusty CMS generator to get the project into shape: `rails g trusty_cms [project_name]`.
16
21
  - This will ask you if you want to replace a number of existing files (like application.rb); reply Y to all.
17
22
 
18
- 5. Run `bundle exec rake db:create`, then `bundle exec rake db:bootstrap`.
23
+ 6. Run `bundle exec rake db:setup`, then `bundle exec rake db:bootstrap`.
data/README.md CHANGED
@@ -2,121 +2,91 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/trusty-cms.svg)](http://badge.fury.io/rb/trusty-cms)
4
4
 
5
- Trusty is a branch of the venerable Radiant CMS. Its goal is to pull the Radiant framework into Rails 4 with minimal changes to its infrastructure. Most of what is below is derived from the original Radiant CMS readme.
5
+ TrustyCMS is a branch of Radiant CMS. Its goal is to pull the Radiant framework into Rails 5 with minimal changes to its infrastructure.
6
6
 
7
- TrustyCms is a no-fluff, open source content management system designed for
7
+ TrustyCMS is a no-fluff, open source content management system designed for
8
8
  small teams. It is similar to Textpattern or MovableType, but is a general
9
- purpose content management system (not just a blogging engine).
9
+ purpose content management system (not just a blogging engine). TrustyCMS is a
10
+ Rails engine and is built to be installed into an existing Rails 5 application as a gem.
10
11
 
11
- [![Build Status](https://secure.travis-ci.org/pgharts/trusty-cms.png?branch=master)](https://travis-ci.org/pgharts/trusty-cms/)
12
+ TravisCI: [![Build Status](https://secure.travis-ci.org/pgharts/trusty-cms.png?branch=master)](https://travis-ci.org/pgharts/trusty-cms/)
12
13
 
13
- Currently, TrustyCMS is functional but still has some core issues. We're managing the outstanding problems in [Github Issues](https://github.com/pgharts/trusty-cms/issues?state=open), so if you'd like to help out, that's a great place to start. Also, if you find anything wrong, let us know there so we can get to work fixing it.
14
+ CodeClimate: [![Code Climate](https://codeclimate.com/github/codeclimate/codeclimate/badges/gpa.svg)](https://codeclimate.com/github/codeclimate/codeclimate)
14
15
 
15
-
16
- TrustyCms features:
16
+ TrustyCMS features:
17
17
 
18
18
  * An elegant user interface
19
- * The ability to arrange pages in a hierarchy
19
+ * The ability to arrange pages in a hierarchy with drag and drop
20
20
  * Flexible templating with layouts, snippets, page parts, and a custom tagging
21
- language (Radius: http://radius.rubyforge.org)
21
+ language
22
22
  * A simple user management/permissions system
23
23
  * Support for Markdown and Textile as well as traditional HTML (it's easy to
24
24
  create other filters)
25
25
  * An advanced plugin system
26
+ * Social sharing buttons
26
27
  * Operates in two modes: dev and production depending on the URL
27
28
  * A caching system which expires pages every 5 minutes
28
- * Built using Ruby on Rails
29
- * And much more...
29
+ * Built using Ruby on Rails (version 5)
30
30
 
31
31
  ## License
32
32
 
33
- TrustyCms is released under the MIT license. The Radiant portions of the
33
+ TrustyCMS is released under the MIT license. The Radiant portions of the
34
34
  codebase are copyright (c) John W. Long and Sean Cribbs; anything after the
35
35
  fork is copyright (c) Pittsburgh Cultural Trust. A copy of the MIT license can
36
36
  be found in the LICENSE file.
37
37
 
38
38
  ## Installation and Setup for Use
39
39
 
40
- TrustyCms is a traditional Ruby on Rails application, meaning that you can
41
- configure and run it the way you would a normal Rails application.
40
+ TrustyCMS is a traditional Ruby on Rails engine, meaning that you can
41
+ configure and run it the way you would a normal gem, like [Devise](https://github.com/plataformatec/devise).
42
42
 
43
- See the INSTALL file for more details.
43
+ See the INSTALL.md file for more instructions.
44
44
 
45
- ### Installation and Setup for Contributing to TrustyCms
45
+ ### Installation and Setup for Contributing to TrustyCMS
46
46
 
47
- #### Part A of setup, common to both kinds of installations
47
+ #### Setup
48
48
 
49
49
  Prerequisites:
50
50
 
51
- * A Github account and Git ([Github has some really good instructons](https://help.github.com/articles/set-up-git))
51
+ * A Github account and Git ([Github has some really good instructions](https://help.github.com/articles/set-up-git))
52
+ * Ruby 2.2.0 or higher
53
+ * A Rails application (currently supports version 5.0)
54
+ * Bundler
55
+ * MySQL
56
+ * [PhantomJS >= 1.8.1](https://github.com/teampoltergeist/poltergeist/tree/v1.5.0#installing-phantomjs)
52
57
 
53
58
  Steps:
54
59
 
55
- 1. Fork this repository to your github account.
60
+ 1. Fork this repository to your Github account.
56
61
  1. Clone your fork to your machine.
57
62
  1. `cd` into the directory you just cloned into.
63
+ 1. Follow the INSTALL.md instructions to setup an empty app with TrustyCMS installed. To modify TrustyCMS,
64
+ point your dependency to the local path of your fork.
58
65
 
59
- #### Part B, the Vagrant install way
60
-
61
- To get a development environment up and running quickly, we have a vagrant box with the dependencies you'll need! Just follow these steps:
62
-
63
- 1. Download and install [Vagrant](http://www.vagrantup.com/)
64
- 1. Download and install [Virtualbox](https://www.virtualbox.org/)
65
- 1. Download [this box](https://dl.dropboxusercontent.com/u/27379052/trusty-cms.box) into the directory with your code and make sure the file is named "trusty-cms.box".
66
- 1. Run `vagrant up` to start the virutal environment
67
- 1. Run `vagrant ssh` to ssh into the virtual environment
68
- 1. `cd /vagrant` to get to the directory with the rails code that's shared with your computer.
66
+ gem 'trusty-cms', path: '../trusty-cms'
69
67
 
70
- You can edit the files in this directory with your favorite editor on your
71
- machine. The files are shared into the `/vagrant` directory in the virtual
72
- machine.
73
-
74
- When you're done using the vagrant environment, you can run `vagrant destroy`
75
- to stop the vm and remove all guest hard disks. Next time you want to use it,
76
- just start from the `vagrant up` step again!
77
-
78
- #### Part B, the native install way to set up
79
-
80
- Prerequisites:
81
-
82
- * Ruby 2.2.0
83
- * The bundler gem
84
- * Mysql
85
- * [PhantomJS >= 1.8.1](https://github.com/teampoltergeist/poltergeist/tree/v1.5.0#installing-phantomjs)
86
-
87
- 1. Install the gems with bundler: `bundle`
88
-
89
- #### Part C of setup, common to both kinds of installations
90
-
91
- 1. Create a database configuration: `cp config/database.mysql.yml config/database.yml`. You probably don't need to make any further changes.
92
- 1. Set up your databases:
68
+ 1. Set up your databases in your Rails application:
93
69
 
94
70
  bundle exec rake db:create
95
71
  bundle exec rake db:migrate
96
- bundle exec rake db:migrate:extensions
97
- bundle exec rake db:test:prepare
98
72
 
99
73
  1. Run the tests to make sure they pass (If they don't, file a bug!):
100
74
 
101
75
  rspec
102
76
 
103
- 1. Run `rails s` to start the server. Visit the site in your browser at http://localhost:3000.
104
-
105
77
  When you're ready to make a change:
106
78
 
107
79
  1. Add the pgharts fork as a git remote called "upstream": `git remote add upstream https://github.com/pgharts/trusty-cms.git` so that you can keep up with changes that other people make.
108
- 1. Fetch the remote you just added: `git fetch upstream`
109
- 1. Start a new branch for the change you're going to make. Name it something having to do with the changes, like "fix-queries" if you are going to try to fix some queries. Base this branch on `upstream/master` by running `git checkout -b fix-queries upstream/master`
80
+ 1. Fetch the remote you just added: `git fetch upstream`.
81
+ 1. Start a new branch for the change you're going to make. Name it something having to do with the changes, like "fix-queries" if you are going to try to fix some queries. Base this branch on `upstream/master` by running `git checkout -b fix-queries upstream/master`.
110
82
  1. Make your changes and commit them. Please include tests!
111
83
  1. Run the tests and make sure they pass.
112
- 1. Push your changes to your github fork: `git push origin fix-queries`
113
- 1. Send a pull request to the pgharts fork
114
- 1. High five the nearest person!
115
-
84
+ 1. Push your changes to your github fork: `git push origin fix-queries`.
85
+ 1. Send a pull request to the pgharts fork.
116
86
 
117
87
  ## Support
118
88
 
119
- Most of the development for TrustyCms happens on Github:
89
+ All of the development for TrustyCMS happens on Github:
120
90
 
121
91
  https://github.com/pgharts/trusty-cms
122
92
 
data/app/models/page.rb CHANGED
@@ -282,7 +282,7 @@ class Page < ActiveRecord::Base
282
282
  $1.camelize.constantize if page =~ %r{/([^/]+)\.rb}
283
283
  end
284
284
  end
285
- if ActiveRecord::Base.connection.tables.include?('pages') && Page.column_names.include?('class_name') # Assume that we have bootstrapped
285
+ if ActiveRecord::Base.connection.data_sources.include?('pages') && Page.column_names.include?('class_name') # Assume that we have bootstrapped
286
286
  Page.connection.select_values("SELECT DISTINCT class_name FROM pages WHERE class_name <> '' AND class_name IS NOT NULL").each do |p|
287
287
  begin
288
288
  p.constantize
data/coverage/index.html CHANGED
@@ -14,7 +14,7 @@
14
14
  <img src="./assets/0.10.1/loading.gif" alt="loading"/>
15
15
  </div>
16
16
  <div id="wrapper" style="display:none;">
17
- <div class="timestamp">Generated <abbr class="timeago" title="2017-07-21T16:05:39-04:00">2017-07-21T16:05:39-04:00</abbr></div>
17
+ <div class="timestamp">Generated <abbr class="timeago" title="2017-08-07T14:39:52-04:00">2017-08-07T14:39:52-04:00</abbr></div>
18
18
  <ul class="group_tabs"></ul>
19
19
 
20
20
  <div id="content">
@@ -2,8 +2,9 @@ require 'rails_generator'
2
2
  module TrustyCms
3
3
  module GeneratorBaseExtension
4
4
  def self.included(base)
5
- base.class_eval %{
6
- alias_method_chain :existing_migrations, :extensions
5
+ base.class_eval {
6
+ alias_method :existing_migrations_without_extensions, :existing_migrations
7
+ alias_method :existing_migrations, :existing_migrations_with_extensions
7
8
  }
8
9
  end
9
10
 
@@ -13,4 +14,5 @@ module TrustyCms
13
14
 
14
15
  end
15
16
  end
17
+
16
18
  Rails::Generator::Commands::Base.class_eval { include TrustyCms::GeneratorBaseExtension }
@@ -18,7 +18,7 @@ module TrustyCms
18
18
  end
19
19
 
20
20
  def [](id)
21
- unless id.kind_of? Fixnum
21
+ unless id.kind_of? Integer
22
22
  self.find {|subnav_item| subnav_item.name.to_s.titleize == id.to_s.titleize }
23
23
  else
24
24
  super
@@ -107,14 +107,11 @@ module TrustyCms
107
107
 
108
108
  def activate_extension
109
109
  return if instance.active?
110
- instance.activate if instance.respond_to? :activate
110
+ instance.activate_extension if instance.respond_to? :activate
111
111
  Dir["#{Rails.root}/config/routes/**/*.rb"].each do |route_file|
112
- #config.paths["config/routes"] << route_file if instance.routed?
113
112
  end
114
- #TrustyCms::Application.reload_routes!
115
113
  instance.active = true
116
114
  end
117
- alias :activate :activate_extension
118
115
 
119
116
  def deactivate_extension
120
117
  return unless instance.active?
@@ -131,14 +128,6 @@ module TrustyCms
131
128
  instance.migrates_from[extension_name] = until_migration
132
129
  end
133
130
 
134
- # Expose the configuration object for init hooks
135
- # class MyExtension < ActiveRecord::Base
136
- # extension_config do |config|
137
- # config.after_initialize do
138
- # run_something
139
- # end
140
- # end
141
- # end
142
131
  def extension_config(&block)
143
132
  yield Rails.configuration
144
133
  end
data/lib/trusty_cms.rb CHANGED
@@ -2,6 +2,6 @@ TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) unle
2
2
 
3
3
  unless defined? TrustyCms::VERSION
4
4
  module TrustyCms
5
- VERSION = "3.0.8"
5
+ VERSION = '3.0.9'
6
6
  end
7
7
  end