rspec-core 3.2.1 → 3.2.2

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: d3464d50aabc135c4eb42c895bf39efee77b71c0
4
- data.tar.gz: 7ece9a5ae8f18b7dd4f64922278e16f27bf5c7df
3
+ metadata.gz: ba0ddfd56ea03cc9a322731b3f8dfaffdbf30e0a
4
+ data.tar.gz: c583095f89e08f9bad505e66ff8e7c6b8d86463e
5
5
  SHA512:
6
- metadata.gz: a17e0892a0475a1fc22e75da06fa40b9f7e6e99e1aa709b148f6cd4ea7b435aec49c298cb39f9bd7030fd18de5a7c045810dbb0045c92213b094f82cd671c217
7
- data.tar.gz: 9e2a83b038993bddf729f9821349588d6c21612fec3482bd39ea7835bcbeccf85d21feb72c3676cb336ea24792436760b574181a346b88df7280976844c363c0
6
+ metadata.gz: fc5a1e85733f04c1356f602fb26423b97d6d77f615b9fed60af58c000a6f053d9370de6d07cb7ccf0491597b3483ae50c04f8520196dea74bb1f3dd69fa3dc0c
7
+ data.tar.gz: c69325b31b38dd11ad00ba848bd4863184031aec28479d2329d0e7971443e4fc06ebeb82416cbfaa3d2a5b348992c3a906d65a3472fe1eb5f7f1d648a043309c
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,13 @@
1
+ ### 3.2.2 / 2015-03-11
2
+ [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.2.1...v3.2.2)
3
+
4
+ Bug Fixes:
5
+
6
+ * Fix regression in 3.2.0 that allowed tag-filtered examples to
7
+ run even if there was a location filter applied to the spec
8
+ file that was intended to limit the file to other examples.
9
+ (#1894, Myron Marston)
10
+
1
11
  ### 3.2.1 / 2015-02-23
2
12
  [Full Changelog](http://github.com/rspec/rspec-core/compare/v3.2.0...v3.2.1)
3
13
 
@@ -31,8 +31,13 @@ module RSpec
31
31
  if inclusions.standalone?
32
32
  examples.select { |e| include?(e) }
33
33
  else
34
- locations = inclusions.fetch(:locations) { Hash.new([]) }
35
- examples.select { |e| priority_include?(e, locations) || (!exclude?(e) && include?(e)) }
34
+ locations, other_inclusions = inclusions.partition_locations
35
+
36
+ examples.select do |e|
37
+ priority_include?(e, locations) do
38
+ !exclude?(e) && other_inclusions.include_example?(e)
39
+ end
40
+ end
36
41
  end
37
42
  end
38
43
 
@@ -83,7 +88,7 @@ module RSpec
83
88
  # defined in the same file as the location filters. Excluded specs in
84
89
  # other files should still be excluded.
85
90
  def priority_include?(example, locations)
86
- return false if locations[example.metadata[:absolute_file_path]].empty?
91
+ return yield if locations[example.metadata[:absolute_file_path]].empty?
87
92
  MetadataFilter.filter_applies?(:locations, locations, example.metadata)
88
93
  end
89
94
  end
@@ -104,8 +109,8 @@ module RSpec
104
109
  [exclusions, inclusions]
105
110
  end
106
111
 
107
- def initialize(*args, &block)
108
- @rules = Hash.new(*args, &block)
112
+ def initialize(rules={})
113
+ @rules = rules
109
114
  end
110
115
 
111
116
  def add(updated)
@@ -173,6 +178,13 @@ module RSpec
173
178
  apply_standalone_filter(*args) || super
174
179
  end
175
180
 
181
+ def partition_locations
182
+ locations = @rules.fetch(:locations) { Hash.new([]) }
183
+ other_inclusions = self.class.new(@rules.dup.tap { |r| r.delete(:locations) })
184
+
185
+ return locations, other_inclusions
186
+ end
187
+
176
188
  def include_example?(example)
177
189
  @rules.empty? || super
178
190
  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.2.1'
6
+ STRING = '3.2.2'
7
7
  end
8
8
  end
9
9
  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.2.1
4
+ version: 3.2.2
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: 2015-02-24 00:00:00.000000000 Z
49
+ date: 2015-03-12 00:00:00.000000000 Z
50
50
  dependencies:
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: rspec-support
@@ -276,9 +276,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
276
276
  version: '0'
277
277
  requirements: []
278
278
  rubyforge_project: rspec
279
- rubygems_version: 2.4.5
279
+ rubygems_version: 2.2.2
280
280
  signing_key:
281
281
  specification_version: 4
282
- summary: rspec-core-3.2.1
282
+ summary: rspec-core-3.2.2
283
283
  test_files: []
284
284
  has_rdoc:
metadata.gz.sig CHANGED
Binary file