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

Sinatra 2.0.0 alpha [redux] #1033

Merged
merged 20 commits into from Jan 24, 2016

Conversation

Projects
None yet
8 participants
@TrevorBramble
Contributor

TrevorBramble commented Sep 11, 2015

(Reopening #1029 as a branch on core project to allow collaborator activity)
(Holy crap I named the branch with "2.2.0" but I'm not switching it around again. Sorry!)

Here we go!

The Plan:

  • Drop support for Rubies earlier than 2.2 (MRI and equivalent implementations)
  • Change nothing else
  • Move 1.4 development to the 1.4.x branch, where releases will come from until 2.0 is fully released

Tasks:

  • Revise Travis matrix
  • Update gem version
  • Add Ruby version dependency to gemspec
  • Raise Rack version requirement to ~> 2.0, fix new incompatibilities
  • Remove overt conditional statements for dropped Rubies
  • Update English README to communicate new set of supported versions related notes
  • Coordinate translations for non-English READMEs
  • Sweep outstanding issues for 1.4.x changes before shunting to maintenance branch
  • ...figure out what else should be done...

TrevorBramble added some commits Jul 27, 2015

Raise supported/expected dependency versions
Drop Travis testing for Ruby versions lower than 2.2 (or equivalent).
Drop minimum Ruby version to 2.2.0
Put the baseline at 2.2.0 because Ruby is now using SemVer and any 2.2.x
release should still be compatible.

@zzak zzak changed the title from Sinatra 2.2.0 alpha [redux] to Sinatra 2.0.0 alpha [redux] Sep 11, 2015

kgrz and others added some commits Sep 12, 2015

Remove 1.8 specific handling in `time_for`
Ruby 1.8 didn't support `to_time` method on a Time object, and so there
was custom conversion of Date, DateTime objects to a Time object. This
is no more a problem.
Remove check for availability of URI::Parser
Related Commit: 4a02a75

In the above commit, the URI parser instance was switched based on the
availability of the `Parser` module because Ruby 1.9.2 and above
deprecated the usage of URI::decode in favour of URI::Parser#unescape.

This change removes this switch since this is not required anymore.
Revert special char in heredoc fix specific to 1.9.2
This reverts commit 3c99033. It was
made to avoid a syntax error on Ruby 1.9.2. A tick in a heredoc now
doesn't raise an error under Ruby 2.2.0.

@TrevorBramble TrevorBramble referenced this pull request Sep 13, 2015

Closed

Sinatra 2.0.0 alpha #1029

3 of 9 tasks complete

TrevorBramble added some commits Sep 15, 2015

Merge pull request #1036 from kgrz/remove-19-18-specific-workarounds
Remove some 1.9.x 1.8.x specific workarounds
Removed intermediary `path` var in send_file tests
When later referenced, `path` would have a value of the current file,
not the "uploaded" test file. Also, it looked useless?
@burningTyger

This comment has been minimized.

Show comment
Hide comment
@burningTyger

burningTyger Oct 15, 2015

Member

Looking at the Gemfile I see all the dependencies on templates. Would it be a good idea to drop all dependencies and let the user require them?

Member

burningTyger commented Oct 15, 2015

Looking at the Gemfile I see all the dependencies on templates. Would it be a good idea to drop all dependencies and let the user require them?

<dd>
2.x is fully supported and recommended. There are currently no plans to drop
official support for it.
2.2 is fully supported and recommended. There are currently no plans to

This comment has been minimized.

@burningTyger

burningTyger Oct 15, 2015

Member

why not support the ruby version available on the release date? i.e. 2.3 if ruby has had a release before sinatra 2.0.

@burningTyger

burningTyger Oct 15, 2015

Member

why not support the ruby version available on the release date? i.e. 2.3 if ruby has had a release before sinatra 2.0.

kgrz added some commits Oct 29, 2015

Revert 855208a.
This causes conflicts with the way the instance variable `@file` in the
test file works with the scope of `mock_app`. Without assigning the
`@file` instance variable to a temporary variable—in this case `path`—we
won't be able to access the instance var inside the mock_app > get context.
Use Rack::File#serving method
The API of `Rack::File#serving` has been changed to take two
arguments: `request` and `path` of the file. `Rack::File` would then
interpret the file path based on the root path supplied to it's `#new`
method, and the `path` value passed into the `#serving` method.

This change also sets the root path to the app root path.

This reverts the earlier change to use `Rack::File#call` method because
it appends the route path fragment to the root path provided to
`Rack::File#new` and considers that as the file path for the static
file. Also, it doesn't work with POST requests of static files, which
Sinatra does. So we can't quite use it without modification of the
method.
Rack::File#serving now returns Rack::File::Iterator
Background:
==========

In the `body` Sinatra helper, we DON'T delete the 'Content-Length'
header when:

1. the request is a HEAD request OR
2. If the "value" is a `Rack::File` type OR
3. If the "value" is a `Stream`

where "value" is the argument passed to the `body` helper method. (Refer
#739 and
#770)

Post Rack 2.0, the `Rack::File#serving` method now returns a response
array with the second argument of type `Rack::File::Iterator`. This
change breaks this conditional and deletes the `Content-Length` header.
This changes fixes this problem.
@twalpole

This comment has been minimized.

Show comment
Hide comment
@twalpole

twalpole Dec 17, 2015

this breaks #send_file since it means the path passed to #send_file is no longer the file that gets sent. Instead it tries to send the file identified by the path_info in the request. Maybe it should be calling serving instead?

this breaks #send_file since it means the path passed to #send_file is no longer the file that gets sent. Instead it tries to send the file identified by the path_info in the request. Maybe it should be calling serving instead?

This comment has been minimized.

Show comment
Hide comment
@kgrz

kgrz Dec 18, 2015

Member

There's a PR for this #1045

Member

kgrz replied Dec 18, 2015

There's a PR for this #1045

@beanieboi

This comment has been minimized.

Show comment
Hide comment
@beanieboi

beanieboi Jan 16, 2016

hey, i would love to help.

it feels like the TODO list is a little outdated, would you mind updating the TODO list so people can pickup tasks?

thanks a bunch!
ben

beanieboi commented Jan 16, 2016

hey, i would love to help.

it feels like the TODO list is a little outdated, would you mind updating the TODO list so people can pickup tasks?

thanks a bunch!
ben

zzak added a commit that referenced this pull request Jan 24, 2016

@zzak zzak merged commit 2af9910 into master Jan 24, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@zzak zzak deleted the 2.2.0-alpha branch Jan 24, 2016

@ericboehs

This comment has been minimized.

Show comment
Hide comment
@ericboehs

ericboehs Jul 1, 2016

Would it make sense to cut an alpha release on rubygems?

ericboehs commented Jul 1, 2016

Would it make sense to cut an alpha release on rubygems?

@b264

This comment has been minimized.

Show comment
Hide comment

b264 commented Jul 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment