Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare version 1.0 #31

Closed
wants to merge 29 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
035fadf
Move the build to GitHub Actions
laserlemon Apr 22, 2024
cc86382
Expand RSpec version support and contract Ruby version support
laserlemon Apr 22, 2024
ce1b20e
Remove Ruby versions from the build
laserlemon Apr 22, 2024
d1331c2
Build against all 14 RSpec 3.x minor versions
laserlemon Apr 22, 2024
e76d69f
Update RuboCop and generate a to-do
laserlemon Apr 22, 2024
7f47972
Remove the build name so we can see the RSpec version in the GitHub UI
laserlemon Apr 22, 2024
abf28df
Remove support for RSpec < 3.4
laserlemon Apr 22, 2024
5e39ada
Regenerate the MIT license
laserlemon Apr 22, 2024
c1ef486
Update readme badges
laserlemon Apr 22, 2024
b1fa33d
Regenerate the gemspec and RuboCop to-do
laserlemon Apr 22, 2024
450044f
Address all RuboCop to-dos
laserlemon Apr 22, 2024
028ab2d
Clean up the RSpec suite
laserlemon Apr 22, 2024
01a528c
Reformat the changelog
laserlemon Apr 22, 2024
e852f2e
Remove Travis reference from the contribution guidelines
laserlemon Apr 22, 2024
070dd08
Refactor error class definitions
laserlemon Apr 22, 2024
53cbcd8
Add the missing changelog entry for version 0.0.9
laserlemon Apr 22, 2024
d0e9fa6
Populate the "unreleased" section of the changelog
laserlemon Apr 22, 2024
990a0ae
Only accept a block for wait_for and wait.for methods
laserlemon Apr 22, 2024
3b503fb
Refactor raising on non-block arguments passed to wait_for
laserlemon Apr 22, 2024
1a08e84
Run RuboCop before RSpec when running the default Rake task
laserlemon Apr 22, 2024
0ba6a28
Stop using Ruby's dangerous Timeout API
laserlemon Apr 23, 2024
52afc02
Attempt to support block matchers
laserlemon Apr 23, 2024
c04e13d
Refactor block matcher support to be RSpec 3.10 friendly
laserlemon Apr 23, 2024
c541620
Try to reproduce an old issue dealing with stale matcher data
laserlemon Apr 23, 2024
eea2033
Target version 1.0.0.rc1
laserlemon Apr 24, 2024
4dacf2e
Update RSpec source reference comments
laserlemon Apr 24, 2024
ef4a899
Refactor to simplify the handler to only accept blocks
laserlemon Apr 24, 2024
9d3a54e
Refactor handler args
laserlemon Apr 24, 2024
0286575
Introduce a configuration controlling whether to clone wait_for matchers
laserlemon Apr 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update RSpec source reference comments
laserlemon committed Apr 24, 2024
commit 4dacf2e8d2b363660196583d1d4b02eb47537b0d
2 changes: 1 addition & 1 deletion lib/rspec/wait.rb
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ module RSpec
module Wait
module_function

# From: https://github.com/rspec/rspec-expectations/blob/v3.0.0/lib/rspec/expectations/syntax.rb#L72-L74
# From: https://github.com/rspec/rspec-expectations/blob/v3.4.0/lib/rspec/expectations/syntax.rb#L72-L74
def wait_for(value = Target::UndefinedValue, &block)
Target.for(value, block)
end
4 changes: 2 additions & 2 deletions lib/rspec/wait/handler.rb
Original file line number Diff line number Diff line change
@@ -29,12 +29,12 @@ def handle_matcher(target, matcher, *args, &block)
end
end

# From: https://github.com/rspec/rspec-expectations/blob/v3.0.0/lib/rspec/expectations/handler.rb#L44-L63
# From: https://github.com/rspec/rspec-expectations/blob/v3.4.0/lib/rspec/expectations/handler.rb#L46-L65
class PositiveHandler < RSpec::Expectations::PositiveExpectationHandler
extend Handler
end

# From: https://github.com/rspec/rspec-expectations/blob/v3.0.0/lib/rspec/expectations/handler.rb#L66-L93
# From: https://github.com/rspec/rspec-expectations/blob/v3.4.0/lib/rspec/expectations/handler.rb#L68-L95
class NegativeHandler < RSpec::Expectations::NegativeExpectationHandler
extend Handler
end
12 changes: 6 additions & 6 deletions lib/rspec/wait/target.rb
Original file line number Diff line number Diff line change
@@ -6,25 +6,25 @@ module Wait
# RSpec::Expectations::ExpectationTarget class and allows the inclusion of
# RSpec::Wait options via RSpec::Wait::Proxy.
class Target < RSpec::Expectations::ExpectationTarget
# From: https://github.com/rspec/rspec-expectations/blob/v3.0.0/lib/rspec/expectations/expectation_target.rb#L22
# From: https://github.com/rspec/rspec-expectations/blob/v3.4.0/lib/rspec/expectations/expectation_target.rb#L22
UndefinedValue = Module.new

# From: https://github.com/rspec/rspec-expectations/blob/v3.0.0/lib/rspec/expectations/expectation_target.rb#L30-L41
# From: https://github.com/rspec/rspec-expectations/blob/v3.4.0/lib/rspec/expectations/expectation_target.rb#L30-L41
def self.for(value, block, options = {})
unless UndefinedValue.equal?(value) && block
raise ArgumentError, "The wait_for method only accepts a block."
raise ArgumentError, "You must pass a block to `wait_for`."
end

new(block, options)
end

# From: https://github.com/rspec/rspec-expectations/blob/v3.0.0/lib/rspec/expectations/expectation_target.rb#L25-L27
# From: https://github.com/rspec/rspec-expectations/blob/v3.4.0/lib/rspec/expectations/expectation_target.rb#L25-L27
def initialize(target, options)
@wait_options = options
super(target)
end

# From: https://github.com/rspec/rspec-expectations/blob/v3.0.0/lib/rspec/expectations/expectation_target.rb#L53-L54
# From: https://github.com/rspec/rspec-expectations/blob/v3.4.0/lib/rspec/expectations/expectation_target.rb#L52-L55
def to(matcher = nil, message = nil, &block)
prevent_operator_matchers(:to) unless matcher

@@ -33,7 +33,7 @@ def to(matcher = nil, message = nil, &block)
end
end

# From: https://github.com/rspec/rspec-expectations/blob/v3.0.0/lib/rspec/expectations/expectation_target.rb#L66-L67
# From: https://github.com/rspec/rspec-expectations/blob/v3.4.0/lib/rspec/expectations/expectation_target.rb#L65-L68
def not_to(matcher = nil, message = nil, &block)
prevent_operator_matchers(:not_to) unless matcher