Sinatra: Plan for Rails 5.0 compatible release?

Created on 11 Jul 2016  路  13Comments  路  Source: sinatra/sinatra

Right now Sinatra users must run master if they want to run inside a Rails 5 process. What are the issues blocking a gem release?

Most helpful comment

@zzak Thanks for the summary. I'll leave this issue open for others to find if they have the same question.

All 13 comments

At the moment:

  • sinatra-contrib has 14 open issues and 9 pull requests that need to be cleaned up for the next release, including a blocking issue in the Namespace extension related to the Mustermann changes.
  • mustermann may need to change due to this blocking issue, as well there is another namespace conflict we're trying to resolve. So that will also need a release
  • Lastly, rack-protection has 20 open issues and 8 pull requests that need attention, and will require a release before one is made to Sinatra.

After these peripheral things are cleaned up, I will merge the rack-protection and sinatra-contrib gems into the repo -- and once everything is green: make a release.

I don't want to cut a pre-release until those gems are ready, and even if I did it won't make a difference for bundler users because ~> 2.0 won't resolve to a pre-release candidate and users will still be stuck with Sinatra 1.x -- otherwise they have to specifically choose the pre-release (such as gem 'sinatra', '2.0.0.rc1' in their gemfile and at that point there isn't much difference from a git sha as far as I'm concerned.

The master branch is quiet and stable, has been for a while, so please just bare with me.

Those interested in wanting speed up the release should help focus on the peripheral gems, which are still pivotal to the rest of the sinatra community.

@zzak Thanks for the summary. I'll leave this issue open for others to find if they have the same question.

I don't want to cut a pre-release until those gems are ready, and even if I did it won't make a difference for bundler users because ~> 2.0 won't resolve to a pre-release candidate and users will still be stuck with Sinatra 1.x -- otherwise they have to specifically choose the pre-release (such as gem 'sinatra', '2.0.0.rc1' in their gemfile and at that point there isn't much difference from a git sha as far as I'm concerned.

This actually makes quite a difference for me. I operate inside a large enterprise and am running Sinatra as a dependency on a Rail 5 application. Due to restrictions presented by our deployed environment, we cannot reliably use git-based dependencies in our Gemfile and must instead rely on properly packaged rubygems. Even creating a 2.0.0-alpha version of this gem would make my life (and I'm sure the lives of other similarly restricted enterprise users) much easier.

@wadetandy Sorry for the trouble, if your company has restrictions on git dependencies, I would suggest building the gem and hosting it within your company.

Bundler even provides a tool to make this task simpler.

Just a quick heads up: right now you cannot specify sinatra as a git dependency, because of commit 13fec9cf160946ee7d044b7728b2b56cb38f6059 - dependency resolution will fail because it cannot find that version of rack-protection on rubygems. You have to specify a specific commit for it to work, e.g. gem "sinatra", git: "https://github.com/sinatra/sinatra.git", require: nil, ref: "a5da6fa82c46436f59ae482d07c1752ab908c852"

@fschwahn You will have to also build and install the rack-protection gem from source, otherwise you must put the following line in your Gemfile (along with gem 'sinatra', github: 'sinatra/sinatra'):

gem 'rack-protection', github: 'sinatra/rack-protection'

@zzak thank you for all the work you've done over the past few weeks, you're killing it <3

Regarding the dependent gems, sinatra-contrib has been merged and rack-protection and mustermann have 3 and 4 open issues respectively. Could you update us on what remains as blocking? :)

@connorshea Thanks, stay tuned!

Once rack-protection is cleaned up I will cut pre-releases~

Because of this issue, it seems like you cannot also use sinatra-contrib along side the beta release or running git master sinatra/sinatra. This seems to be the fact that sinitra-contrib depends on sinatra 1.4.0 which won't run against rails 5. Anyone have solutions to resolve?

'ruby/2.3.0/rubygems/specification.rb:2284:in

 `raise_if_conflicts': Unable to activate sinatra-contrib-1.4.7, because sinatra-2.0.0.beta2 conflicts with sinatra (~> 1.4.0) (Gem::ConflictError)
    from /Users/mwy1u5/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:1407:in `activate'
    from /Users/mwy1u5/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems.rb:196:in `rescue in try_activate'
    from /Users/mwy1u5/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems.rb:193:in `try_activate'
    from /Users/mwy1u5/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:125:in `rescue in require'
    from /Users/mwy1u5/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
    from ./spec/fake_services/fake_auth_services.rb:2:in `<main>'

@zzak Any plans for a stable release? The 2.0.0.beta2 blog post states that it's an unstable release. We'd like to upgrade to Rails 5, but don't feel comfortable using an unstable release for our production app. Is there anything contributors can do to help push towards a stable release?

@Topher33 There's a separate 2.0.0.beta2 of the sinatra-contrib gem. Installing both of these from Rubygems (i.e. not from git master) should do the trick.

# Gemfile

source 'https://rubygems.org'

gem 'sinatra', '~> 2.0.0.beta2'
gem 'sinatra-contrib', '~> 2.0.0.beta2'

@mwpastore thanks - we ended up just working around this issue. we mainly wanted the cookies functionality on contrib. redesigned and cut this portion out. appreciate the response!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AvailCat picture AvailCat  路  4Comments

za3k picture za3k  路  5Comments

ricardovsilva picture ricardovsilva  路  7Comments

shreeve picture shreeve  路  5Comments

mediafinger picture mediafinger  路  7Comments