muck-engine 3.4.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm 1.9.3@muck_engine
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.4.0
1
+ 3.5.0
@@ -5,17 +5,18 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "muck-engine"
8
- s.version = "3.4.0"
8
+ s.version = "3.5.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
12
- s.date = "2011-10-07"
12
+ s.date = "2012-12-21"
13
13
  s.description = "The base engine for the muck system. Contains common tables, custom for, css and javascript."
14
14
  s.email = "justin@tatemae.com"
15
15
  s.extra_rdoc_files = [
16
16
  "README.rdoc"
17
17
  ]
18
18
  s.files = [
19
+ ".rvmrc",
19
20
  "MIT-LICENSE",
20
21
  "README.rdoc",
21
22
  "Rakefile",
@@ -114,7 +115,6 @@ Gem::Specification.new do |s|
114
115
  "lib/muck-engine.rb",
115
116
  "lib/muck-engine/config.rb",
116
117
  "lib/muck-engine/controllers/application.rb",
117
- "lib/muck-engine/controllers/ssl_requirement.rb",
118
118
  "lib/muck-engine/engine.rb",
119
119
  "lib/muck-engine/flash_errors.rb",
120
120
  "lib/muck-engine/form_builder.rb",
@@ -849,7 +849,7 @@ Gem::Specification.new do |s|
849
849
  ]
850
850
  s.homepage = "http://github.com/tatemae/muck-engine"
851
851
  s.require_paths = ["lib"]
852
- s.rubygems_version = "1.8.10"
852
+ s.rubygems_version = "1.8.24"
853
853
  s.summary = "The base engine for the muck system."
854
854
 
855
855
  if s.respond_to? :specification_version then
@@ -1,22 +1,26 @@
1
- <!doctype html>
2
- <!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]-->
3
- <!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]-->
4
- <!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]-->
5
- <!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
6
- <head>
7
- <%= render :partial => 'layouts/global/head' %>
8
- </head>
9
- <body>
10
- <div id="wrapper" class="container">
11
- <%= render :partial => 'layouts/global/header' %>
12
- <div id="content-wrapper">
13
- <div id="content">
14
- <%= yield :layout %>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
+ <title>home</title>
6
+ <%= stylesheet_link_tag 'application', :cache=>true -%>
7
+ <%= javascript_include_tag 'application' -%>
8
+ <%= javascript_tag %[const AUTH_TOKEN = #{form_authenticity_token.inspect};] if protect_against_forgery? -%>
9
+ <%= yield :head -%>
10
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
11
+ </head>
12
+ <body>
13
+ <div id="header">
14
+ <div id="top-navigation">
15
15
  </div>
16
+ <div class="clear"></div>
17
+ </div>
18
+ <div id="main">
19
+ <div id="content">
20
+ <%= yield %>
21
+ </div>
22
+ </div>
23
+ <div id="footer">
16
24
  </div>
17
- <%= render :partial => 'layouts/global/footer' %>
18
- </div>
19
- <%= yield :javascript %>
20
- <%= render :partial => 'layouts/global/google_analytics' %>
21
- </body>
25
+ </body>
22
26
  </html>
metadata CHANGED
@@ -1,286 +1,314 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: muck-engine
3
- version: !ruby/object:Gem::Version
4
- hash: 23
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.5.0
5
5
  prerelease:
6
- segments:
7
- - 3
8
- - 4
9
- - 0
10
- version: 3.4.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Justin Ball
14
9
  - Joel Duffin
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2011-10-07 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- hash: 3
28
- segments:
29
- - 0
30
- version: "0"
13
+ date: 2012-12-21 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
31
16
  name: validation_reflection
32
- prerelease: false
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
33
23
  type: :runtime
34
- requirement: *id001
35
- - !ruby/object:Gem::Dependency
36
- version_requirements: &id002 !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
37
26
  none: false
38
- requirements:
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
31
+ - !ruby/object:Gem::Dependency
32
+ name: will_paginate
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
39
36
  - - ~>
40
- - !ruby/object:Gem::Version
41
- hash: 7
42
- segments:
43
- - 3
44
- - 0
45
- - 0
37
+ - !ruby/object:Gem::Version
46
38
  version: 3.0.0
47
- name: will_paginate
48
- prerelease: false
49
39
  type: :runtime
50
- requirement: *id002
51
- - !ruby/object:Gem::Dependency
52
- version_requirements: &id003 !ruby/object:Gem::Requirement
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
53
42
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: 3.0.0
47
+ - !ruby/object:Gem::Dependency
61
48
  name: overlord
62
- prerelease: false
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
63
55
  type: :runtime
64
- requirement: *id003
65
- - !ruby/object:Gem::Dependency
66
- version_requirements: &id004 !ruby/object:Gem::Requirement
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
67
58
  none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- hash: 3
72
- segments:
73
- - 0
74
- version: "0"
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ - !ruby/object:Gem::Dependency
75
64
  name: shoulda
76
- prerelease: false
65
+ requirement: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
77
71
  type: :development
78
- requirement: *id004
79
- - !ruby/object:Gem::Dependency
80
- version_requirements: &id005 !ruby/object:Gem::Requirement
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
81
74
  none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- hash: 3
86
- segments:
87
- - 0
88
- version: "0"
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ - !ruby/object:Gem::Dependency
89
80
  name: rspec-rails
90
- prerelease: false
81
+ requirement: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
91
87
  type: :development
92
- requirement: *id005
93
- - !ruby/object:Gem::Dependency
94
- version_requirements: &id006 !ruby/object:Gem::Requirement
88
+ prerelease: false
89
+ version_requirements: !ruby/object:Gem::Requirement
95
90
  none: false
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- hash: 3
100
- segments:
101
- - 0
102
- version: "0"
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ - !ruby/object:Gem::Dependency
103
96
  name: cucumber-rails
104
- prerelease: false
97
+ requirement: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
105
103
  type: :development
106
- requirement: *id006
107
- - !ruby/object:Gem::Dependency
108
- version_requirements: &id007 !ruby/object:Gem::Requirement
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
109
106
  none: false
110
- requirements:
111
- - - ">="
112
- - !ruby/object:Gem::Version
113
- hash: 3
114
- segments:
115
- - 0
116
- version: "0"
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
117
112
  name: autotest
118
- prerelease: false
113
+ requirement: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
119
  type: :development
120
- requirement: *id007
121
- - !ruby/object:Gem::Dependency
122
- version_requirements: &id008 !ruby/object:Gem::Requirement
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
123
122
  none: false
124
- requirements:
125
- - - ">="
126
- - !ruby/object:Gem::Version
127
- hash: 3
128
- segments:
129
- - 0
130
- version: "0"
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ - !ruby/object:Gem::Dependency
131
128
  name: capybara
132
- prerelease: false
129
+ requirement: !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ! '>='
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
133
135
  type: :development
134
- requirement: *id008
135
- - !ruby/object:Gem::Dependency
136
- version_requirements: &id009 !ruby/object:Gem::Requirement
136
+ prerelease: false
137
+ version_requirements: !ruby/object:Gem::Requirement
137
138
  none: false
138
- requirements:
139
- - - ">="
140
- - !ruby/object:Gem::Version
141
- hash: 3
142
- segments:
143
- - 0
144
- version: "0"
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ - !ruby/object:Gem::Dependency
145
144
  name: shoulda
146
- prerelease: false
145
+ requirement: !ruby/object:Gem::Requirement
146
+ none: false
147
+ requirements:
148
+ - - ! '>='
149
+ - !ruby/object:Gem::Version
150
+ version: '0'
147
151
  type: :development
148
- requirement: *id009
149
- - !ruby/object:Gem::Dependency
150
- version_requirements: &id010 !ruby/object:Gem::Requirement
152
+ prerelease: false
153
+ version_requirements: !ruby/object:Gem::Requirement
151
154
  none: false
152
- requirements:
153
- - - ">="
154
- - !ruby/object:Gem::Version
155
- hash: 3
156
- segments:
157
- - 0
158
- version: "0"
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ - !ruby/object:Gem::Dependency
159
160
  name: factory_girl
160
- prerelease: false
161
+ requirement: !ruby/object:Gem::Requirement
162
+ none: false
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
161
167
  type: :development
162
- requirement: *id010
163
- - !ruby/object:Gem::Dependency
164
- version_requirements: &id011 !ruby/object:Gem::Requirement
168
+ prerelease: false
169
+ version_requirements: !ruby/object:Gem::Requirement
165
170
  none: false
166
- requirements:
167
- - - ">="
168
- - !ruby/object:Gem::Version
169
- hash: 3
170
- segments:
171
- - 0
172
- version: "0"
171
+ requirements:
172
+ - - ! '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ - !ruby/object:Gem::Dependency
173
176
  name: cucumber
174
- prerelease: false
177
+ requirement: !ruby/object:Gem::Requirement
178
+ none: false
179
+ requirements:
180
+ - - ! '>='
181
+ - !ruby/object:Gem::Version
182
+ version: '0'
175
183
  type: :development
176
- requirement: *id011
177
- - !ruby/object:Gem::Dependency
178
- version_requirements: &id012 !ruby/object:Gem::Requirement
184
+ prerelease: false
185
+ version_requirements: !ruby/object:Gem::Requirement
179
186
  none: false
180
- requirements:
181
- - - ">="
182
- - !ruby/object:Gem::Version
183
- hash: 3
184
- segments:
185
- - 0
186
- version: "0"
187
+ requirements:
188
+ - - ! '>='
189
+ - !ruby/object:Gem::Version
190
+ version: '0'
191
+ - !ruby/object:Gem::Dependency
187
192
  name: rcov
188
- prerelease: false
193
+ requirement: !ruby/object:Gem::Requirement
194
+ none: false
195
+ requirements:
196
+ - - ! '>='
197
+ - !ruby/object:Gem::Version
198
+ version: '0'
189
199
  type: :development
190
- requirement: *id012
191
- - !ruby/object:Gem::Dependency
192
- version_requirements: &id013 !ruby/object:Gem::Requirement
200
+ prerelease: false
201
+ version_requirements: !ruby/object:Gem::Requirement
193
202
  none: false
194
- requirements:
195
- - - ">="
196
- - !ruby/object:Gem::Version
197
- hash: 3
198
- segments:
199
- - 0
200
- version: "0"
203
+ requirements:
204
+ - - ! '>='
205
+ - !ruby/object:Gem::Version
206
+ version: '0'
207
+ - !ruby/object:Gem::Dependency
201
208
  name: rspec
202
- prerelease: false
209
+ requirement: !ruby/object:Gem::Requirement
210
+ none: false
211
+ requirements:
212
+ - - ! '>='
213
+ - !ruby/object:Gem::Version
214
+ version: '0'
203
215
  type: :development
204
- requirement: *id013
205
- - !ruby/object:Gem::Dependency
206
- version_requirements: &id014 !ruby/object:Gem::Requirement
216
+ prerelease: false
217
+ version_requirements: !ruby/object:Gem::Requirement
207
218
  none: false
208
- requirements:
209
- - - ">="
210
- - !ruby/object:Gem::Version
211
- hash: 3
212
- segments:
213
- - 0
214
- version: "0"
219
+ requirements:
220
+ - - ! '>='
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
215
224
  name: database_cleaner
216
- prerelease: false
225
+ requirement: !ruby/object:Gem::Requirement
226
+ none: false
227
+ requirements:
228
+ - - ! '>='
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
217
231
  type: :development
218
- requirement: *id014
219
- - !ruby/object:Gem::Dependency
220
- version_requirements: &id015 !ruby/object:Gem::Requirement
232
+ prerelease: false
233
+ version_requirements: !ruby/object:Gem::Requirement
221
234
  none: false
222
- requirements:
223
- - - ">="
224
- - !ruby/object:Gem::Version
225
- hash: 3
226
- segments:
227
- - 0
228
- version: "0"
235
+ requirements:
236
+ - - ! '>='
237
+ - !ruby/object:Gem::Version
238
+ version: '0'
239
+ - !ruby/object:Gem::Dependency
229
240
  name: spork
230
- prerelease: false
241
+ requirement: !ruby/object:Gem::Requirement
242
+ none: false
243
+ requirements:
244
+ - - ! '>='
245
+ - !ruby/object:Gem::Version
246
+ version: '0'
231
247
  type: :development
232
- requirement: *id015
233
- - !ruby/object:Gem::Dependency
234
- version_requirements: &id016 !ruby/object:Gem::Requirement
248
+ prerelease: false
249
+ version_requirements: !ruby/object:Gem::Requirement
235
250
  none: false
236
- requirements:
237
- - - ">="
238
- - !ruby/object:Gem::Version
239
- hash: 3
240
- segments:
241
- - 0
242
- version: "0"
251
+ requirements:
252
+ - - ! '>='
253
+ - !ruby/object:Gem::Version
254
+ version: '0'
255
+ - !ruby/object:Gem::Dependency
243
256
  name: launchy
244
- prerelease: false
257
+ requirement: !ruby/object:Gem::Requirement
258
+ none: false
259
+ requirements:
260
+ - - ! '>='
261
+ - !ruby/object:Gem::Version
262
+ version: '0'
245
263
  type: :development
246
- requirement: *id016
247
- - !ruby/object:Gem::Dependency
248
- version_requirements: &id017 !ruby/object:Gem::Requirement
264
+ prerelease: false
265
+ version_requirements: !ruby/object:Gem::Requirement
249
266
  none: false
250
- requirements:
251
- - - ">="
252
- - !ruby/object:Gem::Version
253
- hash: 3
254
- segments:
255
- - 0
256
- version: "0"
267
+ requirements:
268
+ - - ! '>='
269
+ - !ruby/object:Gem::Version
270
+ version: '0'
271
+ - !ruby/object:Gem::Dependency
257
272
  name: muck-users
258
- prerelease: false
273
+ requirement: !ruby/object:Gem::Requirement
274
+ none: false
275
+ requirements:
276
+ - - ! '>='
277
+ - !ruby/object:Gem::Version
278
+ version: '0'
259
279
  type: :development
260
- requirement: *id017
261
- - !ruby/object:Gem::Dependency
262
- version_requirements: &id018 !ruby/object:Gem::Requirement
280
+ prerelease: false
281
+ version_requirements: !ruby/object:Gem::Requirement
263
282
  none: false
264
- requirements:
265
- - - ">="
266
- - !ruby/object:Gem::Version
267
- hash: 3
268
- segments:
269
- - 0
270
- version: "0"
283
+ requirements:
284
+ - - ! '>='
285
+ - !ruby/object:Gem::Version
286
+ version: '0'
287
+ - !ruby/object:Gem::Dependency
271
288
  name: git
272
- prerelease: false
289
+ requirement: !ruby/object:Gem::Requirement
290
+ none: false
291
+ requirements:
292
+ - - ! '>='
293
+ - !ruby/object:Gem::Version
294
+ version: '0'
273
295
  type: :development
274
- requirement: *id018
275
- description: The base engine for the muck system. Contains common tables, custom for, css and javascript.
296
+ prerelease: false
297
+ version_requirements: !ruby/object:Gem::Requirement
298
+ none: false
299
+ requirements:
300
+ - - ! '>='
301
+ - !ruby/object:Gem::Version
302
+ version: '0'
303
+ description: The base engine for the muck system. Contains common tables, custom
304
+ for, css and javascript.
276
305
  email: justin@tatemae.com
277
306
  executables: []
278
-
279
307
  extensions: []
280
-
281
- extra_rdoc_files:
308
+ extra_rdoc_files:
282
309
  - README.rdoc
283
- files:
310
+ files:
311
+ - .rvmrc
284
312
  - MIT-LICENSE
285
313
  - README.rdoc
286
314
  - Rakefile
@@ -379,7 +407,6 @@ files:
379
407
  - lib/muck-engine.rb
380
408
  - lib/muck-engine/config.rb
381
409
  - lib/muck-engine/controllers/application.rb
382
- - lib/muck-engine/controllers/ssl_requirement.rb
383
410
  - lib/muck-engine/engine.rb
384
411
  - lib/muck-engine/flash_errors.rb
385
412
  - lib/muck-engine/form_builder.rb
@@ -1113,36 +1140,26 @@ files:
1113
1140
  - test/test/fixtures/rails.png
1114
1141
  homepage: http://github.com/tatemae/muck-engine
1115
1142
  licenses: []
1116
-
1117
1143
  post_install_message:
1118
1144
  rdoc_options: []
1119
-
1120
- require_paths:
1145
+ require_paths:
1121
1146
  - lib
1122
- required_ruby_version: !ruby/object:Gem::Requirement
1147
+ required_ruby_version: !ruby/object:Gem::Requirement
1123
1148
  none: false
1124
- requirements:
1125
- - - ">="
1126
- - !ruby/object:Gem::Version
1127
- hash: 3
1128
- segments:
1129
- - 0
1130
- version: "0"
1131
- required_rubygems_version: !ruby/object:Gem::Requirement
1149
+ requirements:
1150
+ - - ! '>='
1151
+ - !ruby/object:Gem::Version
1152
+ version: '0'
1153
+ required_rubygems_version: !ruby/object:Gem::Requirement
1132
1154
  none: false
1133
- requirements:
1134
- - - ">="
1135
- - !ruby/object:Gem::Version
1136
- hash: 3
1137
- segments:
1138
- - 0
1139
- version: "0"
1155
+ requirements:
1156
+ - - ! '>='
1157
+ - !ruby/object:Gem::Version
1158
+ version: '0'
1140
1159
  requirements: []
1141
-
1142
1160
  rubyforge_project:
1143
- rubygems_version: 1.8.10
1161
+ rubygems_version: 1.8.24
1144
1162
  signing_key:
1145
1163
  specification_version: 3
1146
1164
  summary: The base engine for the muck system.
1147
1165
  test_files: []
1148
-
@@ -1,52 +0,0 @@
1
- # Code adapted from http://github.com/rails/ssl_requirement
2
- module MuckEngine
3
- module SslRequirement
4
-
5
- extend ActiveSupport::Concern
6
-
7
- included do
8
- before_filter :ensure_proper_protocol
9
- end
10
-
11
- module ClassMethods
12
- # Specifies that the named actions requires an SSL connection to be performed (which is enforced by ensure_proper_protocol).
13
- def ssl_required(*actions)
14
- write_inheritable_array(:ssl_required_actions, actions)
15
- end
16
-
17
- def ssl_allowed(*actions)
18
- write_inheritable_array(:ssl_allowed_actions, actions)
19
- end
20
- end
21
-
22
- protected
23
- # Only require ssl if we are in production
24
- def ssl_required?
25
- return ENV['SSL'] == 'on' ? true : false if defined? ENV['SSL']
26
- return false if local_request?
27
- return false if RAILS_ENV == 'test'
28
- ((self.class.read_inheritable_attribute(:ssl_required_actions) || []).include?(action_name.to_sym)) && (::Rails.env == 'production' || ::Rails.env == 'staging')
29
- end
30
-
31
-
32
- def ssl_allowed?
33
- (self.class.read_inheritable_attribute(:ssl_allowed_actions) || []).include?(action_name.to_sym)
34
- end
35
-
36
- private
37
- def ensure_proper_protocol
38
- return true if ssl_allowed?
39
-
40
- if ssl_required? && !request.ssl?
41
- redirect_to "https://" + request.host + request.fullpath
42
- flash.keep
43
- return false
44
- elsif request.ssl? && !ssl_required?
45
- redirect_to "http://" + request.host + request.fullpath
46
- flash.keep
47
- return false
48
- end
49
- end
50
-
51
- end
52
- end