Skip to content

Commit

Permalink
move oci-8 to Gemfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Stroop committed Feb 29, 2016
1 parent 613a030 commit af54420
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 11 deletions.
3 changes: 3 additions & 0 deletions Gemfile
@@ -1,4 +1,7 @@
source 'https://rubygems.org'

gem 'ruby-oci8', '~> 2.2.1', group: :development
gem 'rspec', '~> 3.4', group: :test

# Specify your gem's dependencies in marc_liberation.gemspec
gemspec
13 changes: 11 additions & 2 deletions README.md
Expand Up @@ -2,6 +2,8 @@

A set of methods for retrieving data from Voyager.

[![Circle CI](https://circleci.com/gh/pulibrary/voyager_helpers.svg?style=svg)](https://circleci.com/gh/pulibrary/voyager_helpers)

## Installation

On __Ubuntu__ systems, do [this](https://help.ubuntu.com/community/Oracle%20Instant%20Client). __All of it.__
Expand All @@ -10,7 +12,7 @@ Add configuration for VGER In `$ORACLE_HOME/network/admin/tnsnames.ora` (ask DBA

In `/etc/profile.d/oracle.sh` Append:

```
```bash
export ORACLE_LIB=$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
```
Expand All @@ -24,7 +26,14 @@ install the 11.2 client, which works fine with 10.2 Oracle servers.

## Configuration

The gem needs to know the database username, password and database name. Put
Add the `voyager_helpers` and `ruby-oci8` gems to your application's Gemfile

```ruby
gem 'ruby-oci8'
gem 'voyager_helpers'
```

The gem needs to know the database username, password and database name. Put
this somewhere:

```ruby
Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Expand Up @@ -3,14 +3,14 @@
require "bundler/gem_tasks"
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)
RSpec::Core::RakeTask.new(:all_specs)

RSpec::Core::RakeTask.new(:ci_specs) do |task|
RSpec::Core::RakeTask.new(:spec) do |task|
task.rspec_opts = '--tag ~skip_ci'
end

task :ci do
Rake::Task['ci_specs'].invoke
Rake::Task['spec'].invoke
end

task default: :ci
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.0.1.dev
0.1.0
6 changes: 6 additions & 0 deletions circle.yml
@@ -1,3 +1,9 @@
machine:
ruby:
version: 2.3.0
dependencies:
bundler:
without: [development, production]
test:
override:
- bundle exec rspec --color --require spec_helper --tag ~skip_ci --format documentation spec
1 change: 0 additions & 1 deletion lib/voyager_helpers.rb
Expand Up @@ -22,4 +22,3 @@ def configure

end # class << self
end # module VoyagerHelpers

2 changes: 1 addition & 1 deletion lib/voyager_helpers/liberator.rb
@@ -1,7 +1,7 @@
require 'oci8'
require 'marc'
require_relative 'queries'
require_relative 'oracle_connection'
require 'oci8' unless ENV['CI']

module VoyagerHelpers
class Liberator
Expand Down
4 changes: 3 additions & 1 deletion lib/voyager_helpers/oracle_connection.rb
Expand Up @@ -8,9 +8,11 @@ def connection(opts={})
VoyagerHelpers.config.db_name
)
yield conn
rescue NameError
return if ENV['CI']
ensure
conn.logoff unless conn.nil?
end

end # module Connection
end # module VoyagerHelpers
end # module VoyagerHelpers
6 changes: 5 additions & 1 deletion spec/unit/voyager_helpers/connection_spec.rb
@@ -1,6 +1,10 @@
require 'spec_helper'

describe OCI8, :skip_ci do
# These specs are left over from when this gem was included with MARC
# liberation. They are now skipped by `rake ci` and `rake spec`, and can't be
# run unless the database is configured as described in the README file.

describe 'OCI8', :skip_ci do

let(:holding_id) { 2281830 }
let(:item_id) { 23672 }
Expand Down
1 change: 0 additions & 1 deletion voyager_helpers.gemspec
Expand Up @@ -21,7 +21,6 @@ Gem::Specification.new do |spec|

spec.add_dependency 'activesupport', '~> 4.1'
spec.add_dependency 'marc', '~> 1.0'
spec.add_dependency 'ruby-oci8', '~> 2.2.1'
spec.add_dependency 'diffy', '~> 3.0.7'

end

0 comments on commit af54420

Please sign in to comment.