hanami-utils 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/hanami/utils/escape.rb +3 -3
- data/lib/hanami/utils/inflector.rb +3 -0
- data/lib/hanami/utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5efcbfde57472291defc6d0461a2e481f6783549
|
4
|
+
data.tar.gz: aea84dd95e00df2e2a213f7af4c828bcbccea2ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8938d0f2e8a9491d8c8b4bd6752c3d820ec845dcf7b88cdfd6f7421d10b1ef9dc86b08162c0e4a7cba7134cea4d401c43ab1a623de88923072b52989e205d556
|
7
|
+
data.tar.gz: 64bf55cee7347ec7a8627cd8185e3e5a891a414699d00e2e9c60ea05ebe4837eea70fd1348393dd8d7a21df9deac3e1af017b3a134e793d6f720f630f7818718
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# Hanami::Utils
|
2
2
|
Ruby core extentions and class utilities for Hanami
|
3
3
|
|
4
|
+
## v0.7.1 - 2016-02-05
|
5
|
+
### Fixed
|
6
|
+
- [Yuuji Yaginuma] `Hanami::Utils::Escape`: fixed Ruby warning for `String#chars` with a block, which is deprecated. Using `String#each_char` now.
|
7
|
+
- [Sean Collins] Allow non string objects to be escaped by `Hanami::Utils::Escape`.
|
8
|
+
|
4
9
|
## v0.7.0 - 2016-01-22
|
5
10
|
### Changed
|
6
11
|
- [Luca Guidi] Renamed the project
|
data/lib/hanami/utils/escape.rb
CHANGED
@@ -423,7 +423,7 @@ module Hanami
|
|
423
423
|
|
424
424
|
result = SafeString.new
|
425
425
|
|
426
|
-
input.
|
426
|
+
input.each_char do |chr|
|
427
427
|
result << HTML_CHARS.fetch(chr, chr)
|
428
428
|
end
|
429
429
|
|
@@ -456,7 +456,7 @@ module Hanami
|
|
456
456
|
|
457
457
|
result = SafeString.new
|
458
458
|
|
459
|
-
input.
|
459
|
+
input.each_char do |chr|
|
460
460
|
result << encode_char(chr, HTML_ATTRIBUTE_SAFE_CHARS)
|
461
461
|
end
|
462
462
|
|
@@ -529,7 +529,7 @@ module Hanami
|
|
529
529
|
# @api private
|
530
530
|
def self.encode(input)
|
531
531
|
return '' if input.nil?
|
532
|
-
input.encode(Encoding::UTF_8)
|
532
|
+
input.to_s.encode(Encoding::UTF_8)
|
533
533
|
rescue Encoding::UndefinedConversionError
|
534
534
|
input.dup.force_encoding(Encoding::UTF_8)
|
535
535
|
end
|
data/lib/hanami/utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-02-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|