epitools 0.5.44 → 0.5.45

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0522a13977563b564bdb275aeadf28428699aef
4
- data.tar.gz: b0cdb112d922ea85c3a08f3ce56c44a58b2bfc12
3
+ metadata.gz: ddab4d846566b83aec541419d90407c046cf5d02
4
+ data.tar.gz: 73162f34e533c01a7d2ae0ebd20a7b355df424e2
5
5
  SHA512:
6
- metadata.gz: de0eff660c20c27c0769628ae29452e04832a3b7a279dfcde50b365984fca0a3057f692f83ce0f7b60e7ff76fcc49c8fbb2bdc88ff170098ddc879b1dc64e02f
7
- data.tar.gz: da662e207de10d2f5a6f79492d18423114ec853e7dfd5694048128fa6690e72635f45160b0d4e4746d26830c926e2fa439e780bffe7fc031ae4a89ada4651aed
6
+ metadata.gz: 63f0ea45189f9485f7441984d3a3f1766a6ae46f72f6a22f24d8214bba7837ed25e4e010a02485027b068e4a03a3b1ff3f7917b594c9c2a69016a31605d4ebc3
7
+ data.tar.gz: 1b796f700449c95cb22d64880b59ba155aa7655d770be146a294e734bcb061c31748f9a5626c0a1d9584cecb90b3bd453b7576550656eefda34f1e31e56fa7e2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.44
1
+ 0.5.45
@@ -1,25 +1,3 @@
1
- require 'epitools/colored'
2
-
3
- class String
4
-
5
- #
6
- # Find all occurrences of "pattern" in the string and highlight them
7
- # with the specified color. (defaults to light_yellow)
8
- #
9
- # The pattern can be a string or a regular expression.
10
- #
11
- def highlight(pattern, color=:light_yellow, &block)
12
- pattern = Regexp.new(Regexp.escape(pattern)) if pattern.is_a? String
13
-
14
- if block_given?
15
- gsub(pattern, &block)
16
- else
17
- gsub(pattern) { |match| match.send(color) }
18
- end
19
- end
20
-
21
- end
22
-
23
1
  #
24
2
  # Create scrollable output via less!
25
3
  #
@@ -182,5 +160,3 @@ def autoinstall(*packages)
182
160
  end
183
161
  end
184
162
 
185
-
186
-
@@ -183,6 +183,22 @@ module Colored
183
183
  end
184
184
  end
185
185
 
186
+ #
187
+ # Find all occurrences of "pattern" in the string and highlight them
188
+ # with the specified color. (defaults to light_yellow)
189
+ #
190
+ # The pattern can be a string or a regular expression.
191
+ #
192
+ def highlight(pattern, color=:light_yellow, &block)
193
+ pattern = Regexp.new(Regexp.escape(pattern)) if pattern.is_a? String
194
+
195
+ if block_given?
196
+ gsub(pattern, &block)
197
+ else
198
+ gsub(pattern) { |match| match.send(color) }
199
+ end
200
+ end
201
+
186
202
  #
187
203
  # An array of all possible colors.
188
204
  #
@@ -451,6 +451,7 @@ class Path
451
451
  if line =~ /^([^=]+)=0x(.+)/
452
452
  key = $1
453
453
  value = [$2].pack("H*") # unpack hex string
454
+ value = value.encode("UTF-8", "UTF-8") # set its encoding as UTF-8
454
455
 
455
456
  attrs[key] = value
456
457
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epitools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.44
4
+ version: 0.5.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - epitron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-23 00:00:00.000000000 Z
11
+ date: 2014-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.1.11
128
+ rubygems_version: 2.0.14
129
129
  signing_key:
130
130
  specification_version: 3
131
131
  summary: Not utils... METILS!