trusty-cms 1.2.29 → 2.0.0.pre.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDljNjFiYjdjZTNiNWViMmUxZjYwZjE0NGViNGViZDg4ZTNmMjMzNQ==
4
+ YzgwMzQzZGZlMDFhZjljN2M3NDE5OGZlNTBkM2FhMDVhM2I2M2YwNw==
5
5
  data.tar.gz: !binary |-
6
- MTdkODliMmQxM2MwZjg1ZGFmMDY5OTU2Y2UwYTBjNmU1MDRhZDJhZQ==
6
+ NDdjMWFhZmVlYjQ2MDZmYjZhZmM0N2Y1YTk4N2FiZTIwMTI2NGNjZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTEwNmZiZTY5ZTQ3YzAwZGNmNTdiZjBmNTM4ZTM5OTM2YmQ1NThjYzhiYjk5
10
- ZjJmY2UxNjE2MTViYjVkNDBhZmE0ZTc3NTBkYzRlMTNhZjFhNmZlZjA4MzAw
11
- ZGFjMThjZjAyZDlhMjZkMmFjYzc3YWVlNWE3MjE4MzliNDRhYmQ=
9
+ ZThjNmRhOGI1YjkzYWZlNGJiODVlYjU3YjdiNGVkZjMyNDlmNGUzY2JhZmVk
10
+ YmFhNWQ3ZmQwNzAzZjI1ZDI3Nzk0ODRlNWRjNDEyOGQ4MjQyZmQ5NDMyM2Yy
11
+ MTNjNGY4OWE3ZGY0ZTg5MjBkYzU4OWZmYjliYjFjZjJkODJjOTQ=
12
12
  data.tar.gz: !binary |-
13
- MjNiOWQzZDM4ODRkMTM4MGI2YjExZGIwZDM0ZTE2NTk4ZDE3ZmU4MjAxMzdi
14
- NTJmNTEyODc2YWFjYWU3NmI5ZDk4Y2EzMmRkODcwNTZjNjUzNzYxYmExMTFj
15
- MjE3NzZhYmE5ZDc3NzkzZGFiNzMxNWUyMzE0MDBlOTg3NWU1ZDI=
13
+ YjMwNmY5ZjZlZjNlZTk1NDE3NDkxZWMzMjEyOTM5MmY0ZjM0MTE0NTYwMjRm
14
+ MzcxNzM4MjQ3NjljMzgzYTY3YWZmZDVjYTBkMmE2YWQwMjJhNzRhOWQ3YWZh
15
+ YTYxZjkyMzM2NDZhMzRkNTljODI3YmZkNjI4ZDg5MTZmMmQ1NGI=
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile CHANGED
@@ -7,6 +7,8 @@ source 'https://rubygems.org'
7
7
  # requires radiant and therefore pulls in every
8
8
  # dependency mentioned in radiant.gemspec.
9
9
 
10
+ gem 'trustygems', '~> 0.0.1'
11
+
10
12
  gemspec
11
13
 
12
14
  # When trusty is installed as a gem you can run all of
data/Gemfile.lock CHANGED
@@ -1,27 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (1.1.28)
4
+ trusty-cms (2.0.0.pre.beta)
5
5
  RedCloth (~> 4.2)
6
- acts_as_tree (~> 0.1.1)
6
+ acts_as_tree (~> 2.1)
7
7
  bundler (~> 1.7)
8
8
  ckeditor (~> 4.1)
9
9
  compass-rails (~> 2.0)
10
10
  delocalize (~> 0.2)
11
11
  execjs (~> 2.2)
12
12
  haml (~> 4.0)
13
- haml-rails (>= 0.4, < 0.5)
13
+ haml-rails (~> 0.5)
14
14
  highline (~> 1.6)
15
15
  jquery-rails (~> 3.1)
16
16
  mysql (~> 2.9)
17
+ protected_attributes (~> 1.0.9)
17
18
  rack (~> 1.4)
18
19
  rack-cache (~> 1.2)
19
20
  radius (~> 0.7)
20
- rails (~> 3.2)
21
+ rails (~> 4.2)
21
22
  rdoc (~> 3.9)
22
23
  stringex (~> 1.3)
23
24
  therubyracer (~> 0.12)
24
- tzinfo (~> 0.3)
25
+ tzinfo (~> 1.2)
25
26
  uglifier (~> 2.6)
26
27
  will_paginate (~> 3.0)
27
28
 
@@ -30,51 +31,60 @@ GEM
30
31
  specs:
31
32
  RedCloth (4.2.9)
32
33
  RedCloth (4.2.9-java)
33
- actionmailer (3.2.21)
34
- actionpack (= 3.2.21)
35
- mail (~> 2.5.4)
36
- actionpack (3.2.21)
37
- activemodel (= 3.2.21)
38
- activesupport (= 3.2.21)
39
- builder (~> 3.0.0)
34
+ actionmailer (4.2.3)
35
+ actionpack (= 4.2.3)
36
+ actionview (= 4.2.3)
37
+ activejob (= 4.2.3)
38
+ mail (~> 2.5, >= 2.5.4)
39
+ rails-dom-testing (~> 1.0, >= 1.0.5)
40
+ actionpack (4.2.3)
41
+ actionview (= 4.2.3)
42
+ activesupport (= 4.2.3)
43
+ rack (~> 1.6)
44
+ rack-test (~> 0.6.2)
45
+ rails-dom-testing (~> 1.0, >= 1.0.5)
46
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
47
+ actionview (4.2.3)
48
+ activesupport (= 4.2.3)
49
+ builder (~> 3.1)
40
50
  erubis (~> 2.7.0)
41
- journey (~> 1.0.4)
42
- rack (~> 1.4.5)
43
- rack-cache (~> 1.2)
44
- rack-test (~> 0.6.1)
45
- sprockets (~> 2.2.1)
46
- activemodel (3.2.21)
47
- activesupport (= 3.2.21)
48
- builder (~> 3.0.0)
49
- activerecord (3.2.21)
50
- activemodel (= 3.2.21)
51
- activesupport (= 3.2.21)
52
- arel (~> 3.0.2)
53
- tzinfo (~> 0.3.29)
54
- activeresource (3.2.21)
55
- activemodel (= 3.2.21)
56
- activesupport (= 3.2.21)
57
- activesupport (3.2.21)
58
- i18n (~> 0.6, >= 0.6.4)
59
- multi_json (~> 1.0)
60
- acts_as_tree (0.1.1)
61
- addressable (2.3.7)
62
- arel (3.0.3)
63
- builder (3.0.4)
51
+ rails-dom-testing (~> 1.0, >= 1.0.5)
52
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
53
+ activejob (4.2.3)
54
+ activesupport (= 4.2.3)
55
+ globalid (>= 0.3.0)
56
+ activemodel (4.2.3)
57
+ activesupport (= 4.2.3)
58
+ builder (~> 3.1)
59
+ activerecord (4.2.3)
60
+ activemodel (= 4.2.3)
61
+ activesupport (= 4.2.3)
62
+ arel (~> 6.0)
63
+ activesupport (4.2.3)
64
+ i18n (~> 0.7)
65
+ json (~> 1.7, >= 1.7.7)
66
+ minitest (~> 5.1)
67
+ thread_safe (~> 0.3, >= 0.3.4)
68
+ tzinfo (~> 1.1)
69
+ acts_as_tree (2.2.0)
70
+ activerecord (>= 3.0.0)
71
+ addressable (2.3.8)
72
+ arel (6.0.2)
73
+ builder (3.2.2)
64
74
  capybara (2.3.0)
65
75
  mime-types (>= 1.16)
66
76
  nokogiri (>= 1.3.3)
67
77
  rack (>= 1.0.0)
68
78
  rack-test (>= 0.5.4)
69
79
  xpath (~> 2.0)
70
- chunky_png (1.3.3)
71
- ckeditor (4.1.1)
80
+ chunky_png (1.3.4)
81
+ ckeditor (4.1.2)
72
82
  cocaine
73
83
  orm_adapter (~> 0.5.0)
74
84
  climate_control (0.0.3)
75
85
  activesupport (>= 3.0)
76
86
  cliver (0.3.2)
77
- cocaine (0.5.5)
87
+ cocaine (0.5.7)
78
88
  climate_control (>= 0.0.3, < 1.0)
79
89
  coderay (1.1.0)
80
90
  compass (1.0.3)
@@ -93,7 +103,7 @@ GEM
93
103
  compass (~> 1.0.0)
94
104
  sass-rails (<= 5.0.1)
95
105
  sprockets (< 2.13)
96
- daemons (1.1.9)
106
+ daemons (1.2.3)
97
107
  database_cleaner (1.3.0)
98
108
  delocalize (0.4.0)
99
109
  rails (>= 3.0)
@@ -101,38 +111,47 @@ GEM
101
111
  erubis (2.7.0)
102
112
  eventmachine (1.0.7)
103
113
  eventmachine (1.0.7-java)
104
- execjs (2.3.0)
105
- ffi (1.9.6)
106
- ffi (1.9.6-java)
114
+ execjs (2.5.2)
115
+ ffi (1.9.10)
116
+ ffi (1.9.10-java)
117
+ globalid (0.3.5)
118
+ activesupport (>= 4.1.0)
107
119
  haml (4.0.6)
108
120
  tilt
109
- haml-rails (0.4)
110
- actionpack (>= 3.1, < 4.1)
111
- activesupport (>= 3.1, < 4.1)
112
- haml (>= 3.1, < 4.1)
113
- railties (>= 3.1, < 4.1)
114
- highline (1.6.21)
121
+ haml-rails (0.9.0)
122
+ actionpack (>= 4.0.1)
123
+ activesupport (>= 4.0.1)
124
+ haml (>= 4.0.6, < 5.0)
125
+ html2haml (>= 1.0.1)
126
+ railties (>= 4.0.1)
127
+ highline (1.7.2)
115
128
  hike (1.2.3)
129
+ html2haml (2.0.0)
130
+ erubis (~> 2.7.0)
131
+ haml (~> 4.0.0)
132
+ nokogiri (~> 1.6.0)
133
+ ruby_parser (~> 3.5)
116
134
  i18n (0.7.0)
117
- journey (1.0.4)
118
- jquery-rails (3.1.2)
135
+ jquery-rails (3.1.3)
119
136
  railties (>= 3.0, < 5.0)
120
137
  thor (>= 0.14, < 2.0)
121
- json (1.8.2)
122
- json (1.8.2-java)
138
+ json (1.8.3)
139
+ json (1.8.3-java)
123
140
  launchy (2.4.3)
124
141
  addressable (~> 2.3)
125
142
  launchy (2.4.3-java)
126
143
  addressable (~> 2.3)
127
144
  spoon (~> 0.0.1)
128
- libv8 (3.16.14.7)
129
- mail (2.5.4)
130
- mime-types (~> 1.16)
131
- treetop (~> 1.4.8)
145
+ libv8 (3.16.14.11)
146
+ loofah (2.0.2)
147
+ nokogiri (>= 1.5.9)
148
+ mail (2.6.3)
149
+ mime-types (>= 1.16, < 3)
132
150
  method_source (0.8.2)
133
- mime-types (1.25.1)
151
+ mime-types (2.6.1)
134
152
  mini_portile (0.6.2)
135
- multi_json (1.10.1)
153
+ minitest (5.7.0)
154
+ multi_json (1.11.2)
136
155
  mysql (2.9.1)
137
156
  nokogiri (1.6.6.2)
138
157
  mini_portile (~> 0.6.0)
@@ -143,7 +162,8 @@ GEM
143
162
  cliver (~> 0.3.1)
144
163
  multi_json (~> 1.0)
145
164
  websocket-driver (>= 0.2.0)
146
- polyglot (0.3.5)
165
+ protected_attributes (1.0.9)
166
+ activemodel (>= 4.0.1, < 5.0)
147
167
  pry (0.10.1)
148
168
  coderay (~> 1.1.0)
149
169
  method_source (~> 0.8.1)
@@ -153,36 +173,43 @@ GEM
153
173
  method_source (~> 0.8.1)
154
174
  slop (~> 3.4)
155
175
  spoon (~> 0.0)
156
- rack (1.4.5)
176
+ rack (1.6.4)
157
177
  rack-cache (1.2)
158
178
  rack (>= 0.4)
159
- rack-ssl (1.3.4)
160
- rack
161
179
  rack-test (0.6.3)
162
180
  rack (>= 1.0)
163
181
  radius (0.7.4)
164
- rails (3.2.21)
165
- actionmailer (= 3.2.21)
166
- actionpack (= 3.2.21)
167
- activerecord (= 3.2.21)
168
- activeresource (= 3.2.21)
169
- activesupport (= 3.2.21)
170
- bundler (~> 1.0)
171
- railties (= 3.2.21)
172
- railties (3.2.21)
173
- actionpack (= 3.2.21)
174
- activesupport (= 3.2.21)
175
- rack-ssl (~> 1.3.2)
182
+ rails (4.2.3)
183
+ actionmailer (= 4.2.3)
184
+ actionpack (= 4.2.3)
185
+ actionview (= 4.2.3)
186
+ activejob (= 4.2.3)
187
+ activemodel (= 4.2.3)
188
+ activerecord (= 4.2.3)
189
+ activesupport (= 4.2.3)
190
+ bundler (>= 1.3.0, < 2.0)
191
+ railties (= 4.2.3)
192
+ sprockets-rails
193
+ rails-deprecated_sanitizer (1.0.3)
194
+ activesupport (>= 4.2.0.alpha)
195
+ rails-dom-testing (1.0.6)
196
+ activesupport (>= 4.2.0.beta, < 5.0)
197
+ nokogiri (~> 1.6.0)
198
+ rails-deprecated_sanitizer (>= 1.0.1)
199
+ rails-html-sanitizer (1.0.2)
200
+ loofah (~> 2.0)
201
+ railties (4.2.3)
202
+ actionpack (= 4.2.3)
203
+ activesupport (= 4.2.3)
176
204
  rake (>= 0.8.7)
177
- rdoc (~> 3.4)
178
- thor (>= 0.14.6, < 2.0)
205
+ thor (>= 0.18.1, < 2.0)
179
206
  rake (10.4.2)
180
- rb-fsevent (0.9.4)
207
+ rb-fsevent (0.9.5)
181
208
  rb-inotify (0.9.5)
182
209
  ffi (>= 0.5.0)
183
210
  rdoc (3.12.2)
184
211
  json (~> 1.4)
185
- ref (1.0.5)
212
+ ref (2.0.0)
186
213
  rspec-core (3.0.4)
187
214
  rspec-support (~> 3.0.0)
188
215
  rspec-expectations (3.0.4)
@@ -199,21 +226,30 @@ GEM
199
226
  rspec-mocks (~> 3.0.0)
200
227
  rspec-support (~> 3.0.0)
201
228
  rspec-support (3.0.4)
202
- sass (3.4.11)
203
- sass-rails (3.2.6)
204
- railties (~> 3.2.0)
205
- sass (>= 3.1.10)
206
- tilt (~> 1.3)
229
+ ruby_parser (3.7.0)
230
+ sexp_processor (~> 4.1)
231
+ sass (3.4.16)
232
+ sass-rails (5.0.1)
233
+ railties (>= 4.0.0, < 5.0)
234
+ sass (~> 3.1)
235
+ sprockets (>= 2.8, < 4.0)
236
+ sprockets-rails (>= 2.0, < 4.0)
237
+ tilt (~> 1.1)
238
+ sexp_processor (4.6.0)
207
239
  slop (3.6.0)
208
240
  spoon (0.0.4)
209
241
  ffi
210
- sprockets (2.2.3)
242
+ sprockets (2.12.4)
211
243
  hike (~> 1.2)
212
244
  multi_json (~> 1.0)
213
245
  rack (~> 1.0)
214
246
  tilt (~> 1.1, != 1.3.0)
247
+ sprockets-rails (2.3.2)
248
+ actionpack (>= 3.0)
249
+ activesupport (>= 3.0)
250
+ sprockets (>= 2.8, < 4.0)
215
251
  stringex (1.5.1)
216
- therubyracer (0.12.1)
252
+ therubyracer (0.12.2)
217
253
  libv8 (~> 3.16.14.0)
218
254
  ref
219
255
  thin (1.6.3)
@@ -221,19 +257,21 @@ GEM
221
257
  eventmachine (~> 1.0)
222
258
  rack (~> 1.0)
223
259
  thor (0.19.1)
260
+ thread_safe (0.3.5)
261
+ thread_safe (0.3.5-java)
224
262
  tilt (1.4.1)
225
- treetop (1.4.15)
226
- polyglot
227
- polyglot (>= 0.3.1)
228
- tzinfo (0.3.43)
229
- uglifier (2.7.0)
263
+ trustygems (0.0.6)
264
+ rake
265
+ tzinfo (1.2.2)
266
+ thread_safe (~> 0.1)
267
+ uglifier (2.7.1)
230
268
  execjs (>= 0.3.0)
231
269
  json (>= 1.8.0)
232
- websocket-driver (0.5.1)
270
+ websocket-driver (0.6.2)
233
271
  websocket-extensions (>= 0.1.0)
234
- websocket-driver (0.5.1-java)
272
+ websocket-driver (0.6.2-java)
235
273
  websocket-extensions (>= 0.1.0)
236
- websocket-extensions (0.1.1)
274
+ websocket-extensions (0.1.2)
237
275
  will_paginate (3.0.7)
238
276
  xpath (2.0.0)
239
277
  nokogiri (~> 1.3)
@@ -253,3 +291,4 @@ DEPENDENCIES
253
291
  rspec-rails (~> 3.0.0)
254
292
  thin (~> 1.6.2)
255
293
  trusty-cms!
294
+ trustygems (~> 0.0.1)
data/Rakefile CHANGED
@@ -4,4 +4,5 @@
4
4
 
5
5
  require File.expand_path('../config/application', __FILE__)
6
6
  STDOUT.sync = true
7
- TrustyCms::Application.load_tasks
7
+ TrustyCms::Application.load_tasks
8
+ require 'trustygems'
@@ -26,7 +26,7 @@ class Admin::ConfigurationController < ApplicationController
26
26
  begin
27
27
  TrustyCms.config.transaction do
28
28
  params[:trusty_config].each_pair do |key, value|
29
- @trusty_config[key] = TrustyCms::Config.find_or_create_by_key(key)
29
+ @trusty_config[key] = TrustyCms::Config.find_or_initialize_by(key: key)
30
30
  @trusty_config[key].value = value # validation sets errors on @trusty_config['key'] that the helper methods will pick up
31
31
  end
32
32
  redirect_to :action => :show
@@ -69,7 +69,7 @@ module Admin::ConfigurationHelper
69
69
 
70
70
  def setting_for(key)
71
71
  @trusty_config ||= {} # normally initialized in Admin::ConfigurationController
72
- @trusty_config[key] ||= TrustyCms.config.find_or_create_by_key(key)
72
+ @trusty_config[key] ||= TrustyCms.config.find_or_initialize_by(key: key)
73
73
  end
74
74
 
75
75
  def definition_for(key)
data/app/models/layout.rb CHANGED
@@ -2,7 +2,7 @@ class Layout < ActiveRecord::Base
2
2
  attr_protected :created_at, :updated_at
3
3
 
4
4
  # Default Order
5
- default_scope :order => "name"
5
+ default_scope {order("name")}
6
6
 
7
7
  # Associations
8
8
  has_many :pages
data/app/models/page.rb CHANGED
@@ -10,9 +10,9 @@ class Page < ActiveRecord::Base
10
10
 
11
11
  # Associations
12
12
  acts_as_tree :order => 'virtual DESC, title ASC'
13
- has_many :parts, :class_name => 'PagePart', :order => 'id', :dependent => :destroy
13
+ has_many :parts, {:class_name => 'PagePart', :dependent => :destroy}, -> {order(:id)}
14
14
  accepts_nested_attributes_for :parts, :allow_destroy => true
15
- has_many :fields, :class_name => 'PageField', :order => 'id', :dependent => :destroy
15
+ has_many :fields, {:class_name => 'PageField', :dependent => :destroy}, -> {order(:id)}
16
16
  accepts_nested_attributes_for :fields, :allow_destroy => true
17
17
  belongs_to :layout
18
18
  belongs_to :created_by, :class_name => 'User'
@@ -25,7 +25,7 @@ class Page < ActiveRecord::Base
25
25
  validates_length_of :slug, :maximum => 100
26
26
  validates_length_of :breadcrumb, :maximum => 160
27
27
 
28
- validates_format_of :slug, :with => %r{^([-_.A-Za-z0-9]*|/)$}
28
+ validates_format_of :slug, :with => %r{\A([-_.A-Za-z0-9]*|/)\z}
29
29
  validates_uniqueness_of :slug, :scope => :parent_id
30
30
 
31
31
  validate :valid_class_name
@@ -2,7 +2,7 @@ class PagePart < ActiveRecord::Base
2
2
  attr_accessible :name, :filter_id, :content
3
3
 
4
4
  # Default Order
5
- default_scope :order => 'name'
5
+ default_scope {order("name")}
6
6
 
7
7
  # Associations
8
8
  belongs_to :page
@@ -88,7 +88,7 @@ module TrustyCms
88
88
 
89
89
  def []=(key, value)
90
90
  if table_exists?
91
- setting = find_or_initialize_by_key(key)
91
+ setting = find_or_initialize_by(key: key)
92
92
  setting.value = value
93
93
  end
94
94
  end
data/app/models/user.rb CHANGED
@@ -5,7 +5,7 @@ class User < ActiveRecord::Base
5
5
  attr_protected 'why_is_this_needed'
6
6
 
7
7
  # Default Order
8
- default_scope :order => 'name'
8
+ default_scope {order("name")}
9
9
 
10
10
  # Associations
11
11
  belongs_to :created_by, :class_name => 'User'
@@ -8,8 +8,6 @@
8
8
  = "To use HTML or Radius tags, switch to plain text view by clicking the 'Source' button."
9
9
  %span.reference_links
10
10
  = t('reference')
11
- %span{:id => "filter_reference_link_#{page_part.name.to_slug}"}
12
- = link_to_function t('filter'), "loadFilterReference('#{page_part.name.to_slug}');"
13
11
  %span{:id => "tag_reference_link_#{page_part.name.to_slug}"}
14
12
  = link_to t('available_tags'), admin_reference_url(:tags), id: 'tag_reference'
15
13
  = render_region :part_controls, :locals => {:page_part => page_part}
@@ -14,7 +14,7 @@
14
14
  .buttons
15
15
  = submit_tag t('add_part'), :id => 'add_part_button', :class => "button"
16
16
  = t('or')
17
- = link_to_function t('cancel'), "Popup.close();", :class=>"cancel"
17
+ = link_to "Cancel", '#', onclick: "Popup.close(); return false", class: "cancel"
18
18
  #add_field_popup.popup{:style=>"display: none"}
19
19
  #add_field_busy.busy{:style=>"display: none"}= image('spinner.gif', :alt => "")
20
20
  .popup_title= t('add_field')
@@ -27,5 +27,5 @@
27
27
  .buttons
28
28
  = submit_tag t('add_field'), :class=>'button', :id=>'add_page_field_button'
29
29
  = t('or')
30
- = link_to_function t('cancel'), "Popup.close();", :class=>"cancel"
30
+ = link_to "Cancel", '#', onclick: "Popup.close(); return false", class: "cancel"
31
31
  = render_region :popups
data/config/routes.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  TrustyCms::Application.routes.draw do
2
2
  root to: 'site#show_page'
3
3
  TrustyCms::Application.config.enabled_extensions.each { |ext|
4
- load File.join(TrustyCms::ExtensionPath.find(ext).to_s, "config", "routes.rb")
4
+ #load File.join(TrustyCms::ExtensionPath.find(ext).to_s, "config", "routes.rb")
5
5
  }
6
6
  namespace :admin do
7
7
  resources :pages do
@@ -27,12 +27,12 @@ TrustyCms::Application.routes.draw do
27
27
  match '/reference/:type(.:format)' => 'references#show', :as => :reference, :via => :get
28
28
  end
29
29
 
30
- match 'admin' => 'admin/welcome#index', :as => :admin
31
- match 'admin/welcome' => 'admin/welcome#index', :as => :welcome
32
- match 'admin/login' => 'admin/welcome#login', :as => :login
33
- match 'admin/logout' => 'admin/welcome#logout', :as => :logout
30
+ get 'admin' => 'admin/welcome#index', :as => :admin
31
+ get 'admin/welcome' => 'admin/welcome#index', :as => :welcome
32
+ match 'admin/login' => 'admin/welcome#login', :as => :login, :via => [:get, :post]
33
+ get 'admin/logout' => 'admin/welcome#logout', :as => :logout
34
34
  # match '/' => 'site#show_page', :url => '/' # set root to this so root_path works
35
- match 'error/404' => 'site#not_found', :as => :not_found
36
- match 'error/500' => 'site#error', :as => :error
37
- match '*url' => 'site#show_page'
35
+ get 'error/404' => 'site#not_found', :as => :not_found
36
+ get 'error/500' => 'site#error', :as => :error
37
+ get '*url' => 'site#show_page'
38
38
  end
@@ -0,0 +1,3 @@
1
+ gemspec: trusty_cms.gemspec
2
+ # If using a private server, change this to the necessary command, i.e. gem inabox
3
+ deploy_command: gem push
data/lib/trusty_cms.rb CHANGED
@@ -2,18 +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
- module Version
6
- Major = '1'
7
- Minor = '2'
8
- Tiny = '29'
9
- Patch = nil # set to nil for normal release
10
-
11
- class << self
12
- def to_s
13
- [Major, Minor, Tiny, Patch].delete_if{|v| v.nil? }.join('.')
14
- end
15
- alias :to_str :to_s
16
- end
17
- end
5
+ VERSION = "2.0.0-beta"
18
6
  end
19
7
  end
@@ -108,8 +108,10 @@ module TrustyCms
108
108
  def activate_extension
109
109
  return if instance.active?
110
110
  instance.activate if instance.respond_to? :activate
111
- TrustyCms::Application.config.paths["config/routes"].concat([instance.routing_file]) if instance.routed?
112
- TrustyCms::Application.reload_routes!
111
+ Dir["#{Rails.root}/config/routes/**/*.rb"].each do |route_file|
112
+ #config.paths["config/routes"] << route_file if instance.routed?
113
+ end
114
+ #TrustyCms::Application.reload_routes!
113
115
  instance.active = true
114
116
  end
115
117
  alias :activate :activate_extension
@@ -148,10 +148,10 @@ module TrustyCms
148
148
  def initialize_framework_views
149
149
  view_paths = extension_loader.paths(:view) #.push(TrustyCms::Application.config.view_path)
150
150
  if ActionController::Base.view_paths.count == 0 || !ActionView::Base.cache_template_loading
151
- ActionController::Base.view_paths = ActionView::Base.process_view_paths(view_paths)
151
+ ActionController::Base.view_paths = ActionView::PathSet.new(Array.wrap(view_paths))
152
152
  end
153
153
  if ActionMailer::Base.view_paths.count == 0 || !ActionView::Base.cache_template_loading
154
- ActionMailer::Base.view_paths = ActionView::Base.process_view_paths(view_paths)
154
+ ActionMailer::Base.view_paths = ActionView::PathSet.new(Array.wrap(view_paths))
155
155
  end
156
156
  end
157
157
 
data/trusty_cms.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
  require File.expand_path(__FILE__ + '/../lib/trusty_cms.rb')
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{trusty-cms}
5
- s.version = TrustyCms::Version.to_s
5
+ s.version = TrustyCms::VERSION
6
6
  s.platform = Gem::Platform::RUBY
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
@@ -23,8 +23,9 @@ a general purpose content managment system--not merely a blogging engine.}
23
23
  s.summary = %q{A no-fluff content management system designed for small teams.}
24
24
  s.license = %q{MIT}
25
25
 
26
- s.add_dependency "tzinfo", "~> 0.3"
27
- s.add_dependency "rails", "~> 3.2"
26
+ s.add_dependency "tzinfo", "~> 1.2"
27
+ s.add_dependency "rails", "~> 4.2"
28
+ s.add_dependency "protected_attributes", '~> 1.0.9'
28
29
  s.add_dependency "jquery-rails", "~> 3.1"
29
30
  s.add_dependency "rdoc", "~> 3.9"
30
31
  s.add_dependency "acts_as_tree", "~> 2.1"
@@ -32,7 +33,7 @@ a general purpose content managment system--not merely a blogging engine.}
32
33
  s.add_dependency "compass-rails", "~> 2.0"
33
34
  s.add_dependency "delocalize", "~> 0.2"
34
35
  s.add_dependency "haml", "~> 4.0"
35
- s.add_dependency "haml-rails", ">= 0.4", "< 0.5" # 0.5 is rails 4+ only
36
+ s.add_dependency "haml-rails", "~> 0.5" # 0.5 is rails 4+ only
36
37
  s.add_dependency "highline", "~> 1.6"
37
38
  s.add_dependency "mysql", "~> 2.9"
38
39
  s.add_dependency "rack", "~> 1.4"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.29
4
+ version: 2.0.0.pre.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrustyCms CMS dev team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-13 00:00:00.000000000 Z
11
+ date: 2015-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo
@@ -16,28 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '0.3'
19
+ version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '0.3'
26
+ version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: '3.2'
33
+ version: '4.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: '3.2'
40
+ version: '4.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: protected_attributes
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 1.0.9
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.0.9
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: jquery-rails
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -140,20 +154,14 @@ dependencies:
140
154
  name: haml-rails
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
- - - ! '>='
144
- - !ruby/object:Gem::Version
145
- version: '0.4'
146
- - - <
157
+ - - ~>
147
158
  - !ruby/object:Gem::Version
148
159
  version: '0.5'
149
160
  type: :runtime
150
161
  prerelease: false
151
162
  version_requirements: !ruby/object:Gem::Requirement
152
163
  requirements:
153
- - - ! '>='
154
- - !ruby/object:Gem::Version
155
- version: '0.4'
156
- - - <
164
+ - - ~>
157
165
  - !ruby/object:Gem::Version
158
166
  version: '0.5'
159
167
  - !ruby/object:Gem::Dependency
@@ -343,6 +351,7 @@ extra_rdoc_files:
343
351
  files:
344
352
  - .gitignore
345
353
  - CHANGELOG.md
354
+ - CODE_OF_CONDUCT.md
346
355
  - CONTRIBUTORS.md
347
356
  - Gemfile
348
357
  - Gemfile.lock
@@ -564,6 +573,7 @@ files:
564
573
  - config/locales/en_available_tags.yml
565
574
  - config/routes.rb
566
575
  - config/routes.rb.rails2
576
+ - config/trustygems.yml
567
577
  - db/migrate/001_create_radiant_tables.rb
568
578
  - db/migrate/002_insert_initial_data.rb
569
579
  - db/migrate/003_rename_behavior_column.rb