rspec-core 3.5.3 → 3.5.4

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: c9ac822b43683de914c3aa410444eb1c169d0f2d
4
- data.tar.gz: ac809f4a29ae13c01faf12e9da68cebb52382be0
3
+ metadata.gz: 5dc4950a038b0b14b369336c70d967455853128a
4
+ data.tar.gz: 2b2dcb195a0493c6876dbeceb8d6a8adfd643283
5
5
  SHA512:
6
- metadata.gz: 810b2232c50232d568af42436cb1b81dc5b109b9534f8d82a554a069713ce23b0775f8c24eb9edb42f9b51590db57804fe0d2dce55a5af473da81c4dd94b9c9f
7
- data.tar.gz: a0e5e3b3f939ac9518d3b527b40e576ea221f80b66f37fada8f122f960b1720035330fa6c28c3ca583f19ba60ef117ca16a8d0ac15750228d0fe71b0e53d26e1
6
+ metadata.gz: 6cffc5f291e3a7187971a0da4fc6d9900b3022717dbbc4787843510362e6876914e0785011b2e91de4d0a2d48061866b1127acba386be59d00cc157243e6d8f1
7
+ data.tar.gz: 8a347a71f03c00256b9725fa300ea3fdb23999adf48f1984ce144bbbfff08d830dc5f9391a4930afe8f9ce8981efc5a1c59caea6ae5fd79fbff0498dc124b93d
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,11 @@
1
+ ### 3.5.4 / 2016-09-30
2
+ [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.5.3...v3.5.4)
3
+
4
+ Bug Fixes:
5
+
6
+ * Remove accumulated `ExampleGroup` constants when reseting RSpec,
7
+ preventing a memory leak. (TravisSpangle, #2328)
8
+
1
9
  ### 3.5.3 / 2016-09-02
2
10
  [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.5.2...v3.5.3)
3
11
 
@@ -56,6 +56,7 @@ module RSpec
56
56
  # they use the runner multiple times within the same process. Users must deal
57
57
  # themselves with re-configuration of RSpec before run.
58
58
  def self.reset
59
+ RSpec::ExampleGroups.remove_all_constants
59
60
  @world = nil
60
61
  @configuration = nil
61
62
  end
@@ -827,6 +827,12 @@ module RSpec
827
827
  const_scope
828
828
  end
829
829
 
830
+ def self.remove_all_constants
831
+ constants.each do |constant|
832
+ __send__(:remove_const, constant)
833
+ end
834
+ end
835
+
830
836
  def self.base_name_for(group)
831
837
  return "Anonymous" if group.description.empty?
832
838
 
@@ -93,11 +93,6 @@ module RSpec::Core
93
93
  options[:failure_exit_code] = code
94
94
  end
95
95
 
96
- parser.on('--dry-run', 'Print the formatter output of your suite without',
97
- ' running any examples or hooks') do |_o|
98
- options[:dry_run] = true
99
- end
100
-
101
96
  parser.on('-X', '--[no-]drb', 'Run examples via DRb.') do |use_drb|
102
97
  options[:drb] = use_drb
103
98
  options[:runner] = RSpec::Core::Invocations::DRbWithFallback.new if use_drb
@@ -107,10 +102,6 @@ module RSpec::Core
107
102
  options[:drb_port] = o.to_i
108
103
  end
109
104
 
110
- parser.on('--init', 'Initialize your project with RSpec.') do |_cmd|
111
- options[:runner] = RSpec::Core::Invocations::InitializeProject.new
112
- end
113
-
114
105
  parser.separator("\n **** Output ****\n\n")
115
106
 
116
107
  parser.on('-f', '--format FORMATTER', 'Choose a formatter.',
@@ -163,6 +154,11 @@ module RSpec::Core
163
154
  end
164
155
  end
165
156
 
157
+ parser.on('--dry-run', 'Print the formatter output of your suite without',
158
+ ' running any examples or hooks') do |_o|
159
+ options[:dry_run] = true
160
+ end
161
+
166
162
  parser.on('-w', '--warnings', 'Enable ruby warnings') do
167
163
  $VERBOSE = true
168
164
  end
@@ -244,6 +240,10 @@ FILTERING
244
240
 
245
241
  parser.separator("\n **** Utility ****\n\n")
246
242
 
243
+ parser.on('--init', 'Initialize your project with RSpec.') do |_cmd|
244
+ options[:runner] = RSpec::Core::Invocations::InitializeProject.new
245
+ end
246
+
247
247
  parser.on('-v', '--version', 'Display the version.') do
248
248
  options[:runner] = RSpec::Core::Invocations::PrintVersion.new
249
249
  end
@@ -3,7 +3,7 @@ module RSpec
3
3
  # Version information for RSpec Core.
4
4
  module Version
5
5
  # Current version of RSpec Core, in semantic versioning format.
6
- STRING = '3.5.3'
6
+ STRING = '3.5.4'
7
7
  end
8
8
  end
9
9
  end
@@ -38,6 +38,7 @@ module RSpec
38
38
  #
39
39
  # Reset world to 'scratch' before running suite.
40
40
  def reset
41
+ RSpec::ExampleGroups.remove_all_constants
41
42
  example_groups.clear
42
43
  @shared_example_group_registry = nil
43
44
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.3
4
+ version: 3.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Baker
@@ -46,7 +46,7 @@ cert_chain:
46
46
  ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
47
47
  F3MdtaDehhjC
48
48
  -----END CERTIFICATE-----
49
- date: 2016-09-02 00:00:00.000000000 Z
49
+ date: 2016-10-01 00:00:00.000000000 Z
50
50
  dependencies:
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: rspec-support
@@ -283,6 +283,6 @@ rubyforge_project:
283
283
  rubygems_version: 2.2.2
284
284
  signing_key:
285
285
  specification_version: 4
286
- summary: rspec-core-3.5.3
286
+ summary: rspec-core-3.5.4
287
287
  test_files: []
288
288
  has_rdoc:
metadata.gz.sig CHANGED
Binary file