[PATCH conductor] RM 3628 - ensure that all params in a deployable can be resolved
by Jan Provazník
From: Jan Provazník <jan.provaznik(a)gmail.com>
Adds validation for cyclic and not existing references in deployable XML.
Ii also resolves https://bugzilla.redhat.com/show_bug.cgi?id=841028
---
src/app/models/deployable.rb | 44 +++++++++++++-
src/app/util/deployable_xml.rb | 94 ++++++++++++++++++++++++++++++
src/config/locales/en.yml | 4 ++
src/spec/factories/deployable.rb | 111 ++++++++++++++++++++++++++++++++++++
src/spec/models/deployable_spec.rb | 71 ++++++++++++++++++++++-
5 files changed, 321 insertions(+), 3 deletions(-)
diff --git a/src/app/models/deployable.rb b/src/app/models/deployable.rb
index e1d80d5..374b4e3 100644
--- a/src/app/models/deployable.rb
+++ b/src/app/models/deployable.rb
@@ -29,7 +29,8 @@ class Deployable < ActiveRecord::Base
validates_length_of :name, :maximum => 1024
validates_presence_of :xml
- validate :valid_deployable_xml?, :if => Proc.new { |deployable| !deployable.xml.blank? }
+ validate :validate_deployable_xml, :if => Proc.new {|deployable|
+ !deployable.xml.blank? }
has_many :permissions, :as => :permission_object, :dependent => :destroy,
:include => [:role],
@@ -57,7 +58,7 @@ class Deployable < ActiveRecord::Base
super + catalogs + catalogs.collect{|c| c.pool}.uniq + [pool_family]
end
- def valid_deployable_xml?
+ def validate_deployable_xml
begin
deployable_xml = DeployableXML.new(xml)
if !deployable_xml.validate!
@@ -65,11 +66,50 @@ class Deployable < ActiveRecord::Base
elsif !deployable_xml.unique_assembly_names?
errors.add(:xml, I18n.t('catalog_entries.flash.warning.not_valid_duplicate_assembly_names'))
end
+ validate_cycles_in_deployable_xml(deployable_xml)
+ validate_references_in_deployable_xml(deployable_xml)
rescue Nokogiri::XML::SyntaxError => e
errors.add(:base, I18n.t("deployments.errors.not_valid_deployable_xml", :msg => "#{e.message}"))
end
end
+ def validate_cycles_in_deployable_xml(deployable_xml)
+ deployable_xml.dependency_graph.cycles.each do |cycle|
+ cycle_str = cycle.map do |node|
+ str = node[:assembly].to_s
+ str << "[#{node[:service]}]" if node[:service].present?
+ str
+ end.join(' -> ')
+ errors.add(:xml,
+ I18n.t('catalog_entries.flash.warning.not_valid_cyclic_reference',
+ :reference => cycle_str))
+ end
+ end
+
+ def validate_references_in_deployable_xml(deployable_xml)
+ deployable_xml.dependency_graph.not_existing_references.each do |reference|
+ locale_params = {:from_assembly => reference[:assembly],
+ :from_service => reference[:service],
+ :from_param => reference[:reference][:from_param],
+ :to_param => reference[:reference][:param],
+ :to_assembly => reference[:reference][:assembly],
+ :to_service => reference[:reference][:service]}
+ if reference[:no_return_param]
+ errors.add(:xml,
+ I18n.t('catalog_entries.flash.warning.not_valid_not_existing_param',
+ locale_params))
+ elsif reference[:to_service]
+ errors.add(:xml,
+ I18n.t('catalog_entries.flash.warning.not_valid_not_existing_service_reference',
+ locale_params))
+ else
+ errors.add(:xml,
+ I18n.t('catalog_entries.flash.warning.not_valid_not_existing_assembly_reference',
+ locale_params))
+ end
+ end
+ end
+
# Fetch the deployable contained at :url
def fetch_deployable
begin
diff --git a/src/app/util/deployable_xml.rb b/src/app/util/deployable_xml.rb
index cdbbc39..cb01cf5 100644
--- a/src/app/util/deployable_xml.rb
+++ b/src/app/util/deployable_xml.rb
@@ -18,6 +18,8 @@
XML Wrapper objects for the deployable XML format
=end
+require 'tsort'
+
class ValidationError < RuntimeError; end
class ParameterXML
@@ -96,6 +98,16 @@ class ServiceXML
ParameterXML.new(param_node)
end
end
+
+ def references
+ refs = parameters.map do |param|
+ next unless param.reference?
+ {:assembly => param.reference_assembly,
+ :service => param.reference_service,
+ :param => param.reference_parameter,
+ :from_param => param.name}
+ end.compact
+ end
end
class AssemblyXML
@@ -166,6 +178,20 @@ class AssemblyXML
@root.to_s
end
+ def dependency_nodes
+ nodes = services.map do |service|
+ {:assembly => name,
+ :service => service.name,
+ :references => service.references}
+ end
+ # whole assembly is added as a node too because a inter-assembly references
+ # reference whole assembly, not particular service
+ nodes << {:assembly => name,
+ :service => nil,
+ :references => nodes.map {|n|
+ n[:references]}.flatten}
+ end
+
private
def collect_services
# collect the service level tooling
@@ -270,8 +296,76 @@ class DeployableXML
end
end
+ def dependency_graph
+ @dependency_graph ||= DeployableDependencyGraph.new(assemblies)
+ end
+
private
+
def relax
@relax ||= File.open(@relax_file) {|f| Nokogiri::XML::RelaxNG(f)}
end
end
+
+class DeployableDependencyGraph
+ include TSort
+
+ def initialize(assemblies)
+ @assemblies = assemblies
+ end
+
+ def cycles
+ strongly_connected_components.find_all {|c| c.length > 1}
+ end
+
+ def dependency_nodes
+ @nodes ||= @assemblies.map {|assembly| assembly.dependency_nodes}.flatten
+ end
+
+ def tsort_each_node(&block)
+ dependency_nodes.each(&block)
+ end
+
+ def tsort_each_child(node, &block)
+ node[:references].map do |ref|
+ ref_node = dependency_nodes.find do |n|
+ n[:assembly] == ref[:assembly] && n[:service] == ref[:service]
+ end
+ ref[:not_existing_ref] = true unless ref_node
+ ref_node
+ end.compact.each(&block)
+ end
+
+ def not_existing_references
+ # not_existing references are detected when doing tsort
+ strongly_connected_components
+
+ invalid_refs = []
+ dependency_nodes.each do |node|
+ # skip "whole assembly" nodes
+ next unless node[:service]
+
+ node[:references].each do |ref|
+ if ref[:not_existing_ref]
+ # in this case, the referenced assembly/service doesn't exist
+ # at all
+ invalid_refs << {:assembly => node[:assembly],
+ :service => node[:service],
+ :reference => ref}
+ else
+ # in this case, the referenced assembly/service exists, but the
+ # referenced parameter is not listed in <returns> tag of the assembly
+ assembly = @assemblies.find {|a| a.name == ref[:assembly]}
+ next unless assembly # this shouldn't be needed
+ unless assembly.output_parameters.include?(ref[:param])
+ invalid_refs << {:assembly => node[:assembly],
+ :service => node[:service],
+ :no_return_param => true,
+ :reference => ref}
+ end
+ end
+ end
+ end
+ invalid_refs
+ end
+end
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 9ae82e4..8cadf41 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -826,6 +826,10 @@ en:
no_url_provided: "No URL provided for the deployable XML file."
not_valid: "Deployable XML file doesn't resolve valid XML"
not_valid_duplicate_assembly_names: "Deployable XML must contain unique assembly names"
+ not_valid_cyclic_reference: "Contains cyclic reference between following assemblies or services: %{reference}"
+ not_valid_not_existing_assembly_reference: "Assembly %{from_assembly}, service %{from_service}, parameter %{from_param} references not existing assembly %{to_assembly}"
+ not_valid_not_existing_service_reference: "Assembly %{from_assembly}, service %{from_service}, parameter %{from_param} references not existing assembly %{to_assembly}, service %{to_service}"
+ not_valid_not_existing_param: "Assembly %{from_assembly}, service %{from_service}, parameter %{from_param} references param %{to_param} which is not returned by assembly %{to_assembly}"
failed: Deployable was not created.
notice:
added: Deployable added to catalog %{catalog}.
diff --git a/src/spec/factories/deployable.rb b/src/spec/factories/deployable.rb
index efbfc6e..8a4f3ba 100644
--- a/src/spec/factories/deployable.rb
+++ b/src/spec/factories/deployable.rb
@@ -72,4 +72,115 @@ FactoryGirl.define do
</assemblies>
</deployable>"
end
+
+ factory :deployable_with_cyclic_assembly_references, :parent => :deployable do
+ xml "<?xml version=\"1.0\"?>
+ <deployable version='1.0' name='deployable'>
+ <assemblies>
+ <assembly name='assembly1' hwp='front_hwp1'>
+ <image id='85653387-88b2-46b0-b7b2-c779d2af06c7'></image>
+ <services>
+ <service name='service1'>
+ <executable url='executable_url'/>
+ <parameters>
+ <parameter name='param1'>
+ <reference assembly='assembly2' parameter='hostname'/>
+ </parameter>
+ </parameters>
+ </service>
+ </services>
+ </assembly>
+ <assembly name='assembly2' hwp='front_hwp1'>
+ <image id='85653387-88b2-46b0-b7b2-c779d2af06c7'></image>
+ <services>
+ <service name='service1'>
+ <executable url='executable_url'/>
+ <parameters>
+ <parameter name='param1'>
+ <reference assembly='assembly3' parameter='hostname'/>
+ </parameter>
+ </parameters>
+ </service>
+ </services>
+ </assembly>
+ <assembly name='assembly3' hwp='front_hwp1'>
+ <image id='85653387-88b2-46b0-b7b2-c779d2af06c7'></image>
+ <services>
+ <service name='service1'>
+ <executable url='executable_url'/>
+ <parameters>
+ <parameter name='param1'>
+ <reference assembly='assembly1' parameter='hostname'/>
+ </parameter>
+ </parameters>
+ </service>
+ </services>
+ </assembly>
+ </assemblies>
+ </deployable>"
+ end
+
+
+ factory :deployable_with_cyclic_service_references, :parent => :deployable do
+ xml "<?xml version=\"1.0\"?>
+ <deployable version='1.0' name='deployable'>
+ <assemblies>
+ <assembly name='assembly1' hwp='front_hwp1'>
+ <image id='85653387-88b2-46b0-b7b2-c779d2af06c7'></image>
+ <services>
+ <service name='service1'>
+ <executable url='executable_url'/>
+ <parameters>
+ <parameter name='param1'>
+ <reference assembly='assembly1' service='service2'/>
+ </parameter>
+ </parameters>
+ </service>
+ <service name='service2'>
+ <executable url='executable_url'/>
+ <parameters>
+ <parameter name='param1'>
+ <reference assembly='assembly1' service='service1'/>
+ </parameter>
+ </parameters>
+ </service>
+ </services>
+ </assembly>
+ </assemblies>
+ </deployable>"
+ end
+
+ factory :deployable_with_not_existing_references, :parent => :deployable do
+ xml "<?xml version=\"1.0\"?>
+ <deployable version='1.0' name='deployable'>
+ <assemblies>
+ <assembly name='assembly1' hwp='front_hwp1'>
+ <image id='85653387-88b2-46b0-b7b2-c779d2af06c7'></image>
+ <services>
+ <service name='service1'>
+ <executable url='executable_url'/>
+ <parameters>
+ <parameter name='param1'>
+ <reference assembly='assembly2' service='service2'/>
+ </parameter>
+ </parameters>
+ </service>
+ </services>
+ </assembly>
+ <assembly name='assembly2' hwp='front_hwp1'>
+ <image id='85653387-88b2-46b0-b7b2-c779d2af06c7'></image>
+ <services>
+ <service name='service1'>
+ <executable url='executable_url'/>
+ <parameters>
+ <parameter name='param1'>
+ <reference assembly='assembly3' service='service1'/>
+ </parameter>
+ </parameters>
+ </service>
+ </services>
+ </assembly>
+ </assemblies>
+ </deployable>"
+ end
end
diff --git a/src/spec/models/deployable_spec.rb b/src/spec/models/deployable_spec.rb
index 6bc8ffd..4aec099 100644
--- a/src/spec/models/deployable_spec.rb
+++ b/src/spec/models/deployable_spec.rb
@@ -17,6 +17,16 @@
require 'spec_helper'
describe Deployable do
+ shared_examples_for "deployable XML with cyclic reference" do
+ it "should not be valid" do
+ @deployable.valid?.should be_false
+ end
+
+ it "should detect one cycle" do
+ @cycles.length.should == 1
+ end
+ end
+
it "should generate xml when set from image" do
image = mock(Aeolus::Image::Warehouse::Image, :id => '3c58e0d6-d11a-4e68-8b12-233783e56d35', :name => 'image1', :uuid => '3c58e0d6-d11a-4e68-8b12-233783e56d35')
Aeolus::Image::Warehouse::Image.stub(:find).and_return(image)
@@ -40,7 +50,7 @@ describe Deployable do
it "should not be valid if xml has multiple assemblies with the same name" do
deployable = FactoryGirl.build(:deployable_unique_name_violation)
- deployable.valid_deployable_xml?
+ deployable.validate_deployable_xml
deployable.errors[:xml].should == [I18n.t('catalog_entries.flash.warning.not_valid_duplicate_assembly_names')]
end
@@ -72,6 +82,65 @@ describe Deployable do
deployable.should_not be_valid
end
+ describe "validation of deployable_xml with cyclic service references" do
+ before :each do
+ @deployable = FactoryGirl.build(:deployable_with_cyclic_service_references)
+ @cycles = DeployableXML.new((a)deployable.xml).dependency_graph.cycles
+ end
+
+ it_behaves_like "deployable XML with cyclic reference"
+
+ it "should detect cycle between services of same assembly" do
+ cycle = @cycles.first
+ cycle.length.should == 2
+ cycle.find {|n| n[:assembly] == 'assembly1' && n[:service] == 'service1'}
+ cycle.find {|n| n[:assembly] == 'assembly1' && n[:service] == 'service2'}
+ end
+ end
+
+ describe "validation of deployable_xml with cyclic assembly references" do
+ before :each do
+ @deployable = FactoryGirl.build(:deployable_with_cyclic_assembly_references)
+ @cycles = DeployableXML.new((a)deployable.xml).dependency_graph.cycles
+ end
+
+ it_behaves_like "deployable XML with cyclic reference"
+
+ it "should detect cycle between multiple assmebliess" do
+ cycle = @cycles.first
+ cycle.length.should == 3
+ cycle.find {|n| n[:assembly] == 'assembly1' && n[:service] == 'service1'}
+ cycle.find {|n| n[:assembly] == 'assembly2' && n[:service] == 'service1'}
+ cycle.find {|n| n[:assembly] == 'assembly3' && n[:service] == 'service1'}
+ end
+ end
+
+ describe "validation of deployable_xml with not existing references" do
+ before :each do
+ @deployable = FactoryGirl.build(:deployable_with_not_existing_references)
+ @invalid_refs = DeployableXML.new((a)deployable.xml).
+ dependency_graph.not_existing_references
+ end
+
+ it "should not be valid" do
+ @deployable.should_not be_valid
+ end
+
+ it "should detect reference to not existing assembly" do
+ @invalid_refs.find {|r| r[:assembly] == 'assembly2' &&
+ r[:service] == 'service1' &&
+ r[:reference][:assembly] == 'assembly3' &&
+ r[:reference][:service] == 'service1'}.should_not be_nil
+ end
+
+ it "should detect reference to not existing service" do
+ @invalid_refs.find {|r| r[:assembly] == 'assembly1' &&
+ r[:service] == 'service1' &&
+ r[:reference][:assembly] == 'assembly2' &&
+ r[:reference][:service] == 'service2'}.should_not be_nil
+ end
+ end
+
it "should manage permissions on catalog changes" do
pool1 = FactoryGirl.create :pool
pool2 = FactoryGirl.create :pool
--
1.7.10.4
11 years, 8 months
#3623 - Notification of non-launches, unauthorized launches
by Matt Wagner
Hi all,
I had a few questions on
https://www.aeolusproject.org/redmine/issues/3623 and its implementation
task, #3624.
It all makes sense on the surface -- if a launch fails, or a user tries
to launch but doesn't have permission (which is really a subset of
"a launch fails"), we want to record a notification and display it.
But I find that, as I go to implement this, things become hazier.
For one, if you don't have permission to launch a deployable, the button
is disabled. We can have the controller log a notification if it refuses
permission anyway (such as if someone hits the URL directly), but it
doesn't feel like I'm tackling an urgent customer priority there. Am I
overlooking a case where a user would be able to go launch a deployable
but then have it fail with a permissions error after they pressed the
button?
Second, I'm having a hard time even finding a way to intentionally cause
a launch failure. For the most part, if it's something not on the cloud
provider itself, we seem to detect it and disable the Launch button.
Is there any obvious use case I'm overlooking?
For failures that _are_ on the cloud provider, those will already show
up in our "Alerts" section, which lists failed instances.
Am I overlooking some conditions / use cases here? I'm not finding a
whole lot that needs to be done.
-- Matt
11 years, 8 months
[PATCH conductor] BZ 843079 - set deployment's state to stopped when all instances are stopped
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
---
src/app/models/deployment.rb | 8 +++++-
src/spec/models/deployment_spec.rb | 55 ++++++++++++++++++++++++++++++------
2 files changed, 53 insertions(+), 10 deletions(-)
diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
index 277f9b3..fa8605f 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -660,13 +660,19 @@ class Deployment < ActiveRecord::Base
def state_transition_from_running(instance)
if instance.state != STATE_RUNNING
- self.state = STATE_INCOMPLETE
+ if instances.all? {|i| i.state == Instance::STATE_STOPPED}
+ self.state = STATE_STOPPED
+ else
+ self.state = STATE_INCOMPLETE
+ end
end
end
def state_transition_from_incomplete(instance)
if instances.all? {|i| i.state == Instance::STATE_RUNNING}
self.state = STATE_RUNNING
+ elsif instances.all? {|i| i.state == Instance::STATE_STOPPED}
+ self.state = STATE_STOPPED
end
end
diff --git a/src/spec/models/deployment_spec.rb b/src/spec/models/deployment_spec.rb
index 9b2a37e..8627169 100644
--- a/src/spec/models/deployment_spec.rb
+++ b/src/spec/models/deployment_spec.rb
@@ -376,17 +376,45 @@ describe Deployment do
before :each do
@deployment.state = Deployment::STATE_RUNNING
@deployment.save!
- @inst1 = Factory.create(:instance, :deployment => @deployment, :state => Instance::STATE_RUNNING)
- @inst2 = Factory.create(:instance, :deployment => @deployment, :state => Instance::STATE_RUNNING)
- @deployment.instances << @inst1
- @deployment.instances << @inst2
end
- it "should be incomplete if only some instances are running" do
- @inst1.state = Instance::STATE_ERROR
- @inst1.save!
- @deployment.reload
- @deployment.state.should == Deployment::STATE_INCOMPLETE
+ describe "multi-instance deployment" do
+ before :each do
+ @inst1 = Factory.create(:instance, :deployment => @deployment, :state => Instance::STATE_RUNNING)
+ @inst2 = Factory.create(:instance, :deployment => @deployment, :state => Instance::STATE_RUNNING)
+ @deployment.instances << @inst1
+ @deployment.instances << @inst2
+ end
+
+ it "should be incomplete if only some instances are running" do
+ @inst1.state = Instance::STATE_ERROR
+ @inst1.save!
+ @deployment.reload
+ @deployment.state.should == Deployment::STATE_INCOMPLETE
+ end
+
+ it "should be stopped if all instances are stopped" do
+ @inst1.state = Instance::STATE_STOPPED
+ @inst1.save!
+ @inst2.state = Instance::STATE_STOPPED
+ @inst2.save!
+ @deployment.reload
+ @deployment.state.should == Deployment::STATE_STOPPED
+ end
+ end
+
+ describe "single-instance deployment" do
+ before :each do
+ @inst1 = Factory.create(:instance, :deployment => @deployment, :state => Instance::STATE_RUNNING)
+ @deployment.instances << @inst1
+ end
+
+ it "should be stopped if all instances are stopped" do
+ @inst1.state = Instance::STATE_STOPPED
+ @inst1.save!
+ @deployment.reload
+ @deployment.state.should == Deployment::STATE_STOPPED
+ end
end
end
@@ -544,6 +572,15 @@ describe Deployment do
@deployment.reload
@deployment.state.should == Deployment::STATE_RUNNING
end
+
+ it "should be stopped if all instances are stopped" do
+ @inst1.state = Instance::STATE_STOPPED
+ @inst1.save!
+ @inst2.state = Instance::STATE_STOPPED
+ @inst2.save!
+ @deployment.reload
+ @deployment.state.should == Deployment::STATE_STOPPED
+ end
end
end
--
1.7.10.4
11 years, 8 months
Tool to set up development environment / VMs?
by Jiří Stránský
Hi guys,
how do you prepare your development VMs? I've been talking with Mike
yesterday about a possibility of making a tool similar to
aeolus-configure, but for developers. Something to set up development
environment easily. Would anything like this be wanted?
I was thinking something a bit more rake-style with the whole setup
thing decomposed into tasks. You could run a default scenario task with
the whole stack getting set up or just pick something like `rake
firewall:open_for_conductor` or `rake imagefactory:oauth` etc.
Then today I saw Maros's kickstart-based solution [1] and I thought
something similar would be even nicer when doing dev env setup on a VM,
because it also takes care of OS installation.
Mike and Jay also suggested such a tool could be useful for QE, so I
would be pleased to see Dave's and Ronelle's opinions as well.
So I'm looking for ideas/feedback/anything related to this. First,
whether such thing would be wanted at all, and if so, any suggestions
and ideas how should the tool work.
I imagine the tool could be useful to contributors outside of Red Hat,
who don't have Aeolus experts sitting in the same office to ask them
about stuff ;)
Best wishes,
Jirka
[1]: https://github.com/hacxman/spawnvm
11 years, 8 months
[PATCH Conductor 0/1] aeolus-image update
by Jason Guiditta
FYI, I just bumped and pushed aeolus-image version in lock file, there
were previously issues jstransk hit installing from rubygems. This
should resolve those.
-j
11 years, 8 months
[PATCH aeolus-image] Fix up packaging
by Jason Guiditta
We had some bad versions of deps (too tight restrictions), and
differences between gemspec in Rakefile and gemspec, which now match.
Really we should just have the gemspec, but given this is likely the
last major release of this gem, it does not seem worth the effort at
this time.
---
Rakefile | 29 ++++++++++++++++-------------
aeolus-image.gemspec | 28 +++++++++++++++-------------
rubygem-aeolus-image.spec.in | 4 ++++
3 files changed, 35 insertions(+), 26 deletions(-)
diff --git a/Rakefile b/Rakefile
index 0c7d664..7d6e400 100644
--- a/Rakefile
+++ b/Rakefile
@@ -27,22 +27,25 @@ RPM_SPEC_IN = "rubygem-aeolus-image.spec.in"
PKG_VERSION = "0.6.0"
spec = Gem::Specification.new do |s|
- s.name = 'aeolus-image'
- s.version = PKG_VERSION
- s.summary= 'Ruby Client for Image Warehouse and Image Factory for the Aeolus cloud suite'
- s.description = 'Library for managing image via the Factory and Warehouse projects for the aeolus cloud management suite'
- s.author = 'Jason Guiditta, Martyn Taylor'
- s.email = 'jguiditt(a)redhat.com, mtaylor(a)redhat.com'
- s.license = 'ASL 2.0'
- s.homepage = 'http://aeolusproject.org'
- s.files = %w(Rakefile) + Dir.glob("{lib,spec}/**/*") + %w(COPYING)
+ s.name = 'aeolus-image'
+ s.version = PKG_VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = 'Jason Guiditta, Martyn Taylor'
+ s.email = 'jguiditt(a)redhat.com, mtaylor(a)redhat.com'
+ s.license = 'ASL 2.0'
+ s.homepage = "https://github.com/aeolusproject/aeolus-image-rubygem"
+ s.summary = 'Ruby Client for Image Warehouse and Image Factory for the Aeolus cloud suite'
+ s.description = "aeolus-image is a Ruby library used by Conductor to connect with Image Factory and Image Warehouse."
+
+ s.files = Dir["lib/**/*.rb","README.md","COPYING","Rakefile","rake/rpmtask.rb"]
+ s.test_files = Dir["spec/**/*.*",".rspec","examples/aeolus-cli"]
s.require_path = "lib"
- s.add_dependency('nokogiri', '>=0.4.0')
- s.add_dependency('rest-client')
- s.add_dependency('activeresource', '~>3.0.10')
+ s.add_dependency('activeresource')
+ s.add_dependency('nokogiri')
s.add_dependency('oauth')
+ s.add_dependency('rest-client')
- s.add_development_dependency('rspec', '~>1.3.0')
+ s.add_development_dependency('rspec', '>=1.3.0')
end
Gem::PackageTask.new(spec) do |p|
diff --git a/aeolus-image.gemspec b/aeolus-image.gemspec
index 3345e7e..f35dcab 100644
--- a/aeolus-image.gemspec
+++ b/aeolus-image.gemspec
@@ -1,19 +1,21 @@
Gem::Specification.new do |s|
- s.name = "aeolus-image"
- s.version = "0.5.0"
- s.platform = Gem::Platform::RUBY
- s.authors = ["Red Hat Inc."]
- s.email = ["aeolus-devel(a)lists.fedorahosted.org"]
- s.homepage = "https://github.com/aeolusproject/aeolus-image-rubygem"
- s.summary = "Ruby library used by Conductor"
- s.description = "aeolus-image-rubygem is a Ruby library used by Conductor to connect with Image Factory and Image Warehouse."
+ s.name = "aeolus-image"
+ s.version = "0.6.0"
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Jason Guiditta, Martyn Taylor"]
+ s.email = ["jguiditt(a)redhat.com, mtaylor(a)redhat.com"]
+ s.license = "ASL 2.0"
+ s.homepage = "https://github.com/aeolusproject/aeolus-image-rubygem"
+ s.summary = "Ruby Client for Image Warehouse and Image Factory for the Aeolus cloud suite"
+ s.description = "aeolus-image is a Ruby library used by Conductor to connect with Image Factory and Image Warehouse."
- s.add_dependency "oauth"
+ s.files = Dir["lib/**/*.rb","README.md","COPYING","Rakefile","rake/rpmtask.rb"]
+ s.test_files = Dir["spec/**/*.*",".rspec","examples/aeolus-cli"]
+ s.require_path = 'lib'
s.add_dependency "activeresource"
- s.add_dependency "rest-client"
s.add_dependency "nokogiri"
+ s.add_dependency "oauth"
+ s.add_dependency "rest-client"
- # If you need to check in files that aren't .rb files, add them here
- s.files = Dir["{lib}/**/*.rb", "COPYING", "*.md"]
- s.require_path = 'lib'
+ s.add_development_dependency('rspec', '>=1.3.0')
end
diff --git a/rubygem-aeolus-image.spec.in b/rubygem-aeolus-image.spec.in
index f6db1e9..1e0513e 100644
--- a/rubygem-aeolus-image.spec.in
+++ b/rubygem-aeolus-image.spec.in
@@ -57,11 +57,15 @@ rm -rf %{buildroot}%{gemdir}/gems/%{gemname}-%{version}/.yardoc
%files
%doc %{geminstdir}/COPYING
+%doc %{geminstdir}/README.md
%doc %{gemdir}/doc/%{gemname}-%{version}
%dir %{geminstdir}
%{geminstdir}/Rakefile
%{geminstdir}/lib
+%{geminstdir}/rake/rpmtask.rb
+%{geminstdir}/.rspec
%{geminstdir}/spec
+%{geminstdir}/examples
%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
--
1.7.7.6
11 years, 8 months