rspectacular 0.53.1 → 0.54.0
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 +4 -4
- data/README.md +2 -2
- data/lib/rspectacular/matchers/active_record.rb +1 -1
- data/lib/rspectacular/matchers/authentication.rb +1 -1
- data/lib/rspectacular/plugins/timecop.rb +9 -3
- data/lib/rspectacular/selectors.rb +1 -1
- data/lib/rspectacular/support/garbage_collection.rb +3 -3
- data/lib/rspectacular/support/rails.rb +1 -1
- data/lib/rspectacular/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 796d95e9597ba531bdd39c4a4a84da84bbfd3806
|
|
4
|
+
data.tar.gz: 5f5d66574ea95ad662055e8ab8d76a36f6bd4bd1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c5b57496c33941c989f2ae399cf905b7a433b8c4d0286c1c3c804d4569f05329cc687a64019bc8823047e21ec8994afcb04198109304945ce132d3f44c1f7e2
|
|
7
|
+
data.tar.gz: 8d8c3cb0ca6f386ddd95d823fada2ff04007b8f13a0a2aeb91202283a5e8c14fc132a6a588e1fb3fb0cb543949676bc8cc1ed5d78f7296e0ac60517dc66e685c
|
data/README.md
CHANGED
|
@@ -16,7 +16,7 @@ project to project. This was a huge nightmare.
|
|
|
16
16
|
What we decided to do was to package it all up as a gem so that we can simply
|
|
17
17
|
include it in the project and update it as necessary. Version 1.x won't allow
|
|
18
18
|
for too many different customizations, but the plan for 2.x is _selective_
|
|
19
|
-
overriding of
|
|
19
|
+
overriding of Rspectacular configuration decisions.
|
|
20
20
|
|
|
21
21
|
The philosophy behind this gem is to:
|
|
22
22
|
|
|
@@ -28,7 +28,7 @@ need to take place. However, what you should see when you look at your spec's
|
|
|
28
28
|
configuration should be things that are exceptional to your project; nothing
|
|
29
29
|
more.
|
|
30
30
|
|
|
31
|
-
[Welcome to
|
|
31
|
+
[Welcome to Rspectacular](#wiki).
|
|
32
32
|
|
|
33
33
|
Usage
|
|
34
34
|
------------------------------------------------------------------------------
|
|
@@ -11,14 +11,20 @@ begin
|
|
|
11
11
|
options = case options
|
|
12
12
|
when Time
|
|
13
13
|
{ :time => options }
|
|
14
|
+
when FalseClass
|
|
15
|
+
false
|
|
14
16
|
when TrueClass
|
|
15
17
|
{}
|
|
16
18
|
end
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
if options
|
|
21
|
+
mock_type = options.fetch(:type, :freeze)
|
|
22
|
+
time = options.fetch(:time, Time.utc(2012, 7, 26, 18, 0, 0))
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
Timecop.send(mock_type, time)
|
|
25
|
+
else
|
|
26
|
+
Timecop.return
|
|
27
|
+
end
|
|
22
28
|
|
|
23
29
|
example.run
|
|
24
30
|
|
|
@@ -14,7 +14,7 @@ end
|
|
|
14
14
|
|
|
15
15
|
def sf(*args)
|
|
16
16
|
selector_description = args[0]
|
|
17
|
-
selector_entry =
|
|
17
|
+
selector_entry = Rspectacular.selectors.find { |regex, selector| selector_description.match regex }
|
|
18
18
|
|
|
19
19
|
fail "Cannot find selector for '#{selector_description}'. Please add it to the list of selectors." if selector_entry.nil?
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# Shamelessly stolen from http://ariejan.net/2011/09/24/rspec-speed-up-by-tweaking-ruby-garbage-collection/
|
|
4
4
|
#
|
|
5
|
-
module
|
|
5
|
+
module Rspectacular
|
|
6
6
|
class DeferredGarbageCollection
|
|
7
7
|
THRESHOLD = (ENV['DEFER_GC'] || 20.0).to_f
|
|
8
8
|
|
|
@@ -50,10 +50,10 @@ end
|
|
|
50
50
|
|
|
51
51
|
RSpec.configure do |config|
|
|
52
52
|
config.before(:all) do
|
|
53
|
-
|
|
53
|
+
Rspectacular::DeferredGarbageCollection.start
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
config.after(:all) do
|
|
57
|
-
|
|
57
|
+
Rspectacular::DeferredGarbageCollection.reconsider
|
|
58
58
|
end
|
|
59
59
|
end
|
|
@@ -7,7 +7,7 @@ if defined? RSpec::Rails
|
|
|
7
7
|
config.infer_spec_type_from_file_location! if config.respond_to?(:infer_spec_type_from_file_location!)
|
|
8
8
|
|
|
9
9
|
if File.join(Dir.pwd, 'spec', 'dummy', 'config', 'environment')
|
|
10
|
-
config.include
|
|
10
|
+
config.include Rspectacular::NamespacedEngineControllerRouteFix, :type => :controller
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
data/lib/rspectacular/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspectacular
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.54.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jfelchner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-11-
|
|
11
|
+
date: 2014-11-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
137
137
|
version: '0'
|
|
138
138
|
requirements: []
|
|
139
139
|
rubyforge_project: rspectacular
|
|
140
|
-
rubygems_version: 2.
|
|
140
|
+
rubygems_version: 2.4.2
|
|
141
141
|
signing_key:
|
|
142
142
|
specification_version: 4
|
|
143
143
|
summary: RSpec Support And Matchers
|