rspec-core 2.14.2 → 2.14.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,12 @@
1
+ ### 2.14.3 / 2013-07-13
2
+ [full changelog](http://github.com/rspec/rspec-core/compare/v2.14.2...v2.14.3)
3
+
4
+ Bug fixes
5
+
6
+ * Fix deprecation notices issued from `RSpec::Core::RakeTask` so
7
+ that they work properly when all of rspec-core is not loaded.
8
+ (This was a regression in 2.14) (Jon Rowe)
9
+
1
10
  ### 2.14.2 / 2013-07-09
2
11
  [full changelog](http://github.com/rspec/rspec-core/compare/v2.14.1...v2.14.2)
3
12
 
@@ -1,5 +1,4 @@
1
1
  require 'rspec/core/backward_compatibility'
2
- require 'rspec/core/deprecation'
3
2
  require 'rake'
4
3
  require 'rake/tasklib'
5
4
  require 'shellwords'
@@ -24,13 +23,13 @@ module RSpec
24
23
  # @deprecated
25
24
  # Has no effect. The rake task now checks ENV['BUNDLE_GEMFILE'] instead.
26
25
  def skip_bundler=(*)
27
- RSpec.deprecate("RSpec::Core::RakeTask#skip_bundler=")
26
+ deprecate("RSpec::Core::RakeTask#skip_bundler=")
28
27
  end
29
28
 
30
29
  # @deprecated
31
30
  # Has no effect. The rake task now checks ENV['BUNDLE_GEMFILE'] instead.
32
31
  def gemfile=(*)
33
- RSpec.deprecate("RSpec::Core::RakeTask#gemfile=", :replacement => 'ENV["BUNDLE_GEMFILE"]')
32
+ deprecate("RSpec::Core::RakeTask#gemfile=", :replacement => 'ENV["BUNDLE_GEMFILE"]')
34
33
  end
35
34
 
36
35
  # @deprecated
@@ -42,7 +41,7 @@ module RSpec
42
41
  # default:
43
42
  # false
44
43
  def warning=(true_or_false)
45
- RSpec.deprecate("RSpec::Core::RakeTask#warning=", :replacement => 'ruby_opts="-w"')
44
+ deprecate("RSpec::Core::RakeTask#warning=", :replacement => 'ruby_opts="-w"')
46
45
  @warning = true_or_false
47
46
  end
48
47
 
@@ -109,7 +108,7 @@ module RSpec
109
108
  # default:
110
109
  # nil
111
110
  def spec_opts=(opts)
112
- RSpec.deprecate('RSpec::Core::RakeTask#spec_opts=', :replacement => 'rspec_opts=')
111
+ deprecate('RSpec::Core::RakeTask#spec_opts=', :replacement => 'rspec_opts=')
113
112
  @rspec_opts = opts
114
113
  end
115
114
 
@@ -189,6 +188,19 @@ module RSpec
189
188
  def blank
190
189
  lambda {|s| s.nil? || s == ""}
191
190
  end
191
+
192
+ def deprecate deprecated, opts = {}
193
+ # unless RSpec is loaded, deprecate won't work (simply requiring the
194
+ # deprecate file isn't enough) so this is a check for "is rspec already
195
+ # loaded?" "ok use the main deprecate hook" otherwise "simple fallback"
196
+ # Note that we don't need rspec to be loaded for the rake task to work
197
+ if RSpec.respond_to?(:deprecate)
198
+ RSpec.deprecate deprecated, opts
199
+ else
200
+ warn "DEPRECATION: #{deprecated} is deprecated."
201
+ end
202
+ end
203
+
192
204
  end
193
205
  end
194
206
  end
@@ -1,7 +1,8 @@
1
1
  module RSpec
2
2
  module Core
3
3
  module Version
4
- STRING = '2.14.2'
4
+ STRING = '2.14.3'
5
5
  end
6
6
  end
7
7
  end
8
+
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rspec-core
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.14.2
5
+ version: 2.14.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Steven Baker
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2013-07-10 00:00:00.000000000 Z
14
+ date: 2013-07-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  version_requirements: !ruby/object:Gem::Requirement
@@ -383,7 +383,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
383
383
  version: '0'
384
384
  segments:
385
385
  - 0
386
- hash: 2476861130541035807
386
+ hash: -605318191614617076
387
387
  none: false
388
388
  required_rubygems_version: !ruby/object:Gem::Requirement
389
389
  requirements:
@@ -392,14 +392,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
392
392
  version: '0'
393
393
  segments:
394
394
  - 0
395
- hash: 2476861130541035807
395
+ hash: -605318191614617076
396
396
  none: false
397
397
  requirements: []
398
398
  rubyforge_project: rspec
399
399
  rubygems_version: 1.8.24
400
400
  signing_key:
401
401
  specification_version: 3
402
- summary: rspec-core-2.14.2
402
+ summary: rspec-core-2.14.3
403
403
  test_files:
404
404
  - features/Autotest.md
405
405
  - features/README.md