twitter-text 1.9.2 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50d926db2fdf1b07462b2fac4af8fbad3251808e
4
- data.tar.gz: 816af9771e5940a210e72b6f922d0e8fad26b757
3
+ metadata.gz: 9bf8f0458f83224b2f818d0167deece43aa85875
4
+ data.tar.gz: dadc8f874379ed383cf7b66172b5eb65ec130906
5
5
  SHA512:
6
- metadata.gz: 53c99aaa4071d936d041bc8931c55fe76dec979e972d0affec724541f6ab86b4344c320f9f397d234f605a9fdad5646522cb6671361da2a3ed0fc00a183ca5ac
7
- data.tar.gz: 131eee6c27027fb12f105418b52a1f6aaac00acbe4b0b63a3cf97338ea626bd0f6157d7218743b859956b45fb55b06dae3f269fad97a610cff33a26ced9ba38c
6
+ metadata.gz: efadacd1f014d0b422dc513c548e3c7cf22df17a21c42c382160a54883045530355b4766d21bfd038d9dd20ef4fcf9c33767874e2e708a357d9c63ab8dfbd46b
7
+ data.tar.gz: 43d0537e6b2e0411a3929b89ce5977c91ec786ed7e409fa7b0b0ed16beb8fff425b7c012e1f2073bc279af3c1b9814b0d51b6bf10c5f05b59dbefeec2696e2ec
data/lib/twitter-text.rb CHANGED
@@ -1,4 +1,4 @@
1
- major, minor, patch = RUBY_VERSION.split('.')
1
+ major, minor, _patch = RUBY_VERSION.split('.')
2
2
 
3
3
  $RUBY_1_9 = if major.to_i == 1 && minor.to_i < 9
4
4
  # Ruby 1.8 KCODE check. Not needed on 1.9 and later.
@@ -188,7 +188,6 @@ module Twitter
188
188
  def extract_urls_with_indices(text, options = {:extract_url_without_protocol => true}) # :yields: url, start, end
189
189
  return [] unless text && (options[:extract_url_without_protocol] ? text.index(".") : text.index(":"))
190
190
  urls = []
191
- position = 0
192
191
 
193
192
  text.to_s.scan(Twitter::Regex[:valid_url]) do |all, before, url, protocol, domain, port, path, query|
194
193
  valid_url_match_data = $~
@@ -75,8 +75,8 @@ module Twitter
75
75
  if chunk_cursor < chunk_chars.length
76
76
  result << chunk_chars[chunk_cursor..-1]
77
77
  end
78
- (chunk_index+1).upto(chunks.length-1).each do |index|
79
- result << (index.even? ? chunks[index] : "<#{chunks[index]}>")
78
+ (chunk_index+1).upto(chunks.length-1).each do |i|
79
+ result << (i.even? ? chunks[i] : "<#{chunks[i]}>")
80
80
  end
81
81
  end
82
82
 
@@ -6,6 +6,8 @@ module Twitter
6
6
  # used throughout the <tt>Twitter</tt> classes. Special care has been taken to make
7
7
  # sure these reular expressions work with Tweets in all languages.
8
8
  class Regex
9
+ require 'yaml'
10
+
9
11
  REGEXEN = {} # :nodoc:
10
12
 
11
13
  def self.regex_range(from, to = nil) # :nodoc:
@@ -22,7 +24,14 @@ module Twitter
22
24
  [from].pack('U')
23
25
  end
24
26
  end
25
- end
27
+ end
28
+
29
+ TLDS = YAML.load_file(
30
+ File.join(
31
+ File.expand_path('../../..', __FILE__), # project root
32
+ 'test', 'twitter-text-conformance', 'tld_lib.yml'
33
+ )
34
+ )
26
35
 
27
36
  # Space is more than %20, U+3000 for example is the full-width space used with Kanji. Provide a short-hand
28
37
  # to access both the list of characters and a pattern suitible for use with String#split
@@ -51,7 +60,7 @@ module Twitter
51
60
  ].map{|cp| [cp].pack('U') }.freeze
52
61
  REGEXEN[:invalid_control_characters] = /[#{INVALID_CHARACTERS.join('')}]/o
53
62
 
54
- major, minor, patch = RUBY_VERSION.split('.')
63
+ major, minor, _patch = RUBY_VERSION.split('.')
55
64
  if major.to_i >= 2 || major.to_i == 1 && minor.to_i >= 9 || (defined?(RUBY_ENGINE) && ["jruby", "rbx"].include?(RUBY_ENGINE))
56
65
  REGEXEN[:list_name] = /[a-zA-Z][a-zA-Z0-9_\-\u0080-\u00ff]{0,24}/
57
66
  else
@@ -189,46 +198,15 @@ module Twitter
189
198
 
190
199
  REGEXEN[:valid_gTLD] = %r{
191
200
  (?:
192
- (?:
193
- academy|accountants|active|actor|aero|agency|airforce|archi|army|arpa|asia|associates|attorney|audio|autos|axa|
194
- bar|bargains|bayern|beer|berlin|best|bid|bike|bio|biz|black|blackfriday|blue|bmw|boutique|brussels|build|
195
- builders|buzz|bzh|cab|camera|camp|cancerresearch|capetown|capital|cards|care|career|careers|cash|cat|catering|
196
- center|ceo|cheap|christmas|church|citic|claims|cleaning|clinic|clothing|club|codes|coffee|college|cologne|com|
197
- community|company|computer|condos|construction|consulting|contractors|cooking|cool|coop|country|credit|
198
- creditcard|cruises|cuisinella|dance|dating|degree|democrat|dental|dentist|desi|diamonds|digital|direct|
199
- directory|discount|dnp|domains|durban|edu|education|email|engineer|engineering|enterprises|equipment|estate|eus|
200
- events|exchange|expert|exposed|fail|farm|feedback|finance|financial|fish|fishing|fitness|flights|florist|foo|
201
- foundation|frogans|fund|furniture|futbol|gal|gallery|gift|gives|glass|global|globo|gmo|gop|gov|graphics|gratis|
202
- green|gripe|guide|guitars|guru|hamburg|haus|hiphop|hiv|holdings|holiday|homes|horse|host|house|immobilien|
203
- industries|info|ink|institute|insure|int|international|investments|jetzt|jobs|joburg|juegos|kaufen|kim|kitchen|
204
- kiwi|koeln|kred|land|lawyer|lease|lgbt|life|lighting|limited|limo|link|loans|london|lotto|luxe|luxury|maison|
205
- management|mango|market|marketing|media|meet|menu|miami|mil|mini|mobi|moda|moe|monash|mortgage|moscow|
206
- motorcycles|museum|nagoya|name|navy|net|neustar|nhk|ninja|nyc|okinawa|onl|org|organic|ovh|paris|partners|parts|
207
- photo|photography|photos|physio|pics|pictures|pink|place|plumbing|post|press|pro|productions|properties|pub|
208
- qpon|quebec|recipes|red|rehab|reise|reisen|ren|rentals|repair|report|republican|rest|reviews|rich|rio|rocks|
209
- rodeo|ruhr|ryukyu|saarland|schmidt|schule|scot|services|sexy|shiksha|shoes|singles|social|software|sohu|solar|
210
- solutions|soy|space|spiegel|supplies|supply|support|surf|surgery|suzuki|systems|tattoo|tax|technology|tel|
211
- tienda|tips|tirol|today|tokyo|tools|town|toys|trade|training|travel|university|uno|vacations|vegas|ventures|
212
- versicherung|vet|viajes|villas|vision|vlaanderen|vodka|vote|voting|voto|voyage|wang|watch|webcam|website|wed|
213
- wien|wiki|works|wtc|wtf|xxx|xyz|yachts|yokohama|zone|дети|москва|онлайн|орг|сайт|بازار|شبكة|موقع|संगठन|みんな|世界|
214
- 中信|中文网|公司|公益|商城|商标|在线|我爱你|政务|机构|游戏|移动|组织机构|网址|网络|集团|삼성
215
- )(?=[^0-9a-z@]|$)
201
+ (?:#{TLDS['generic'].join('|')})
202
+ (?=[^0-9a-z@]|$)
216
203
  )
217
204
  }ix
218
205
 
219
206
  REGEXEN[:valid_ccTLD] = %r{
220
207
  (?:
221
- (?:
222
- ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bl|bm|bn|bo|bq|br|bs|bt|bv|bw|
223
- by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|
224
- fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|
225
- is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mf|mg|mh|mk|ml|
226
- mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|
227
- ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|
228
- tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|мкд|мон|рф|
229
- срб|укр|қаз|الاردن|الجزائر|السعودية|المغرب|امارات|ایران|بھارت|تونس|سودان|سورية|عمان|فلسطين|قطر|مصر|مليسيا|
230
- پاکستان|भारत|বাংলা|ভারত|ਭਾਰਤ|ભારત|இந்தியா|இலங்கை|சிங்கப்பூர்|భారత్|ලංකා|ไทย|გე|中国|中國|台湾|台灣|新加坡|香港|한국
231
- )(?=[^0-9a-z@]|$)
208
+ (?:#{TLDS['country'].join('|')})
209
+ (?=[^0-9a-z@]|$)
232
210
  )
233
211
  }ix
234
212
  REGEXEN[:valid_punycode] = /(?:xn--[0-9a-z]+)/i
@@ -8,8 +8,8 @@ module Twitter
8
8
  entities = entities.sort_by{|entity| entity[:indices].first}
9
9
 
10
10
  result = []
11
- last_index = entities.inject(0) do |last_index, entity|
12
- result << chars[last_index...entity[:indices].first]
11
+ last_index = entities.inject(0) do |index, entity|
12
+ result << chars[index...entity[:indices].first]
13
13
  result << yield(entity, chars)
14
14
  entity[:indices].last
15
15
  end
@@ -49,7 +49,7 @@ module Twitter
49
49
  begin
50
50
  return :too_long if tweet_length(text) > MAX_LENGTH
51
51
  return :invalid_characters if Twitter::Regex::INVALID_CHARACTERS.any?{|invalid_char| text.include?(invalid_char) }
52
- rescue ArgumentError => e
52
+ rescue ArgumentError
53
53
  # non-Unicode value.
54
54
  return :invalid_characters
55
55
  end
@@ -107,6 +107,14 @@ class ConformanceTest < Test::Unit::TestCase
107
107
  end
108
108
  end
109
109
 
110
+ def_conformance_test("tlds.yml", :generic) do
111
+ assert_equal expected, extract_urls(text), description
112
+ end
113
+
114
+ def_conformance_test("tlds.yml", :country) do
115
+ assert_equal expected, extract_urls(text), description
116
+ end
117
+
110
118
  def_conformance_test("extract.yml", :urls_with_indices) do
111
119
  e = expected.map{|elem| elem.inject({}){|h, (k,v)| h[k.to_sym] = v; h} }
112
120
  assert_equal e, extract_urls_with_indices(text), description
@@ -0,0 +1,752 @@
1
+ ---
2
+ country:
3
+ - ac
4
+ - ad
5
+ - ae
6
+ - af
7
+ - ag
8
+ - ai
9
+ - al
10
+ - am
11
+ - an
12
+ - ao
13
+ - aq
14
+ - ar
15
+ - as
16
+ - at
17
+ - au
18
+ - aw
19
+ - ax
20
+ - az
21
+ - ba
22
+ - bb
23
+ - bd
24
+ - be
25
+ - bf
26
+ - bg
27
+ - bh
28
+ - bi
29
+ - bj
30
+ - bl
31
+ - bm
32
+ - bn
33
+ - bo
34
+ - bq
35
+ - br
36
+ - bs
37
+ - bt
38
+ - bv
39
+ - bw
40
+ - by
41
+ - bz
42
+ - ca
43
+ - cc
44
+ - cd
45
+ - cf
46
+ - cg
47
+ - ch
48
+ - ci
49
+ - ck
50
+ - cl
51
+ - cm
52
+ - cn
53
+ - co
54
+ - cr
55
+ - cu
56
+ - cv
57
+ - cw
58
+ - cx
59
+ - cy
60
+ - cz
61
+ - de
62
+ - dj
63
+ - dk
64
+ - dm
65
+ - do
66
+ - dz
67
+ - ec
68
+ - ee
69
+ - eg
70
+ - eh
71
+ - er
72
+ - es
73
+ - et
74
+ - eu
75
+ - fi
76
+ - fj
77
+ - fk
78
+ - fm
79
+ - fo
80
+ - fr
81
+ - ga
82
+ - gb
83
+ - gd
84
+ - ge
85
+ - gf
86
+ - gg
87
+ - gh
88
+ - gi
89
+ - gl
90
+ - gm
91
+ - gn
92
+ - gp
93
+ - gq
94
+ - gr
95
+ - gs
96
+ - gt
97
+ - gu
98
+ - gw
99
+ - gy
100
+ - hk
101
+ - hm
102
+ - hn
103
+ - hr
104
+ - ht
105
+ - hu
106
+ - id
107
+ - ie
108
+ - il
109
+ - im
110
+ - in
111
+ - io
112
+ - iq
113
+ - ir
114
+ - is
115
+ - it
116
+ - je
117
+ - jm
118
+ - jo
119
+ - jp
120
+ - ke
121
+ - kg
122
+ - kh
123
+ - ki
124
+ - km
125
+ - kn
126
+ - kp
127
+ - kr
128
+ - kw
129
+ - ky
130
+ - kz
131
+ - la
132
+ - lb
133
+ - lc
134
+ - li
135
+ - lk
136
+ - lr
137
+ - ls
138
+ - lt
139
+ - lu
140
+ - lv
141
+ - ly
142
+ - ma
143
+ - mc
144
+ - md
145
+ - me
146
+ - mf
147
+ - mg
148
+ - mh
149
+ - mk
150
+ - ml
151
+ - mm
152
+ - mn
153
+ - mo
154
+ - mp
155
+ - mq
156
+ - mr
157
+ - ms
158
+ - mt
159
+ - mu
160
+ - mv
161
+ - mw
162
+ - mx
163
+ - my
164
+ - mz
165
+ - na
166
+ - nc
167
+ - ne
168
+ - nf
169
+ - ng
170
+ - ni
171
+ - nl
172
+ - 'no'
173
+ - np
174
+ - nr
175
+ - nu
176
+ - nz
177
+ - om
178
+ - pa
179
+ - pe
180
+ - pf
181
+ - pg
182
+ - ph
183
+ - pk
184
+ - pl
185
+ - pm
186
+ - pn
187
+ - pr
188
+ - ps
189
+ - pt
190
+ - pw
191
+ - py
192
+ - qa
193
+ - re
194
+ - ro
195
+ - rs
196
+ - ru
197
+ - rw
198
+ - sa
199
+ - sb
200
+ - sc
201
+ - sd
202
+ - se
203
+ - sg
204
+ - sh
205
+ - si
206
+ - sj
207
+ - sk
208
+ - sl
209
+ - sm
210
+ - sn
211
+ - so
212
+ - sr
213
+ - ss
214
+ - st
215
+ - su
216
+ - sv
217
+ - sx
218
+ - sy
219
+ - sz
220
+ - tc
221
+ - td
222
+ - tf
223
+ - tg
224
+ - th
225
+ - tj
226
+ - tk
227
+ - tl
228
+ - tm
229
+ - tn
230
+ - to
231
+ - tp
232
+ - tr
233
+ - tt
234
+ - tv
235
+ - tw
236
+ - tz
237
+ - ua
238
+ - ug
239
+ - uk
240
+ - um
241
+ - us
242
+ - uy
243
+ - uz
244
+ - va
245
+ - vc
246
+ - ve
247
+ - vg
248
+ - vi
249
+ - vn
250
+ - vu
251
+ - wf
252
+ - ws
253
+ - ye
254
+ - yt
255
+ - za
256
+ - zm
257
+ - zw
258
+ - "бел"
259
+ - "мкд"
260
+ - "мон"
261
+ - "рф"
262
+ - "срб"
263
+ - "укр"
264
+ - "қаз"
265
+ - "الاردن"
266
+ - "الجزائر"
267
+ - "السعودية"
268
+ - "المغرب"
269
+ - "امارات"
270
+ - "ایران"
271
+ - "بھارت"
272
+ - "تونس"
273
+ - "سودان"
274
+ - "سورية"
275
+ - "عراق"
276
+ - "عمان"
277
+ - "فلسطين"
278
+ - "قطر"
279
+ - "مصر"
280
+ - "مليسيا"
281
+ - "پاکستان"
282
+ - "भारत"
283
+ - "বাংলা"
284
+ - "ভারত"
285
+ - "ਭਾਰਤ"
286
+ - "ભારત"
287
+ - "இந்தியா"
288
+ - "இலங்கை"
289
+ - "சிங்கப்பூர்"
290
+ - "భారత్"
291
+ - "ලංකා"
292
+ - "ไทย"
293
+ - "გე"
294
+ - "中国"
295
+ - "中國"
296
+ - "台湾"
297
+ - "台灣"
298
+ - "新加坡"
299
+ - "香港"
300
+ - "한국"
301
+ generic:
302
+ - abogado
303
+ - academy
304
+ - accountants
305
+ - active
306
+ - actor
307
+ - aero
308
+ - agency
309
+ - airforce
310
+ - allfinanz
311
+ - alsace
312
+ - archi
313
+ - army
314
+ - arpa
315
+ - asia
316
+ - associates
317
+ - attorney
318
+ - auction
319
+ - audio
320
+ - autos
321
+ - axa
322
+ - band
323
+ - bar
324
+ - bargains
325
+ - bayern
326
+ - beer
327
+ - berlin
328
+ - best
329
+ - bid
330
+ - bike
331
+ - bio
332
+ - biz
333
+ - black
334
+ - blackfriday
335
+ - blue
336
+ - bmw
337
+ - bnpparibas
338
+ - boo
339
+ - boutique
340
+ - brussels
341
+ - budapest
342
+ - build
343
+ - builders
344
+ - business
345
+ - buzz
346
+ - bzh
347
+ - cab
348
+ - cal
349
+ - camera
350
+ - camp
351
+ - cancerresearch
352
+ - capetown
353
+ - capital
354
+ - caravan
355
+ - cards
356
+ - care
357
+ - career
358
+ - careers
359
+ - casa
360
+ - cash
361
+ - cat
362
+ - catering
363
+ - center
364
+ - ceo
365
+ - cern
366
+ - channel
367
+ - cheap
368
+ - christmas
369
+ - chrome
370
+ - church
371
+ - citic
372
+ - city
373
+ - claims
374
+ - cleaning
375
+ - click
376
+ - clinic
377
+ - clothing
378
+ - club
379
+ - codes
380
+ - coffee
381
+ - college
382
+ - cologne
383
+ - com
384
+ - community
385
+ - company
386
+ - computer
387
+ - condos
388
+ - construction
389
+ - consulting
390
+ - contractors
391
+ - cooking
392
+ - cool
393
+ - coop
394
+ - country
395
+ - credit
396
+ - creditcard
397
+ - crs
398
+ - cruises
399
+ - cuisinella
400
+ - cymru
401
+ - dad
402
+ - dance
403
+ - dating
404
+ - day
405
+ - deals
406
+ - degree
407
+ - democrat
408
+ - dental
409
+ - dentist
410
+ - desi
411
+ - diamonds
412
+ - diet
413
+ - digital
414
+ - direct
415
+ - directory
416
+ - discount
417
+ - dnp
418
+ - domains
419
+ - durban
420
+ - dvag
421
+ - eat
422
+ - edu
423
+ - education
424
+ - email
425
+ - emerck
426
+ - engineer
427
+ - engineering
428
+ - enterprises
429
+ - equipment
430
+ - esq
431
+ - estate
432
+ - eus
433
+ - events
434
+ - exchange
435
+ - expert
436
+ - exposed
437
+ - fail
438
+ - farm
439
+ - feedback
440
+ - finance
441
+ - financial
442
+ - fish
443
+ - fishing
444
+ - fitness
445
+ - flights
446
+ - florist
447
+ - flsmidth
448
+ - fly
449
+ - foo
450
+ - forsale
451
+ - foundation
452
+ - frl
453
+ - frogans
454
+ - fund
455
+ - furniture
456
+ - futbol
457
+ - gal
458
+ - gallery
459
+ - gbiz
460
+ - gent
461
+ - gift
462
+ - gifts
463
+ - gives
464
+ - glass
465
+ - gle
466
+ - global
467
+ - globo
468
+ - gmail
469
+ - gmo
470
+ - gmx
471
+ - google
472
+ - gop
473
+ - gov
474
+ - graphics
475
+ - gratis
476
+ - green
477
+ - gripe
478
+ - guide
479
+ - guitars
480
+ - guru
481
+ - hamburg
482
+ - haus
483
+ - healthcare
484
+ - help
485
+ - here
486
+ - hiphop
487
+ - hiv
488
+ - holdings
489
+ - holiday
490
+ - homes
491
+ - horse
492
+ - host
493
+ - hosting
494
+ - house
495
+ - how
496
+ - ibm
497
+ - immo
498
+ - immobilien
499
+ - industries
500
+ - info
501
+ - ing
502
+ - ink
503
+ - institute
504
+ - insure
505
+ - int
506
+ - international
507
+ - investments
508
+ - jetzt
509
+ - jobs
510
+ - joburg
511
+ - juegos
512
+ - kaufen
513
+ - kim
514
+ - kitchen
515
+ - kiwi
516
+ - koeln
517
+ - krd
518
+ - kred
519
+ - lacaixa
520
+ - land
521
+ - lawyer
522
+ - lease
523
+ - lgbt
524
+ - life
525
+ - lighting
526
+ - limited
527
+ - limo
528
+ - link
529
+ - loans
530
+ - london
531
+ - lotto
532
+ - ltda
533
+ - luxe
534
+ - luxury
535
+ - maison
536
+ - management
537
+ - mango
538
+ - market
539
+ - marketing
540
+ - media
541
+ - meet
542
+ - melbourne
543
+ - meme
544
+ - menu
545
+ - miami
546
+ - mil
547
+ - mini
548
+ - mobi
549
+ - moda
550
+ - moe
551
+ - monash
552
+ - mortgage
553
+ - moscow
554
+ - motorcycles
555
+ - mov
556
+ - museum
557
+ - nagoya
558
+ - name
559
+ - navy
560
+ - net
561
+ - network
562
+ - neustar
563
+ - new
564
+ - nexus
565
+ - ngo
566
+ - nhk
567
+ - ninja
568
+ - nra
569
+ - nrw
570
+ - nyc
571
+ - okinawa
572
+ - ong
573
+ - onl
574
+ - ooo
575
+ - org
576
+ - organic
577
+ - otsuka
578
+ - ovh
579
+ - paris
580
+ - partners
581
+ - parts
582
+ - pharmacy
583
+ - photo
584
+ - photography
585
+ - photos
586
+ - physio
587
+ - pics
588
+ - pictures
589
+ - pink
590
+ - pizza
591
+ - place
592
+ - plumbing
593
+ - pohl
594
+ - poker
595
+ - post
596
+ - praxi
597
+ - press
598
+ - pro
599
+ - prod
600
+ - productions
601
+ - prof
602
+ - properties
603
+ - property
604
+ - pub
605
+ - qpon
606
+ - quebec
607
+ - realtor
608
+ - recipes
609
+ - red
610
+ - rehab
611
+ - reise
612
+ - reisen
613
+ - ren
614
+ - rentals
615
+ - repair
616
+ - report
617
+ - republican
618
+ - rest
619
+ - restaurant
620
+ - reviews
621
+ - rich
622
+ - rio
623
+ - rip
624
+ - rocks
625
+ - rodeo
626
+ - rsvp
627
+ - ruhr
628
+ - ryukyu
629
+ - saarland
630
+ - sarl
631
+ - sca
632
+ - scb
633
+ - schmidt
634
+ - schule
635
+ - scot
636
+ - services
637
+ - sexy
638
+ - shiksha
639
+ - shoes
640
+ - singles
641
+ - social
642
+ - software
643
+ - sohu
644
+ - solar
645
+ - solutions
646
+ - soy
647
+ - space
648
+ - spiegel
649
+ - supplies
650
+ - supply
651
+ - support
652
+ - surf
653
+ - surgery
654
+ - suzuki
655
+ - systems
656
+ - taipei
657
+ - tatar
658
+ - tattoo
659
+ - tax
660
+ - technology
661
+ - tel
662
+ - tienda
663
+ - tips
664
+ - tirol
665
+ - today
666
+ - tokyo
667
+ - tools
668
+ - top
669
+ - town
670
+ - toys
671
+ - trade
672
+ - training
673
+ - travel
674
+ - tui
675
+ - university
676
+ - uno
677
+ - uol
678
+ - vacations
679
+ - vegas
680
+ - ventures
681
+ - vermögensberater
682
+ - vermögensberatung
683
+ - versicherung
684
+ - vet
685
+ - viajes
686
+ - villas
687
+ - vision
688
+ - vlaanderen
689
+ - vodka
690
+ - vote
691
+ - voting
692
+ - voto
693
+ - voyage
694
+ - wales
695
+ - wang
696
+ - watch
697
+ - webcam
698
+ - website
699
+ - wed
700
+ - wedding
701
+ - whoswho
702
+ - wien
703
+ - wiki
704
+ - williamhill
705
+ - wme
706
+ - work
707
+ - works
708
+ - world
709
+ - wtc
710
+ - wtf
711
+ - xxx
712
+ - xyz
713
+ - yachts
714
+ - yandex
715
+ - yoga
716
+ - yokohama
717
+ - youtube
718
+ - zip
719
+ - zone
720
+ - "дети"
721
+ - "москва"
722
+ - "онлайн"
723
+ - "орг"
724
+ - "рус"
725
+ - "сайт"
726
+ - "بازار"
727
+ - "شبكة"
728
+ - "موقع"
729
+ - "संगठन"
730
+ - "みんな"
731
+ - "世界"
732
+ - "中信"
733
+ - "中文网"
734
+ - "企业"
735
+ - "佛山"
736
+ - "公司"
737
+ - "公益"
738
+ - "商城"
739
+ - "商标"
740
+ - "在线"
741
+ - "广东"
742
+ - "我爱你"
743
+ - "手机"
744
+ - "政务"
745
+ - "机构"
746
+ - "游戏"
747
+ - "移动"
748
+ - "组织机构"
749
+ - "网址"
750
+ - "网络"
751
+ - "集团"
752
+ - "삼성"
data/twitter-text.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "twitter-text"
5
- s.version = "1.9.2"
5
+ s.version = "1.10.0"
6
6
  s.authors = ["Matt Sanford", "Patrick Ewing", "Ben Cherry", "Britt Selvitelle",
7
7
  "Raffi Krikorian", "J.P. Cummins", "Yoshimasa Niwa", "Keita Fujii", "James Koval"]
8
8
  s.email = ["matt@twitter.com", "patrick.henry.ewing@gmail.com", "bcherry@gmail.com", "bs@brittspace.com",
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.add_development_dependency "simplecov", "~> 0.8.0"
24
24
  s.add_runtime_dependency "unf", "~> 0.1.0"
25
25
 
26
- s.files = `git ls-files`.split("\n")
26
+ s.files = `git ls-files`.split("\n") + ['test/twitter-text-conformance/tld_lib.yml']
27
27
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
28
28
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
29
29
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-text
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.2
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Sanford
@@ -16,7 +16,7 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2014-07-24 00:00:00.000000000 Z
19
+ date: 2014-10-29 00:00:00.000000000 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: multi_json
@@ -163,6 +163,7 @@ files:
163
163
  - spec/unicode_spec.rb
164
164
  - spec/validation_spec.rb
165
165
  - test/conformance_test.rb
166
+ - test/twitter-text-conformance/tld_lib.yml
166
167
  - twitter-text.gemspec
167
168
  homepage: http://twitter.com
168
169
  licenses: