bsi-pipeline 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +0 -0
- data/.gitignore +23 -0
- data/.travis.yml +0 -0
- data/Gemfile +4 -0
- data/Guardfile +11 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +8 -0
- data/bsi-pipeline.gemspec +36 -0
- data/lib/bsi-pipeline/importer.rb +97 -0
- data/lib/bsi-pipeline/models.rb +110 -0
- data/lib/bsi-pipeline/version.rb +5 -0
- data/lib/bsi-pipeline.rb +20 -0
- data/spec/add_batch_spec.rb +80 -0
- data/spec/bsi_pipeline_spec.rb +1 -0
- data/spec/factories/specimen.rb +32 -0
- data/spec/importer_spec.rb +31 -0
- data/spec/models_spec.rb +8 -0
- data/spec/spec_helper.rb +25 -0
- data/spec/support/factory_girl.rb +13 -0
- metadata +269 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0fa6863806c23dccbf29d3a2084e673d53d1a666
|
4
|
+
data.tar.gz: d2cb13ddf0cafa07bfa4b5a91b9f7b9395e7e9b5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1221f0e7c45e2ea7e97995f4943e9b133ee5786e2d905ba3ca90cf30061806c95f699a67bfdbd379651bba86830e85961c453bd2f4b644525ca4fef8872e120e
|
7
|
+
data.tar.gz: e9d4a21396e09d1ff348da06cb0ef44c02c826047f13ca4cee6f6a1b95900d5058631593ec5d9f0969f81cec2a5414082402f4919b218a714a83499b4c190128
|
data/.coveralls.yml
ADDED
File without changes
|
data/.gitignore
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
*.swp
|
4
|
+
.bundle
|
5
|
+
.config
|
6
|
+
.yardoc
|
7
|
+
Gemfile.lock
|
8
|
+
InstalledFiles
|
9
|
+
_yardoc
|
10
|
+
coverage
|
11
|
+
doc/
|
12
|
+
lib/bundler/man
|
13
|
+
pkg
|
14
|
+
rdoc
|
15
|
+
spec/reports
|
16
|
+
test/tmp
|
17
|
+
test/version_tmp
|
18
|
+
tmp
|
19
|
+
*.bundle
|
20
|
+
*.so
|
21
|
+
*.o
|
22
|
+
*.a
|
23
|
+
mkmf.log
|
data/.travis.yml
ADDED
File without changes
|
data/Gemfile
ADDED
data/Guardfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Elijah Christensen
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Bsi::Pipeline
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'bsi-pipeline'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install bsi-pipeline
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it ( https://github.com/[my-github-username]/bsi-pipeline/fork )
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'bsi-pipeline/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "bsi-pipeline"
|
8
|
+
spec.version = Bsi::Pipeline::VERSION
|
9
|
+
spec.authors = ["Elijah Christensen"]
|
10
|
+
spec.email = ["ejd.christensen@gmail.com"]
|
11
|
+
spec.summary = %q{plugin for pipeline that provides importers and models for migrating data to bsi}
|
12
|
+
spec.description = spec.summary
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_development_dependency "rspec-nc"
|
25
|
+
spec.add_development_dependency "guard"
|
26
|
+
spec.add_development_dependency "guard-rspec"
|
27
|
+
spec.add_development_dependency "terminal-notifier-guard"
|
28
|
+
spec.add_development_dependency "pry"
|
29
|
+
spec.add_development_dependency "pry-remote"
|
30
|
+
spec.add_development_dependency "pry-nav"
|
31
|
+
spec.add_development_dependency "coveralls"
|
32
|
+
spec.add_development_dependency "factory_girl"
|
33
|
+
|
34
|
+
spec.add_runtime_dependency "etl-pipeline"
|
35
|
+
spec.add_runtime_dependency "rbc"
|
36
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
module Pipeline
|
2
|
+
module BSI
|
3
|
+
|
4
|
+
module Importer
|
5
|
+
|
6
|
+
class DataEntryBatch
|
7
|
+
attr_accessor :type, :properties, :id, :specimens, :client
|
8
|
+
def initialize(client, batch_type, batch_properties)
|
9
|
+
@type = batch_type
|
10
|
+
@properties = batch_properties
|
11
|
+
@bsi = client
|
12
|
+
@id = @bsi.batch.create(batch_type, batch_properties)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class AddBatch < DataEntryBatch
|
17
|
+
attr_accessor :seminal_parents
|
18
|
+
|
19
|
+
def initialize(client, batch_properties)
|
20
|
+
super client, 'A', batch_properties
|
21
|
+
end
|
22
|
+
|
23
|
+
def type
|
24
|
+
'Add'
|
25
|
+
end
|
26
|
+
|
27
|
+
def add_specimens(specimens)
|
28
|
+
@specimens = specimens
|
29
|
+
format
|
30
|
+
@bsi.batch.addVials( @id, specimens.map{ |s| s.to_bfh } )
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
|
34
|
+
def format
|
35
|
+
# Find out how many seminal parents there are
|
36
|
+
num_seminal_parents = @specimens.select{|s| ['N/A', ''].include?( s.parent_id.to_s )}.length
|
37
|
+
|
38
|
+
fails = 0
|
39
|
+
begin
|
40
|
+
# Reserve Sample ID's for all the seminal parent's
|
41
|
+
# Returns and array of strings with both the sampleID and the sequence number in the format: AAA000000 0000
|
42
|
+
# Only keep first 6 characters which represent the sample id's (remove the sequence suffix)
|
43
|
+
@seminal_parents = @bsi.batch.reserveAvailableBsiIds( @id, 'LAA000000', num_seminal_parents ).map{|i| i[0..-6]} if num_seminal_parents > 0
|
44
|
+
# Not sure why I've been getting this error periodically, but it happens
|
45
|
+
rescue NoMethodError
|
46
|
+
fails += 1
|
47
|
+
retry if fails < 3
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def perform_edit_checks
|
52
|
+
end
|
53
|
+
|
54
|
+
def commit
|
55
|
+
@bsi.batch.commit(@id)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
class SpecimenImporter < Pipeline::Importer::Base
|
60
|
+
attr_accessor :specimens, :batches, :batch_delimiter
|
61
|
+
|
62
|
+
def initialize(key, options={})
|
63
|
+
@bsi = RBC.new(key)
|
64
|
+
@specimens = specimens
|
65
|
+
@batches = Array.new
|
66
|
+
end
|
67
|
+
|
68
|
+
def import(all_specimens, options={})
|
69
|
+
@specimens = all_specimens
|
70
|
+
subject_ids = @specimens.map{|e| e.subject_id}.uniq
|
71
|
+
|
72
|
+
subject_ids.each_with_index do |sid, i|
|
73
|
+
# Filter by subject_id
|
74
|
+
subset = @specimens.select{|e| e.subject_id == sid}
|
75
|
+
|
76
|
+
batch_properties = {
|
77
|
+
'batch.description' => "Subject: #{sid}"
|
78
|
+
}
|
79
|
+
|
80
|
+
@batch = AddBatch.new(@bsi, batch_properties)
|
81
|
+
@batch.add_specimens(subset)
|
82
|
+
@batch.commit if options['commit']
|
83
|
+
|
84
|
+
@batches << @batch
|
85
|
+
end
|
86
|
+
|
87
|
+
@bsi.common.logoff
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
class Subject < Pipeline::Importer::Base
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
require 'etl-pipeline'
|
2
|
+
require 'yaml'
|
3
|
+
|
4
|
+
module Pipeline
|
5
|
+
module BSI
|
6
|
+
module Models
|
7
|
+
class Specimen < Pipeline::Model::Base
|
8
|
+
attr_accessor :seminal_parent
|
9
|
+
REQUIRED_ATTRIBUTES = %w(study_id subject_id specimen_type date_drawn date_received label_status billing_method thaws).map{|v| v.to_sym}
|
10
|
+
BFH_MAP = {
|
11
|
+
:study_id => 'vial.study_id',
|
12
|
+
:specimen_type => 'vial.mat_type',
|
13
|
+
:current_label => 'vial.current_label',
|
14
|
+
:parent_id => 'vial.parent_id',
|
15
|
+
:measurement => 'vial.volume',
|
16
|
+
:measurement_est => 'vial.volume_est',
|
17
|
+
:measurement_unit => 'vial.volume_unit',
|
18
|
+
:stain_type => 'vial.field_268',
|
19
|
+
:block_status => 'vial.field_266',
|
20
|
+
:biobank => 'vial.field_269',
|
21
|
+
:grade => 'vial.field_271',
|
22
|
+
:room => 'location.room',
|
23
|
+
:building => 'location.building',
|
24
|
+
:freezer => 'location.freezer',
|
25
|
+
:shelf => 'location.shelf',
|
26
|
+
:rack => 'location.rack',
|
27
|
+
:box => 'location.box',
|
28
|
+
:row => 'vial_location.row',
|
29
|
+
:col => 'vial_location.col',
|
30
|
+
:sample_id => 'sample.sample_id',
|
31
|
+
:appointment_time => 'sample.appointment_time',
|
32
|
+
:center => 'sample.center',
|
33
|
+
:data_manager => 'sample.data_manager',
|
34
|
+
:date_drawn => 'sample.date_drawn',
|
35
|
+
:cra => 'sample.cra',
|
36
|
+
:kit_id => 'sample.kit_id',
|
37
|
+
:pickup_location => 'sample.pickup_location',
|
38
|
+
:subject_id => 'sample.subject_id',
|
39
|
+
:surgeon => 'sample.surgeon',
|
40
|
+
:referring_physician => 'sample.field_273',
|
41
|
+
:surgical_case_number => 'sample.surgical_case_number',
|
42
|
+
:surgical_case_part => 'sample.field_267',
|
43
|
+
:telephone => 'sample.telephone',
|
44
|
+
:timepoint => 'sample.time_point',
|
45
|
+
:sample_modifiers => 'sample.sample_modifiers'
|
46
|
+
}
|
47
|
+
|
48
|
+
vial_props = (BFH_MAP.keys+REQUIRED_ATTRIBUTES).uniq
|
49
|
+
begin
|
50
|
+
vial_props = YAML::load(File.open(File.join(File.dirname(__FILE__), 'vial_props.yaml'))).map{|v| v.to_sym}
|
51
|
+
rescue Errno::ENOENT
|
52
|
+
end
|
53
|
+
|
54
|
+
(vial_props-BFH_MAP.keys+[:specimen_code]).each{|attr_string| attr_accessor attr_string.to_sym}
|
55
|
+
BFH_MAP.keys.each{ |attr| attr_accessor attr }
|
56
|
+
|
57
|
+
# Define Defaults
|
58
|
+
def initialize(bfh={})
|
59
|
+
|
60
|
+
unless bfh.empty?
|
61
|
+
self.seminal_parent = true
|
62
|
+
bfh.keys.each do |bfh_key|
|
63
|
+
if BFH_MAP.has_value?(bfh_key)
|
64
|
+
instance_eval("self.#{BFH_MAP.key(bfh_key)} = '#{bfh[bfh_key]}'")
|
65
|
+
else
|
66
|
+
instance_eval("self.#{bfh_key.gsub(/vial\./, '')} = '#{bfh[bfh_key]}'")
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
else
|
71
|
+
self.thaws = '0'
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
def bsi_id()
|
77
|
+
"#{self.sample_id} #{self.seq_num}"
|
78
|
+
end
|
79
|
+
|
80
|
+
def seminal_parent?
|
81
|
+
return seminal_parent
|
82
|
+
end
|
83
|
+
|
84
|
+
def to_bfh
|
85
|
+
bfh = Hash.new
|
86
|
+
# Add 1-1 matches/translations
|
87
|
+
formatted_attributes.each do |k,v|
|
88
|
+
if BFH_MAP.has_key?(k)
|
89
|
+
bfh[BFH_MAP[k]] = v
|
90
|
+
else
|
91
|
+
bfh["vial.#{k}"] = v
|
92
|
+
end
|
93
|
+
end
|
94
|
+
bfh
|
95
|
+
end
|
96
|
+
|
97
|
+
def valid?
|
98
|
+
incomplete_attrs = REQUIRED_ATTRIBUTES.find{|v| send(v).nil?}.nil?
|
99
|
+
end
|
100
|
+
|
101
|
+
def missing_attrs
|
102
|
+
REQUIRED_ATTRIBUTES.find_all{|a| send(a).nil?}
|
103
|
+
end
|
104
|
+
end # class Specimen < Pipeline::Model::Base
|
105
|
+
|
106
|
+
class Subject < Pipeline::Model::Base
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
data/lib/bsi-pipeline.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require "bsi-pipeline/version"
|
2
|
+
require 'bsi-pipeline/models'
|
3
|
+
require 'bsi-pipeline/importer'
|
4
|
+
require 'rbc'
|
5
|
+
|
6
|
+
module Pipeline
|
7
|
+
module BSI
|
8
|
+
class Pipe
|
9
|
+
def initialize(key, options={})
|
10
|
+
@key = key
|
11
|
+
@options = options
|
12
|
+
@bsi = RBC.new( key, options.merge!( {:debug => true} ) )
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
include Pipeline::BSI::Models
|
17
|
+
include Pipeline::BSI::Importer
|
18
|
+
|
19
|
+
end # module BSI
|
20
|
+
end # module Pipeline
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require'spec_helper'
|
2
|
+
|
3
|
+
describe AddBatch do
|
4
|
+
before :all do
|
5
|
+
@bsi = RBC.new(
|
6
|
+
{ :user => 'ecog_bot',
|
7
|
+
:pass => ENV['ECOG_BOT_PASS'],
|
8
|
+
:server => 'PCF',
|
9
|
+
:url => 'https://websvc-mirror.bsisystems.com:2271/bsi/xmlrpc'
|
10
|
+
},
|
11
|
+
{
|
12
|
+
:debug => false,
|
13
|
+
:stealth => false
|
14
|
+
}
|
15
|
+
)
|
16
|
+
|
17
|
+
batch_description = {
|
18
|
+
'batch.description' => 'My Batch Description'
|
19
|
+
}
|
20
|
+
|
21
|
+
@batch = AddBatch.new @bsi, batch_description
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '#new' do
|
25
|
+
it 'takes 2 parameters and returns an AddBatch object' do
|
26
|
+
expect(@batch).to be_instance_of AddBatch
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe '#id' do
|
31
|
+
it "returns batch id string for the created batch" do
|
32
|
+
expect(@batch.id).not_to be_nil
|
33
|
+
expect(@batch.id).to be_instance_of String
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe '#type' do
|
38
|
+
it "returns Add (the correct type)" do
|
39
|
+
expect(@batch.type).to eq('Add')
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe '#specimens' do
|
44
|
+
context 'before specimens added' do
|
45
|
+
end
|
46
|
+
|
47
|
+
context 'after specimens added' do
|
48
|
+
before :each do
|
49
|
+
test_specimens = build_list(:specimen, 10)
|
50
|
+
@batch.add_specimens(test_specimens)
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'returns array of Pipeline::BSI::Models::Specimen objects' do
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe '#properties' do
|
59
|
+
it "returns correct properties hash" do
|
60
|
+
expect(@batch.properties).to be_instance_of Hash
|
61
|
+
expect(@batch.properties).to include('batch.description')
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe '#add_specimens' do
|
66
|
+
it 'takes an array of Pipeline::BSI::Models::Specimen objects and adds them to the batch'
|
67
|
+
end
|
68
|
+
|
69
|
+
describe '#perform_edit_checks' do
|
70
|
+
it 'runs the built in edit check functionality of BSI to check for errors in the Add Batch'
|
71
|
+
end
|
72
|
+
|
73
|
+
describe '#commit' do
|
74
|
+
it 'commits specimens in the batch to the BSI database if all edit checks pass'
|
75
|
+
end
|
76
|
+
|
77
|
+
after :all do
|
78
|
+
@bsi.common.logoff
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'spec_helper'
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
FactoryGirl.define do
|
4
|
+
sequence :current_label do |n|
|
5
|
+
sprintf '%05d', n
|
6
|
+
end
|
7
|
+
|
8
|
+
factory :specimen, class: Specimen do
|
9
|
+
study_id "STUDY1"
|
10
|
+
subject_id "12345"
|
11
|
+
specimen_type "WB"
|
12
|
+
current_label
|
13
|
+
billing_method "Direct Billing"
|
14
|
+
date_drawn "06/14/2013 00:00"
|
15
|
+
date_received "06/14/2013 05:00"
|
16
|
+
label_status "Barcoded"
|
17
|
+
thaws '0'
|
18
|
+
|
19
|
+
# Generic Fluid Specimen
|
20
|
+
trait :fluid do
|
21
|
+
specimen_type "WB"
|
22
|
+
end
|
23
|
+
|
24
|
+
# Generic Slide Specimen
|
25
|
+
trait :slide do
|
26
|
+
specimen_type "SLDTS"
|
27
|
+
stain_type "H&E"
|
28
|
+
end
|
29
|
+
|
30
|
+
factory :slide_specimen, traits: [:slide]
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe SpecimenImporter do
|
4
|
+
before :each do
|
5
|
+
key = {
|
6
|
+
:user => 'ecog_bot',
|
7
|
+
:pass => ENV['ECOG_BOT_PASS'],
|
8
|
+
:server => 'PCF',
|
9
|
+
:url => 'https://websvc-mirror.bsisystems.com:2271/bsi/xmlrpc'
|
10
|
+
}
|
11
|
+
@importer = SpecimenImporter.new(key)
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#new' do
|
16
|
+
end
|
17
|
+
|
18
|
+
describe '#import' do
|
19
|
+
context '25 slides' do
|
20
|
+
before :example do
|
21
|
+
@specimens = build_list(:slide_specimen, 25)
|
22
|
+
@importer.import(@specimens)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'stores all the specimens as an attribute' do
|
26
|
+
expect(@importer.specimens).to be_instance_of Array
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
data/spec/models_spec.rb
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'coveralls'
|
2
|
+
Coveralls.wear!
|
3
|
+
|
4
|
+
require 'pry'
|
5
|
+
require 'rbc'
|
6
|
+
require 'bsi-pipeline'
|
7
|
+
require 'bsi-pipeline/importer'
|
8
|
+
require 'bsi-pipeline/models'
|
9
|
+
require 'bsi-pipeline/version'
|
10
|
+
require 'factory_girl'
|
11
|
+
include Pipeline::BSI::Importer
|
12
|
+
include Pipeline::BSI::Models
|
13
|
+
|
14
|
+
RSpec.configure do |config|
|
15
|
+
config.expect_with :rspec
|
16
|
+
|
17
|
+
config.include FactoryGirl::Syntax::Methods
|
18
|
+
|
19
|
+
config.before(:suite) do
|
20
|
+
FactoryGirl.lint
|
21
|
+
end
|
22
|
+
|
23
|
+
FactoryGirl.definition_file_paths = %w{./factories ./test/factories ./spec/factories}
|
24
|
+
FactoryGirl.find_definitions
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,269 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bsi-pipeline
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Elijah Christensen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-07-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-nc
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: terminal-notifier-guard
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: pry-remote
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry-nav
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: coveralls
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: factory_girl
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - '>='
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: etl-pipeline
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - '>='
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - '>='
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rbc
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - '>='
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - '>='
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
description: plugin for pipeline that provides importers and models for migrating
|
210
|
+
data to bsi
|
211
|
+
email:
|
212
|
+
- ejd.christensen@gmail.com
|
213
|
+
executables: []
|
214
|
+
extensions: []
|
215
|
+
extra_rdoc_files: []
|
216
|
+
files:
|
217
|
+
- .coveralls.yml
|
218
|
+
- .gitignore
|
219
|
+
- .travis.yml
|
220
|
+
- Gemfile
|
221
|
+
- Guardfile
|
222
|
+
- LICENSE.txt
|
223
|
+
- README.md
|
224
|
+
- Rakefile
|
225
|
+
- bsi-pipeline.gemspec
|
226
|
+
- lib/bsi-pipeline.rb
|
227
|
+
- lib/bsi-pipeline/importer.rb
|
228
|
+
- lib/bsi-pipeline/models.rb
|
229
|
+
- lib/bsi-pipeline/version.rb
|
230
|
+
- spec/add_batch_spec.rb
|
231
|
+
- spec/bsi_pipeline_spec.rb
|
232
|
+
- spec/factories/specimen.rb
|
233
|
+
- spec/importer_spec.rb
|
234
|
+
- spec/models_spec.rb
|
235
|
+
- spec/spec_helper.rb
|
236
|
+
- spec/support/factory_girl.rb
|
237
|
+
homepage: ''
|
238
|
+
licenses:
|
239
|
+
- MIT
|
240
|
+
metadata: {}
|
241
|
+
post_install_message:
|
242
|
+
rdoc_options: []
|
243
|
+
require_paths:
|
244
|
+
- lib
|
245
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
246
|
+
requirements:
|
247
|
+
- - '>='
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: '0'
|
250
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
251
|
+
requirements:
|
252
|
+
- - '>='
|
253
|
+
- !ruby/object:Gem::Version
|
254
|
+
version: '0'
|
255
|
+
requirements: []
|
256
|
+
rubyforge_project:
|
257
|
+
rubygems_version: 2.3.0
|
258
|
+
signing_key:
|
259
|
+
specification_version: 4
|
260
|
+
summary: plugin for pipeline that provides importers and models for migrating data
|
261
|
+
to bsi
|
262
|
+
test_files:
|
263
|
+
- spec/add_batch_spec.rb
|
264
|
+
- spec/bsi_pipeline_spec.rb
|
265
|
+
- spec/factories/specimen.rb
|
266
|
+
- spec/importer_spec.rb
|
267
|
+
- spec/models_spec.rb
|
268
|
+
- spec/spec_helper.rb
|
269
|
+
- spec/support/factory_girl.rb
|