rails-ext 0.3.19 → 0.3.20

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
- upd
1
+ fix
data/.git/index CHANGED
Binary file
data/.git/logs/HEAD CHANGED
@@ -73,3 +73,4 @@ cda2dd4b5ecbc69fa1b1ebf09c580ba17bf69656 268fe011dd9d01aa6e05c2004280b78e149ea29
73
73
  3566bd5be950e4b626366b4cb2909838729bc66c a5fe3c8ef2b84dbebb2181ceaebec710f5b163d4 alex <alex@amac.local> 1272739313 +0400 commit: upd language
74
74
  a5fe3c8ef2b84dbebb2181ceaebec710f5b163d4 0573ef490a937cd853c8d8d6affb63851451e0a3 alex <alex@amac.local> 1272795016 +0400 commit: upd
75
75
  0573ef490a937cd853c8d8d6affb63851451e0a3 f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 alex <alex@amac.local> 1272795359 +0400 commit: upd
76
+ f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 alex <alex@amac.local> 1272806420 +0400 commit: fix
@@ -73,3 +73,4 @@ cda2dd4b5ecbc69fa1b1ebf09c580ba17bf69656 268fe011dd9d01aa6e05c2004280b78e149ea29
73
73
  3566bd5be950e4b626366b4cb2909838729bc66c a5fe3c8ef2b84dbebb2181ceaebec710f5b163d4 alex <alex@amac.local> 1272739313 +0400 commit: upd language
74
74
  a5fe3c8ef2b84dbebb2181ceaebec710f5b163d4 0573ef490a937cd853c8d8d6affb63851451e0a3 alex <alex@amac.local> 1272795016 +0400 commit: upd
75
75
  0573ef490a937cd853c8d8d6affb63851451e0a3 f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 alex <alex@amac.local> 1272795359 +0400 commit: upd
76
+ f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 alex <alex@amac.local> 1272806420 +0400 commit: fix
@@ -58,3 +58,4 @@ cda2dd4b5ecbc69fa1b1ebf09c580ba17bf69656 268fe011dd9d01aa6e05c2004280b78e149ea29
58
58
  6d8daa98dd7a0922a838ee0d274247693d7d9ac2 3566bd5be950e4b626366b4cb2909838729bc66c alex <alex@amac.local> 1272710619 +0400 update by push
59
59
  3566bd5be950e4b626366b4cb2909838729bc66c 0573ef490a937cd853c8d8d6affb63851451e0a3 alex <alex@amac.local> 1272795025 +0400 update by push
60
60
  0573ef490a937cd853c8d8d6affb63851451e0a3 f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 alex <alex@amac.local> 1272795370 +0400 update by push
61
+ f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 alex <alex@amac.local> 1272806434 +0400 update by push
@@ -1 +1 @@
1
- f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7
1
+ e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7
@@ -1 +1 @@
1
- f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7
1
+ e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7
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.19"
21
+ s.version = "0.3.20"
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"
@@ -91,11 +91,11 @@ ActionController::Base.class_eval do
91
91
  # enshure domain has www. except if there's custom subdomain
92
92
  #
93
93
  def ensure_www
94
- # if request.domain.count('.') < 2 and Rails.production? and request.domain !~ /localhost/
95
- # uri = Addressable::URI.parse request.url
96
- # uri.host = "www." + uri.host
97
- # redirect_to uri.to_s
98
- # end
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
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
- - 19
9
- version: 0.3.19
8
+ - 20
9
+ version: 0.3.20
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alexey Petrushin
@@ -172,6 +172,7 @@ files:
172
172
  - .git/objects/2c/633c11fb72405c6646493bc6c4d8c4fed0b9a6
173
173
  - .git/objects/2c/b04524ccd690f1cb4345586ca9138f9615afd5
174
174
  - .git/objects/2d/043376f1bc26b2dad3e79fc72ea14341ea437d
175
+ - .git/objects/2d/90f7bfae12824956e169af9762be28dd79e8ce
175
176
  - .git/objects/2e/3e3fc8e46949a9b944da3c36207c444aa2c9b7
176
177
  - .git/objects/2e/f02adc5485c579d75dfacf7034b20760f2fdf4
177
178
  - .git/objects/2f/af7acb8454f4b248d928b9a92f09571302a174
@@ -218,6 +219,7 @@ files:
218
219
  - .git/objects/40/215c0554202fc46dc2fca94ed21e2920ce1e84
219
220
  - .git/objects/40/7adfb7f6188b0bb0b88cf9391943e1aaa32374
220
221
  - .git/objects/40/b5d1a81a061ce0e2f315b7e741ec70e0defe1d
222
+ - .git/objects/40/f31192acfd64b4f9526c4c254e8b82c79975b5
221
223
  - .git/objects/43/6b9b73da4632657be4800b250741f37fdbb505
222
224
  - .git/objects/44/c96e2a778dcc62c10b3c329ab0211115a9f546
223
225
  - .git/objects/46/3353505eed0c799d05f025788437decbabafec
@@ -303,6 +305,7 @@ files:
303
305
  - .git/objects/6a/2daaf6529a3841c7fd39683d9bcec79b48f79e
304
306
  - .git/objects/6a/90d6784ac3b6580ef470dac68c2d93c276d6a7
305
307
  - .git/objects/6a/cdfb69624140a67634b65ab8230cc5e0ffd543
308
+ - .git/objects/6b/6ca4397efe04b2f715692d6086b73253b7402d
306
309
  - .git/objects/6b/779e60dfa44ba3daa26badf65b3422f30c7b9b
307
310
  - .git/objects/6c/699c7999faa02e17f5e19d2598b0fd98b3e553
308
311
  - .git/objects/6c/9a74002b06e39c2421e55c6fdf31eb08aea357
@@ -544,6 +547,7 @@ files:
544
547
  - .git/objects/d4/1e2336bcd3ce3d09a9fa6c3af3270c29bd8457
545
548
  - .git/objects/d4/faaed37686ae3ce16b636defd37eeacb38470d
546
549
  - .git/objects/d5/7224732596609c1852e96d45130893eff75f13
550
+ - .git/objects/d5/842c33405a7d029aa4ae0759fa382842a9cf34
547
551
  - .git/objects/d5/86dc7698c6ec37db86e9f36a16bd671e0005ab
548
552
  - .git/objects/d5/a2b441718a88aa08fa937352a6d80319bc91c0
549
553
  - .git/objects/d6/c2636aa2b5da4a6b06dd824bd0e9a82c5765a4
@@ -553,6 +557,7 @@ files:
553
557
  - .git/objects/d7/dc82a39bd4d292230a212479dc4c0d7786474d
554
558
  - .git/objects/d8/bd32eafc1bcd962f7e2e1244071c921cd465fe
555
559
  - .git/objects/d9/0981681872c639fc00eb95ffa9dc17ad9f9599
560
+ - .git/objects/da/f433cd767bb556670540e78611e99df6f31911
556
561
  - .git/objects/db/64f75586d2786dd374615d935889e185f26fab
557
562
  - .git/objects/db/951c9a303fba608e0066e2aa68c3b7d8d9aea6
558
563
  - .git/objects/db/d962bcfbb85c6da46c868594983f3cda9fcad8
@@ -586,6 +591,7 @@ files:
586
591
  - .git/objects/e5/18de391d5b9dee87ec6f749900785f3b24dad0
587
592
  - .git/objects/e5/7fa5fd7f10f6f532742b0cc2dc3edaed6c0763
588
593
  - .git/objects/e6/4d9b4d86a001e4f882a9842a8dd4368001c470
594
+ - .git/objects/e6/8bedbf8dd4dacaa7f0a681fe083d4b754cb1f7
589
595
  - .git/objects/e6/ed7d272f8c48a28904007d653837bfe761be36
590
596
  - .git/objects/e7/2c6706f1ff4a5861eebfd846209c3d9628f7ae
591
597
  - .git/objects/e7/391f37a0dbbb03b5444d43d9679cb0e2942128
@@ -646,6 +652,7 @@ files:
646
652
  - .git/objects/fd/066ab33785d26d7c6728d2651bfd560da5bdd1
647
653
  - .git/objects/fd/25e0c8e44fb97a7c7d76280cec51886b51abf6
648
654
  - .git/objects/fd/3ef43acfe1fe6d70246df4b59524ebd7b58c49
655
+ - .git/objects/fd/86581fecec41d03582ff9121c4111e58820837
649
656
  - .git/objects/fe/c19d13244f6b439e234e1af2e2e6d1f886b2fb
650
657
  - .git/objects/fe/ce95626cedcc0682e6fcc20fe019aab60938f2
651
658
  - .git/objects/ff/b170e96b4d79ff011c6aa5de53b588ebbab0fa