rails-ext 0.3.10 → 0.3.11

Sign up to get free protection for your applications and to get access to all the features.
data/.git/index CHANGED
Binary file
data/.git/logs/HEAD CHANGED
@@ -61,3 +61,4 @@ a3ece30fb5827ed20d26a75253bb4854f657055a 0538f41ddebf7fa8c71ebe99c5288d5e11c3fb8
61
61
  8f53b7b2ab88b130763bc42b3ded7983d27bff7a b4343d9284a89e2971022f8d4acf7865d8341c6d alex <alex@amac.local> 1270054079 +0400 commit: upd
62
62
  b4343d9284a89e2971022f8d4acf7865d8341c6d 824ac01aecaa766ea8a7b10ef9d9f67810fdff40 alex <alex@amac.local> 1270516451 +0400 commit: upd
63
63
  824ac01aecaa766ea8a7b10ef9d9f67810fdff40 83b834761b24c759d71e6fb8121dcf127290454e alex <alex@amac.local> 1270519846 +0400 commit: upd
64
+ 83b834761b24c759d71e6fb8121dcf127290454e bc8c233044e9ab4299af036c0602bab06d3a5349 alex <alex@amac.local> 1271850978 +0400 commit: upd
@@ -61,3 +61,4 @@ a3ece30fb5827ed20d26a75253bb4854f657055a 0538f41ddebf7fa8c71ebe99c5288d5e11c3fb8
61
61
  8f53b7b2ab88b130763bc42b3ded7983d27bff7a b4343d9284a89e2971022f8d4acf7865d8341c6d alex <alex@amac.local> 1270054079 +0400 commit: upd
62
62
  b4343d9284a89e2971022f8d4acf7865d8341c6d 824ac01aecaa766ea8a7b10ef9d9f67810fdff40 alex <alex@amac.local> 1270516451 +0400 commit: upd
63
63
  824ac01aecaa766ea8a7b10ef9d9f67810fdff40 83b834761b24c759d71e6fb8121dcf127290454e alex <alex@amac.local> 1270519846 +0400 commit: upd
64
+ 83b834761b24c759d71e6fb8121dcf127290454e bc8c233044e9ab4299af036c0602bab06d3a5349 alex <alex@amac.local> 1271850978 +0400 commit: upd
@@ -47,3 +47,4 @@ a3ece30fb5827ed20d26a75253bb4854f657055a 0538f41ddebf7fa8c71ebe99c5288d5e11c3fb8
47
47
  6a02fd5698264a4165c46af5175a39f5b130de9c b4343d9284a89e2971022f8d4acf7865d8341c6d alex <alex@amac.local> 1270054087 +0400 update by push
48
48
  b4343d9284a89e2971022f8d4acf7865d8341c6d 824ac01aecaa766ea8a7b10ef9d9f67810fdff40 alex <alex@amac.local> 1270516459 +0400 update by push
49
49
  824ac01aecaa766ea8a7b10ef9d9f67810fdff40 83b834761b24c759d71e6fb8121dcf127290454e alex <alex@amac.local> 1270519856 +0400 update by push
50
+ 83b834761b24c759d71e6fb8121dcf127290454e bc8c233044e9ab4299af036c0602bab06d3a5349 alex <alex@amac.local> 1271850990 +0400 update by push
@@ -0,0 +1,3 @@
1
+ x���
2
+ �0D=�+r��P��ѫ�9lҍ]��������
3
+ V���;3��G�6�����Q� �E�#T�lY�WO= 8F���-��v��#���۠C� ����X�kH� P ���%癗�>���2ڴ�cYn!��F�Sy����ghF0�Ȕ�8ǝ��[_�'&�S�oP:/�Q��
@@ -0,0 +1,2 @@
1
+ x��[
2
+ �0E��*�/���1 ���I2A������@���s��e���b����Zf,��)�Π�w�}�X��P�H:&f�M_�&W�����rc��KB�V;S���c٬L���/�2K�LK��fS��ɞ����5����k37�;T
@@ -1 +1 @@
1
- 83b834761b24c759d71e6fb8121dcf127290454e
1
+ bc8c233044e9ab4299af036c0602bab06d3a5349
@@ -1 +1 @@
1
- 83b834761b24c759d71e6fb8121dcf127290454e
1
+ bc8c233044e9ab4299af036c0602bab06d3a5349
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.10"
21
+ s.version = "0.3.11"
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"
@@ -6,6 +6,14 @@ ActionController::StatusCodes::SYMBOL_TO_STATUS_CODE[:failed] = 422
6
6
  #
7
7
  ActionController::Base.class_eval do
8
8
  protected
9
+ #
10
+ # link_to
11
+ #
12
+ def link_to text, uri
13
+ %{<a href="#{uri}">#{text}</a>}
14
+ end
15
+
16
+
9
17
  #
10
18
  # Bunch of small actions
11
19
  #
@@ -34,7 +42,7 @@ ActionController::Base.class_eval do
34
42
  unless options.delete :no_prefix
35
43
  url = ActionController::Base.relative_url_root + path
36
44
  else
37
- url = path
45
+ url = path.dup
38
46
  end
39
47
 
40
48
  options = default_url_options.merge options
@@ -45,6 +53,7 @@ ActionController::Base.class_eval do
45
53
  to_delete.each{|k| options.delete k}
46
54
 
47
55
  host = options.delete(:host) || options.delete('host')
56
+ port = options.delete(:port) || options.delete('port')
48
57
 
49
58
  url << "?#{options.to_query}" unless options.empty?
50
59
  url._url_format = options[:format] if options[:format] # hack for links with ajax support
@@ -53,7 +62,7 @@ ActionController::Base.class_eval do
53
62
  if host.blank?
54
63
  url
55
64
  else
56
- "http://#{host}#{url}"
65
+ %{http://#{host}#{":#{port}" unless port.blank?}#{url}}
57
66
  end
58
67
  end
59
68
  helper_method :url_for_path
@@ -14,4 +14,4 @@ require 'rails_ext/micelaneous/create_public_symlinks'
14
14
 
15
15
  require 'addressable/uri'
16
16
  require 'rails_ext/micelaneous/addressable_uri'
17
- Uri = Addressable::URI
17
+ ::Uri = Addressable::URI
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 10
9
- version: 0.3.10
8
+ - 11
9
+ version: 0.3.11
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alexey Petrushin
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-06 00:00:00 +04:00
17
+ date: 2010-04-21 00:00:00 +04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -209,6 +209,7 @@ files:
209
209
  - .git/objects/49/66cd792ea3e03d5091aa7a332f2a082e479a76
210
210
  - .git/objects/49/b7ee2b8f19ff0639d351fd5f3616c1360ff700
211
211
  - .git/objects/49/ca132451f70ee989ff7a7cf487b029fe706b28
212
+ - .git/objects/4a/7160238a500fa567412510e6a26ea5e7ca6a03
212
213
  - .git/objects/4a/80705702f499ef1278630257a33c6088238ba3
213
214
  - .git/objects/4a/be35eba6ed159578e3f43f6ffa8ea7541598e2
214
215
  - .git/objects/4b/2bdb2dc6330ba9bafd9058ec8eaa925ef53f91
@@ -301,6 +302,7 @@ files:
301
302
  - .git/objects/75/c64796b5ffb6107b861cfa77fa28e8e43a1156
302
303
  - .git/objects/75/d0b250bcdf241d981313b1d6eb153b96e4b05f
303
304
  - .git/objects/76/d3cd0f31cfb174c2411be5636a8257e7af613a
305
+ - .git/objects/77/1b320725df70e54f05ef4926c6360b2ba8ba8a
304
306
  - .git/objects/77/6e03ab9139aab1e0e8d551a75c3c0145fd9322
305
307
  - .git/objects/78/dfe98fd2685e6fd0b937d866e5dfb1c83ae589
306
308
  - .git/objects/79/0a80b72f6f6f214ece6a3e71e818effc5c9e6e
@@ -309,6 +311,7 @@ files:
309
311
  - .git/objects/7a/d62f1e2a8e4af39d293ce70c5dca999263ab4e
310
312
  - .git/objects/7b/f12fa27542b09a968ac9b1ceedc1a71bfd6ce8
311
313
  - .git/objects/7c/d6496ed2dbb6dc550d2080954a5485bff16e7f
314
+ - .git/objects/7c/ecdf8b52167f490bafb6948b0413855923e3d4
312
315
  - .git/objects/7d/156826045e2eef7611f3fcad3adee9c17c2c02
313
316
  - .git/objects/7d/6cd855bdf8661fab653f9f2de1195a6552e458
314
317
  - .git/objects/7d/978ee312ca2119dc84e40431182b8f68e42f53
@@ -439,6 +442,7 @@ files:
439
442
  - .git/objects/ba/67eef0f58a44e4b39af605d45e1e958023588d
440
443
  - .git/objects/bb/05a580a8afe6e3078b8e6ec4cda41fdc266f5d
441
444
  - .git/objects/bb/23236d2e8340087cc495c66310e6eb90d6fe0a
445
+ - .git/objects/bc/8c233044e9ab4299af036c0602bab06d3a5349
442
446
  - .git/objects/bc/90a06dd2f2257e8da49989738db5747e2b78d8
443
447
  - .git/objects/bd/2534abb8cf454ca08872a72624a794a367bf53
444
448
  - .git/objects/bd/eab0ec8a914cdd8c9341340191c116a4bf2d3e
@@ -449,9 +453,12 @@ files:
449
453
  - .git/objects/c1/3cf3c2ea85ec40544fe31702b2cfe6091aed6e
450
454
  - .git/objects/c1/424cadd8817a7e927742e52945f303b38e7222
451
455
  - .git/objects/c1/fb376eb3ec3001d492ed32ce7d40019e11d2c2
456
+ - .git/objects/c2/442ec8198b14297b9eb7a7c16e15a9565905b5
452
457
  - .git/objects/c2/4bcd795ec0e5c301b9e3006f4bba8079926d4b
453
458
  - .git/objects/c3/20b469c3e447a63e887cefac9c3b5c2b1fb304
454
459
  - .git/objects/c3/dd5ae1e005efb09ef758da1ec17781c616ae9d
460
+ - .git/objects/c3/e12a8de544ec3ff9de16a8f6922d4c7ba42dfe
461
+ - .git/objects/c4/0f87d366f511d03a513ece12232ce9787b9e6a
455
462
  - .git/objects/c4/3553ba14f97cbddefa4cf70bcc5b39c8e61933
456
463
  - .git/objects/c4/524d9d99c6072949bfc565f78b7a62577ffa3f
457
464
  - .git/objects/c4/7ead0b6604e6627e887f2f2e8909a8b409ae5a
@@ -537,6 +544,7 @@ files:
537
544
  - .git/objects/eb/950b1535bf0671019ba323386deea2598ce246
538
545
  - .git/objects/eb/9701e2dbe8fb606315f9514d789188160bdd67
539
546
  - .git/objects/eb/f7fda7b05436ca8616cc3098a069cc611224b6
547
+ - .git/objects/ed/6f2933b5e004994c7614117439dcf72acf66e3
540
548
  - .git/objects/ed/c690a7821df2da3c0ddeee24b87187b3a99d91
541
549
  - .git/objects/ee/8f2701595573a12b9186f3655a8baede5e8b4d
542
550
  - .git/objects/ee/ccaf0d272346a1dcc672a4131ba692a0027049