Skip to content

Commit

Permalink
Merge pull request #49 from connectpal/rails-5-gemfile
Browse files Browse the repository at this point in the history
Add Rails 5 to Travis, fix deprecation warnings
  • Loading branch information
rmehner committed Oct 21, 2016
2 parents 94fbd68 + 4bf2ad1 commit 1cb1f9b
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 8 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
@@ -1,13 +1,10 @@
sudo: false
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- 2.3.0
- rbx-2
- jruby-19mode
- jruby-9.0.0.0
script: "bundle exec rake test"

Expand All @@ -18,3 +15,12 @@ gemfile:
- gemfiles/4.0.gemfile
- gemfiles/4.1.gemfile
- gemfiles/4.2.gemfile

matrix:
allow_failures:
- rvm: rbx-2
include:
- rvm: 2.2.2
gemfile: gemfiles/5.0.gemfile
- rvm: 2.3.0
gemfile: gemfiles/5.0.gemfile
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,9 @@
### 2.0.0 / 2016-10-06 ###

* Drop support for EOL'd Ruby 1.9.x and Ruby 2.0, please use version 1.2.0 if you need support for older
Ruby versions.
* Fix compatibility to Ruby >=2.1 and Rails 5 (thanks @einzige)

### 1.2.0 / 2016-03-27 ###

* Allow to pass `max_size` to the helper (thanks @avokhmin)
Expand Down
13 changes: 11 additions & 2 deletions README.md
Expand Up @@ -10,7 +10,7 @@ This is the official Rails gem for [Transloadit](http://transloadit.com). It all
you to automate uploading files through the Transloadit REST API.

This gem provides browser integration. If you're looking to do video transcoding / image resizing
initiated from your own serverside Ruby code, please use the [ruby-sdk](https://github.com/transloadit/ruby-sdk)
initiated from your own serverside Ruby code, please use the [ruby-sdk](https://github.com/transloadit/ruby-sdk)
instead.

## Install
Expand Down Expand Up @@ -51,7 +51,7 @@ auth:
templates:
# template identified by template_id
s3_store: '4d2e...'

# template defined inline
image_resize:
steps:
Expand Down Expand Up @@ -289,6 +289,15 @@ def example_json
end
```

## Compatibility

At a minimum, this gem should work on MRI 2.3.0, 2.2.0, 2.1.0, Rubinius, and JRuby.
It may also work on older ruby versions, but support for those Rubies is not guaranteed.
If it doesn't work on one of the officially supported Rubies, please file a bug report.
Compatibility patches for other Rubies are welcome.

Testing against these versions is performed automatically by [Travis CI](https://travis-ci.org/transloadit/rails-sdk).

## License

MIT, see [LICENSE](LICENSE)
4 changes: 4 additions & 0 deletions gemfiles/5.0.gemfile
@@ -0,0 +1,4 @@
source "http://rubygems.org"

gem 'railties', '~> 5.0.0'
gemspec :path => '../'
6 changes: 5 additions & 1 deletion lib/transloadit/rails/params_decoder.rb
Expand Up @@ -4,7 +4,11 @@ module Transloadit::Rails::ParamsDecoder
extend ActiveSupport::Concern

included do
before_filter :decode_transloadit_json
if respond_to?(:before_action)
before_action :decode_transloadit_json
else
before_filter :decode_transloadit_json
end
end

def decode_transloadit_json
Expand Down
5 changes: 3 additions & 2 deletions transloadit-rails.gemspec
Expand Up @@ -15,7 +15,8 @@ Gem::Specification.new do |gem|
gem.summary = 'Official Rails gem for Transloadit'
gem.description = 'The transloadit-rails gem allows you to automate uploading files through the Transloadit REST API'

gem.required_rubygems_version = '>= 1.3.6'
gem.required_rubygems_version = '>= 2.1.0'
gem.required_ruby_version = '>= 2.1.0'
gem.rubyforge_project = 'transloadit-rails'

gem.files = `git ls-files`.split("\n")
Expand All @@ -26,7 +27,7 @@ Gem::Specification.new do |gem|

gem.add_dependency 'transloadit', '>= 1.1.1'
gem.add_dependency 'railties', '>= 3'
gem.add_dependency 'mime-types', '~> 2.99'
gem.add_dependency 'mime-types'

gem.add_development_dependency 'rake'
gem.add_development_dependency 'test-unit'
Expand Down

0 comments on commit 1cb1f9b

Please sign in to comment.