Skip to content

Commit 33c63e3

Browse files
authored
Release v2.1.0 (#4)
1 parent 146b239 commit 33c63e3

40 files changed

+1575
-1702
lines changed

.DS_Store

6 KB
Binary file not shown.

.codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
ignore:
22
- "Tests"
3+
- "Sources/Performance"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_Store
12
build/
23
DerivedData/
34
xcuserdata/

.jazzy.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
clean: true
2+
author: "Alexis Aubry Radanovic"
3+
author_url: https://github.com/alexaubry
4+
github_url: https://github.com/alexaubry/HTMLString
5+
github_file_prefix: https://github.com/alexaubry/HTMLString/tree/2.1.0
6+
module_version: 2.1.0
7+
xcodebuild_arguments: -scheme,HTMLString
8+
module: HTMLString
9+
root_url: https://alexaubry.github.io/HTMLString
10+
output: docs/
11+
swift_version: 3.0.2
12+
copyright: "Copyright © 2016-2017 Alexis Aubry Radanovic. Licensed under the [MIT License](https://github.com/alexaubry/HTMLString/blob/master/LICENSE)"
13+
podspec: ./HTMLString.podspec
14+
skip-undocumented: true
15+
theme: apple

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.1
1+
3.0.2

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ os:
44
language: generic
55
sudo: required
66
dist: trusty
7-
osx_image: xcode8.1
7+
osx_image: xcode8.2
88

99
script:
1010
- eval "$(curl -sL https://swift.vapor.sh/ci)"

Benchmark.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# ⚡ Benchmarks
2+
3+
A set of measures tracking the performance of the library.
4+
5+
## ⏱ Compile times
6+
7+
| Configuration | v2.0.1 | v2.1.0 |
8+
|:---|---|---|
9+
| Debug | 7.15s | 6.40s |
10+
| Release | 32.83s | 27.21ss |
11+
12+
## 🤖 Common Tasks
13+
14+
### Debug
15+
16+
| Task | v2.0.1 | v2.1.0 |
17+
|:---|---|---|
18+
| Unicode-escaping 2 emojis | 0.000083s | 0.000040s |
19+
| ASCII-escaping 2 emojis | 0.000104s | 0.000035s |
20+
| Unescaping 2 emojis | 0.000046s | 0.000049s |
21+
| Unescaping a tweet | 0.000085s | 0.000033s |
22+
| Unicode-escaping a tweet | 0.000844s | 0.000131s |
23+
| ASCII-escaping a tweet | 0.001023s | 0.000158s |
24+
| Unicode-escaping 23,145 characters | 0.159909s | 0.024684s |
25+
| ASCII-escaping 23,145 characters | 0.198981s | 0.030419s |
26+
| Unescaping 3,026 words with 366 escapes | 0.165962s | 0.001686s |
27+
28+
### Release
29+
30+
| Task | v2.0.1 | v2.1.0 |
31+
|:---|---|---|
32+
| Unicode-escaping 2 emojis | 0.000022s | 0.000010s |
33+
| ASCII-escaping 2 emojis | 0.000033s | 0.000015s |
34+
| Unescaping 2 emojis | 0.000031s | 0.000016s |
35+
| Unescaping a tweet | 0.000052s | 0.000017s |
36+
| Unicode-escaping a tweet | 0.000183s | 0.000064s |
37+
| ASCII-escaping a tweet | 0.000276s | 0.000077s |
38+
| Unicode-escaping 23,145 characters | 0.034701s | 0.011941s |
39+
| ASCII-escaping 23,145 characters | 0.052937s | 0.014950s |
40+
| Unescaping 3,026 words with 366 escapes | 0.014192s | 0.001162s |
41+
42+
## ❓ Complexity
43+
44+
TODO
45+
46+
| Algorithm | v2.0.1 | v2.1.0 |
47+
|:---|---|---|
48+
| ASCII escaping | N/A | N/A |
49+
| Unicode escaping | N/A | N/A |
50+
| Unescaping | N/A | N/A |

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# HTMLString Change Log
22

3+
## 2017-01-04 — Version 2.1.0
4+
5+
- Change the escaping algorithm (`reduce` instead of `map`)
6+
- Reduced the size of the escaping mappings
7+
- Performance improvements: escaping is up to **6.5 times** faster and unescaping is up to **98 times** faster
8+
- Improved documentation
9+
- New benchmark tool and reports
10+
11+
#### Source breaking changes
12+
13+
- The `Character` (un)escaping extensions have been removed.
14+
315
## 2016-12-06 — Version 2.0.1
416

517
- Performance improvements : escaping is **99.37%** faster and unescaping is **10,38%** faster (in average)

Carthage/.DS_Store

6 KB
Binary file not shown.

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
source "https://rubygems.org"
22
gem 'json', '~> 1.7'
33
gem 'jazzy', '~> 0.7.3'
4+
gem 'xcov', '~> 0.12.5'

Gemfile.lock

Lines changed: 122 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ GEM
88
minitest (~> 5.1)
99
thread_safe (~> 0.3, >= 0.3.4)
1010
tzinfo (~> 1.1)
11+
addressable (2.5.0)
12+
public_suffix (~> 2.0, >= 2.0.2)
13+
babosa (1.0.2)
1114
claide (1.0.1)
1215
cocoapods (1.1.1)
1316
activesupport (>= 4.0.2, < 5)
@@ -32,20 +35,88 @@ GEM
3235
fuzzy_match (~> 2.0.4)
3336
nap (~> 1.0)
3437
cocoapods-deintegrate (1.0.1)
35-
cocoapods-downloader (1.1.2)
38+
cocoapods-downloader (1.1.3)
3639
cocoapods-plugins (1.0.0)
3740
nap
3841
cocoapods-search (1.0.0)
3942
cocoapods-stats (1.0.0)
40-
cocoapods-trunk (1.1.1)
43+
cocoapods-trunk (1.1.2)
4144
nap (>= 0.8, < 2.0)
4245
netrc (= 0.7.8)
4346
cocoapods-try (1.1.0)
4447
colored (1.2)
48+
commander (4.4.3)
49+
highline (~> 1.7.2)
50+
domain_name (0.5.20161129)
51+
unf (>= 0.0.5, < 1.0.0)
52+
dotenv (2.1.1)
4553
escape (0.0.4)
54+
excon (0.54.0)
55+
faraday (0.10.1)
56+
multipart-post (>= 1.2, < 3)
57+
faraday-cookie_jar (0.0.6)
58+
faraday (>= 0.7.4)
59+
http-cookie (~> 1.0.0)
60+
faraday_middleware (0.10.1)
61+
faraday (>= 0.7.4, < 1.0)
62+
fastimage (2.0.1)
63+
addressable (~> 2)
64+
fastlane (2.3.0)
65+
activesupport (< 5)
66+
addressable (>= 2.3, < 3.0.0)
67+
babosa (>= 1.0.2, < 2.0.0)
68+
bundler (~> 1.12)
69+
colored
70+
commander (>= 4.4.0, < 5.0.0)
71+
dotenv (>= 2.1.1, < 3.0.0)
72+
excon (>= 0.45.0, < 1.0.0)
73+
faraday (~> 0.9)
74+
faraday-cookie_jar (~> 0.0.6)
75+
faraday_middleware (~> 0.9)
76+
fastimage (>= 1.6)
77+
gh_inspector (>= 1.0.1, < 2.0.0)
78+
google-api-client (~> 0.9.1)
79+
highline (>= 1.7.2, < 2.0.0)
80+
json (< 3.0.0)
81+
mini_magick (~> 4.5.1)
82+
multi_json
83+
multi_xml (~> 0.5)
84+
multipart-post (~> 2.0.0)
85+
plist (>= 3.1.0, < 4.0.0)
86+
rubyzip (>= 1.1.0, < 2.0.0)
87+
security (= 0.1.3)
88+
slack-notifier (>= 1.3, < 2.0.0)
89+
terminal-notifier (>= 1.6.2, < 2.0.0)
90+
terminal-table (>= 1.4.5, < 2.0.0)
91+
word_wrap (~> 1.0.0)
92+
xcodeproj (>= 0.20, < 2.0.0)
93+
xcpretty (>= 0.2.4, < 1.0.0)
94+
xcpretty-travis-formatter (>= 0.0.3)
4695
fourflusher (2.0.1)
4796
fuzzy_match (2.0.4)
4897
gh_inspector (1.0.2)
98+
google-api-client (0.9.20)
99+
addressable (~> 2.3)
100+
googleauth (~> 0.5)
101+
httpclient (~> 2.7)
102+
hurley (~> 0.1)
103+
memoist (~> 0.11)
104+
mime-types (>= 1.6)
105+
representable (~> 2.3.0)
106+
retriable (~> 2.0)
107+
googleauth (0.5.1)
108+
faraday (~> 0.9)
109+
jwt (~> 1.4)
110+
logging (~> 2.0)
111+
memoist (~> 0.12)
112+
multi_json (~> 1.11)
113+
os (~> 0.9)
114+
signet (~> 0.7)
115+
highline (1.7.8)
116+
http-cookie (1.0.3)
117+
domain_name (~> 0.5)
118+
httpclient (2.8.3)
119+
hurley (0.2)
49120
i18n (0.7.0)
50121
jazzy (0.7.3)
51122
cocoapods (~> 1.0)
@@ -57,36 +128,81 @@ GEM
57128
sqlite3 (~> 1.3)
58129
xcinvoke (~> 0.3.0)
59130
json (1.8.3)
131+
jwt (1.5.6)
60132
liferaft (0.0.6)
133+
little-plugger (1.1.4)
134+
logging (2.1.0)
135+
little-plugger (~> 1.1)
136+
multi_json (~> 1.10)
137+
memoist (0.15.0)
138+
mime-types (3.1)
139+
mime-types-data (~> 3.2015)
140+
mime-types-data (3.2016.0521)
141+
mini_magick (4.5.1)
61142
minitest (5.10.1)
62143
molinillo (0.5.4)
144+
multi_json (1.12.1)
145+
multi_xml (0.6.0)
146+
multipart-post (2.0.0)
63147
mustache (0.99.8)
64148
nanaimo (0.2.3)
65149
nap (1.1.0)
66150
netrc (0.7.8)
67151
open4 (1.3.4)
68-
redcarpet (3.3.4)
152+
os (0.9.6)
153+
plist (3.2.0)
154+
public_suffix (2.0.5)
155+
redcarpet (3.4.0)
156+
representable (2.3.0)
157+
uber (~> 0.0.7)
158+
retriable (2.1.0)
69159
rouge (1.11.1)
70-
sass (3.4.22)
160+
rubyzip (1.2.0)
161+
sass (3.4.23)
162+
security (0.1.3)
163+
signet (0.7.3)
164+
addressable (~> 2.3)
165+
faraday (~> 0.9)
166+
jwt (~> 1.5)
167+
multi_json (~> 1.10)
168+
slack-notifier (1.5.1)
71169
sqlite3 (1.3.12)
170+
terminal-notifier (1.7.1)
171+
terminal-table (1.7.3)
172+
unicode-display_width (~> 1.1.1)
72173
thread_safe (0.3.5)
73174
tzinfo (1.2.2)
74175
thread_safe (~> 0.1)
176+
uber (0.0.15)
177+
unf (0.1.4)
178+
unf_ext
179+
unf_ext (0.0.7.2)
180+
unicode-display_width (1.1.2)
181+
word_wrap (1.0.0)
75182
xcinvoke (0.3.0)
76183
liferaft (~> 0.0.6)
77-
xcodeproj (1.4.1)
184+
xcodeproj (1.4.2)
78185
CFPropertyList (~> 2.3.3)
79186
activesupport (>= 3)
80187
claide (>= 1.0.1, < 2.0)
81188
colored (~> 1.2)
82-
nanaimo (~> 0.2.0)
189+
nanaimo (~> 0.2.3)
190+
xcov (0.12.5)
191+
fastlane (>= 2.0.3, < 3.0.0)
192+
slack-notifier (~> 1.3)
193+
terminal-table
194+
xcpretty (0.2.4)
195+
rouge (~> 1.8)
196+
xcpretty-travis-formatter (0.0.4)
197+
xcpretty (~> 0.2, >= 0.0.7)
83198

84199
PLATFORMS
85200
ruby
86201

87202
DEPENDENCIES
88203
jazzy (~> 0.7.3)
89204
json (~> 1.7)
205+
xcov (~> 0.12.5)
90206

91207
BUNDLED WITH
92208
1.13.6

HTMLString.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Pod::Spec.new do |s|
22

33
s.name = "HTMLString"
4-
s.version = "2.0.1"
5-
s.summary = "Convert Strings that contains HTML in Swift"
4+
s.version = "2.1.0"
5+
s.summary = "Escape and unescape HTML Strings in Swift"
66

77
s.description = <<-DESC
8-
HTMLString is a micro-library written in Swift that enables your app to convert Strings that contain HTML. It supports ASCII and Unicode escaping, as well as unescaping. You can use it with 2125 named escape sequences (`&amp;`) as well as with decimal (`&#128;`) and hexadecimal (`&#x1F643;`) sequences.
8+
HTMLString is a fast micro-library written in Swift that enables your app to encode and decode HTML Strings. It supports ASCII and Unicode escaping, as well as unescaping. You can use it with 2125 named escape sequences (`&amp;`) and with all decimal (`&#128;`) and hexadecimal (`&#x1F643;`) sequences.
99
DESC
1010

1111
s.homepage = "https://github.com/alexaubry/HTMLString"
@@ -21,6 +21,6 @@ DESC
2121
s.tvos.deployment_target = "9.0"
2222

2323
s.source = { :git => "https://github.com/alexaubry/HTMLString.git", :tag => "#{s.version}" }
24-
s.source_files = "Sources"
24+
s.source_files = "Sources/HTMLString/*"
2525

2626
end

0 commit comments

Comments
 (0)