stash-wrapper 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb6dd5df6c45afae4bed1654fe7ee2dee9406f65
4
- data.tar.gz: 7af4155eae092621706b7186a55e1d43647d7b7d
3
+ metadata.gz: 8b977267ee80e7268e598a8fa16e5b35964a85e6
4
+ data.tar.gz: 11a202d7774ac98eac6d4d19fb8c81cc6fb4888e
5
5
  SHA512:
6
- metadata.gz: 107b4c38067d994db9e8fc24320f07f478243438b7225594534826e1a36d776cdca6076ed09a2992079cb276d51229de2275755da862581bbee7e2fe4d327f44
7
- data.tar.gz: e1ff98e05c2abc70c21d686022154437c6093f560c6f03bcce64ed2d1adbf9c02f10791ed3bc54d9d4353261ea05adecb09005e89484a0455441911ec9e00833
6
+ metadata.gz: a48ae24c603ab53a66609ebc66a0e99a307109ddf5b032c9f73fc635a33269e0d2c4faee6e877c54e7438436aa837b0c11348436faaef6300dec072bf7fdc589
7
+ data.tar.gz: 59d2753ed90cd79243f4e1d46dda0a22a41a8451e504fd683603515bd2b3d39d56970f184a2381a376ff9dddd304d41acb46ce2f6fde3f2e550a4f9fca80a6d1
data/CHANGES.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 0.1.7 (2 May 2016)
2
2
 
3
- - Ensure namespace gets set on read as well as write
3
+ - Fix issue where namespace would not be set correctly when round-tripping from XML
4
4
 
5
5
  # 0.1.6 (2 May 2016)
6
6
 
@@ -5,7 +5,7 @@ module Stash
5
5
  NAME = 'stash-wrapper'
6
6
 
7
7
  # The version of this gem
8
- VERSION = '0.1.7'
8
+ VERSION = '0.1.8'
9
9
 
10
10
  # The copyright notice for this gem
11
11
  COPYRIGHT = 'Copyright (c) 2016 The Regents of the University of California'
@@ -8,22 +8,14 @@ module Stash
8
8
  module Wrapper
9
9
  # Mapping for the root `<st:stash_wrapper>` element
10
10
  class StashWrapper
11
- include ::XML::Mapping
11
+ include ::XML::MappingExtensions::Namespaced
12
12
 
13
- NAMESPACE = ::XML::MappingExtensions::Namespace.new(
13
+ namespace ::XML::MappingExtensions::Namespace.new(
14
14
  prefix: 'st',
15
15
  uri: 'http://dash.cdlib.org/stash_wrapper/',
16
16
  schema_location: 'http://dash.cdlib.org/stash_wrapper/ http://dash.cdlib.org/stash_wrapper/stash_wrapper.xsd'
17
17
  )
18
18
 
19
- # Overrides `Class.allocate`, used by `XML::Mapping` on read, to make sure
20
- # the namespace gets set even when we don't call the initializer
21
- def self.allocate
22
- res = super
23
- res.namespace = NAMESPACE
24
- res
25
- end
26
-
27
19
  root_element_name 'stash_wrapper'
28
20
 
29
21
  object_node :identifier, 'identifier', class: Identifier
@@ -44,7 +36,6 @@ module Stash
44
36
  # @param descriptive_elements [Array<REXML::Element>] the encapsulated
45
37
  # XML metadata
46
38
  def initialize(identifier:, version:, license:, embargo: nil, inventory: nil, descriptive_elements:) # rubocop:disable Metrics/ParameterLists
47
- self.namespace = NAMESPACE
48
39
  self.identifier = identifier
49
40
  self.stash_administrative = StashAdministrative.new(
50
41
  version: version,
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ['lib']
26
26
 
27
27
  spec.add_dependency 'typesafe_enum', '~> 0.1', '>= 0.1.7'
28
- spec.add_dependency 'xml-mapping_extensions', '~> 0.3', '>= 0.3.6'
28
+ spec.add_dependency 'xml-mapping_extensions', '~> 0.4'
29
29
 
30
30
  spec.add_development_dependency 'bundler', '~> 1.7'
31
31
  spec.add_development_dependency 'equivalent-xml', '~> 0.6.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stash-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Moles
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-02 00:00:00.000000000 Z
11
+ date: 2016-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typesafe_enum
@@ -36,20 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.3'
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 0.3.6
39
+ version: '0.4'
43
40
  type: :runtime
44
41
  prerelease: false
45
42
  version_requirements: !ruby/object:Gem::Requirement
46
43
  requirements:
47
44
  - - "~>"
48
45
  - !ruby/object:Gem::Version
49
- version: '0.3'
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: 0.3.6
46
+ version: '0.4'
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: bundler
55
49
  requirement: !ruby/object:Gem::Requirement