kylef / JSONWebToken.swift

Swift implementation of JSON Web Token (JWT).
http://jwt.io
BSD 2-Clause "Simplified" License
763 stars 226 forks source link

Ruby version and Gemfile #24

Closed maxfell closed 8 years ago

maxfell commented 8 years ago

While trying to fix the tests for https://github.com/kylef/JSONWebToken.swift/pull/23 I noticed that the tests still failed because Cocoapods’ dependencies suddenly required a ruby version above or equal to 2.2.2 even though I didn’t touch anything related to that.

The problem was that Travis always fetches the most recent version of the gems. In this case it was problematic because cocoapods depends on activesupport. To current version of activesupport is activesupport-5.0.0.beta2 which requires ruby >= 2.2.2..

I added a .ruby-version which Travis should pick up and added bundler to make sure dependency versions are locked unless clearly enforced. That should prevent these kinds of issues in the future.

maxfell commented 8 years ago

As you can see in the Travis build it is now using ruby 2.2.1p85. Yay!

kylef commented 8 years ago

I'd rather not add a dependency of bundler and two extra files to manage Ruby for a Swift project. The modern Xcode image on travis CI has the latest version of CocoaPods and xcpretty and then installing CocoaPods can be omitted.

Can you try the method I mentioned in https://github.com/kylef/JSONWebToken.swift/pull/23#issuecomment-181359679 along with completely removing the before_install step?