occi-core 5.0.0.beta.4 → 5.0.0.beta.5

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: e2e1b39411baa08d88b06220dc9478fed8dc9853
4
- data.tar.gz: 38abfa1554fd73fb0107be365060cc8858ff3eb6
3
+ metadata.gz: 10924a00e47bae93f04879bcfe242c3b4957dc7d
4
+ data.tar.gz: 1f62fc249445349f361d1a909f9298ad619775a5
5
5
  SHA512:
6
- metadata.gz: 308dac6e39d40ba9df868b98f5e02ec2eab4e5242b6f48cc688d124c3b221654e91d6a48f80a906a8700acd397fb09f9094f29d45ca071cf333c30c9b4da6654
7
- data.tar.gz: c0ef2b4f0c161a672aece4f5d5596463e3ff562967967d9bc8c0bc44d050b678ceec03563b7a6090a44a327170c5515ae4c953642c6022a072b79c2d5f8c8a4e
6
+ metadata.gz: dbff54906247c5d0205fcbe28391f2fd1a5802ca8abc3f3c808681c4ebb024ac3edd151a9cb6090726d11f2782fb811ebef4604ac082eeb125a0757ae5b72d24
7
+ data.tar.gz: 3068278a251a5c3cbe077726999ba2d06c610e15689c69e8d1d76149131ad37e10676b132be7ad0d0c6ff534d3197b684baa524ed550d938082c33a9e6b56a39
@@ -29,7 +29,15 @@ module Occi
29
29
  # @return [Hash] textual representation of Object for headers
30
30
  def render_headers
31
31
  return {} if object.empty?
32
- { LOCATION_KEY_HEADERS => object.map(&:to_s) }
32
+ { LOCATION_KEY_HEADERS => location_ary_or_first }
33
+ end
34
+
35
+ protected
36
+
37
+ # :nodoc:
38
+ def location_ary_or_first
39
+ locations = object.map(&:to_s)
40
+ locations.many? ? locations : locations.first
33
41
  end
34
42
  end
35
43
  end
@@ -3,7 +3,7 @@ module Occi
3
3
  MAJOR_VERSION = 5 # Major update constant
4
4
  MINOR_VERSION = 0 # Minor update constant
5
5
  PATCH_VERSION = 0 # Patch/Fix version constant
6
- STAGE_VERSION = 'beta.4'.freeze # use `nil` for production releases
6
+ STAGE_VERSION = 'beta.5'.freeze # use `nil` for production releases
7
7
 
8
8
  unless defined?(::Occi::Core::VERSION)
9
9
  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.0.beta.4
4
+ version: 5.0.0.beta.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Parak
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-07-10 00:00:00.000000000 Z
13
+ date: 2017-07-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -571,7 +571,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
571
571
  version: 1.3.1
572
572
  requirements: []
573
573
  rubyforge_project:
574
- rubygems_version: 2.6.10
574
+ rubygems_version: 2.6.8
575
575
  signing_key:
576
576
  specification_version: 4
577
577
  summary: The rOCCI toolkit