twitter-text-kow 1.3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gemtest +0 -0
- data/.gitignore +40 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/CHANGELOG.md +44 -0
- data/Gemfile +4 -0
- data/LICENSE +188 -0
- data/README.md +193 -0
- data/Rakefile +52 -0
- data/config/README.md +142 -0
- data/config/v1.json +8 -0
- data/config/v2.json +29 -0
- data/config/v3.json +30 -0
- data/lib/assets/tld_lib.yml +1577 -0
- data/lib/twitter-text/autolink.rb +455 -0
- data/lib/twitter-text/configuration.rb +68 -0
- data/lib/twitter-text/deprecation.rb +21 -0
- data/lib/twitter-text/emoji_regex.rb +27 -0
- data/lib/twitter-text/extractor.rb +388 -0
- data/lib/twitter-text/hash_helper.rb +27 -0
- data/lib/twitter-text/hit_highlighter.rb +92 -0
- data/lib/twitter-text/regex.rb +381 -0
- data/lib/twitter-text/rewriter.rb +69 -0
- data/lib/twitter-text/unicode.rb +31 -0
- data/lib/twitter-text/validation.rb +251 -0
- data/lib/twitter-text/weighted_range.rb +24 -0
- data/lib/twitter-text.rb +29 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/spec/autolinking_spec.rb +858 -0
- data/spec/configuration_spec.rb +136 -0
- data/spec/extractor_spec.rb +392 -0
- data/spec/hithighlighter_spec.rb +96 -0
- data/spec/regex_spec.rb +76 -0
- data/spec/rewriter_spec.rb +553 -0
- data/spec/spec_helper.rb +139 -0
- data/spec/test_urls.rb +90 -0
- data/spec/twitter_text_spec.rb +25 -0
- data/spec/unicode_spec.rb +35 -0
- data/spec/validation_spec.rb +87 -0
- data/test/conformance_test.rb +242 -0
- data/twitter-text.gemspec +35 -0
- metadata +228 -0
data/config/v1.json
ADDED
data/config/v2.json
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"version": 2,
|
3
|
+
"maxWeightedTweetLength": 280,
|
4
|
+
"scale": 100,
|
5
|
+
"defaultWeight": 200,
|
6
|
+
"transformedURLLength": 23,
|
7
|
+
"ranges": [
|
8
|
+
{
|
9
|
+
"start": 0,
|
10
|
+
"end": 4351,
|
11
|
+
"weight": 100
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"start": 8192,
|
15
|
+
"end": 8205,
|
16
|
+
"weight": 100
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"start": 8208,
|
20
|
+
"end": 8223,
|
21
|
+
"weight": 100
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"start": 8242,
|
25
|
+
"end": 8247,
|
26
|
+
"weight": 100
|
27
|
+
}
|
28
|
+
]
|
29
|
+
}
|
data/config/v3.json
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"maxWeightedTweetLength": 280,
|
4
|
+
"scale": 100,
|
5
|
+
"defaultWeight": 200,
|
6
|
+
"emojiParsingEnabled": true,
|
7
|
+
"transformedURLLength": 23,
|
8
|
+
"ranges": [
|
9
|
+
{
|
10
|
+
"start": 0,
|
11
|
+
"end": 4351,
|
12
|
+
"weight": 100
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"start": 8192,
|
16
|
+
"end": 8205,
|
17
|
+
"weight": 100
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"start": 8208,
|
21
|
+
"end": 8223,
|
22
|
+
"weight": 100
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"start": 8242,
|
26
|
+
"end": 8247,
|
27
|
+
"weight": 100
|
28
|
+
}
|
29
|
+
]
|
30
|
+
}
|