Skip to content

Commit

Permalink
massive re-factor to have modes be based on module/extend vs. subclas…
Browse files Browse the repository at this point in the history
…sing. NOT backward compat. note version bump.
  • Loading branch information
ahoward committed Oct 8, 2009
1 parent 6bb22e0 commit 6709b8c
Show file tree
Hide file tree
Showing 11 changed files with 326 additions and 337 deletions.
5 changes: 3 additions & 2 deletions Rakefile
Expand Up @@ -64,6 +64,7 @@ task :gemspec do
Gem::Specification::new do |spec|
spec.name = #{ lib.inspect }
spec.description = 'a class factory and dsl for generating command line programs real quick'
spec.version = #{ version.inspect }
spec.platform = Gem::Platform::RUBY
spec.summary = #{ lib.inspect }
Expand All @@ -77,8 +78,8 @@ task :gemspec do
spec.has_rdoc = #{ has_rdoc.inspect }
spec.test_files = #{ test_files.inspect }
spec.add_dependency 'fattr'
spec.add_dependency 'arrayfields'
spec.add_dependency 'fattr', '>= 1.0.3'
spec.add_dependency 'arrayfields', '>= 4.5.0'
spec.extensions.push(*#{ extensions.inspect })
Expand Down
2 changes: 1 addition & 1 deletion TODO
Expand Up @@ -9,7 +9,7 @@

* figure out how to support '-' ??

* clean up warnings under 'ruby -d'
* clean up warnings under 'ruby -w'
* error reporting weird for some errors

===============================================================================
Expand Down
16 changes: 2 additions & 14 deletions lib/main.rb
Expand Up @@ -2,7 +2,7 @@ module Main
#
# top level constants
#
Main::VERSION = '2.9.3' unless
Main::VERSION = '3.0.0' unless
defined? Main::VERSION
def self.version() Main::VERSION end

Expand All @@ -29,20 +29,7 @@ def self.libdir() Main::LIBDIR end
end

require 'fattr'
begin
version = Fattr.version
raise unless version[%r/^1\./]
rescue
abort "main requires fattrs >= 1.0.3 - gem install fattr"
end

require 'arrayfields'
begin
version = Arrayfields.version
raise unless version[%r/^4\./]
rescue
abort "main requires arrayfields >= 4.5.0 - gem install arrayfields"
end
#
# main's own libs
#
Expand All @@ -55,6 +42,7 @@ def self.libdir() Main::LIBDIR end
require libdir + 'parameter'
require libdir + 'getoptlong'
require libdir + 'mode'
require libdir + 'dsl'
require libdir + 'base'
require libdir + 'factories'
end

0 comments on commit 6709b8c

Please sign in to comment.