Skip to content

Commit

Permalink
Update for postgres 10 support
Browse files Browse the repository at this point in the history
  • Loading branch information
hasghari committed Mar 29, 2018
1 parent 47bb969 commit 059ecec
Show file tree
Hide file tree
Showing 11 changed files with 135 additions and 134 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
.ruby-gemset
.ruby-version
/vendor/
/spec/internal/log/*
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ env:
- STRATEGY=array
- STRATEGY=ltree
gemfile:
- gemfiles/activerecord_5.1.gemfile
- gemfiles/activerecord_5.1.5.gemfile
before_install: gem install bundler -v 1.10.6
4 changes: 2 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
appraise 'activerecord-5.1' do
gem 'activerecord', '~> 5.1.0'
appraise 'activerecord-5.1.5' do
gem 'activerecord', '5.1.5'
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
source "https://rubygems.org"

gem "appraisal"
gem "activerecord", "~> 5.1.0"
gem "activerecord", "5.1.5"

gemspec :path => "../"
117 changes: 117 additions & 0 deletions gemfiles/activerecord_5.1.5.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
PATH
remote: ..
specs:
parentry (1.0.1)
activerecord (>= 5.1)

GEM
remote: https://rubygems.org/
specs:
actionpack (5.1.5)
actionview (= 5.1.5)
activesupport (= 5.1.5)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.5)
activesupport (= 5.1.5)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activemodel (5.1.5)
activesupport (= 5.1.5)
activerecord (5.1.5)
activemodel (= 5.1.5)
activesupport (= 5.1.5)
arel (~> 8.0)
activesupport (5.1.5)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
appraisal (2.2.0)
bundler
rake
thor (>= 0.14.0)
arel (8.0.0)
builder (3.2.3)
coderay (1.1.2)
combustion (0.9.0)
activesupport (>= 3.0.0)
railties (>= 3.0.0)
thor (>= 0.14.6)
concurrent-ruby (1.0.5)
crass (1.0.3)
database_cleaner (1.6.2)
diff-lcs (1.3)
erubi (1.7.1)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
method_source (0.9.0)
mini_portile2 (2.3.0)
minitest (5.11.3)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
pg (0.21.0)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
rack (2.0.4)
rack-test (1.0.0)
rack (>= 1.0, < 3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.1.5)
actionpack (= 5.1.5)
activesupport (= 5.1.5)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.5.0)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-rails (3.7.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
thor (0.20.0)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)

PLATFORMS
ruby

DEPENDENCIES
activerecord (= 5.1.5)
appraisal
bundler (~> 1.10)
combustion (= 0.9.0)
database_cleaner (~> 1.6)
parentry!
pg (~> 0.21)
pry (~> 0.10)
rake (~> 10.0)
rspec-rails (~> 3.7)

BUNDLED WITH
1.14.6
116 changes: 0 additions & 116 deletions gemfiles/activerecord_5.1.gemfile.lock

This file was deleted.

8 changes: 4 additions & 4 deletions parentry.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Gem::Specification.new do |spec|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.require_paths = ['lib']

spec.add_dependency 'activerecord', '~> 5.1'
spec.add_dependency 'activerecord', '>= 5.1'

spec.add_development_dependency 'bundler', '~> 1.10'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rspec-rails', '~> 3.6'
spec.add_development_dependency 'pg', '~> 0.20'
spec.add_development_dependency 'combustion', '0.5.3'
spec.add_development_dependency 'rspec-rails', '~> 3.7'
spec.add_development_dependency 'pg', '~> 0.21'
spec.add_development_dependency 'combustion', '0.9.0'
spec.add_development_dependency 'database_cleaner', '~> 1.6'
spec.add_development_dependency 'pry', '~> 0.10'
end
File renamed without changes.
5 changes: 5 additions & 0 deletions spec/internal/db/database.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test:
adapter: postgresql
host: localhost
database: parentry_test
username: postgres
File renamed without changes.
14 changes: 4 additions & 10 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

require 'combustion'
Combustion.initialize! :active_record

require 'yaml'
require 'erb'
require 'active_record'
require 'pry'

ActiveRecord::Base.configurations = YAML.load(ERB.new(IO.read(File.dirname(__FILE__) + '/db/database.yml')).result)
ActiveRecord::Base.establish_connection(:test)
ActiveRecord::Migration.verbose = false

require 'combustion/database'
Combustion::Database.create_database(ActiveRecord::Base.configurations['test'])
load File.join(File.dirname(__FILE__), 'db', 'schema.rb')

require 'parentry'
require 'support/models'

Expand All @@ -27,7 +22,6 @@
DatabaseCleaner.strategy = :transaction

config.before(:suite) { DatabaseCleaner.clean_with :truncation }
config.after(:suite) { Combustion::Database.drop_database(ActiveRecord::Base.configurations['test']) }

config.before { DatabaseCleaner.start }
config.after { DatabaseCleaner.clean }
Expand Down

0 comments on commit 059ecec

Please sign in to comment.