Skip to content
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

[WIP] A new version that target Rails 4.2+ #32

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ rvm:
- 2.0
- 2.1
gemfile:
- gemfiles/Gemfile.ar-3.2
- gemfiles/Gemfile.ar-4.0
- gemfiles/Gemfile.ar-4.1
- gemfiles/Gemfile.ar-4.2
- gemfiles/Gemfile.ar-edge

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ task :default => :spec

namespace :spec do
task :all do
%w(3.2 4.0 edge).each do |ar_version|
%w(4.2 edge).each do |ar_version|
[1, 0].each do |timezone_aware|
command = %W{
BUNDLE_GEMFILE=gemfiles/Gemfile.ar-#{ar_version}
Expand Down
2 changes: 1 addition & 1 deletion activerecord-typedstore.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.add_dependency 'activerecord', '>= 3.2', '< 5'
spec.add_dependency 'activerecord', '>= 4.2', '< 5'

spec.add_development_dependency 'bundler', '~> 1.3'
spec.add_development_dependency 'rake', '~> 0'
Expand Down
11 changes: 0 additions & 11 deletions gemfiles/Gemfile.ar-3.2

This file was deleted.

11 changes: 0 additions & 11 deletions gemfiles/Gemfile.ar-4.0

This file was deleted.

11 changes: 0 additions & 11 deletions gemfiles/Gemfile.ar-4.1

This file was deleted.

1 change: 1 addition & 0 deletions gemfiles/Gemfile.ar-4.2
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ gem 'pg', '~> 0.11'
gem 'mysql2'
gem 'database_cleaner'
gem 'coveralls', require: false
gem 'pry-byebug'
95 changes: 0 additions & 95 deletions lib/active_record/typed_store/ar_32_fallbacks.rb

This file was deleted.

6 changes: 1 addition & 5 deletions lib/active_record/typed_store/column.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Column < ::ActiveRecord::ConnectionAdapters::Column
attr_reader :array, :blank

def initialize(name, type, options={})
@name = name
@name = name.to_s
@type = type
@array = options.fetch(:array, false)
@default = extract_default(options.fetch(:default, nil))
Expand Down Expand Up @@ -43,10 +43,6 @@ def type_cast(value, map=true)
return value.to_s unless value.nil? && (null || array)
end

if IS_AR_3_2 && type == :datetime && value.is_a?(DateTime)
return super(value.iso8601)
end

defined?(super) ? super(value) : type_cast_from_database(value)
end

Expand Down
Loading