occi-core 5.0.3 → 5.0.4

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: 5466749ee73863d17ad9790d85ca8433543bba7e
4
- data.tar.gz: 5ed162d57f5cc6a11b3085f51b6fa39b74287418
3
+ metadata.gz: c513bf8c09cb9dc9789598eabca5d2d5af294a85
4
+ data.tar.gz: e3284ba5d52dd568e2323a82f1020c2309289ca6
5
5
  SHA512:
6
- metadata.gz: 5ef10975e63f4258705a2ed36a9db7ad8abeaccde4b515c629e8449b06579f0093cfb51b1b16841f5dbcec876115c303ee1c3778c08a9657b008a3778de490a6
7
- data.tar.gz: 8ed7bd47e034c3d20481b8f0ec01d75cd1566f9c2b4f5511907c2883558e975b5b1d7ffbf90e5b2198490df52f37e8fa68fa3dda0e91393cbf16cf26a61dc3ba
6
+ metadata.gz: dde99401dee876b8522a50ab31fad485f87cfbca281d2ffa9543bee2573a1fb2a145242d36a9ef66fe76e35229706b573ec5df4813458218ee73791fbb1e4707
7
+ data.tar.gz: 8e309b3a4b7895428103c6fd6a7179a04ceacd5fe306cddb71a5e2169a9d789d30c9183bb1b93a54b75146eb264130ffa0e3cb6f1e1e8bd0576a9cf1c1812dda
@@ -1,4 +1,14 @@
1
1
 
2
+ 5.0.4 / 2017-11-10
3
+ ==================
4
+
5
+ * Forcing attribute type on occi.core.{source,target} to URI
6
+
7
+ 5.0.3 / 2017-10-19
8
+ ==================
9
+ * Added missing support for legacy context mixins
10
+
11
+
2
12
  5.0.2 / 2017-09-27
3
13
  ==================
4
14
 
@@ -82,7 +82,8 @@ module Occi
82
82
  unless def_hsh[:type]
83
83
  raise Occi::Core::Errors::ParsingError, "Attribute #{k.to_s.inspect} has no type"
84
84
  end
85
- attr_defs[k.to_s] = Occi::Core::AttributeDefinition.new def_hsh
85
+ fix_links!(k, def_hsh)
86
+ attr_defs[k.to_s] = Occi::Core::AttributeDefinition.new(def_hsh)
86
87
  end
87
88
 
88
89
  attr_defs
@@ -113,7 +114,14 @@ module Occi
113
114
  parsed_rel.each { |mxn| mixin.depends << first_or_die(derefd, mxn) }
114
115
  end
115
116
 
116
- private :lookup_applies_references!, :lookup_depends_references!
117
+ # :nodoc:
118
+ def fix_links!(name, definition_hash)
119
+ return unless %w[occi.core.source occi.core.target].include?(name.to_s)
120
+ logger.debug { "Forcing attribute type on #{name.to_s.inspect} from #{definition_hash[:type]} to URI" }
121
+ definition_hash[:type] = URI # forcing 'string' to URI for validation purposes
122
+ end
123
+
124
+ private :lookup_applies_references!, :lookup_depends_references!, :fix_links!
117
125
  end
118
126
  end
119
127
  end
@@ -2,7 +2,7 @@ module Occi
2
2
  module Core
3
3
  MAJOR_VERSION = 5 # Major update constant
4
4
  MINOR_VERSION = 0 # Minor update constant
5
- PATCH_VERSION = 3 # Patch/Fix version constant
5
+ PATCH_VERSION = 4 # Patch/Fix version constant
6
6
  STAGE_VERSION = nil # use `nil` for production releases
7
7
 
8
8
  unless defined?(::Occi::Core::VERSION)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: occi-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.3
4
+ version: 5.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Parak
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-19 00:00:00.000000000 Z
12
+ date: 2017-11-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport