Skip to content

Commit

Permalink
Add Rails 5.0 support
Browse files Browse the repository at this point in the history
Fixes #100, closes #88, closes #92
  • Loading branch information
dnrce committed Jul 9, 2016
1 parent 7a931dc commit 4d5c6fe
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -6,6 +6,7 @@ rvm:
- 2.0.0
- 2.1
- 2.2
- 2.3.1
env:
- RAILS_VERSION='~> 3.0.0'
- RAILS_VERSION='~> 3.1.0'
Expand All @@ -28,5 +29,10 @@ matrix:
rvm: 1.8.7
- env: RAILS_VERSION='~> 4.2.0'
rvm: 1.9.2
include:
- env: RAILS_VERSION='~> 5.0.0'
rvm: 2.2.5
- env: RAILS_VERSION='~> 5.0.0'
rvm: 2.3.1
before_install:
- gem update bundler
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,4 +1,5 @@
* Put everything under the YamlDb module namespace
* Add Rails 5.0 support

## yaml_db 0.3.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -6,7 +6,7 @@ This can be used as a replacement for mysqldump or pg_dump, but only for the dat

Any database that has an ActiveRecord adapter should work.

This gem supports Rails 3.x and 4.x.
This gem supports Rails 3.x, 4.x, and 5.0.

[![Build Status](https://travis-ci.org/yamldb/yaml_db.svg?branch=master)](https://travis-ci.org/yamldb/yaml_db)

Expand Down
2 changes: 1 addition & 1 deletion lib/yaml_db/serialization_helper.rb
Expand Up @@ -184,7 +184,7 @@ def self.each_table_page(table, records_per_page=1000)
quoted_table_name = Utils.quote_table(table)

(0..pages).to_a.each do |page|
query = Arel::Table.new(table, ActiveRecord::Base).order(id).skip(records_per_page*page).take(records_per_page).project(Arel.sql('*'))
query = Arel::Table.new(table).order(id).skip(records_per_page*page).take(records_per_page).project(Arel.sql('*'))
records = ActiveRecord::Base.connection.select_all(query.to_sql)
records = Utils.convert_booleans(records, boolean_columns)
yield records
Expand Down
2 changes: 1 addition & 1 deletion yaml_db.gemspec
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |s|

s.required_ruby_version = ">= 1.8.7"

s.add_runtime_dependency "rails", ">= 3.0", "< 4.3"
s.add_runtime_dependency "rails", ">= 3.0", "< 5.1"
s.add_runtime_dependency "rake", ">= 0.8.7"

s.add_development_dependency "bundler", "~> 1.0"
Expand Down

0 comments on commit 4d5c6fe

Please sign in to comment.