regexp-examples 1.5.0 → 1.5.1

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
  SHA256:
3
- metadata.gz: 905cc28db8e824ca4bdfed6a6b3e304af0fa76de572a7fd673c4e64074f758a0
4
- data.tar.gz: 42bcbba65b38998244b26d7a1a5c20f8212094ab204860381442d56d56760989
3
+ metadata.gz: 38fbbe3d506284921194e15fded3d672d114212223e46cc380bba3f0f669b432
4
+ data.tar.gz: d0c47861293efcf61aa4f0d7ce3eee05aac8e57c43affe9a0e58af61e8cbc50b
5
5
  SHA512:
6
- metadata.gz: fa88b19665fbf46251d7226369d1b27b35e19a61deb354df5d3fef3cab0a09a86c3214767f52410a39a384953c8e488ae1c51d67fe382351d76b2eaae0f09bdb
7
- data.tar.gz: 34572d245792daa0cbe168e110592ba76174c6b986099db2a7f1591c2d9b0bb095f8869bf4b9cdfe1afab19648a0cd2354eff322e6b45179b2bdd21bea56dd9d
6
+ metadata.gz: 989d3c74e5120a0612d340b3919e511b8aad3eabc06a5c939bab2deb724f0168644af75f4e47c5b5c577689df768c8414ac1c93a1e1d4cf0885f75a8a983d1ca
7
+ data.tar.gz: 8125cb96126af56ce2fc283e47da4963706e86f11f9fa287c8fdd4b495514852c6ab64aad061ce60a19160694eea39382621cfda56ad92808d2f4fc855f0448d
@@ -4,6 +4,7 @@ rvm:
4
4
  - 2.5.5
5
5
  - 2.6.2 # Uses unicode 12.0.0
6
6
  - 2.6.3 # Uses unicode 12.1.0
7
+ - 2.7.0
7
8
  - ruby-head
8
9
  matrix:
9
10
  allow_failures:
@@ -5,13 +5,13 @@ module CoreExtensions
5
5
  # No core classes are extended in any way, other than the above two methods.
6
6
  module Examples
7
7
  def examples(**config_options)
8
- RegexpExamples::Config.with_configuration(config_options) do
8
+ RegexpExamples::Config.with_configuration(**config_options) do
9
9
  examples_by_method(:result)
10
10
  end
11
11
  end
12
12
 
13
13
  def random_example(**config_options)
14
- RegexpExamples::Config.with_configuration(config_options) do
14
+ RegexpExamples::Config.with_configuration(**config_options) do
15
15
  examples_by_method(:random_result).sample
16
16
  end
17
17
  end
@@ -27,10 +27,10 @@ module RegexpExamples
27
27
  original_config = config.dup
28
28
 
29
29
  begin
30
- self.config = new_config
30
+ update_config(**new_config)
31
31
  result = yield
32
32
  ensure
33
- self.config = original_config
33
+ update_config(**original_config)
34
34
  end
35
35
 
36
36
  result
@@ -48,7 +48,7 @@ module RegexpExamples
48
48
 
49
49
  private
50
50
 
51
- def config=(**args)
51
+ def update_config(**args)
52
52
  Thread.current[:regexp_examples_config].merge!(args)
53
53
  end
54
54
 
@@ -1,4 +1,4 @@
1
1
  # Gem version
2
2
  module RegexpExamples
3
- VERSION = '1.5.0'.freeze
3
+ VERSION = '1.5.1'.freeze
4
4
  end
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.add_development_dependency 'bundler', '> 1.7'
18
18
  s.add_development_dependency 'rake', '~> 12.0'
19
19
  s.add_development_dependency 'pry', '~> 0.12.0'
20
+ s.add_development_dependency 'warning', '~> 0.10.0'
20
21
  s.license = 'MIT'
21
22
  s.required_ruby_version = '>= 2.4.0'
22
23
  end
@@ -6,13 +6,14 @@ Coveralls.wear!
6
6
  require './lib/regexp-examples.rb'
7
7
  require 'helpers'
8
8
  require 'pry'
9
+ require 'warning'
9
10
 
10
11
  # Several of these tests (intentionally) use "weird" regex patterns,
11
12
  # that spam annoying warnings when running.
12
13
  # E.g. warning: invalid back reference: /\k/
13
14
  # and warning: character class has ']' without escape: /[]]/
14
15
  # This config disables those warnings.
15
- $VERBOSE = nil
16
+ Warning.ignore(//, __dir__)
16
17
 
17
18
  RSpec.configure do |config|
18
19
  config.include Helpers
@@ -65,7 +65,7 @@ RSpec.configure do |config|
65
65
 
66
66
  # This setting enables warnings. It's recommended, but in some cases may
67
67
  # be too noisy due to issues in dependencies.
68
- config.warnings = true
68
+ config.warnings = false
69
69
 
70
70
  # Many RSpec users commonly either run the entire suite or an individual
71
71
  # file, and it's useful to allow more verbose output when running an
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regexp-examples
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lord
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-13 00:00:00.000000000 Z
11
+ date: 2020-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.12.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: warning
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.10.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.10.0
55
69
  description: Regexp#examples returns a list of "all" strings that are matched by the
56
70
  regex. Regexp#random_example returns one, random string that matches.
57
71
  email: lord.thom@gmail.com