occi-core 4.3.5 → 4.3.6

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: d538f5cdea3d97838599cb47ec683aa741511fb6
4
- data.tar.gz: c67bbd9ec02ca318d34107f9e424a11b3a2525da
3
+ metadata.gz: 982c9d4d37b5b8e86e38e039dce74a1a27c3d0f9
4
+ data.tar.gz: 8ff90a2a4c11dbeed57dd7ac8e8a5f4a7d14d9ec
5
5
  SHA512:
6
- metadata.gz: e3906c64af02d6dce2a806d86e21779c92842a159b67c35eb1a29d92ca57bfb853180fa2bb55333b2482407433114cbfdd94520f1cc3b0018cbde20d3ff0070d
7
- data.tar.gz: e30e89e7765a35b16981a001b8711cfea3544392ce4e4a06e227a05a612384b50e60d7f161f2bcc74b44e35ac2e0762ce9def7ff962acb874e5530c52c790930
6
+ metadata.gz: d5b7a5296a00711b0d9b3f1abfc8a6e089aeaf1e5e71c6de83ff987d49dbe65e2e4d0eb0cfbffb16303fc9e772ffbbe111b378f4a072bc5454d941ac93831f48
7
+ data.tar.gz: 1a5b883d2eef57cdf6ee9dc498e3b9516f34025d2ba2c2193ab7f97d2d766c117dee223d0a5898ba703b215d5d451d7a4da484a59b650fcf14ad5c5e93615901
@@ -208,11 +208,11 @@ module Occi
208
208
 
209
209
  # @return [String] text representation
210
210
  def to_text
211
- text = "Category: #{self.kind.term};scheme=#{self.kind.scheme.inspect};class=\"kind\";location=#{self.kind.location.inspect};title=#{self.kind.title.inspect}"
211
+ text = "Category: #{self.kind.term};scheme=#{self.kind.scheme.inspect};class=\"kind\""
212
212
  @mixins.each do |mixin|
213
213
  scheme, term = mixin.to_s.split('#')
214
214
  scheme << '#'
215
- text << "\nCategory: #{term};scheme=#{scheme.inspect};class=\"mixin\";location=#{mixin.location.inspect};title=#{mixin.title ? mixin.title.inspect : ''.inspect}"
215
+ text << "\nCategory: #{term};scheme=#{scheme.inspect};class=\"mixin\""
216
216
  end
217
217
 
218
218
  text << @attributes.to_text
@@ -225,12 +225,12 @@ module Occi
225
225
  # @return [Hash] hash containing the HTTP headers of the text/occi rendering
226
226
  def to_header
227
227
  header = Hashie::Mash.new
228
- header['Category'] = "#{self.kind.term};scheme=#{self.kind.scheme.inspect};class=\"kind\";location=#{self.kind.location.inspect};title=#{self.kind.title.inspect}"
228
+ header['Category'] = "#{self.kind.term};scheme=#{self.kind.scheme.inspect};class=\"kind\""
229
229
 
230
230
  @mixins.each do |mixin|
231
231
  scheme, term = mixin.to_s.split('#')
232
232
  scheme << '#'
233
- header['Category'] << ",#{term};scheme=#{scheme.inspect};class=\"mixin\";location=#{mixin.location.inspect};title=#{mixin.title ? mixin.title.inspect : ''.inspect}"
233
+ header['Category'] << ",#{term};scheme=#{scheme.inspect};class=\"mixin\""
234
234
  end
235
235
 
236
236
  attributes = @attributes.to_header
@@ -93,7 +93,13 @@ module Occi
93
93
  # @param kind [Occi::Core::Kind, String] Kind or Type Identifier of a Kind where relation should be checked.
94
94
  # @return [true,false]
95
95
  def related_to?(kind)
96
- self.parent.to_s == kind.to_s or self.to_s == kind.to_s
96
+ to_s == kind.to_s || parent.to_s == kind.to_s \
97
+ || \
98
+ (parent.to_s == "http://schemas.ogf.org/occi/infrastructure#network" && kind.to_s == "http://schemas.ogf.org/occi/core#resource") \
99
+ || \
100
+ (parent.to_s == "http://schemas.ogf.org/occi/infrastructure#storage" && kind.to_s == "http://schemas.ogf.org/occi/core#resource") \
101
+ || \
102
+ (parent.to_s == "http://schemas.ogf.org/occi/infrastructure#compute" && kind.to_s == "http://schemas.ogf.org/occi/core#resource")
97
103
  end
98
104
 
99
105
  def entity_type
@@ -1,3 +1,3 @@
1
1
  module Occi
2
- VERSION = "4.3.5" unless defined?(::Occi::VERSION)
2
+ VERSION = "4.3.6" unless defined?(::Occi::VERSION)
3
3
  end
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: 4.3.5
4
+ version: 4.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Feldhaus
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-02-03 00:00:00.000000000 Z
13
+ date: 2017-07-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -304,7 +304,6 @@ extra_rdoc_files: []
304
304
  files:
305
305
  - ".gitignore"
306
306
  - ".rspec"
307
- - ".travis.yml"
308
307
  - ".yardopts"
309
308
  - AUTHORS
310
309
  - Gemfile
@@ -457,7 +456,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
457
456
  version: '0'
458
457
  requirements: []
459
458
  rubyforge_project:
460
- rubygems_version: 2.4.8
459
+ rubygems_version: 2.6.12
461
460
  signing_key:
462
461
  specification_version: 4
463
462
  summary: OCCI toolkit
@@ -1,30 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1
7
- - 2.2
8
- - 2.3
9
- - ruby-head
10
-
11
- matrix:
12
- allow_failures:
13
- - rvm: 2.3
14
- - rvm: ruby-head
15
- fast_finish: true
16
-
17
- branches:
18
- only:
19
- - master
20
- - 4.0.x
21
- - 4.1.x
22
- - 4.2.x
23
- - 4.3.x
24
-
25
- install: 'gem install bundler -v ">= 1.7.12" && bundle install --retry=10'
26
-
27
- env:
28
- - ON_TRAVIS_CI=yes
29
-
30
- sudo: false