aeolus-image 0.0.1 → 0.4.0

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.
Files changed (63) hide show
  1. data/COPYING +161 -0
  2. data/Rakefile +32 -19
  3. data/lib/aeolus_image.rb +35 -0
  4. data/lib/aeolus_image/active_resource_oauth_client.rb +62 -0
  5. data/lib/aeolus_image/import.rb +44 -0
  6. data/lib/aeolus_image/model/factory/base.rb +93 -0
  7. data/lib/aeolus_image/model/factory/build.rb +23 -0
  8. data/lib/aeolus_image/model/factory/builder.rb +46 -0
  9. data/lib/aeolus_image/model/factory/image.rb +23 -0
  10. data/lib/aeolus_image/model/factory/provider_image.rb +35 -0
  11. data/lib/aeolus_image/model/factory/target_image.rb +45 -0
  12. data/lib/aeolus_image/model/warehouse/icicle.rb +60 -0
  13. data/lib/aeolus_image/model/warehouse/image.rb +135 -0
  14. data/lib/aeolus_image/model/warehouse/image_build.rb +60 -0
  15. data/lib/aeolus_image/model/warehouse/provider_image.rb +36 -0
  16. data/lib/aeolus_image/model/warehouse/target_image.rb +53 -0
  17. data/lib/aeolus_image/model/warehouse/template.rb +35 -0
  18. data/lib/aeolus_image/model/warehouse/warehouse_client.rb +201 -0
  19. data/lib/aeolus_image/model/warehouse/warehouse_model.rb +236 -0
  20. data/spec/aeolus_image/model/factory/provider_image_spec.rb +12 -0
  21. data/spec/models/factory/base_spec.rb +94 -0
  22. data/spec/models/factory/builder_spec.rb +31 -0
  23. data/spec/models/factory/provider_image_spec.rb +21 -0
  24. data/spec/models/factory/target_image_spec.rb +21 -0
  25. data/spec/models/warehouse/image_build_spec.rb +189 -0
  26. data/spec/models/warehouse/image_spec.rb +241 -0
  27. data/spec/models/warehouse/provider_image_spec.rb +115 -0
  28. data/spec/models/warehouse/target_image_spec.rb +180 -0
  29. data/spec/models/warehouse/template_spec.rb +76 -0
  30. data/spec/models/warehouse/warehouse_client_spec.rb +445 -0
  31. data/spec/models/warehouse/warehouse_model_spec.rb +94 -0
  32. data/spec/spec_helper.rb +34 -47
  33. data/spec/vcr/cassettes/builder.yml +24 -0
  34. data/spec/vcr/cassettes/oauth.yml +80 -0
  35. data/spec/vcr/cassettes/oauth_fail_invalid.yml +30 -0
  36. data/spec/vcr/cassettes/oauth_fail_no.yml +22 -0
  37. data/spec/vcr/cassettes/oauth_success_valid.yml +30 -0
  38. data/spec/vcr_setup.rb +26 -0
  39. metadata +70 -46
  40. data/bin/aeolus-image +0 -6
  41. data/examples/aeolus-cli +0 -9
  42. data/examples/custom_repo.tdl +0 -18
  43. data/examples/image_description.xml +0 -3
  44. data/examples/tdl.rng +0 -207
  45. data/lib/base_command.rb +0 -134
  46. data/lib/build_command.rb +0 -68
  47. data/lib/config_parser.rb +0 -212
  48. data/lib/delete_command.rb +0 -9
  49. data/lib/import_command.rb +0 -44
  50. data/lib/list_command.rb +0 -141
  51. data/lib/push_command.rb +0 -72
  52. data/man/aeolus-image-build.1 +0 -36
  53. data/man/aeolus-image-import.1 +0 -57
  54. data/man/aeolus-image-list.1 +0 -80
  55. data/man/aeolus-image-push.1 +0 -40
  56. data/man/aeolus-image.1 +0 -16
  57. data/spec/base_command_spec.rb +0 -76
  58. data/spec/build_command_spec.rb +0 -63
  59. data/spec/config_parser_spec.rb +0 -82
  60. data/spec/import_command_spec.rb +0 -43
  61. data/spec/list_command_spec.rb +0 -21
  62. data/spec/push_command_spec.rb +0 -56
  63. data/spec/spec.opts +0 -3
@@ -0,0 +1,94 @@
1
+ # Copyright 2011 Red Hat, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'spec_helper'
16
+
17
+ module Aeolus
18
+ module Image
19
+ module Warehouse
20
+ describe WarehouseModel do
21
+ subject { @warehouse_model }
22
+ before(:each) do
23
+ @warehouse_model_attributes = {
24
+ :attribute => 'attribute',
25
+ :other_attribute => 'other_attribute',
26
+ }
27
+ @object = mock(Object, :attr_list => @warehouse_model_attributes.keys, :attrs => @warehouse_model_attributes, :body => 'body')
28
+ @warehouse_model_attributes.each do |key, value|
29
+ @object.stub(key.to_sym, value)
30
+ end
31
+ @warehouse_model = WarehouseModel.new(@object)
32
+ end
33
+
34
+ context "#==" do
35
+ let(:other_object) { mock(Object, :attr_list => other_warehouse_attributes.keys, :attrs => other_warehouse_attributes, :body => 'body') }
36
+ let(:other_warehouse_model) { WarehouseModel.new(other_object) }
37
+
38
+ context "when other object has the same instance variables list" do
39
+ context "with the same values" do
40
+ let(:other_warehouse_attributes) { @warehouse_model_attributes }
41
+ it { subject.should == other_warehouse_model }
42
+ end
43
+
44
+ context "with different values" do
45
+ let(:other_warehouse_attributes) { @warehouse_model_attributes.merge(:attribute => 'other_value') }
46
+ it { subject.==(other_warehouse_model).should be_false }
47
+ end
48
+ end
49
+
50
+ context "when other object has different instance variables list" do
51
+ let(:other_warehouse_attributes) { @warehouse_model_attributes.merge(:another_attribute => 'another_attribute') }
52
+
53
+ it { subject.==(other_warehouse_model).should be_false }
54
+
55
+ end
56
+ end
57
+
58
+ # cannot be tested - method returns uuid
59
+ # which may be created by initialize method in child of WarehouseModel
60
+ context "#id"
61
+
62
+ context ".set_warehouse_and_bucket" do
63
+
64
+ it "should set warehouse" do
65
+ pending
66
+ end
67
+
68
+ it "should set bucket" do
69
+ pending
70
+ end
71
+ end
72
+
73
+ context ".bucket_objects" do
74
+
75
+ context "when bucket is not present" do
76
+
77
+ it "should set warehouse and bucket" do
78
+ pending
79
+ end
80
+ end
81
+ end
82
+
83
+ context ".first" do
84
+
85
+ before(:each) do
86
+ WarehouseModel.stub(:bucket_objects).and_return(bucket_objects)
87
+ end
88
+
89
+ end
90
+
91
+ end
92
+ end
93
+ end
94
+ end
@@ -1,52 +1,39 @@
1
- $: << File.expand_path(File.join(File.dirname(__FILE__), "../lib"))
2
- $: << File.expand_path(File.join(File.dirname(__FILE__), "."))
3
- require 'rubygems'
4
- require 'config_parser'
5
- require 'stringio'
6
- require 'base_command'
7
- require 'list_command'
8
- require 'build_command'
9
- require 'push_command'
10
- require 'import_command'
11
- require 'delete_command'
1
+ # Copyright 2011 Red Hat, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
12
14
 
15
+ $: << File.expand_path(File.join(File.dirname(__FILE__), "../lib/aeolus_image/model/"))
13
16
 
14
- module Helpers
15
- # Silences any stream for the duration of the block.
16
- #
17
- # silence_stream(STDOUT) do
18
- # puts 'This will never be seen'
19
- # end
20
- #
21
- # puts 'But this will'
22
- #
23
- # (Taken from ActiveSupport)
24
- def silence_stream(stream)
25
- old_stream = stream.dup
26
- stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')
27
- stream.sync = true
28
- yield
29
- ensure
30
- stream.reopen(old_stream)
31
- end
32
- end
17
+ require 'rubygems'
18
+ require File.join(File.dirname(__FILE__), '../lib', 'aeolus_image')
19
+ require 'vcr_setup'
33
20
 
34
- Spec::Runner.configure do |config|
35
- config.include Helpers
21
+ require 'rspec'
22
+ require 'warehouse/warehouse_client'
23
+ require 'warehouse/warehouse_model'
24
+ require 'warehouse/image'
25
+ require 'warehouse/image_build'
26
+ require 'warehouse/target_image'
27
+ require 'warehouse/provider_image'
28
+ require 'warehouse/template'
29
+
30
+ RSpec.configure do |config|
31
+ config.extend VCR::RSpec::Macros
36
32
  config.before(:all) do
37
- Aeolus::Image::BaseCommand.class_eval do
38
- def load_config
39
- YAML::load(File.open(File.join(File.dirname(__FILE__), "/../examples/aeolus-cli")))
40
- end
41
- end
42
- end
43
- config.before(:each) do
44
- @output = double('output')
45
- @stdout_orig = $stdout
46
- $stdout = StringIO.new
47
- @options = {}
33
+ # Aeolus::Image::BaseCommand.class_eval do
34
+ # def load_config
35
+ # YAML::load(File.open(File.join(File.dirname(__FILE__), "/../examples/aeolus-cli")))
36
+ # end
37
+ # end
48
38
  end
49
- config.after(:each) do
50
- $stdout = @stdout_orig
51
- end
52
- end
39
+ end
@@ -0,0 +1,24 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://127.0.0.1:8075/imagefactory/builders
6
+ body:
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ content-type:
16
+ - application/json
17
+ server:
18
+ - PasteWSGIServer/0.5 Python/2.7.2
19
+ date:
20
+ - Tue, 17 Jan 2012 14:19:33 GMT
21
+ content-length:
22
+ - "512"
23
+ body: "{\"_type\": \"builders\", \"href\": \"http://127.0.0.1:8075/imagefactory/builders\", \"builders\": [{\"status\": \"PENDING\", \"_type\": \"builder\", \"completed\": 20, \"provider_account_identifier\": null, \"image_id\": \"4d6da4b2-3de1-11e1-90a4-5254001901e4\", \"href\": \"http://127.0.0.1:8075/imagefactory/builders/fba47ca6-dcde-438d-84b4-b40b8a2413af\", \"operation\": \"build\", \"id\": \"fba47ca6-dcde-438d-84b4-b40b8a2413af\", \"build_id\": \"93423694-421c-40f6-80b3-8997758d9241\", \"target\": \"mock\", \"provider\": null, \"target_image_id\": null}]}"
24
+ http_version: "1.1"
@@ -0,0 +1,80 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://127.0.0.1:8075/imagefactory/images
6
+ body: "{\"image\":{\"targets\":\"ec2\",\"template\":\"<template>\\n <name>f14jeos</name>\\n <os>\\n <name>Fedora</name>\\n <version>14</version>\\n <arch>x86_64</arch>\\n <install type='url'>\\n <url>http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86_64/os/</url>\\n </install>\\n </os>\\n <description>Fedora 14</description>\\n</template>\\n\"}}"
7
+ headers:
8
+ user-agent:
9
+ - OAuth gem v0.4.4
10
+ content-type:
11
+ - application/json
12
+ authorization:
13
+ - OAuth oauth_body_hash="iLFFmVptnUF4tv9PvDNdNxK%2FSOs%3D", oauth_consumer_key="mock-key", oauth_nonce="dESbWyTyKA0UTHekLdt7DOSOFh6tYU39Mw7LpFkts", oauth_signature="ydhBMjipuQ7ARZT5xfOrvShZfHI%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1318873100", oauth_version="1.0"
14
+ content-length:
15
+ - "365"
16
+ response: !ruby/struct:VCR::Response
17
+ status: !ruby/struct:VCR::ResponseStatus
18
+ code: 202
19
+ message: Accepted
20
+ headers:
21
+ content-type:
22
+ - application/json
23
+ server:
24
+ - PasteWSGIServer/0.5 Python/2.7.1
25
+ date:
26
+ - Mon, 17 Oct 2011 17:38:15 GMT
27
+ content-length:
28
+ - "640"
29
+ body: "{\"_type\": \"image\", \"href\": \"http://127.0.0.1:8075/imagefactory/images/18f1b17e-3fdc-4931-a5d6-f4581e5f5f85\", \"id\": \"18f1b17e-3fdc-4931-a5d6-f4581e5f5f85\", \"build\": {\"target_images\": [{\"_type\": \"target_image\", \"href\": \"http://127.0.0.1:8075/imagefactory/images/18f1b17e-3fdc-4931-a5d6-f4581e5f5f85/builds/6d715c2f-8dc5-46eb-86ad-509366e64252/target_images/dd9c27c5-0bdb-4670-b172-46a3cf2101a6\", \"id\": \"dd9c27c5-0bdb-4670-b172-46a3cf2101a6\"}], \"_type\": \"build\", \"href\": \"http://127.0.0.1:8075/imagefactory/images/18f1b17e-3fdc-4931-a5d6-f4581e5f5f85/builds/6d715c2f-8dc5-46eb-86ad-509366e64252\", \"id\": \"6d715c2f-8dc5-46eb-86ad-509366e64252\"}}"
30
+ http_version: "1.1"
31
+ - !ruby/struct:VCR::HTTPInteraction
32
+ request: !ruby/struct:VCR::Request
33
+ method: :post
34
+ uri: http://127.0.0.1:8075/imagefactory/images
35
+ body: "{\"image\":{\"targets\":\"ec2\",\"template\":\"<template>\\n <name>f14jeos</name>\\n <os>\\n <name>Fedora 2</name>\\n <version>14</version>\\n <arch>x86_64</arch>\\n <install type='url'>\\n <url>http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86_64/os/</url>\\n </install>\\n </os>\\n <description>Fedora 14</description>\\n</template>\\n\"}}"
36
+ headers:
37
+ content-type:
38
+ - application/json
39
+ user-agent:
40
+ - OAuth gem v0.4.4
41
+ authorization:
42
+ - OAuth oauth_body_hash="tEAlC3IwCGiB%2FNSQRUOwBifTHmY%3D", oauth_consumer_key="mock-key", oauth_nonce="jeQp5OlYxoCbbflwdM9nfg306BUVfmidPYKV7qPOs", oauth_signature="ERZpwVUR4qdBjfeBTJQtem%2FnKTo%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1318873100", oauth_version="1.0"
43
+ content-length:
44
+ - "367"
45
+ response: !ruby/struct:VCR::Response
46
+ status: !ruby/struct:VCR::ResponseStatus
47
+ code: 401
48
+ message: Unauthorized
49
+ headers:
50
+ content-type:
51
+ - text/html; charset=UTF-8
52
+ date:
53
+ - Mon, 17 Oct 2011 17:38:15 GMT
54
+ server:
55
+ - PasteWSGIServer/0.5 Python/2.7.1
56
+ content-length:
57
+ - "0"
58
+ body:
59
+ http_version: "1.1"
60
+ - !ruby/struct:VCR::HTTPInteraction
61
+ request: !ruby/struct:VCR::Request
62
+ method: :post
63
+ uri: http://127.0.0.1:8075/imagefactory/images
64
+ body: "{\"image\":{\"targets\":\"ec2\",\"template\":\"<template>\\n <name>f14jeos</name>\\n <os>\\n <name>Fedora 3</name>\\n <version>14</version>\\n <arch>x86_64</arch>\\n <install type='url'>\\n <url>http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86_64/os/</url>\\n </install>\\n </os>\\n <description>Fedora 14</description>\\n</template>\\n\"}}"
65
+ headers:
66
+ content-type:
67
+ - application/json
68
+ response: !ruby/struct:VCR::Response
69
+ status: !ruby/struct:VCR::ResponseStatus
70
+ code: 500
71
+ message: Internal Server Error
72
+ headers:
73
+ content-type:
74
+ - text/html; charset=UTF-8
75
+ server:
76
+ - PasteWSGIServer/0.5 Python/2.7.1
77
+ date:
78
+ - Mon, 17 Oct 2011 17:38:15 GMT
79
+ body: "'NoneType' object has no attribute '_get_timestamp_nonce'"
80
+ http_version: "1.1"
@@ -0,0 +1,30 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://127.0.0.1:8075/imagefactory/images
6
+ body: "{\"image\":{\"targets\":\"ec2\",\"template\":\"<template>\\n <name>f14jeos</name>\\n <os>\\n <name>Fedora 2</name>\\n <version>14</version>\\n <arch>x86_64</arch>\\n <install type='url'>\\n <url>http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86_64/os/</url>\\n </install>\\n </os>\\n <description>Fedora 14</description>\\n</template>\\n\"}}"
7
+ headers:
8
+ content-type:
9
+ - application/json
10
+ user-agent:
11
+ - OAuth gem v0.4.4
12
+ authorization:
13
+ - OAuth oauth_body_hash="tEAlC3IwCGiB%2FNSQRUOwBifTHmY%3D", oauth_consumer_key="mock-key", oauth_nonce="jeQp5OlYxoCbbflwdM9nfg306BUVfmidPYKV7qPOs", oauth_signature="ERZpwVUR4qdBjfeBTJQtem%2FnKTo%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1318873100", oauth_version="1.0"
14
+ content-length:
15
+ - "367"
16
+ response: !ruby/struct:VCR::Response
17
+ status: !ruby/struct:VCR::ResponseStatus
18
+ code: 401
19
+ message: Unauthorized
20
+ headers:
21
+ content-type:
22
+ - text/html; charset=UTF-8
23
+ date:
24
+ - Mon, 17 Oct 2011 17:38:15 GMT
25
+ server:
26
+ - PasteWSGIServer/0.5 Python/2.7.1
27
+ content-length:
28
+ - "0"
29
+ body:
30
+ http_version: "1.1"
@@ -0,0 +1,22 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://127.0.0.1:8075/imagefactory/images
6
+ body: "{\"image\":{\"targets\":\"ec2\",\"template\":\"<template>\\n <name>f14jeos</name>\\n <os>\\n <name>Fedora 3</name>\\n <version>14</version>\\n <arch>x86_64</arch>\\n <install type='url'>\\n <url>http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86_64/os/</url>\\n </install>\\n </os>\\n <description>Fedora 14</description>\\n</template>\\n\"}}"
7
+ headers:
8
+ content-type:
9
+ - application/json
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 500
13
+ message: Internal Server Error
14
+ headers:
15
+ content-type:
16
+ - text/html; charset=UTF-8
17
+ server:
18
+ - PasteWSGIServer/0.5 Python/2.7.1
19
+ date:
20
+ - Mon, 17 Oct 2011 17:38:15 GMT
21
+ body: "'NoneType' object has no attribute '_get_timestamp_nonce'"
22
+ http_version: "1.1"
@@ -0,0 +1,30 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://127.0.0.1:8075/imagefactory/images
6
+ body: "{\"image\":{\"targets\":\"ec2\",\"template\":\"<template>\\n <name>f14jeos</name>\\n <os>\\n <name>Fedora</name>\\n <version>14</version>\\n <arch>x86_64</arch>\\n <install type='url'>\\n <url>http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86_64/os/</url>\\n </install>\\n </os>\\n <description>Fedora 14</description>\\n</template>\\n\"}}"
7
+ headers:
8
+ user-agent:
9
+ - OAuth gem v0.4.4
10
+ content-type:
11
+ - application/json
12
+ authorization:
13
+ - OAuth oauth_body_hash="iLFFmVptnUF4tv9PvDNdNxK%2FSOs%3D", oauth_consumer_key="mock-key", oauth_nonce="dESbWyTyKA0UTHekLdt7DOSOFh6tYU39Mw7LpFkts", oauth_signature="ydhBMjipuQ7ARZT5xfOrvShZfHI%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1318873100", oauth_version="1.0"
14
+ content-length:
15
+ - "365"
16
+ response: !ruby/struct:VCR::Response
17
+ status: !ruby/struct:VCR::ResponseStatus
18
+ code: 202
19
+ message: Accepted
20
+ headers:
21
+ content-type:
22
+ - application/json
23
+ server:
24
+ - PasteWSGIServer/0.5 Python/2.7.1
25
+ date:
26
+ - Mon, 17 Oct 2011 17:38:15 GMT
27
+ content-length:
28
+ - "640"
29
+ body: "{\"_type\": \"image\", \"href\": \"http://127.0.0.1:8075/imagefactory/images/18f1b17e-3fdc-4931-a5d6-f4581e5f5f85\", \"id\": \"18f1b17e-3fdc-4931-a5d6-f4581e5f5f85\", \"build\": {\"target_images\": [{\"_type\": \"target_image\", \"href\": \"http://127.0.0.1:8075/imagefactory/images/18f1b17e-3fdc-4931-a5d6-f4581e5f5f85/builds/6d715c2f-8dc5-46eb-86ad-509366e64252/target_images/dd9c27c5-0bdb-4670-b172-46a3cf2101a6\", \"id\": \"dd9c27c5-0bdb-4670-b172-46a3cf2101a6\"}], \"_type\": \"build\", \"href\": \"http://127.0.0.1:8075/imagefactory/images/18f1b17e-3fdc-4931-a5d6-f4581e5f5f85/builds/6d715c2f-8dc5-46eb-86ad-509366e64252\", \"id\": \"6d715c2f-8dc5-46eb-86ad-509366e64252\"}}"
30
+ http_version: "1.1"
@@ -0,0 +1,26 @@
1
+ #
2
+ # Copyright 2011 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ require 'vcr'
17
+ require 'oauth'
18
+ require File.join(File.dirname(__FILE__), '../lib', 'aeolus_image')
19
+
20
+
21
+ VCR.config do |config|
22
+ config.cassette_library_dir = 'spec/vcr/cassettes'
23
+ config.stub_with :webmock
24
+ config.allow_http_connections_when_no_cassette = true
25
+ end
26
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aeolus-image
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease: false
4
+ hash: 15
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 4
8
9
  - 0
9
- - 1
10
- version: 0.0.1
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Guiditta, Martyn Taylor
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-22 00:00:00 +01:00
19
- default_executable:
18
+ date: 2012-05-09 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: nokogiri
@@ -49,25 +48,39 @@ dependencies:
49
48
  type: :runtime
50
49
  version_requirements: *id002
51
50
  - !ruby/object:Gem::Dependency
52
- name: imagefactory-console
51
+ name: activeresource
53
52
  prerelease: false
54
53
  requirement: &id003 !ruby/object:Gem::Requirement
55
54
  none: false
56
55
  requirements:
57
- - - ">="
56
+ - - ~>
58
57
  - !ruby/object:Gem::Version
59
- hash: 15
58
+ hash: 19
60
59
  segments:
60
+ - 3
61
61
  - 0
62
- - 4
63
- - 0
64
- version: 0.4.0
62
+ - 10
63
+ version: 3.0.10
65
64
  type: :runtime
66
65
  version_requirements: *id003
67
66
  - !ruby/object:Gem::Dependency
68
- name: rspec
67
+ name: oauth
69
68
  prerelease: false
70
69
  requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ type: :runtime
79
+ version_requirements: *id004
80
+ - !ruby/object:Gem::Dependency
81
+ name: rspec
82
+ prerelease: false
83
+ requirement: &id005 !ruby/object:Gem::Requirement
71
84
  none: false
72
85
  requirements:
73
86
  - - ~>
@@ -79,48 +92,59 @@ dependencies:
79
92
  - 0
80
93
  version: 1.3.0
81
94
  type: :development
82
- version_requirements: *id004
83
- description: Commandline interface for working with the aeolus cloud management suite
95
+ version_requirements: *id005
96
+ description: Library for managing image via the Factory and Warehouse projects for the aeolus cloud management suite
84
97
  email: jguiditt@redhat.com, mtaylor@redhat.com
85
- executables:
86
- - aeolus-image
98
+ executables: []
99
+
87
100
  extensions: []
88
101
 
89
102
  extra_rdoc_files: []
90
103
 
91
104
  files:
92
105
  - Rakefile
93
- - bin/aeolus-image
94
- - lib/build_command.rb
95
- - lib/delete_command.rb
96
- - lib/list_command.rb
97
- - lib/base_command.rb
98
- - lib/push_command.rb
99
- - lib/config_parser.rb
100
- - lib/import_command.rb
101
- - spec/base_command_spec.rb
102
- - spec/list_command_spec.rb
106
+ - lib/aeolus_image/model/factory/build.rb
107
+ - lib/aeolus_image/model/factory/provider_image.rb
108
+ - lib/aeolus_image/model/factory/builder.rb
109
+ - lib/aeolus_image/model/factory/base.rb
110
+ - lib/aeolus_image/model/factory/target_image.rb
111
+ - lib/aeolus_image/model/factory/image.rb
112
+ - lib/aeolus_image/model/warehouse/provider_image.rb
113
+ - lib/aeolus_image/model/warehouse/template.rb
114
+ - lib/aeolus_image/model/warehouse/icicle.rb
115
+ - lib/aeolus_image/model/warehouse/warehouse_client.rb
116
+ - lib/aeolus_image/model/warehouse/target_image.rb
117
+ - lib/aeolus_image/model/warehouse/warehouse_model.rb
118
+ - lib/aeolus_image/model/warehouse/image.rb
119
+ - lib/aeolus_image/model/warehouse/image_build.rb
120
+ - lib/aeolus_image/import.rb
121
+ - lib/aeolus_image/active_resource_oauth_client.rb
122
+ - lib/aeolus_image.rb
123
+ - spec/vcr_setup.rb
124
+ - spec/aeolus_image/model/factory/provider_image_spec.rb
125
+ - spec/vcr/cassettes/oauth_fail_invalid.yml
126
+ - spec/vcr/cassettes/oauth.yml
127
+ - spec/vcr/cassettes/oauth_success_valid.yml
128
+ - spec/vcr/cassettes/builder.yml
129
+ - spec/vcr/cassettes/oauth_fail_no.yml
103
130
  - spec/spec_helper.rb
104
- - spec/spec.opts
105
- - spec/fixtures/valid_template.tdl
131
+ - spec/models/factory/base_spec.rb
132
+ - spec/models/factory/builder_spec.rb
133
+ - spec/models/factory/target_image_spec.rb
134
+ - spec/models/factory/provider_image_spec.rb
135
+ - spec/models/warehouse/warehouse_client_spec.rb
136
+ - spec/models/warehouse/image_spec.rb
137
+ - spec/models/warehouse/template_spec.rb
138
+ - spec/models/warehouse/image_build_spec.rb
139
+ - spec/models/warehouse/target_image_spec.rb
140
+ - spec/models/warehouse/warehouse_model_spec.rb
141
+ - spec/models/warehouse/provider_image_spec.rb
106
142
  - spec/fixtures/invalid_template.tdl
107
- - spec/build_command_spec.rb
108
- - spec/push_command_spec.rb
109
- - spec/import_command_spec.rb
110
- - spec/config_parser_spec.rb
111
- - examples/image_description.xml
112
- - examples/aeolus-cli
113
- - examples/tdl.rng
114
- - examples/custom_repo.tdl
115
- - man/aeolus-image.1
116
- - man/aeolus-image-push.1
117
- - man/aeolus-image-build.1
118
- - man/aeolus-image-import.1
119
- - man/aeolus-image-list.1
120
- has_rdoc: true
143
+ - spec/fixtures/valid_template.tdl
144
+ - COPYING
121
145
  homepage: http://aeolusproject.org
122
146
  licenses:
123
- - GPL-2
147
+ - ASL 2.0
124
148
  post_install_message:
125
149
  rdoc_options: []
126
150
 
@@ -147,9 +171,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
171
  requirements: []
148
172
 
149
173
  rubyforge_project:
150
- rubygems_version: 1.3.7
174
+ rubygems_version: 1.8.11
151
175
  signing_key:
152
176
  specification_version: 3
153
- summary: cli for aeolus cloud suite
177
+ summary: Ruby Client for Image Warehouse and Image Factory for the Aeolus cloud suite
154
178
  test_files: []
155
179