occi-core 4.1.2 → 4.1.3

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: 9b884e7dad15d650f4b9d82c029a5581176c13fa
4
- data.tar.gz: 6fcf4b0cd0141f1aaba9b5287fd6aa5206c165af
3
+ metadata.gz: 55193e61a404bde23ad87389d4a7211bfb9361ab
4
+ data.tar.gz: 836fd7feeb5d45e1809f4416a5b3107f3aa617a7
5
5
  SHA512:
6
- metadata.gz: 22fffb43cbf87277d3c18453687873a8e37a87c76cfcad265a76e44781a0a3acf1a71a3030b60e299b55ccc9f607f789d9d243defb3f799475666e4890acae77
7
- data.tar.gz: 4e50e65a640d86a6ac8f8b0db7dce4418835493e37be5a452d3a63c473a6cbde2545fa7a43db874c37bc730b452c5ee5a866d40cc10e7d66ceacac60de45b3be
6
+ metadata.gz: 09b0320da7a2c4bf931cd077a77ada66794fe074ef1c79770467cebec65497b0eee29d032a53b4db402d9354bc266288bb24d087b51381e5372e9c3d70b855e0
7
+ data.tar.gz: 903d240f897e55af9e6d772b94194629ffec7301c118906562ccc756604458e6624b78300461bc00c32f928af293e3c82b51a61d8c5e85e864bf375d39d2ac9d
data/README.md CHANGED
@@ -14,30 +14,20 @@ Requirements
14
14
  * RubyGems have to be installed
15
15
  * Rake has to be installed (e.g., `gem install rake`)
16
16
 
17
- ### Dependencies
18
- * `libxslt1-dev` or `libxslt-devel`
19
- * `libxml2-dev`or `libxml2-devel`
17
+ ### Libraries/packages
18
+ * libxslt1-dev/libxslt-devel
19
+ * libxml2-dev/libxml2-devel
20
20
 
21
21
  ### Examples
22
- #### For distros based on Debian:
22
+ For distros based on Debian:
23
23
  ~~~
24
24
  apt-get install ruby rubygems ruby-dev libxslt1-dev libxml2-dev
25
25
  ~~~
26
- ~~~
27
- ruby -v
28
- ~~~
29
-
30
- **Unless you have Ruby >= 1.9.3, please, go to [rOCCI-core#RVM](#rvm) and install RVM with a newer Ruby version.**
31
26
 
32
- #### For distros based on RHEL:
27
+ For distros based on RHEL:
33
28
  ~~~
34
29
  yum install libxml2-devel libxslt-devel ruby-devel openssl-devel gcc gcc-c++ ruby rubygems
35
30
  ~~~
36
- ~~~
37
- ruby -v
38
- ~~~
39
-
40
- **Unless you have Ruby >= 1.9.3, please, go to [rOCCI-core#RVM](#rvm) and install RVM with a newer Ruby version.**
41
31
 
42
32
  Installation
43
33
  ------------
@@ -57,9 +47,13 @@ To install the most recent beta version
57
47
  ### From source (dev)
58
48
 
59
49
  **Installation from source should never be your first choice! Especially, if you are not familiar with RVM, Bundler, Rake and other dev tools for Ruby!**
60
-
61
50
  **However, if you wish to contribute to our project, this is the right way to start.**
62
51
 
52
+ To use rOCCI from source it is very much recommended to use RVM. [Install RVM](https://rvm.io/rvm/install/) with
53
+
54
+ curl -L https://get.rvm.io | bash -s stable --ruby
55
+ rvm install 1.9.3
56
+
63
57
  To build and install the bleeding edge version from master
64
58
 
65
59
  git clone git://github.com/gwdg/rOCCI-core.git
@@ -69,24 +63,6 @@ To build and install the bleeding edge version from master
69
63
  bundle exec rake test
70
64
  rake install
71
65
 
72
- ### RVM
73
-
74
- **Notice:** Follow the RVM installation guide linked below, we recommend using the default 'Single-User installation'.
75
-
76
- **Warning:** NEVER install RVM as root! If you choose the 'Multi-User installation', use a different user account with sudo access instead!
77
-
78
- * [Installing RVM](https://rvm.io/rvm/install#explained)
79
- * Install Ruby
80
-
81
- ~~~
82
- rvm requirements
83
- rvm install 1.9.3
84
- rvm use 1.9.3 --default
85
- ~~~
86
- ~~~
87
- ruby -v
88
- ~~~
89
-
90
66
  Usage
91
67
  -----
92
68
  #### Logging
@@ -5,7 +5,6 @@ module Occi
5
5
  # Regular expressions
6
6
  REGEXP_QUOTED_STRING = /([^"\\]|\\.)*/
7
7
  REGEXP_LOALPHA = /[a-z]/
8
- REGEXP_ALPHA = /[a-zA-Z]/
9
8
  REGEXP_DIGIT = /[0-9]/
10
9
  REGEXP_INT = /#{REGEXP_DIGIT}+/
11
10
  REGEXP_FLOAT = /#{REGEXP_INT}\.#{REGEXP_INT}/
@@ -15,7 +14,7 @@ module Occi
15
14
  # Regular expressions for OCCI
16
15
  if Occi::Settings.compatibility
17
16
  # Compatibility with terms starting with a number
18
- REGEXP_TERM = /(#{REGEXP_ALPHA}|#{REGEXP_DIGIT})(#{REGEXP_ALPHA}|#{REGEXP_DIGIT}|-|_)*/
17
+ REGEXP_TERM = /(#{REGEXP_LOALPHA}|#{REGEXP_DIGIT})(#{REGEXP_LOALPHA}|#{REGEXP_DIGIT}|-|_)*/
19
18
  else
20
19
  REGEXP_TERM = /#{REGEXP_LOALPHA}(#{REGEXP_LOALPHA}|#{REGEXP_DIGIT}|-|_)*/
21
20
  end
@@ -41,7 +40,7 @@ module Occi
41
40
  if Occi::Settings.compatibility
42
41
  REGEXP_CATEGORY = "Category:\\s*(?<term>#{REGEXP_TERM})" << # term (mandatory)
43
42
  ";\\s*scheme=\"(?<scheme>#{REGEXP_SCHEME})#{REGEXP_TERM}?\"" << # scheme (mandatory)
44
- ";\\s*class=\"?(?<class>#{REGEXP_CLASS})\"?" << # class (mandatory)
43
+ ";\\s*class=\"(?<class>#{REGEXP_CLASS})\"" << # class (mandatory)
45
44
  "(;\\s*title=\"(?<title>#{REGEXP_QUOTED_STRING})\")?" << # title (optional)
46
45
  "(;\\s*rel=\"(?<rel>#{REGEXP_TYPE_IDENTIFIER})\")?"<< # rel (optional)
47
46
  "(;\\s*location=\"(?<location>#{URI::URI_REF})\")?" << # location (optional)
@@ -155,13 +154,15 @@ module Occi
155
154
 
156
155
  raise "could not match #{string}" unless match
157
156
 
158
- term = match[:term].downcase
157
+ term = match[:term]
159
158
  scheme = match[:scheme]
160
159
  title = match[:title]
161
160
  related = match[:rel].to_s.split
162
161
  attributes = Occi::Core::Attributes.new
163
162
  if match[:attributes]
164
- match[:attributes].split.each do |attribute|
163
+ matched_attributes = match[:attributes].gsub(/\{(immutable|required)\s+(required|immutable)\}/, '{\1_\2}')
164
+ matched_attributes.split.each do |attribute|
165
+ attribute.gsub! /\{(immutable|required)_(required|immutable)\}/, '{\1 \2}'
165
166
  property_string = attribute[/#{REGEXP_ATTRIBUTE_DEF}/, -2]
166
167
  properties = Occi::Core::Properties.new
167
168
  if property_string
data/lib/occi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Occi
2
- VERSION = "4.1.2" unless defined?(::Occi::VERSION)
2
+ VERSION = "4.1.3" unless defined?(::Occi::VERSION)
3
3
  end
@@ -6,7 +6,7 @@ module Occi
6
6
 
7
7
  describe '.category' do
8
8
 
9
- it 'parses a string describing an OCCI Category' do
9
+ it 'parses a string with an OCCI Category to an OCCI Category' do
10
10
  category_string = 'Category: a_a1-_;scheme="http://a.a/a#";class="kind";title="aA1!\"§$%&/()=?`´ß+*#-_.:,;<>";rel="http://a.a/b#a";location="/a1-A/";attributes="a_1-_.a1-_a a-1.a.b";actions="http://a.a/a1#a1 http://a.b1/b1#b2"'
11
11
 
12
12
  category = Occi::Parser::Text.category category_string
@@ -25,24 +25,6 @@ module Occi
25
25
  category.actions.to_a.any? {|action| action.to_s == 'http://a.b1/b1#b2'}.should be_true
26
26
  end
27
27
 
28
- it 'parses a string describing an OCCI Category with unquoted class value' do
29
- category_string = 'Category: a_a1-_;scheme="http://a.a/a#";class=kind'
30
-
31
- category = Occi::Parser::Text.category category_string
32
- category.term.should eq 'a_a1-_'
33
- category.scheme.should eq 'http://a.a/a#'
34
- category.class.should eq Occi::Core::Kind
35
- end
36
-
37
- it 'parses a string describing an OCCI Category with uppercase term' do
38
- category_string = 'Category: TERM;scheme="http://a.a/a#";class=kind'
39
-
40
- category = Occi::Parser::Text.category category_string
41
- category.term.should eq 'term'
42
- category.scheme.should eq 'http://a.a/a#'
43
- category.class.should eq Occi::Core::Kind
44
- end
45
-
46
28
  end
47
29
 
48
30
  describe '.resource' do
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.1.2
4
+ version: 4.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Feldhaus
@@ -10,174 +10,174 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-09-19 00:00:00.000000000 Z
13
+ date: 2014-10-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - '>='
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - '>='
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  version: '0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: hashie
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - '>='
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
35
  version: '0'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - '>='
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: uuidtools
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - '>='
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: 2.1.3
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - '>='
54
+ - - ">="
55
55
  - !ruby/object:Gem::Version
56
56
  version: 2.1.3
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: nokogiri
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - ~>
61
+ - - "~>"
62
62
  - !ruby/object:Gem::Version
63
63
  version: 1.6.0
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - ~>
68
+ - - "~>"
69
69
  - !ruby/object:Gem::Version
70
70
  version: 1.6.0
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: activesupport
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - ~>
75
+ - - "~>"
76
76
  - !ruby/object:Gem::Version
77
77
  version: 4.0.0
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - ~>
82
+ - - "~>"
83
83
  - !ruby/object:Gem::Version
84
84
  version: 4.0.0
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: settingslogic
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - '>='
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - '>='
96
+ - - ">="
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: rspec
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - '>='
103
+ - - ">="
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - '>='
110
+ - - ">="
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rake
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - '>='
117
+ - - ">="
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - '>='
124
+ - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: builder
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - '>='
131
+ - - ">="
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - '>='
138
+ - - ">="
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: simplecov
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - '>='
145
+ - - ">="
146
146
  - !ruby/object:Gem::Version
147
147
  version: '0'
148
148
  type: :development
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
- - - '>='
152
+ - - ">="
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: yard
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
- - - '>='
159
+ - - ">="
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  type: :development
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
- - - '>='
166
+ - - ">="
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: yard-rspec
171
171
  requirement: !ruby/object:Gem::Requirement
172
172
  requirements:
173
- - - '>='
173
+ - - ">="
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  type: :development
177
177
  prerelease: false
178
178
  version_requirements: !ruby/object:Gem::Requirement
179
179
  requirements:
180
- - - '>='
180
+ - - ">="
181
181
  - !ruby/object:Gem::Version
182
182
  version: '0'
183
183
  description: OCCI is a collection of classes to simplify the implementation of the
@@ -190,10 +190,10 @@ executables: []
190
190
  extensions: []
191
191
  extra_rdoc_files: []
192
192
  files:
193
- - .gitignore
194
- - .rspec
195
- - .travis.yml
196
- - .yardopts
193
+ - ".gitignore"
194
+ - ".rspec"
195
+ - ".travis.yml"
196
+ - ".yardopts"
197
197
  - AUTHORS
198
198
  - Gemfile
199
199
  - LICENSE
@@ -270,35 +270,18 @@ require_paths:
270
270
  - lib
271
271
  required_ruby_version: !ruby/object:Gem::Requirement
272
272
  requirements:
273
- - - '>='
273
+ - - ">="
274
274
  - !ruby/object:Gem::Version
275
275
  version: 1.9.3
276
276
  required_rubygems_version: !ruby/object:Gem::Requirement
277
277
  requirements:
278
- - - '>='
278
+ - - ">="
279
279
  - !ruby/object:Gem::Version
280
280
  version: '0'
281
281
  requirements: []
282
282
  rubyforge_project:
283
- rubygems_version: 2.0.3
283
+ rubygems_version: 2.2.2
284
284
  signing_key:
285
285
  specification_version: 4
286
286
  summary: OCCI toolkit
287
- test_files:
288
- - spec/occi/collection_spec.rb
289
- - spec/occi/core/attribute_spec.rb
290
- - spec/occi/core/attributes_spec.rb
291
- - spec/occi/core/categories_spec.rb
292
- - spec/occi/core/category_spec.rb
293
- - spec/occi/core/entity_spec.rb
294
- - spec/occi/core/kind_spec.rb
295
- - spec/occi/core/resource_spec.rb
296
- - spec/occi/infrastructure/compute_spec.rb
297
- - spec/occi/log_spec.rb
298
- - spec/occi/model_spec.rb
299
- - spec/occi/parser/text_spec.rb
300
- - spec/occi/parser_spec.rb
301
- - spec/occi/test.json
302
- - spec/occi/test.ova
303
- - spec/occi/test.ovf
304
- - spec/spec_helper.rb
287
+ test_files: []