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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a33c7098ea5fe083cfdd02cb0ccfc06d3384df2b
4
- data.tar.gz: 25ce5cb86c212b64217c5ec264d5dfa80cad9449
3
+ metadata.gz: b077596e43b2ac75f4ec36c1d5939128e8eca13e
4
+ data.tar.gz: 2fe6f5794eee5ef28fda1f8c90ba5a1a56140e97
5
5
  SHA512:
6
- metadata.gz: df178f0f3bff88225f992838fcd8479df2c9e3c2ccb768e9daf98d1440716a5f6e13956d86a409063f82551e602d0a1f96a15390b5cb8538e1f1afcde59bf4ca
7
- data.tar.gz: '04316495bec126d47904cf9581bd12dd8a679e5c9a58d8f2a8a2de9b3ecef4b8196e2da1d48d18fff6b70e8d7006b5006046e1b16db828b278608aa81358ee73'
6
+ metadata.gz: faaaf5de4811ed3ce6fe1bd6ab34e690587d60e37960830b5a180ee6677bfe3f5c5bc37a88a36702ebf97e0e14610fdb0765d26b46c8351319910db3c2c9d949
7
+ data.tar.gz: cbe6d61a5459cbeef51e2d7073385f5a4e3c4e44098f24ad35584c1431a98837dc5b26887c528873f8d1af8bf56f9b0c27e830d9403e2123781985a946f4386a
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Twords
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'.freeze
5
5
  end
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.match?(/#(\w+)/)
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.match?(URI.regexp)
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.match?(/@(\w+)/)
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.6
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: '0'
79
+ version: '2.1'
80
80
  required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - ">="