diff options
-rw-r--r-- | Rakefile | 36 | ||||
-rw-r--r-- | VERSION.yml | 5 | ||||
-rw-r--r-- | lib/mixlib/log.rb | 1 | ||||
-rw-r--r-- | lib/mixlib/log/version.rb | 5 | ||||
-rw-r--r-- | mixlib-log.gemspec | 16 |
5 files changed, 30 insertions, 33 deletions
@@ -1,25 +1,14 @@ -require 'rubygems' require 'rake' +require 'rake/gempackagetask' +require 'rake/rdoctask' +require 'yaml' -begin - require 'jeweler' - Jeweler::Tasks.new do |gem| - gem.name = "mixlib-log" - gem.summary = "A gem that provides a simple mixin for log functionality" - gem.email = "info@opscode.com" - gem.homepage = "http://www.opscode.com" - gem.authors = ["Opscode, Inc."] - gem.files.include %w{ bin/* lib/**/* } - # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings - end - Jeweler::GemcutterTasks.new -rescue LoadError - STDERR.puts - STDERR.puts "Jeweler is not installed. (sudo) gem install jeweler to use gem packaging tasks" - STDERR.puts -end +gemspec = eval(IO.read('mixlib-log.gemspec')) + +Rake::GemPackageTask.new(gemspec).define begin + require 'rubygems' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = 'spec/**/*_spec.rb' @@ -33,19 +22,10 @@ end task :default => :spec -require 'rake/rdoctask' -require 'yaml' Rake::RDocTask.new do |rdoc| - if File.exist?('VERSION.yml') - config = YAML.load(File.read('VERSION.yml')) - version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}" - else - version = "" - end - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "mixlib-log #{version}" + rdoc.title = "mixlib-log #{Mixlib::Log::VERSION}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end diff --git a/VERSION.yml b/VERSION.yml deleted file mode 100644 index 082b8f7..0000000 --- a/VERSION.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -:major: 1 -:minor: 3 -:patch: 0 -:build: diff --git a/lib/mixlib/log.rb b/lib/mixlib/log.rb index d0c99b5..2819d1d 100644 --- a/lib/mixlib/log.rb +++ b/lib/mixlib/log.rb @@ -17,6 +17,7 @@ # limitations under the License. require 'logger' +require 'mixlib/log/version' require 'mixlib/log/formatter' module Mixlib diff --git a/lib/mixlib/log/version.rb b/lib/mixlib/log/version.rb new file mode 100644 index 0000000..30d5f9a --- /dev/null +++ b/lib/mixlib/log/version.rb @@ -0,0 +1,5 @@ +module Mixlib + module Log + VERSION = "1.3.0" + end +end diff --git a/mixlib-log.gemspec b/mixlib-log.gemspec new file mode 100644 index 0000000..1f64e9a --- /dev/null +++ b/mixlib-log.gemspec @@ -0,0 +1,16 @@ +puts File.expand_path('../lib', __FILE__) +$:.unshift File.expand_path('../lib', __FILE__) +require 'mixlib/log/version' + +Gem::Specification.new do |gem| + gem.name = "mixlib-log" + gem.version = Mixlib::Log::VERSION + gem.platform = Gem::Platform::RUBY + gem.summary = "A gem that provides a simple mixin for log functionality" + gem.email = "info@opscode.com" + gem.homepage = "http://www.opscode.com" + gem.authors = ["Opscode, Inc."] + gem.has_rdoc = true + gem.extra_rdoc_files = ["README.rdoc", "LICENSE", 'NOTICE'] + gem.files = Dir['lib/**/*'] +end |