Permalink
Browse files

Simplify release process and have VERSION in just one place (ach/vers…

…ion.rb)
  • Loading branch information...
jm81 committed Jan 12, 2013
1 parent 1867220 commit 73e4b68bdadbc2e69bef3e9c446e71bc39bcc350
Showing with 26 additions and 82 deletions.
  1. +9 −24 Rakefile
  2. +0 −1 VERSION
  3. +14 −57 ach.gemspec
  4. +3 −0 lib/ach/version.rb
View
@@ -1,24 +1,5 @@
-require 'rubygems'
-require 'rake'
-
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "ach"
- gem.summary = %{Helper for building ACH files in Ruby}
- gem.description = <<EOF
-ach is a Ruby helper for builder ACH files. In particular, it helps with field
-order and alignment, and adds padding lines to end of file.
-EOF
- gem.email = "jmorgan@morgancreative.net"
- gem.homepage = "http://github.com/jm81/ach"
- gem.authors = ["Jared Morgan", "Josh Puetz"]
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
-end
+$:.push File.expand_path('../lib', __FILE__)
+require 'ach/version'
require 'micronaut/rake_task'
Micronaut::RakeTask.new(:examples) do |examples|
@@ -36,12 +17,16 @@ task :default => :examples
require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ''
rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "ACH #{version}"
+ rdoc.title = "ACH #{ACH::VERSION}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
+task :build do
+ system 'gem build ach.gemspec'
+end
-
+task :release => :build do
+ system "gem push ach-#{ACH::VERSION}.gem"
+end
View
@@ -1 +0,0 @@
-0.4.2
View
@@ -1,64 +1,21 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require 'ach/version'
Gem::Specification.new do |s|
- s.name = "ach"
- s.version = "0.4.2"
+ s.name = 'ach'
+ s.version = ACH::VERSION.dup
+ s.summary = 'Helper for building ACH files'
+ s.description = 'ach is a Ruby helper for building and parsing ACH files. In particular, it helps with field order and alignment, and adds padding lines to end of file.'
+ s.email = 'jmorgan@morgancreative.net'
+ s.homepage = 'https://github.com/jm81/ach'
+ s.authors = ['Jared Morgan', 'Josh Puetz']
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Jared Morgan", "Josh Puetz"]
- s.date = "2012-12-10"
- s.description = "ach is a Ruby helper for builder ACH files. In particular, it helps with field\norder and alignment, and adds padding lines to end of file.\n"
- s.email = "jmorgan@morgancreative.net"
- s.extra_rdoc_files = [
- "README.md"
- ]
- s.files = [
- ".autotest",
- "MIT-LICENSE",
- "README.md",
- "Rakefile",
- "VERSION",
- "ach.gemspec",
- "examples/ach/ach_file_example.rb",
- "examples/ach/batch_example.rb",
- "examples/ach/field_identifiers_example.rb",
- "examples/ach/fixtures/return_noc.txt",
- "examples/ach/parse_example.rb",
- "examples/ach/records/batch_control_example.rb",
- "examples/ach/records/batch_header_example.rb",
- "examples/ach/records/ctx_entry_detail_example.rb",
- "examples/ach/records/ctx_entry_detail_test.rb",
- "examples/ach/records/nines_example.rb",
- "examples/ach/records/shared/batch_summaries.rb",
- "examples/example_helper.rb",
- "lib/ach.rb",
- "lib/ach/ach_file.rb",
- "lib/ach/batch.rb",
- "lib/ach/field_identifiers.rb",
- "lib/ach/records/addendum.rb",
- "lib/ach/records/batch_control.rb",
- "lib/ach/records/batch_header.rb",
- "lib/ach/records/entry_detail.rb",
- "lib/ach/records/file_control.rb",
- "lib/ach/records/file_header.rb",
- "lib/ach/records/nines.rb",
- "lib/ach/records/record.rb"
- ]
- s.homepage = "http://github.com/jm81/ach"
- s.require_paths = ["lib"]
- s.rubygems_version = "1.8.10"
- s.summary = "Helper for building ACH files in Ruby"
+ s.extra_rdoc_files = ['README.md']
- if s.respond_to? :specification_version then
- s.specification_version = 3
+ s.files = Dir.glob('lib/**/*') + %w{MIT-LICENSE README.md}
+ s.test_files = Dir.glob('examples/**/*')
+ s.require_path = 'lib'
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- else
- end
- else
- end
+ s.add_development_dependency('micronaut')
end
-
View
@@ -0,0 +1,3 @@
+module ACH
+ VERSION = '0.4.2'.freeze
+end

0 comments on commit 73e4b68

Please sign in to comment.