Splitting out CLI portion of rubygem-aeolus-image and calling it aeolus-cli
---
Rakefile | 4 +-
bin/aeolus-image | 2 +-
lib/aeolus_cli.rb | 30 +++++++++++++++
lib/aeolus_image.rb | 30 ---------------
rubygem-aeolus-cli.spec | 87 +++++++++++++++++++++++++++++++++++++++++++++
rubygem-aeolus-image.spec | 87 ---------------------------------------------
6 files changed, 120 insertions(+), 120 deletions(-)
create mode 100644 lib/aeolus_cli.rb
delete mode 100644 lib/aeolus_image.rb
create mode 100644 rubygem-aeolus-cli.spec
delete mode 100644 rubygem-aeolus-image.spec
diff --git a/Rakefile b/Rakefile
index 0fa82fe..bee01f7 100644
--- a/Rakefile
+++ b/Rakefile
@@ -22,10 +22,10 @@ require 'rspec/core/rake_task'
require 'rake/rpmtask'
RPMBUILD_DIR = "#{File.expand_path('~')}/rpmbuild"
-RPM_SPEC = "rubygem-aeolus-image.spec"
+RPM_SPEC = "rubygem-aeolus-cli.spec"
spec = Gem::Specification.new do |s|
- s.name = 'aeolus-image'
+ s.name = 'aeolus-cli'
s.version = '0.1.0'
s.summary= 'cli for aeolus cloud suite'
s.description = 'Commandline interface for working with the aeolus cloud management
suite'
diff --git a/bin/aeolus-image b/bin/aeolus-image
index 8a05848..a6ddbee 100755
--- a/bin/aeolus-image
+++ b/bin/aeolus-image
@@ -15,6 +15,6 @@
# limitations under the License.
$: << File.expand_path(File.dirname(__FILE__) + '/../lib')
-require 'aeolus_image.rb'
+require 'aeolus_cli.rb'
parser = Aeolus::Image::ConfigParser.new(ARGV)
puts parser.process
diff --git a/lib/aeolus_cli.rb b/lib/aeolus_cli.rb
new file mode 100644
index 0000000..f17ed66
--- /dev/null
+++ b/lib/aeolus_cli.rb
@@ -0,0 +1,30 @@
+# Copyright 2011 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+require 'optparse'
+require 'logger'
+require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'base_command')
+require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'list_command')
+require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'build_command')
+require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'push_command')
+require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'import_command')
+require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'delete_command')
+require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'config_parser')
+require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'warehouse_client') # Not sure we need this
+require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'warehouse_model') # We may be able to factor this out?
+require File.join(File.dirname(__FILE__), 'aeolus_image/model', 'image')
+require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'image_build')
+require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'provider_image')
+require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'target_image')
+require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'template')
diff --git a/lib/aeolus_image.rb b/lib/aeolus_image.rb
deleted file mode 100644
index f17ed66..0000000
--- a/lib/aeolus_image.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 2011 Red Hat, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'optparse'
-require 'logger'
-require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'base_command')
-require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'list_command')
-require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'build_command')
-require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'push_command')
-require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'import_command')
-require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'delete_command')
-require File.join(File.dirname(__FILE__), 'aeolus_image/command',
'config_parser')
-require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'warehouse_client') # Not sure we need this
-require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'warehouse_model') # We may be able to factor this out?
-require File.join(File.dirname(__FILE__), 'aeolus_image/model', 'image')
-require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'image_build')
-require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'provider_image')
-require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'target_image')
-require File.join(File.dirname(__FILE__), 'aeolus_image/model',
'template')
diff --git a/rubygem-aeolus-cli.spec b/rubygem-aeolus-cli.spec
new file mode 100644
index 0000000..50a9568
--- /dev/null
+++ b/rubygem-aeolus-cli.spec
@@ -0,0 +1,87 @@
+%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%global gemname aeolus-cli
+%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%global mandir %{_mandir}/man1
+%global rubyabi 1.8
+
+Summary: Command-line interface for working with the Aeolus cloud suite
+Name: rubygem-aeolus-cli
+Version: 0.1.0
+Release: 3%{?extra_release}%{?dist}
+Group: Development/Languages
+License: ASL 2.0
+URL:
http://aeolusproject.org
+
+# The source for this packages was pulled from the upstream's git repo.
+# Use the following commands to generate the gem
+# git clone
git://git.fedorahosted.org/aeolus/conductor.git
+# git checkout next
+# cd services/image_factory/aeolus-image
+# rake gem
+# grab image_factory_console-0.0.1.gem from the pkg subdir
+Source0: %{gemname}-%{version}.gem
+
+Requires: ruby(abi) = %{rubyabi}
+Requires: rubygems
+Requires: rubygem(nokogiri) >= 1.4.0
+Requires: rubygem(rest-client)
+Requires: rubygem(imagefactory-console) >= 0.4.0
+
+BuildRequires: ruby
+BuildRequires: rubygems
+BuildRequires: rubygem(rspec-core)
+
+BuildArch: noarch
+Provides: rubygem(%{gemname}) = %{version}
+
+%description
+CLI for Aeolus Image Factory
+
+%prep
+%setup -q -c -T
+mkdir -p ./%{gemdir}
+gem install --local --install-dir ./%{gemdir} --force --rdoc %{SOURCE0}
+
+%build
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{gemdir}
+cp -a .%{gemdir}/* %{buildroot}%{gemdir}/
+
+mkdir -p %{buildroot}/%{_bindir}
+mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
+find %{buildroot}%{geminstdir}/bin -type f | xargs chmod 755
+rmdir %{buildroot}%{gemdir}/bin
+rm -rf %{buildroot}%{gemdir}/gems/%{gemname}-%{version}/.yardoc
+
+mkdir -p %{buildroot}%{mandir}
+mv %{buildroot}%{geminstdir}/man/* %{buildroot}%{mandir}
+
+%files
+%doc %{geminstdir}/COPYING
+%{_bindir}/aeolus-image
+%dir %{geminstdir}
+%{geminstdir}/Rakefile
+%{geminstdir}/bin
+%{geminstdir}/examples
+%{geminstdir}/lib
+%{geminstdir}/man
+%{geminstdir}/spec
+%doc %{gemdir}/doc/%{gemname}-%{version}
+%{gemdir}/cache/%{gemname}-%{version}.gem
+%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%{mandir}/*
+
+%changelog
+* Wed Jul 20 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-3
+- more updates to conform to fedora guidelines
+
+* Fri Jul 15 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-2
+- updated package to conform to fedora guidelines
+
+* Mon Jul 04 2011 <mtaylor(a)redhat.com> - 0.0.1-1
+- Added man files
+
+* Wed Jun 15 2011 <jguiditt(a)redhat.com> - 0.0.1-1
+- Initial package
diff --git a/rubygem-aeolus-image.spec b/rubygem-aeolus-image.spec
deleted file mode 100644
index 2e98471..0000000
--- a/rubygem-aeolus-image.spec
+++ /dev/null
@@ -1,87 +0,0 @@
-%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%global gemname aeolus-image
-%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
-%global mandir %{_mandir}/man1
-%global rubyabi 1.8
-
-Summary: Command-line interface for working with the Aeolus cloud suite
-Name: rubygem-aeolus-image
-Version: 0.1.0
-Release: 3%{?extra_release}%{?dist}
-Group: Development/Languages
-License: ASL 2.0
-URL:
http://aeolusproject.org
-
-# The source for this packages was pulled from the upstream's git repo.
-# Use the following commands to generate the gem
-# git clone
git://git.fedorahosted.org/aeolus/conductor.git
-# git checkout next
-# cd services/image_factory/aeolus-image
-# rake gem
-# grab image_factory_console-0.0.1.gem from the pkg subdir
-Source0: %{gemname}-%{version}.gem
-
-Requires: ruby(abi) = %{rubyabi}
-Requires: rubygems
-Requires: rubygem(nokogiri) >= 1.4.0
-Requires: rubygem(rest-client)
-Requires: rubygem(imagefactory-console) >= 0.4.0
-
-BuildRequires: ruby
-BuildRequires: rubygems
-BuildRequires: rubygem(rspec-core)
-
-BuildArch: noarch
-Provides: rubygem(%{gemname}) = %{version}
-
-%description
-QMF Console for Aeolus Image Factory
-
-%prep
-%setup -q -c -T
-mkdir -p ./%{gemdir}
-gem install --local --install-dir ./%{gemdir} --force --rdoc %{SOURCE0}
-
-%build
-
-%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{gemdir}
-cp -a .%{gemdir}/* %{buildroot}%{gemdir}/
-
-mkdir -p %{buildroot}/%{_bindir}
-mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
-find %{buildroot}%{geminstdir}/bin -type f | xargs chmod 755
-rmdir %{buildroot}%{gemdir}/bin
-rm -rf %{buildroot}%{gemdir}/gems/%{gemname}-%{version}/.yardoc
-
-mkdir -p %{buildroot}%{mandir}
-mv %{buildroot}%{geminstdir}/man/* %{buildroot}%{mandir}
-
-%files
-%doc %{geminstdir}/COPYING
-%{_bindir}/aeolus-image
-%dir %{geminstdir}
-%{geminstdir}/Rakefile
-%{geminstdir}/bin
-%{geminstdir}/examples
-%{geminstdir}/lib
-%{geminstdir}/man
-%{geminstdir}/spec
-%doc %{gemdir}/doc/%{gemname}-%{version}
-%{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
-%{mandir}/*
-
-%changelog
-* Wed Jul 20 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-3
-- more updates to conform to fedora guidelines
-
-* Fri Jul 15 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-2
-- updated package to conform to fedora guidelines
-
-* Mon Jul 04 2011 <mtaylor(a)redhat.com> - 0.0.1-1
-- Added man files
-
-* Wed Jun 15 2011 <jguiditt(a)redhat.com> - 0.0.1-1
-- Initial package
--
1.7.6.2