hache 1.1.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -6
  3. data/lib/hache.rb +3 -4
  4. data/test/hache_test.rb +1 -1
  5. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7dda5800d3b2cdb69cbceffaf5387a8bf47b2676
4
- data.tar.gz: ffbccf68d39d5d1b0f1de3d2d6babb3c4b7b696a
3
+ metadata.gz: 25a75f94107f7e747e86b28bc3b43a12fc96a546
4
+ data.tar.gz: d91c19440ea292ae3bd1482f8eb5e0ff5ca6fe57
5
5
  SHA512:
6
- metadata.gz: 895d47f6f136787e20a9fb183d7e58638926fd55d681af21b01c3889c946ddd1ec90f9a7f35eabebe1838adb2d756c11cea68a25c94d4920240f81f8df407ae0
7
- data.tar.gz: 19f650add5fd21a8f5678db99da6fed858f79a31410169aae9f555a5136fadc40711f21e01a84a82d9a9ceda231b53e870d897fdbe48a77af1380a84cfa35ce2
6
+ metadata.gz: edc4f746d068152f7145439a0ce63b19383b2b3841aa0c692bed5499f831fa4ff726c621662b168bc9603a9aa67f641aef1080239376b450a17b0c51e23e415e
7
+ data.tar.gz: 8c87072c39d6812d2bd62c2f48e13f18f59305e19743694b25bb236903d07aef3fe3a802acecb09fa11265000b2f260367d0b0e0308846dab5a15b099120aa30
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
- Hache [![Build Status](https://gitlab.com/frodsan/hache/badges/master/build.svg)](https://gitlab.com/frodsan/hache/builds)
1
+ hache [![Build Status](https://travis-ci.org/frodsan/hache.svg)](https://travis-ci.org/frodsan/hache)
2
2
  =====
3
3
 
4
- Escapes HTML tag characters: `&`, `<`, `>`, `"`, `'` and `/`.
4
+ Escapes HTML tag characters: `&`, `<`, `>`, `"` and `'`.
5
5
 
6
6
  Installation
7
7
  ------------
@@ -30,7 +30,7 @@ Usage
30
30
  ```ruby
31
31
  require "hache"
32
32
 
33
- Hache.h(%q(<>&"'/)) == "&lt;&gt;&amp;&quot;&#x27;&#x2F;"
33
+ Hache.h(%q(<>&"')) == "&lt;&gt;&amp;&#39;&#34;"
34
34
  # => true
35
35
  ```
36
36
 
@@ -40,7 +40,7 @@ Contributing
40
40
  Fork the project with:
41
41
 
42
42
  ```
43
- $ git clone git@gitlab.com:frodsan/hache.git
43
+ $ git clone git@github.com:frodsan/hache.git
44
44
  ```
45
45
 
46
46
  To install dependencies, use:
@@ -55,7 +55,7 @@ To run the test suite, do:
55
55
  $ rake test
56
56
  ```
57
57
 
58
- For bug reports and pull requests use [GitLab][issues].
58
+ For bug reports and pull requests use [GitHub][issues].
59
59
 
60
60
  License
61
61
  -------
@@ -63,4 +63,4 @@ License
63
63
  Hache is released under the [MIT License][mit].
64
64
 
65
65
  [mit]: http://www.opensource.org/licenses/MIT
66
- [issues]: https://gitlab.com/frodsan/hache/issues
66
+ [issues]: https://github.com/frodsan/hache/issues
@@ -5,12 +5,11 @@ module Hache
5
5
  "&" => "&amp;",
6
6
  ">" => "&gt;",
7
7
  "<" => "&lt;",
8
- '"' => "&quot;",
9
- "'" => "&#x27;",
10
- "/" => "&#x2F;"
8
+ '"' => "&#39;",
9
+ "'" => "&#34;"
11
10
  }.freeze
12
11
 
13
- UNSAFE = /[&"'><\/]/
12
+ UNSAFE = /[&"'><]/
14
13
 
15
14
  def self.h(s)
16
15
  s.to_str.gsub(UNSAFE, HTML_ESCAPE)
@@ -12,6 +12,6 @@ class HacheTest < Minitest::Test
12
12
  end
13
13
 
14
14
  test "escapes unsafe characters" do
15
- assert_equal "&lt;&gt;&amp;&quot;&#x27;&#x2F;", Hache.h(%q(<>&"'/))
15
+ assert_equal "&lt;&gt;&amp;&#39;&#34;", Hache.h(%q(<>&"'))
16
16
  end
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hache
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Rodríguez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-07 00:00:00.000000000 Z
11
+ date: 2016-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '11.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '11.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -66,8 +66,8 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.39'
69
- description: 'Escapes HTML tag characters: &, <>, ", '', /.'
70
- email: hello@frodsan.com
69
+ description: 'Escapes HTML tag characters: &, <, >, ", '''
70
+ email: frodsan@protonmail.com
71
71
  executables: []
72
72
  extensions: []
73
73
  extra_rdoc_files: []
@@ -76,7 +76,7 @@ files:
76
76
  - README.md
77
77
  - lib/hache.rb
78
78
  - test/hache_test.rb
79
- homepage: https://gitlab.com/frodsan/hache
79
+ homepage: https://github.com/frodsan/hache
80
80
  licenses:
81
81
  - MIT
82
82
  metadata: {}
@@ -99,6 +99,6 @@ rubyforge_project:
99
99
  rubygems_version: 2.5.1
100
100
  signing_key:
101
101
  specification_version: 4
102
- summary: 'Escapes HTML tag characters: &, <>, ", '', /.'
102
+ summary: 'Escapes HTML tag characters: &, <, >, ", '''
103
103
  test_files:
104
104
  - test/hache_test.rb