Skip to content

Commit

Permalink
Add coveralls back, remove unwanted autoloading in pre_assembly.rb an…
Browse files Browse the repository at this point in the history
…d add file to gitignore
  • Loading branch information
SaravShah committed Aug 29, 2018
1 parent 9482e33 commit 7f74c8a
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 88 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ tags
tmp
/workflow_service.log*
coverage
spec/lib/test_data/logging/progress_log_file.yml

# Ignore master key for decrypting credentials and more.
/config/master.key
Expand Down
7 changes: 0 additions & 7 deletions app/lib/pre_assembly.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
require 'fileutils'
require 'erb'



# auto require any project specific files
Dir[File.dirname(__FILE__) + '/pre_assembly/project/*.rb'].each { |file| require "pre_assembly/project/#{File.basename(file)}" }

require 'assembly-utils'
require 'assembly-image'
require 'rest_client'
require 'honeybadger'
3 changes: 0 additions & 3 deletions config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)

require 'bundler/setup' # Set up gems listed in the Gemfile.

require 'rubygems'
require 'bundler/setup'

environment = ENV['RAILS_ENV'] || 'development'
PRE_ASSEMBLY_ROOT = File.expand_path(File.dirname(__FILE__) + '/..')
CERT_DIR = File.join(File.dirname(__FILE__), ".", "certs")

# Environment.
# ENV_FILE = PRE_ASSEMBLY_ROOT + "/config/cli_environments/#{environment}.rb"
require_relative "cli_environments/#{environment}.rb"
1 change: 0 additions & 1 deletion config/cli_environments/test.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'dor-services'

Dor::Config.configure do
dor do
service_root 'https://example.com/dor/v1'
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/pre_assembly/bundle_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def bundle_setup(bundle_context)

describe '#load_skippables' do
it "does nothing if @resume is false" do
rumsey.resume = false
allow(rumsey).to receive(:resume).and_return(false)
expect(rumsey.load_skippables).to be_nil
end

Expand Down
2 changes: 2 additions & 0 deletions spec/lib/pre_assembly/remediation/item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
let(:progress_log_file) { log_dir + "/progress_log_file.yml" }

before { Dir.mkdir(log_dir) unless Dir.exist?(log_dir) }
before { touch progress_log_file }

after { File.delete(csv_filename) if File.exist?(csv_filename) }
after { FileUtils.rm_f(progress_log_file) } # cleanup

it "ensures a log file exists" do
File.delete(csv_filename) if File.exist?(csv_filename)
Expand Down
75 changes: 0 additions & 75 deletions spec/lib/test_data/logging/progress_log_file.yml

This file was deleted.

2 changes: 2 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!

require 'coveralls'
Coveralls.wear!('rails')
# auto-require all ruby files in the support directory
Dir[Rails.root.join('spec', 'support', '*.rb')].each { |f| require f }

Expand Down
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require 'equivalent-xml/rspec_matchers'
require 'byebug'


RSpec.configure do |config|

# rspec-expectations config goes here. You can use an alternate
Expand Down

0 comments on commit 7f74c8a

Please sign in to comment.