active_fedora-noid 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58331d11f13b03e0afbb2768cefd92dc9c9f407e
4
- data.tar.gz: 8ce905f51981b34871da889019175afbb51a255e
3
+ metadata.gz: cb21b73450d652c999b6957aec06a64a6b93a424
4
+ data.tar.gz: 92a908f1457731a303eaa3bede38fd139ba0a820
5
5
  SHA512:
6
- metadata.gz: f518f02cd6051a6a890d837eda8de798c586fe4a24ada26b6a2480f6ab5e75f04c9374af38865a22cc07df3277448b011ea582fc32c89a41c9cc2407c874ebc3
7
- data.tar.gz: c57803c1c8970842d232e1217257fe7a51f0717dcca2fae9d45db511bb29f955c572a4e3611930573408ad6f2705fa263f19dc87fb06f7b53258e66ab14b2033
6
+ metadata.gz: 1a41ca01378cfab9bfeb598ebfbba2b685759058281897c6bc730b8d92cd7dc5e047676de949d05d802141cc46c448eaf052cef625154ed2a0695601e6cc88ea
7
+ data.tar.gz: b844067ca1dd94891953605151997e594b0c57f4194148ed47a6ddcd9f1481b678e8bf672b73282e99a4ee4cec4e4f3dc559c9bf6f5faba7dae6daf57a39c7a8
data/.travis.yml CHANGED
@@ -1,20 +1,15 @@
1
1
  language: ruby
2
2
  cache: bundler
3
- script:
4
- - bundle exec rake spec environment=test
5
3
  sudo: false
6
4
  rvm:
7
- - 2.2
8
- - 2.1
5
+ - 2.3.1
9
6
  env:
10
7
  global:
11
8
  - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
9
+ matrix:
10
+ - "RAILS_VERSION=4.2.7.1"
11
+ - "RAILS_VERSION=5.0.0.1"
12
12
  notifications:
13
- email:
14
- recipients:
15
- - "ul-dlt-hydra@lists.psu.edu"
16
- on_success: "change"
17
- on_failure: "always"
18
13
  irc:
19
14
  channels:
20
15
  - "irc.freenode.org#projecthydra"
@@ -15,6 +15,7 @@ module ActiveFedora
15
15
  end
16
16
 
17
17
  def treeify(identifier)
18
+ raise ArgumentError, 'Identifier must be a string of size > 0 in order to be treeified' if identifier.blank?
18
19
  head = identifier.split('/').first
19
20
  head.gsub!(/#.*/, '')
20
21
  (head.scan(/..?/).first(4) + [identifier]).join('/')
@@ -1,5 +1,5 @@
1
1
  module ActiveFedora
2
2
  module Noid
3
- VERSION = '1.1.2'.freeze
3
+ VERSION = '1.1.3'.freeze
4
4
  end
5
5
  end
@@ -19,5 +19,17 @@ describe ActiveFedora::Noid do
19
19
  let(:id) { 'abc123z' }
20
20
  it { is_expected.to eq 'ab/c1/23/z/abc123z' }
21
21
  end
22
+ context 'with an empty string' do
23
+ let(:id) { '' }
24
+ it 'raises ArgumentError' do
25
+ expect { subject }.to raise_error(ArgumentError)
26
+ end
27
+ end
28
+ context 'with a nil' do
29
+ let(:id) { nil }
30
+ it 'raises ArgumentError' do
31
+ expect { subject }.to raise_error(ArgumentError)
32
+ end
33
+ end
22
34
  end
23
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_fedora-noid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael J. Giarlo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-21 00:00:00.000000000 Z
11
+ date: 2016-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active-fedora