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

Compatibility with older servers that support #rewind. #515

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

olleolleolle
Copy link
Contributor

@olleolleolle olleolleolle commented Jul 3, 2024

This PR is an experiment to make slack-ruby-client able to be used with Webrick via rackup gem.

The "rewind-read-rewind" used here:

def body
@body ||= begin
input = http_request.body
input.rewind
body = input.read
input.rewind
body
end
end

...is no longer supported.

This change is about making the code compatible with older servers that offered rewind.

@dangerpr-bot
Copy link

dangerpr-bot commented Jul 3, 2024

1 Warning
⚠️ There're library changes, but not tests. That's OK as long as you're refactoring existing code.

Generated by 🚫 Danger

@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9776811795

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 30 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.08%) to 89.161%

Files with Coverage Reduction New Missed Lines %
spec/slack/real_time/concurrency/clients/async_spec.rb 1 87.5%
spec/slack/real_time/concurrency/with_concurrency_spec.rb 1 80.0%
lib/slack/real_time/concurrency/async.rb 28 1.39%
Totals Coverage Status
Change from base Build 7789505062: -0.08%
Covered Lines: 5092
Relevant Lines: 5711

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9776811795

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 30 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.002%) to 89.239%

Files with Coverage Reduction New Missed Lines %
spec/slack/real_time/concurrency/clients/async_spec.rb 1 87.5%
spec/slack/real_time/concurrency/with_concurrency_spec.rb 1 80.0%
lib/slack/real_time/concurrency/async.rb 28 1.39%
Totals Coverage Status
Change from base Build 7789505062: 0.002%
Covered Lines: 5100
Relevant Lines: 5715

💛 - Coveralls

olleolleolle added a commit to olleolleolle/slack-ruby-client that referenced this pull request Jul 3, 2024
@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9777240612

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 28 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.08%) to 89.161%

Files with Coverage Reduction New Missed Lines %
lib/slack/real_time/concurrency/async.rb 28 1.39%
Totals Coverage Status
Change from base Build 7789505062: -0.08%
Covered Lines: 5092
Relevant Lines: 5711

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9777240612

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 28 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.002%) to 89.239%

Files with Coverage Reduction New Missed Lines %
lib/slack/real_time/concurrency/async.rb 28 1.39%
Totals Coverage Status
Change from base Build 7789505062: 0.002%
Covered Lines: 5100
Relevant Lines: 5715

💛 - Coveralls

olleolleolle added a commit to olleolleolle/slack-ruby-client that referenced this pull request Jul 3, 2024
@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9777379775

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.08%) to 89.161%

Totals Coverage Status
Change from base Build 7789505062: -0.08%
Covered Lines: 5092
Relevant Lines: 5711

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9777379775

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 89.239%

Totals Coverage Status
Change from base Build 7789505062: 0.002%
Covered Lines: 5100
Relevant Lines: 5715

💛 - Coveralls

olleolleolle added a commit to olleolleolle/slack-ruby-client that referenced this pull request Jul 3, 2024
@olleolleolle olleolleolle changed the title request.rb: Compatibility with rackup's WEBRick handler Compatibility with older servers that support #rewind. Jul 3, 2024
olleolleolle added a commit to olleolleolle/slack-ruby-client that referenced this pull request Jul 3, 2024
@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9777483025

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.08%) to 89.161%

Totals Coverage Status
Change from base Build 7789505062: -0.08%
Covered Lines: 5092
Relevant Lines: 5711

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9777501826

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 28 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.08%) to 89.161%

Files with Coverage Reduction New Missed Lines %
lib/slack/real_time/concurrency/async.rb 28 1.39%
Totals Coverage Status
Change from base Build 7789505062: -0.08%
Covered Lines: 5092
Relevant Lines: 5711

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9777501826

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 28 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.08%) to 89.161%

Files with Coverage Reduction New Missed Lines %
lib/slack/real_time/concurrency/async.rb 28 1.39%
Totals Coverage Status
Change from base Build 7789505062: -0.08%
Covered Lines: 5092
Relevant Lines: 5711

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9777483025

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 89.239%

Totals Coverage Status
Change from base Build 7789505062: 0.002%
Covered Lines: 5100
Relevant Lines: 5715

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9777483025

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 89.239%

Totals Coverage Status
Change from base Build 7789505062: 0.002%
Covered Lines: 5100
Relevant Lines: 5715

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9777501826

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 28 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.002%) to 89.239%

Files with Coverage Reduction New Missed Lines %
lib/slack/real_time/concurrency/async.rb 28 1.39%
Totals Coverage Status
Change from base Build 7789505062: 0.002%
Covered Lines: 5100
Relevant Lines: 5715

💛 - Coveralls

@olleolleolle olleolleolle changed the title Compatibility with older servers that support #rewind. Compatibility with older servers that support #rewind. Jul 3, 2024
@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9777677201

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 30 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.08%) to 89.161%

Files with Coverage Reduction New Missed Lines %
spec/slack/real_time/concurrency/clients/async_spec.rb 1 87.5%
spec/slack/real_time/concurrency/with_concurrency_spec.rb 1 80.0%
lib/slack/real_time/concurrency/async.rb 28 1.39%
Totals Coverage Status
Change from base Build 7789505062: -0.08%
Covered Lines: 5092
Relevant Lines: 5711

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9777677201

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 30 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.08%) to 89.161%

Files with Coverage Reduction New Missed Lines %
spec/slack/real_time/concurrency/clients/async_spec.rb 1 87.5%
spec/slack/real_time/concurrency/with_concurrency_spec.rb 1 80.0%
lib/slack/real_time/concurrency/async.rb 28 1.39%
Totals Coverage Status
Change from base Build 7789505062: -0.08%
Covered Lines: 5092
Relevant Lines: 5711

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 9777677201

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 30 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.002%) to 89.239%

Files with Coverage Reduction New Missed Lines %
spec/slack/real_time/concurrency/clients/async_spec.rb 1 87.5%
spec/slack/real_time/concurrency/with_concurrency_spec.rb 1 80.0%
lib/slack/real_time/concurrency/async.rb 28 1.39%
Totals Coverage Status
Change from base Build 7789505062: 0.002%
Covered Lines: 5100
Relevant Lines: 5715

💛 - Coveralls

@dblock
Copy link
Collaborator

dblock commented Jul 3, 2024

If you don't .rewind you end up with incorrect data, don't you? I think we need an integration test for the various servers at the very least before changing this.

Coveralls is being annoying re-running on every commit... maybe you know how to turn this off?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants