url_canonicalize 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/monkey_patches/string.rb +0 -15
- data/lib/url_canonicalize/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13b661525f1808823be7d8fd56af87e79da03188
|
4
|
+
data.tar.gz: e5546a71cc12516d9acb529183d1983cbdb2756e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 800b5ddeae0c0379ca36eb4acebd09d2abfa9493d7ad017db5afedf0e9145911db05fa08b6b9c13fbf7cf87fd1261eeb031fc9285d830afc4564405dfff3ede3
|
7
|
+
data.tar.gz: e8b7bddb19f7727e960480e55ecadfc26b016e2de13e048ad69b86ee7e5b96b9dc48311f475cb2a17b9a6468e14c1dce50be5be13a532e804d0c8bafb09b1e2d
|
@@ -3,19 +3,4 @@ class String
|
|
3
3
|
def canonicalize
|
4
4
|
URLCanonicalize.canonicalize(self)
|
5
5
|
end
|
6
|
-
|
7
|
-
def ansi_attributes(*args)
|
8
|
-
"\e[#{args.join(';')}m#{self}\e[0m"
|
9
|
-
end
|
10
|
-
|
11
|
-
colors = %w(black red green yellow blue magenta cyan white)
|
12
|
-
|
13
|
-
colors.each_with_index do |fg_color, i|
|
14
|
-
fg = 30 + i
|
15
|
-
define_method(fg_color) { ansi_attributes(fg) }
|
16
|
-
|
17
|
-
colors.each_with_index do |bg_color, j|
|
18
|
-
define_method("#{fg_color}_on_#{bg_color}") { ansi_attributes(fg, 40 + j) }
|
19
|
-
end
|
20
|
-
end
|
21
6
|
end
|