twords 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twords/version.rb +1 -1
- data/lib/twords.rb +3 -3
- data/twords.gemspec +2 -0
- 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: b077596e43b2ac75f4ec36c1d5939128e8eca13e
|
4
|
+
data.tar.gz: 2fe6f5794eee5ef28fda1f8c90ba5a1a56140e97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faaaf5de4811ed3ce6fe1bd6ab34e690587d60e37960830b5a180ee6677bfe3f5c5bc37a88a36702ebf97e0e14610fdb0765d26b46c8351319910db3c2c9d949
|
7
|
+
data.tar.gz: cbe6d61a5459cbeef51e2d7073385f5a4e3c4e44098f24ad35584c1431a98837dc5b26887c528873f8d1af8bf56f9b0c27e830d9403e2123781985a946f4386a
|
data/lib/twords/version.rb
CHANGED
data/lib/twords.rb
CHANGED
@@ -99,17 +99,17 @@ class Twords
|
|
99
99
|
|
100
100
|
def hashtag?(word)
|
101
101
|
return false if self.class.include_hashtags
|
102
|
-
word
|
102
|
+
!(word =~ /#(\w+)/).nil?
|
103
103
|
end
|
104
104
|
|
105
105
|
def uri?(word)
|
106
106
|
return false if self.class.include_uris
|
107
|
-
word
|
107
|
+
!(word =~ URI.regexp).nil?
|
108
108
|
end
|
109
109
|
|
110
110
|
def mention?(word)
|
111
111
|
return false if self.class.include_mentions
|
112
|
-
word
|
112
|
+
!(word =~ /@(\w+)/).nil?
|
113
113
|
end
|
114
114
|
|
115
115
|
def hashtags
|
data/twords.gemspec
CHANGED
@@ -22,6 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
|
+
spec.required_ruby_version = '>= 2.1'
|
26
|
+
|
25
27
|
spec.add_dependency 'twitter', '~> 6.1.0'
|
26
28
|
|
27
29
|
spec.add_development_dependency 'bundler', '~> 1.14'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twords
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. Simon Borg
|
@@ -76,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
76
|
requirements:
|
77
77
|
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: '
|
79
|
+
version: '2.1'
|
80
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - ">="
|