doi_extractor 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +54 -0
- data/Capfile +34 -0
- data/Gemfile +6 -0
- data/README.md +50 -0
- data/Rakefile +43 -0
- data/bin/doi_extractor +18 -0
- data/config/deploy.rb +34 -0
- data/config/deploy/production.rb +65 -0
- data/doi_extractor.gemspec +29 -0
- data/lib/doi_extractor.rb +25 -0
- data/lib/doi_extractor/cancel_command.rb +24 -0
- data/lib/doi_extractor/command.rb +81 -0
- data/lib/doi_extractor/command_line_parser.rb +154 -0
- data/lib/doi_extractor/create_command.rb +32 -0
- data/lib/doi_extractor/download_command.rb +109 -0
- data/lib/doi_extractor/download_location.rb +86 -0
- data/lib/doi_extractor/errors.rb +34 -0
- data/lib/doi_extractor/ipums_client.rb +159 -0
- data/lib/doi_extractor/ipums_uri_builder.rb +51 -0
- data/lib/doi_extractor/old_ruby_patch.rb +25 -0
- data/lib/doi_extractor/options.rb +132 -0
- data/lib/doi_extractor/secrets.rb +18 -0
- data/lib/doi_extractor/status_command.rb +62 -0
- data/lib/doi_extractor/version.rb +3 -0
- data/spec/fixtures/api_creds.yml +2 -0
- data/spec/reports/SPEC-DoiExtractor-CancelCommand-when-successful.xml +7 -0
- data/spec/reports/SPEC-DoiExtractor-CancelCommand.xml +3 -0
- data/spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-create-command-with-email.xml +14 -0
- data/spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-create-command.xml +9 -0
- data/spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-download-command.xml +9 -0
- data/spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-status-command.xml +9 -0
- data/spec/reports/SPEC-DoiExtractor-CommandLineParser-with-an-invalid-command.xml +9 -0
- data/spec/reports/SPEC-DoiExtractor-CommandLineParser-with-an-unknown-option.xml +5 -0
- data/spec/reports/SPEC-DoiExtractor-CommandLineParser.xml +3 -0
- data/spec/reports/SPEC-DoiExtractor-CreateCommand-when-an-existing-extract-is-processing.xml +7 -0
- data/spec/reports/SPEC-DoiExtractor-CreateCommand-when-successful.xml +7 -0
- data/spec/reports/SPEC-DoiExtractor-CreateCommand.xml +3 -0
- data/spec/reports/SPEC-DoiExtractor-DownloadCommand-user-cancels-download.xml +7 -0
- data/spec/reports/SPEC-DoiExtractor-DownloadCommand-when-an-extract-is-available-when-force-is-not-set.xml +5 -0
- data/spec/reports/SPEC-DoiExtractor-DownloadCommand-when-an-extract-is-available.xml +13 -0
- data/spec/reports/SPEC-DoiExtractor-DownloadCommand.xml +3 -0
- data/spec/reports/SPEC-DoiExtractor-DownloadLocation.xml +11 -0
- data/spec/reports/SPEC-DoiExtractor-IpumsClient.xml +7 -0
- data/spec/reports/SPEC-DoiExtractor-IpumsUriBuilder-internal-environment.xml +5 -0
- data/spec/reports/SPEC-DoiExtractor-IpumsUriBuilder-live-environment.xml +5 -0
- data/spec/reports/SPEC-DoiExtractor-IpumsUriBuilder-local-environment.xml +5 -0
- data/spec/reports/SPEC-DoiExtractor-IpumsUriBuilder.xml +3 -0
- data/spec/reports/SPEC-DoiExtractor-Options-for-command-with-create-command-with-invalid-doi-version.xml +5 -0
- data/spec/reports/SPEC-DoiExtractor-Options-for-command-with-create-command.xml +7 -0
- data/spec/reports/SPEC-DoiExtractor-Options-for-command-with-download-command.xml +7 -0
- data/spec/reports/SPEC-DoiExtractor-Options-for-command-with-status-command.xml +7 -0
- data/spec/reports/SPEC-DoiExtractor-Options-for-command.xml +3 -0
- data/spec/reports/SPEC-DoiExtractor-Options-when-setting-path-values.xml +9 -0
- data/spec/reports/SPEC-DoiExtractor-Options.xml +5 -0
- data/spec/reports/SPEC-DoiExtractor-Secrets.xml +7 -0
- data/spec/reports/SPEC-DoiExtractor-StatusCommand.xml +5 -0
- data/spec/spec_helper.rb +20 -0
- data/spec/support/test_input.rb +36 -0
- data/spec/unit/cancel_command_spec.rb +28 -0
- data/spec/unit/command_line_parser_spec.rb +68 -0
- data/spec/unit/create_command_spec.rb +44 -0
- data/spec/unit/download_command_spec.rb +139 -0
- data/spec/unit/download_location_spec.rb +71 -0
- data/spec/unit/ipums_client_spec.rb +23 -0
- data/spec/unit/ipums_uri_builder_spec.rb +26 -0
- data/spec/unit/options_spec.rb +86 -0
- data/spec/unit/secrets_spec.rb +14 -0
- data/spec/unit/status_command_spec.rb +46 -0
- metadata +282 -0
@@ -0,0 +1,71 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
|
3
|
+
describe DoiExtractor::DownloadLocation do
|
4
|
+
|
5
|
+
let(:base_path) { File.expand_path(File.dirname(__FILE__) + '/../testdata/') }
|
6
|
+
let(:path) { File.join(base_path, '2017_v1.1') }
|
7
|
+
let(:extract) {
|
8
|
+
er = OpenStruct.new
|
9
|
+
er.id = 5
|
10
|
+
er.samples = [OpenStruct.new.tap { |s| s.name = '1990a'; s.long_description = 'US 1990 5%' }]
|
11
|
+
er
|
12
|
+
}
|
13
|
+
|
14
|
+
let(:extract_group) {
|
15
|
+
doi = OpenStruct.new
|
16
|
+
doi.id = 1
|
17
|
+
doi.year = '2017'
|
18
|
+
doi.doi_version = '1.1'
|
19
|
+
doi.extract_requests = [extract]
|
20
|
+
doi
|
21
|
+
}
|
22
|
+
|
23
|
+
let(:location) { DoiExtractor::DownloadLocation.new(base_path, extract_group) }
|
24
|
+
|
25
|
+
after do
|
26
|
+
if Dir.exist?(base_path)
|
27
|
+
FileUtils.rm_rf(base_path)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'calculates extract request paths' do
|
32
|
+
expect(location.extract_request_path(extract)).to eq File.join(path, '1990a - US 1990 5%.tar.gz')
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'can create itself' do
|
36
|
+
expect(Dir.exist?(path)).to be_falsey
|
37
|
+
location.ensure!
|
38
|
+
expect(Dir.exist?(path)).to be_truthy
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'creates and clears the tmp path' do
|
42
|
+
location.ensure!
|
43
|
+
expect(Dir.exist?(File.join(path, 'tmp'))).to be_falsey
|
44
|
+
location.clean_tmp!
|
45
|
+
expect(Dir.exist?(File.join(path, 'tmp'))).to be_truthy
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'packages up downloaded extract files' do
|
49
|
+
files = {
|
50
|
+
File.join(location.tmp_path, '1990a - US 1990 5%', 'cps_001.dat') => 'data file',
|
51
|
+
File.join(location.tmp_path, '1990a - US 1990 5%', 'cps_001.cbk') => 'basic codebook',
|
52
|
+
File.join(location.tmp_path, '1990a - US 1990 5%', 'cps_001.spss') => 'spss codebook contents'
|
53
|
+
}
|
54
|
+
location.ensure!
|
55
|
+
location.clean_tmp!(extract)
|
56
|
+
|
57
|
+
files.each do |k, v|
|
58
|
+
File.write(k, v)
|
59
|
+
end
|
60
|
+
|
61
|
+
expect(File.exist?(location.extract_request_path(extract))).to be_falsey
|
62
|
+
|
63
|
+
location.package_tmp_to_extract(extract)
|
64
|
+
|
65
|
+
expect(File.exist?(location.extract_request_path(extract))).to be_truthy
|
66
|
+
|
67
|
+
tar_files = `tar -tf "#{location.extract_request_path(extract)}"`.split("\n")
|
68
|
+
expect(tar_files).to contain_exactly '1990a - US 1990 5%/', *files.keys.map { |f| "1990a - US 1990 5%/#{File.basename(f)}" }
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
|
3
|
+
describe DoiExtractor::IpumsClient do
|
4
|
+
|
5
|
+
it 'handles HTTP 422' do
|
6
|
+
|
7
|
+
stub_request(:get, 'http://localhost:3003/cps-action/api/extracts/v1/extract_request_groups/1').to_return(status: 422, body: '{"error": "bad stuff"}')
|
8
|
+
|
9
|
+
client = DoiExtractor::IpumsClient.new('http://localhost:3003/cps-action', 'user', 'pass')
|
10
|
+
|
11
|
+
expect { client.get_doi_extract(1) }.to raise_error(DoiExtractor::ApiError, /returned an error/)
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'handles HTTP 500' do
|
16
|
+
stub_request(:get, 'http://localhost:3003/cps-action/api/extracts/v1/extract_request_groups/1').to_return(status: 500, body: '{"error": "bad stuff"}')
|
17
|
+
|
18
|
+
client = DoiExtractor::IpumsClient.new('http://localhost:3003/cps-action', 'user', 'pass')
|
19
|
+
|
20
|
+
expect { client.get_doi_extract(1) }.to raise_error(DoiExtractor::ApiError, /invalid/i)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
|
3
|
+
describe DoiExtractor::IpumsUriBuilder do
|
4
|
+
|
5
|
+
context 'live environment' do
|
6
|
+
it 'builds correct urls' do
|
7
|
+
expect(DoiExtractor::IpumsUriBuilder.new('cps', 'live').url).to eq 'https://cps.ipums.org/cps-action'
|
8
|
+
expect(DoiExtractor::IpumsUriBuilder.new('dhs', 'live').url).to eq 'https://www.idhsdata.org/idhs-action'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
context 'local environment' do
|
13
|
+
it 'builds correct urls' do
|
14
|
+
expect(DoiExtractor::IpumsUriBuilder.new('cps', 'local').url).to eq 'http://localhost:3003/cps-action'
|
15
|
+
expect(DoiExtractor::IpumsUriBuilder.new('dhs', 'local').url).to eq 'http://localhost:3003/idhs-action'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'internal environment' do
|
20
|
+
it 'builds correct urls' do
|
21
|
+
expect(DoiExtractor::IpumsUriBuilder.new('cps', 'internal').url).to eq 'https://internal.cps.ipums.org/cps-action'
|
22
|
+
expect(DoiExtractor::IpumsUriBuilder.new('dhs', 'internal').url).to eq 'https://internal.idhsdata.org/idhs-action'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
|
3
|
+
describe DoiExtractor::Options do
|
4
|
+
|
5
|
+
describe '.for_command' do
|
6
|
+
|
7
|
+
context 'with download command' do
|
8
|
+
let(:options) { DoiExtractor::Options.for_command('download', project: 'cps', environment: 'live') }
|
9
|
+
|
10
|
+
it 'returns the right class' do
|
11
|
+
expect(options).to be_a DoiExtractor::Options
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'sets the attributes' do
|
15
|
+
expect(options.command).to eq 'download'
|
16
|
+
expect(options.project).to eq 'cps'
|
17
|
+
expect(options.environment).to eq 'live'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'with create command' do
|
22
|
+
let(:options) { DoiExtractor::Options.for_command('create', project: 'cps', environment: 'live', doi_version: '1.1') }
|
23
|
+
|
24
|
+
it 'returns the right class' do
|
25
|
+
expect(options).to be_a DoiExtractor::Options
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'sets the attributes' do
|
29
|
+
expect(options.command).to eq 'create'
|
30
|
+
expect(options.project).to eq 'cps'
|
31
|
+
expect(options.environment).to eq 'live'
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'with invalid doi version' do
|
35
|
+
let(:options) { DoiExtractor::Options.for_command('create', project: 'cps', environment: 'live', doi_version: 'asdf') }
|
36
|
+
|
37
|
+
it 'is not valid' do
|
38
|
+
expect(options.valid?).to be_falsey
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
context 'with status command' do
|
44
|
+
let(:options) { DoiExtractor::Options.for_command('status', project: 'cps', environment: 'live') }
|
45
|
+
|
46
|
+
it 'returns the right class' do
|
47
|
+
expect(options).to be_a DoiExtractor::Options
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'sets the attributes' do
|
51
|
+
expect(options.command).to eq 'status'
|
52
|
+
expect(options.project).to eq 'cps'
|
53
|
+
expect(options.environment).to eq 'live'
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'when setting path values' do
|
60
|
+
let(:options) { DoiExtractor::Options.for_command('download', project: 'cps', environment: 'live', extract_group_id: 1) }
|
61
|
+
|
62
|
+
it 'defaults the base path' do
|
63
|
+
expect(options.valid?).to be_truthy
|
64
|
+
expect(options.download_base_path).to eq "/pkg/ipums/programming/doi_extractor/temp_archive/cps/live"
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'allows overriding the base path' do
|
68
|
+
options.download_base_path = '/new/place'
|
69
|
+
expect(options.valid?).to be_truthy
|
70
|
+
expect(options.download_base_path).to eq '/new/place'
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'does not allow an empty base path' do
|
74
|
+
options.download_base_path = ''
|
75
|
+
expect(options.valid?).not_to be_truthy
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
it 'defaults to basic auth creds on internal env' do
|
80
|
+
opts = DoiExtractor::Options.for_command('download', project: 'cps', environment: 'internal', extract_group_id: 1)
|
81
|
+
opts.validate
|
82
|
+
expect(opts.api_username).to eq 'hcp'
|
83
|
+
expect(opts.api_password).to eq '1234'
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
|
3
|
+
describe DoiExtractor::Secrets do
|
4
|
+
it 'reads the api password' do
|
5
|
+
s = DoiExtractor::Secrets.new(api_path: File.expand_path(File.dirname(__FILE__) + '/../fixtures/api_creds.yml'))
|
6
|
+
expect(s.api_username).to eq 'terrapop'
|
7
|
+
expect(s.api_password).to eq 'testPassword'
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'overrides correctly' do
|
11
|
+
s = DoiExtractor::Secrets.new(api_path: '/fake/not/here.yml', api_password: '123')
|
12
|
+
expect(s.api_password).to eq '123'
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
|
3
|
+
describe DoiExtractor::StatusCommand do
|
4
|
+
|
5
|
+
let(:base_path) { File.expand_path(File.dirname(__FILE__) + '/../testdata/') }
|
6
|
+
let(:path) { File.join(base_path, '2017_v1.1') }
|
7
|
+
let(:options) { DoiExtractor::Options.for_command('status', project: 'cps', environment: 'local', extract_group_id: 1, api_password: 'abc123', download_base_path: base_path).tap {|o| o.validate } }
|
8
|
+
let(:output) { StringIO.new }
|
9
|
+
let(:input) { TestInput.new }
|
10
|
+
let(:command) { DoiExtractor::StatusCommand.new(options, output, input) }
|
11
|
+
|
12
|
+
let(:complete_extract_group_json) {
|
13
|
+
{
|
14
|
+
id: 1,
|
15
|
+
year: '2017',
|
16
|
+
doi_version: '1.1',
|
17
|
+
status: 'complete',
|
18
|
+
all_data_available: true,
|
19
|
+
citation: 'this is a citation',
|
20
|
+
extract_requests: [
|
21
|
+
{id: 10, completion_status: 'email_sent', samples: [{id: 100, name: '1990a'}], files: [{filename: 'cps_001.dat.gz', ext: 'dat.gz'}, {filename: 'cps_001.cbk', ext: 'cbk'}, {filename: 'cps_001.spss', ext: 'spss'}]},
|
22
|
+
{id: 20, completion_status: 'email_sent', samples: [{id: 200, name: '2000a'}], files: [{filename: 'cps_002.dat.gz', ext: 'dat.gz'}, {filename: 'cps_002.cbk', ext: 'cbk'}, {filename: 'cps_002.spss', ext: 'spss'}]}
|
23
|
+
]
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
def stub_get_extract_group(id, group_json)
|
28
|
+
url = "http://localhost:3003/cps-action/api/extracts/v1/extract_request_groups/#{id}"
|
29
|
+
if group_json
|
30
|
+
stub_request(:get, url).to_return(body: JSON.dump(group_json))
|
31
|
+
else
|
32
|
+
stub_request(:get, url).to_return(status: 404)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'generates some output' do
|
37
|
+
stub = stub_get_extract_group(1, complete_extract_group_json)
|
38
|
+
|
39
|
+
command.execute
|
40
|
+
|
41
|
+
expect(output.string).to match /DOI Extract \(ID: 1/
|
42
|
+
|
43
|
+
expect(stub).to have_been_requested
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
metadata
ADDED
@@ -0,0 +1,282 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: doi_extractor
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dan Elbert
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-09-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
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: public_suffix
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.4.6
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.4.6
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.5.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.5.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: ci_reporter_rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.0.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.0.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.13.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.13.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov-rcov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.2.3
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.2.3
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webmock
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 2.3.2
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 2.3.2
|
139
|
+
description:
|
140
|
+
email:
|
141
|
+
- delbert@umn.edu
|
142
|
+
executables:
|
143
|
+
- doi_extractor
|
144
|
+
extensions: []
|
145
|
+
extra_rdoc_files: []
|
146
|
+
files:
|
147
|
+
- ".gitignore"
|
148
|
+
- Capfile
|
149
|
+
- Gemfile
|
150
|
+
- README.md
|
151
|
+
- Rakefile
|
152
|
+
- bin/doi_extractor
|
153
|
+
- config/deploy.rb
|
154
|
+
- config/deploy/production.rb
|
155
|
+
- doi_extractor.gemspec
|
156
|
+
- lib/doi_extractor.rb
|
157
|
+
- lib/doi_extractor/cancel_command.rb
|
158
|
+
- lib/doi_extractor/command.rb
|
159
|
+
- lib/doi_extractor/command_line_parser.rb
|
160
|
+
- lib/doi_extractor/create_command.rb
|
161
|
+
- lib/doi_extractor/download_command.rb
|
162
|
+
- lib/doi_extractor/download_location.rb
|
163
|
+
- lib/doi_extractor/errors.rb
|
164
|
+
- lib/doi_extractor/ipums_client.rb
|
165
|
+
- lib/doi_extractor/ipums_uri_builder.rb
|
166
|
+
- lib/doi_extractor/old_ruby_patch.rb
|
167
|
+
- lib/doi_extractor/options.rb
|
168
|
+
- lib/doi_extractor/secrets.rb
|
169
|
+
- lib/doi_extractor/status_command.rb
|
170
|
+
- lib/doi_extractor/version.rb
|
171
|
+
- spec/fixtures/api_creds.yml
|
172
|
+
- spec/reports/SPEC-DoiExtractor-CancelCommand-when-successful.xml
|
173
|
+
- spec/reports/SPEC-DoiExtractor-CancelCommand.xml
|
174
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-create-command-with-email.xml
|
175
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-create-command.xml
|
176
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-download-command.xml
|
177
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-status-command.xml
|
178
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-an-invalid-command.xml
|
179
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-an-unknown-option.xml
|
180
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser.xml
|
181
|
+
- spec/reports/SPEC-DoiExtractor-CreateCommand-when-an-existing-extract-is-processing.xml
|
182
|
+
- spec/reports/SPEC-DoiExtractor-CreateCommand-when-successful.xml
|
183
|
+
- spec/reports/SPEC-DoiExtractor-CreateCommand.xml
|
184
|
+
- spec/reports/SPEC-DoiExtractor-DownloadCommand-user-cancels-download.xml
|
185
|
+
- spec/reports/SPEC-DoiExtractor-DownloadCommand-when-an-extract-is-available-when-force-is-not-set.xml
|
186
|
+
- spec/reports/SPEC-DoiExtractor-DownloadCommand-when-an-extract-is-available.xml
|
187
|
+
- spec/reports/SPEC-DoiExtractor-DownloadCommand.xml
|
188
|
+
- spec/reports/SPEC-DoiExtractor-DownloadLocation.xml
|
189
|
+
- spec/reports/SPEC-DoiExtractor-IpumsClient.xml
|
190
|
+
- spec/reports/SPEC-DoiExtractor-IpumsUriBuilder-internal-environment.xml
|
191
|
+
- spec/reports/SPEC-DoiExtractor-IpumsUriBuilder-live-environment.xml
|
192
|
+
- spec/reports/SPEC-DoiExtractor-IpumsUriBuilder-local-environment.xml
|
193
|
+
- spec/reports/SPEC-DoiExtractor-IpumsUriBuilder.xml
|
194
|
+
- spec/reports/SPEC-DoiExtractor-Options-for-command-with-create-command-with-invalid-doi-version.xml
|
195
|
+
- spec/reports/SPEC-DoiExtractor-Options-for-command-with-create-command.xml
|
196
|
+
- spec/reports/SPEC-DoiExtractor-Options-for-command-with-download-command.xml
|
197
|
+
- spec/reports/SPEC-DoiExtractor-Options-for-command-with-status-command.xml
|
198
|
+
- spec/reports/SPEC-DoiExtractor-Options-for-command.xml
|
199
|
+
- spec/reports/SPEC-DoiExtractor-Options-when-setting-path-values.xml
|
200
|
+
- spec/reports/SPEC-DoiExtractor-Options.xml
|
201
|
+
- spec/reports/SPEC-DoiExtractor-Secrets.xml
|
202
|
+
- spec/reports/SPEC-DoiExtractor-StatusCommand.xml
|
203
|
+
- spec/spec_helper.rb
|
204
|
+
- spec/support/test_input.rb
|
205
|
+
- spec/unit/cancel_command_spec.rb
|
206
|
+
- spec/unit/command_line_parser_spec.rb
|
207
|
+
- spec/unit/create_command_spec.rb
|
208
|
+
- spec/unit/download_command_spec.rb
|
209
|
+
- spec/unit/download_location_spec.rb
|
210
|
+
- spec/unit/ipums_client_spec.rb
|
211
|
+
- spec/unit/ipums_uri_builder_spec.rb
|
212
|
+
- spec/unit/options_spec.rb
|
213
|
+
- spec/unit/secrets_spec.rb
|
214
|
+
- spec/unit/status_command_spec.rb
|
215
|
+
homepage: https://github.umn.edu/mpc/doi_extractor
|
216
|
+
licenses: []
|
217
|
+
metadata: {}
|
218
|
+
post_install_message:
|
219
|
+
rdoc_options: []
|
220
|
+
require_paths:
|
221
|
+
- lib
|
222
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
223
|
+
requirements:
|
224
|
+
- - ">="
|
225
|
+
- !ruby/object:Gem::Version
|
226
|
+
version: '0'
|
227
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
228
|
+
requirements:
|
229
|
+
- - ">="
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
version: '0'
|
232
|
+
requirements: []
|
233
|
+
rubyforge_project:
|
234
|
+
rubygems_version: 2.6.11
|
235
|
+
signing_key:
|
236
|
+
specification_version: 4
|
237
|
+
summary: Command line tool to package IPUMS DOI extracts
|
238
|
+
test_files:
|
239
|
+
- spec/fixtures/api_creds.yml
|
240
|
+
- spec/reports/SPEC-DoiExtractor-CancelCommand-when-successful.xml
|
241
|
+
- spec/reports/SPEC-DoiExtractor-CancelCommand.xml
|
242
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-create-command-with-email.xml
|
243
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-create-command.xml
|
244
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-download-command.xml
|
245
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-a-valid-status-command.xml
|
246
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-an-invalid-command.xml
|
247
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser-with-an-unknown-option.xml
|
248
|
+
- spec/reports/SPEC-DoiExtractor-CommandLineParser.xml
|
249
|
+
- spec/reports/SPEC-DoiExtractor-CreateCommand-when-an-existing-extract-is-processing.xml
|
250
|
+
- spec/reports/SPEC-DoiExtractor-CreateCommand-when-successful.xml
|
251
|
+
- spec/reports/SPEC-DoiExtractor-CreateCommand.xml
|
252
|
+
- spec/reports/SPEC-DoiExtractor-DownloadCommand-user-cancels-download.xml
|
253
|
+
- spec/reports/SPEC-DoiExtractor-DownloadCommand-when-an-extract-is-available-when-force-is-not-set.xml
|
254
|
+
- spec/reports/SPEC-DoiExtractor-DownloadCommand-when-an-extract-is-available.xml
|
255
|
+
- spec/reports/SPEC-DoiExtractor-DownloadCommand.xml
|
256
|
+
- spec/reports/SPEC-DoiExtractor-DownloadLocation.xml
|
257
|
+
- spec/reports/SPEC-DoiExtractor-IpumsClient.xml
|
258
|
+
- spec/reports/SPEC-DoiExtractor-IpumsUriBuilder-internal-environment.xml
|
259
|
+
- spec/reports/SPEC-DoiExtractor-IpumsUriBuilder-live-environment.xml
|
260
|
+
- spec/reports/SPEC-DoiExtractor-IpumsUriBuilder-local-environment.xml
|
261
|
+
- spec/reports/SPEC-DoiExtractor-IpumsUriBuilder.xml
|
262
|
+
- spec/reports/SPEC-DoiExtractor-Options-for-command-with-create-command-with-invalid-doi-version.xml
|
263
|
+
- spec/reports/SPEC-DoiExtractor-Options-for-command-with-create-command.xml
|
264
|
+
- spec/reports/SPEC-DoiExtractor-Options-for-command-with-download-command.xml
|
265
|
+
- spec/reports/SPEC-DoiExtractor-Options-for-command-with-status-command.xml
|
266
|
+
- spec/reports/SPEC-DoiExtractor-Options-for-command.xml
|
267
|
+
- spec/reports/SPEC-DoiExtractor-Options-when-setting-path-values.xml
|
268
|
+
- spec/reports/SPEC-DoiExtractor-Options.xml
|
269
|
+
- spec/reports/SPEC-DoiExtractor-Secrets.xml
|
270
|
+
- spec/reports/SPEC-DoiExtractor-StatusCommand.xml
|
271
|
+
- spec/spec_helper.rb
|
272
|
+
- spec/support/test_input.rb
|
273
|
+
- spec/unit/cancel_command_spec.rb
|
274
|
+
- spec/unit/command_line_parser_spec.rb
|
275
|
+
- spec/unit/create_command_spec.rb
|
276
|
+
- spec/unit/download_command_spec.rb
|
277
|
+
- spec/unit/download_location_spec.rb
|
278
|
+
- spec/unit/ipums_client_spec.rb
|
279
|
+
- spec/unit/ipums_uri_builder_spec.rb
|
280
|
+
- spec/unit/options_spec.rb
|
281
|
+
- spec/unit/secrets_spec.rb
|
282
|
+
- spec/unit/status_command_spec.rb
|