Skip to content

Commit

Permalink
Updated README. Added coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Naiman committed May 9, 2018
1 parent 7027c25 commit fed305a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Sequel::Postgres::DeferConstraints

[![Gem Version](https://badge.fury.io/rb/sequel-pg_defer_constraints.svg)](https://rubygems.org/gems/sequel-pg_defer_constraints)
[![Build Status](https://travis-ci.org/gabynaiman/sequel-pg_defer_constraints.svg?branch=master)](https://travis-ci.org/gabynaiman/sequel-pg_defer_constraints)
[![Coverage Status](https://coveralls.io/repos/github/gabynaiman/sequel-pg_defer_constraints/badge.svg?branch=master)](https://coveralls.io/github/gabynaiman/sequel-pg_defer_constraints?branch=master)
[![Code Climate](https://codeclimate.com/github/gabynaiman/sequel-pg_defer_constraints.svg)](https://codeclimate.com/github/gabynaiman/sequel-pg_defer_constraints)
[![Dependency Status](https://gemnasium.com/gabynaiman/sequel-pg_defer_constraints.svg)](https://gemnasium.com/gabynaiman/sequel-pg_defer_constraints)

Disable and enable PG constraints

## Installation
Expand Down
5 changes: 2 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "bundler/gem_tasks"
require 'bundler/gem_tasks'
require 'rake/testtask'

Rake::TestTask.new(:spec) do |t|
Expand All @@ -14,5 +14,4 @@ Rake::TestTask.new(:spec) do |t|
t.options << "-l #{ENV['LINE']} " if ENV['LINE'] && ENV['TEST']
end


task :default => :spec
task :default => :spec
1 change: 1 addition & 0 deletions sequel-pg_defer_constraints.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

spec.add_runtime_dependency 'sequel', '>= 5'

spec.add_development_dependency 'pg'
spec.add_development_dependency 'bundler', '~> 1.12'
spec.add_development_dependency 'rake', '~> 11.0'
Expand Down
5 changes: 5 additions & 0 deletions spec/coverage_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'simplecov'
require 'coveralls'

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]
SimpleCov.start
7 changes: 3 additions & 4 deletions spec/minitest_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'coverage_helper'
require 'minitest/autorun'
require 'minitest/colorin'
require 'pry-nav'
Expand All @@ -6,18 +7,16 @@
require 'sequel/extensions/pg_defer_constraints'

driver = {
host: 'localhost',
port: 5432,
database: 'pg_defer_constraints_test',
username: 'postgres',
password: 'password'
}

if RUBY_ENGINE == 'jruby'
driver[:adapter] = "jdbc:postgresql"
driver[:adapter] = 'jdbc:postgresql'
require 'jdbc/postgres'
else
driver[:adapter] = "postgres"
driver[:adapter] = 'postgres'
require 'pg'
end

Expand Down
2 changes: 1 addition & 1 deletion spec/pg_defer_constraints_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@
DB[:people].count.must_equal 0
end

end
end

0 comments on commit fed305a

Please sign in to comment.