rails-ext 0.3.21 → 0.3.22

Sign up to get free protection for your applications and to get access to all the features.
data/.git/COMMIT_EDITMSG CHANGED
@@ -1 +1 @@
1
- fix
1
+ upd
data/.git/index CHANGED
Binary file
data/.git/logs/HEAD CHANGED
@@ -75,3 +75,4 @@ a5fe3c8ef2b84dbebb2181ceaebec710f5b163d4 0573ef490a937cd853c8d8d6affb63851451e0a
75
75
  0573ef490a937cd853c8d8d6affb63851451e0a3 f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 alex <alex@amac.local> 1272795359 +0400 commit: upd
76
76
  f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 alex <alex@amac.local> 1272806420 +0400 commit: fix
77
77
  e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 83e57169d9640366e3a95806fc2c73c98d686033 alex <alex@amac.local> 1272814712 +0400 commit: fix
78
+ 83e57169d9640366e3a95806fc2c73c98d686033 120612cf1c0a44c1433355a4155c1aede0bbceef alex <alex@amac.local> 1272820652 +0400 commit: upd
@@ -75,3 +75,4 @@ a5fe3c8ef2b84dbebb2181ceaebec710f5b163d4 0573ef490a937cd853c8d8d6affb63851451e0a
75
75
  0573ef490a937cd853c8d8d6affb63851451e0a3 f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 alex <alex@amac.local> 1272795359 +0400 commit: upd
76
76
  f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 alex <alex@amac.local> 1272806420 +0400 commit: fix
77
77
  e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 83e57169d9640366e3a95806fc2c73c98d686033 alex <alex@amac.local> 1272814712 +0400 commit: fix
78
+ 83e57169d9640366e3a95806fc2c73c98d686033 120612cf1c0a44c1433355a4155c1aede0bbceef alex <alex@amac.local> 1272820652 +0400 commit: upd
@@ -60,3 +60,4 @@ cda2dd4b5ecbc69fa1b1ebf09c580ba17bf69656 268fe011dd9d01aa6e05c2004280b78e149ea29
60
60
  0573ef490a937cd853c8d8d6affb63851451e0a3 f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 alex <alex@amac.local> 1272795370 +0400 update by push
61
61
  f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 alex <alex@amac.local> 1272806434 +0400 update by push
62
62
  e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 83e57169d9640366e3a95806fc2c73c98d686033 alex <alex@amac.local> 1272814722 +0400 update by push
63
+ 83e57169d9640366e3a95806fc2c73c98d686033 120612cf1c0a44c1433355a4155c1aede0bbceef alex <alex@amac.local> 1272820661 +0400 update by push
@@ -1 +1 @@
1
- 83e57169d9640366e3a95806fc2c73c98d686033
1
+ 120612cf1c0a44c1433355a4155c1aede0bbceef
@@ -1 +1 @@
1
- 83e57169d9640366e3a95806fc2c73c98d686033
1
+ 120612cf1c0a44c1433355a4155c1aede0bbceef
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ require 'fileutils'
18
18
 
19
19
  spec = Gem::Specification.new do |s|
20
20
  s.name = "rails-ext"
21
- s.version = "0.3.21"
21
+ s.version = "0.3.22"
22
22
  s.summary = "Set of common Ruby on Rails extensions"
23
23
  s.description = "Set of common Ruby on Rails extensions"
24
24
  s.author = "Alexey Petrushin"
@@ -90,12 +90,12 @@ ActionController::Base.class_eval do
90
90
  #
91
91
  # enshure domain has www. except if there's custom subdomain
92
92
  #
93
- def ensure_www
94
- # uri = Addressable::URI.parse request.url
95
- # if uri.host.count('.') < 2 and Rails.production? and request.domain !~ /localhost/
96
- # uri.host = "www." + uri.host
97
- # redirect_to uri.to_s
98
- # end
93
+ def ensure_no_www
94
+ uri = Addressable::URI.parse request.url
95
+ if uri.host =~ /^www\./
96
+ uri.host = uri.host.sub(/^www\./, '')
97
+ redirect_to uri.to_s
98
+ end
99
99
  end
100
100
 
101
101
  class << self
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 21
9
- version: 0.3.21
8
+ - 22
9
+ version: 0.3.22
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alexey Petrushin
@@ -102,7 +102,9 @@ files:
102
102
  - .git/objects/10/7da1f89d0cd40e5c1f46a5cfc5c2f45e998008
103
103
  - .git/objects/10/be800e74a6f059e784c0ed9bbac41b49f8e8e5
104
104
  - .git/objects/10/bfe1230b9d96e23600091cc8b4b9d378068101
105
+ - .git/objects/11/7c771659caad8e7095366a541ab4ed0f4443df
105
106
  - .git/objects/11/9db1e92a2d4c7ff2c6d9a58940aa25d8bd4bc3
107
+ - .git/objects/12/0612cf1c0a44c1433355a4155c1aede0bbceef
106
108
  - .git/objects/13/882df4f2ef911454bf3b69a85742b372723366
107
109
  - .git/objects/13/a8efff96c74f758b770a3d6825e8ede1163130
108
110
  - .git/objects/13/d5e53963c37e20ff517035b00f6b404c0e8056
@@ -279,6 +281,7 @@ files:
279
281
  - .git/objects/5c/d7e89f2b29ed92fd51e2c6b2ee74db376d17d7
280
282
  - .git/objects/5c/e57246e73624ffb1eb0eee1375f42d8f8b8764
281
283
  - .git/objects/5d/c38b1f2d3893c8e41b05de2d121b525f888e5c
284
+ - .git/objects/5e/2b259a6488f50b8720ba1a4218ceb389f15341
282
285
  - .git/objects/5f/483b0c41645f8882f549c1c6d0274bb592140a
283
286
  - .git/objects/60/2f24a20e697369f97c5c20a77b3c713dab59d4
284
287
  - .git/objects/60/74f4e0c668417e06938cb77640240e9c2b6e0e
@@ -288,6 +291,7 @@ files:
288
291
  - .git/objects/61/32f3f8005ce5b88165162ac5542e54d0472a82
289
292
  - .git/objects/62/2e59d90f16452aeeaadc01b1cacfda6c9c7160
290
293
  - .git/objects/62/881631df674271b3880d9ca46bd76401e1a42e
294
+ - .git/objects/63/7824b973d490697b068edb60a4a644f992301c
291
295
  - .git/objects/63/e3ecfd9b00f7111c9d9bb8e734e0c04ab44583
292
296
  - .git/objects/64/96d7c4cc0c824e706bf757f9ec63b5553c9caf
293
297
  - .git/objects/65/51094fa3b996ff25b88d7ddb21d21a811d53fc
@@ -341,6 +345,7 @@ files:
341
345
  - .git/objects/76/d3cd0f31cfb174c2411be5636a8257e7af613a
342
346
  - .git/objects/77/1b320725df70e54f05ef4926c6360b2ba8ba8a
343
347
  - .git/objects/77/6e03ab9139aab1e0e8d551a75c3c0145fd9322
348
+ - .git/objects/78/cfbab8bbda08337c77019743e6b22575bfba1f
344
349
  - .git/objects/78/dfe98fd2685e6fd0b937d866e5dfb1c83ae589
345
350
  - .git/objects/79/0a80b72f6f6f214ece6a3e71e818effc5c9e6e
346
351
  - .git/objects/79/4750e930e297c9616e902898f684967c2760c7
@@ -389,6 +394,7 @@ files:
389
394
  - .git/objects/8c/6052d58764acb01306a844aecafbbe23918682
390
395
  - .git/objects/8c/b356ae2ff8011edfa68c9683ffeca358213d12
391
396
  - .git/objects/8d/4dcde8df4da8f53f5f5313757b907e9aa1af66
397
+ - .git/objects/8d/b7faac2276194f251f49aff3b63e8438ab9586
392
398
  - .git/objects/8e/3cfb391de711b5fecfbdf2860fa37b019e8036
393
399
  - .git/objects/8e/69b6cf3ec8b49270091b4a206ccf326679dc20
394
400
  - .git/objects/8e/a47de58a27dd343b3ecd3dd5e0fab88e268a72
@@ -470,6 +476,7 @@ files:
470
476
  - .git/objects/ac/df4d7cb89a31894b95d8c107a4824f84c6cf55
471
477
  - .git/objects/ad/66aac16165dd71456e4488069248d6f10ebb8f
472
478
  - .git/objects/ae/536c345aad67cee8ce167dc91006263e63885f
479
+ - .git/objects/ae/60060e74d531834093fc886271aa3cbc5c778e
473
480
  - .git/objects/ae/f24b73cf47992cde67e6b07544872df9bb2530
474
481
  - .git/objects/af/33f2833588e40e441f8b1f4dd26d5c93488334
475
482
  - .git/objects/b0/2c48116db702256abf27fab4236c84bd2d2dbc