occi-core 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +34 -10
- data/lib/occi/parser/text.rb +1 -1
- data/lib/occi/version.rb +1 -1
- data/spec/occi/parser/text_spec.rb +10 -1
- metadata +45 -54
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2a33d4666ccb0cb6f5319c9c0a313a57659d092f
|
4
|
+
data.tar.gz: 06508a287d3bab6d510dc75e4c330f15fecab503
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: df8f403bc9166fea257c801665645cf61060cb5667854f7a76053d3744f7d1021d77605661805bf55fa649809d51a61187ac8a07dfae89427ff824be8f1e0c03
|
7
|
+
data.tar.gz: 68593e75b588190ee1d8a604594931edac40a1bfded15ca8bba84193859397ada6a2ed16f966ab046d8199918ebc63fe8e3ed4af705b6a39e074a9de476fef5d
|
data/README.md
CHANGED
@@ -14,20 +14,30 @@ Requirements
|
|
14
14
|
* RubyGems have to be installed
|
15
15
|
* Rake has to be installed (e.g., `gem install rake`)
|
16
16
|
|
17
|
-
###
|
18
|
-
* libxslt1-dev
|
19
|
-
* libxml2-dev
|
17
|
+
### Dependencies
|
18
|
+
* `libxslt1-dev` or `libxslt-devel`
|
19
|
+
* `libxml2-dev`or `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.**
|
26
31
|
|
27
|
-
For distros based on RHEL:
|
32
|
+
#### For distros based on RHEL:
|
28
33
|
~~~
|
29
34
|
yum install libxml2-devel libxslt-devel ruby-devel openssl-devel gcc gcc-c++ ruby rubygems
|
30
35
|
~~~
|
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.**
|
31
41
|
|
32
42
|
Installation
|
33
43
|
------------
|
@@ -47,12 +57,8 @@ To install the most recent beta version
|
|
47
57
|
### From source (dev)
|
48
58
|
|
49
59
|
**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!**
|
50
|
-
**However, if you wish to contribute to our project, this is the right way to start.**
|
51
60
|
|
52
|
-
|
53
|
-
|
54
|
-
curl -L https://get.rvm.io | bash -s stable --ruby
|
55
|
-
rvm install 1.9.3
|
61
|
+
**However, if you wish to contribute to our project, this is the right way to start.**
|
56
62
|
|
57
63
|
To build and install the bleeding edge version from master
|
58
64
|
|
@@ -63,6 +69,24 @@ To build and install the bleeding edge version from master
|
|
63
69
|
bundle exec rake test
|
64
70
|
rake install
|
65
71
|
|
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
|
+
|
66
90
|
Usage
|
67
91
|
-----
|
68
92
|
#### Logging
|
data/lib/occi/parser/text.rb
CHANGED
@@ -40,7 +40,7 @@ module Occi
|
|
40
40
|
if Occi::Settings.compatibility
|
41
41
|
REGEXP_CATEGORY = "Category:\\s*(?<term>#{REGEXP_TERM})" << # term (mandatory)
|
42
42
|
";\\s*scheme=\"(?<scheme>#{REGEXP_SCHEME})#{REGEXP_TERM}?\"" << # scheme (mandatory)
|
43
|
-
";\\s*class=\"(?<class>#{REGEXP_CLASS})\"" << # class (mandatory)
|
43
|
+
";\\s*class=\"?(?<class>#{REGEXP_CLASS})\"?" << # class (mandatory)
|
44
44
|
"(;\\s*title=\"(?<title>#{REGEXP_QUOTED_STRING})\")?" << # title (optional)
|
45
45
|
"(;\\s*rel=\"(?<rel>#{REGEXP_TYPE_IDENTIFIER})\")?"<< # rel (optional)
|
46
46
|
"(;\\s*location=\"(?<location>#{URI::URI_REF})\")?" << # location (optional)
|
data/lib/occi/version.rb
CHANGED
@@ -6,7 +6,7 @@ module Occi
|
|
6
6
|
|
7
7
|
describe '.category' do
|
8
8
|
|
9
|
-
it 'parses a string
|
9
|
+
it 'parses a string describing 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,6 +25,15 @@ 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
|
+
|
28
37
|
end
|
29
38
|
|
30
39
|
describe '.resource' do
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: occi-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
5
|
-
prerelease:
|
4
|
+
version: 4.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Florian Feldhaus
|
@@ -11,60 +10,53 @@ authors:
|
|
11
10
|
autorequire:
|
12
11
|
bindir: bin
|
13
12
|
cert_chain: []
|
14
|
-
date: 2013-
|
13
|
+
date: 2013-09-19 00:00:00.000000000 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: json
|
18
17
|
requirement: !ruby/object:Gem::Requirement
|
19
|
-
none: false
|
20
18
|
requirements:
|
21
|
-
- -
|
19
|
+
- - '>='
|
22
20
|
- !ruby/object:Gem::Version
|
23
21
|
version: '0'
|
24
22
|
type: :runtime
|
25
23
|
prerelease: false
|
26
24
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
-
none: false
|
28
25
|
requirements:
|
29
|
-
- -
|
26
|
+
- - '>='
|
30
27
|
- !ruby/object:Gem::Version
|
31
28
|
version: '0'
|
32
29
|
- !ruby/object:Gem::Dependency
|
33
30
|
name: hashie
|
34
31
|
requirement: !ruby/object:Gem::Requirement
|
35
|
-
none: false
|
36
32
|
requirements:
|
37
|
-
- -
|
33
|
+
- - '>='
|
38
34
|
- !ruby/object:Gem::Version
|
39
35
|
version: '0'
|
40
36
|
type: :runtime
|
41
37
|
prerelease: false
|
42
38
|
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
none: false
|
44
39
|
requirements:
|
45
|
-
- -
|
40
|
+
- - '>='
|
46
41
|
- !ruby/object:Gem::Version
|
47
42
|
version: '0'
|
48
43
|
- !ruby/object:Gem::Dependency
|
49
44
|
name: uuidtools
|
50
45
|
requirement: !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
46
|
requirements:
|
53
|
-
- -
|
47
|
+
- - '>='
|
54
48
|
- !ruby/object:Gem::Version
|
55
49
|
version: 2.1.3
|
56
50
|
type: :runtime
|
57
51
|
prerelease: false
|
58
52
|
version_requirements: !ruby/object:Gem::Requirement
|
59
|
-
none: false
|
60
53
|
requirements:
|
61
|
-
- -
|
54
|
+
- - '>='
|
62
55
|
- !ruby/object:Gem::Version
|
63
56
|
version: 2.1.3
|
64
57
|
- !ruby/object:Gem::Dependency
|
65
58
|
name: nokogiri
|
66
59
|
requirement: !ruby/object:Gem::Requirement
|
67
|
-
none: false
|
68
60
|
requirements:
|
69
61
|
- - ~>
|
70
62
|
- !ruby/object:Gem::Version
|
@@ -72,7 +64,6 @@ dependencies:
|
|
72
64
|
type: :runtime
|
73
65
|
prerelease: false
|
74
66
|
version_requirements: !ruby/object:Gem::Requirement
|
75
|
-
none: false
|
76
67
|
requirements:
|
77
68
|
- - ~>
|
78
69
|
- !ruby/object:Gem::Version
|
@@ -80,7 +71,6 @@ dependencies:
|
|
80
71
|
- !ruby/object:Gem::Dependency
|
81
72
|
name: activesupport
|
82
73
|
requirement: !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
84
74
|
requirements:
|
85
75
|
- - ~>
|
86
76
|
- !ruby/object:Gem::Version
|
@@ -88,7 +78,6 @@ dependencies:
|
|
88
78
|
type: :runtime
|
89
79
|
prerelease: false
|
90
80
|
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
none: false
|
92
81
|
requirements:
|
93
82
|
- - ~>
|
94
83
|
- !ruby/object:Gem::Version
|
@@ -96,113 +85,99 @@ dependencies:
|
|
96
85
|
- !ruby/object:Gem::Dependency
|
97
86
|
name: settingslogic
|
98
87
|
requirement: !ruby/object:Gem::Requirement
|
99
|
-
none: false
|
100
88
|
requirements:
|
101
|
-
- -
|
89
|
+
- - '>='
|
102
90
|
- !ruby/object:Gem::Version
|
103
91
|
version: '0'
|
104
92
|
type: :runtime
|
105
93
|
prerelease: false
|
106
94
|
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
none: false
|
108
95
|
requirements:
|
109
|
-
- -
|
96
|
+
- - '>='
|
110
97
|
- !ruby/object:Gem::Version
|
111
98
|
version: '0'
|
112
99
|
- !ruby/object:Gem::Dependency
|
113
100
|
name: rspec
|
114
101
|
requirement: !ruby/object:Gem::Requirement
|
115
|
-
none: false
|
116
102
|
requirements:
|
117
|
-
- -
|
103
|
+
- - '>='
|
118
104
|
- !ruby/object:Gem::Version
|
119
105
|
version: '0'
|
120
106
|
type: :development
|
121
107
|
prerelease: false
|
122
108
|
version_requirements: !ruby/object:Gem::Requirement
|
123
|
-
none: false
|
124
109
|
requirements:
|
125
|
-
- -
|
110
|
+
- - '>='
|
126
111
|
- !ruby/object:Gem::Version
|
127
112
|
version: '0'
|
128
113
|
- !ruby/object:Gem::Dependency
|
129
114
|
name: rake
|
130
115
|
requirement: !ruby/object:Gem::Requirement
|
131
|
-
none: false
|
132
116
|
requirements:
|
133
|
-
- -
|
117
|
+
- - '>='
|
134
118
|
- !ruby/object:Gem::Version
|
135
119
|
version: '0'
|
136
120
|
type: :development
|
137
121
|
prerelease: false
|
138
122
|
version_requirements: !ruby/object:Gem::Requirement
|
139
|
-
none: false
|
140
123
|
requirements:
|
141
|
-
- -
|
124
|
+
- - '>='
|
142
125
|
- !ruby/object:Gem::Version
|
143
126
|
version: '0'
|
144
127
|
- !ruby/object:Gem::Dependency
|
145
128
|
name: builder
|
146
129
|
requirement: !ruby/object:Gem::Requirement
|
147
|
-
none: false
|
148
130
|
requirements:
|
149
|
-
- -
|
131
|
+
- - '>='
|
150
132
|
- !ruby/object:Gem::Version
|
151
133
|
version: '0'
|
152
134
|
type: :development
|
153
135
|
prerelease: false
|
154
136
|
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
none: false
|
156
137
|
requirements:
|
157
|
-
- -
|
138
|
+
- - '>='
|
158
139
|
- !ruby/object:Gem::Version
|
159
140
|
version: '0'
|
160
141
|
- !ruby/object:Gem::Dependency
|
161
142
|
name: simplecov
|
162
143
|
requirement: !ruby/object:Gem::Requirement
|
163
|
-
none: false
|
164
144
|
requirements:
|
165
|
-
- -
|
145
|
+
- - '>='
|
166
146
|
- !ruby/object:Gem::Version
|
167
147
|
version: '0'
|
168
148
|
type: :development
|
169
149
|
prerelease: false
|
170
150
|
version_requirements: !ruby/object:Gem::Requirement
|
171
|
-
none: false
|
172
151
|
requirements:
|
173
|
-
- -
|
152
|
+
- - '>='
|
174
153
|
- !ruby/object:Gem::Version
|
175
154
|
version: '0'
|
176
155
|
- !ruby/object:Gem::Dependency
|
177
156
|
name: yard
|
178
157
|
requirement: !ruby/object:Gem::Requirement
|
179
|
-
none: false
|
180
158
|
requirements:
|
181
|
-
- -
|
159
|
+
- - '>='
|
182
160
|
- !ruby/object:Gem::Version
|
183
161
|
version: '0'
|
184
162
|
type: :development
|
185
163
|
prerelease: false
|
186
164
|
version_requirements: !ruby/object:Gem::Requirement
|
187
|
-
none: false
|
188
165
|
requirements:
|
189
|
-
- -
|
166
|
+
- - '>='
|
190
167
|
- !ruby/object:Gem::Version
|
191
168
|
version: '0'
|
192
169
|
- !ruby/object:Gem::Dependency
|
193
170
|
name: yard-rspec
|
194
171
|
requirement: !ruby/object:Gem::Requirement
|
195
|
-
none: false
|
196
172
|
requirements:
|
197
|
-
- -
|
173
|
+
- - '>='
|
198
174
|
- !ruby/object:Gem::Version
|
199
175
|
version: '0'
|
200
176
|
type: :development
|
201
177
|
prerelease: false
|
202
178
|
version_requirements: !ruby/object:Gem::Requirement
|
203
|
-
none: false
|
204
179
|
requirements:
|
205
|
-
- -
|
180
|
+
- - '>='
|
206
181
|
- !ruby/object:Gem::Version
|
207
182
|
version: '0'
|
208
183
|
description: OCCI is a collection of classes to simplify the implementation of the
|
@@ -288,26 +263,42 @@ files:
|
|
288
263
|
homepage: https://github.com/gwdg/rOCCI-core
|
289
264
|
licenses:
|
290
265
|
- Apache License, Version 2.0
|
266
|
+
metadata: {}
|
291
267
|
post_install_message:
|
292
268
|
rdoc_options: []
|
293
269
|
require_paths:
|
294
270
|
- lib
|
295
271
|
required_ruby_version: !ruby/object:Gem::Requirement
|
296
|
-
none: false
|
297
272
|
requirements:
|
298
|
-
- -
|
273
|
+
- - '>='
|
299
274
|
- !ruby/object:Gem::Version
|
300
275
|
version: 1.9.3
|
301
276
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
302
|
-
none: false
|
303
277
|
requirements:
|
304
|
-
- -
|
278
|
+
- - '>='
|
305
279
|
- !ruby/object:Gem::Version
|
306
280
|
version: '0'
|
307
281
|
requirements: []
|
308
282
|
rubyforge_project:
|
309
|
-
rubygems_version:
|
283
|
+
rubygems_version: 2.0.3
|
310
284
|
signing_key:
|
311
|
-
specification_version:
|
285
|
+
specification_version: 4
|
312
286
|
summary: OCCI toolkit
|
313
|
-
test_files:
|
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
|