Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update gem deps (map.rb). release v4.5.1.

  • Loading branch information...
commit 3f3b56c6467a5afe23a3b8ff8c36d5ac75c26e60 1 parent ea8d628
@ahoward authored
View
3  README.erb
@@ -188,6 +188,9 @@ DOCS
API section below
HISTORY
+ 4.5.0
+ - use map.rb for config objects
+
4.4.0
- app storage under a dotdir. for example
View
8 Rakefile
@@ -80,6 +80,7 @@ task :gemspec do
spec.test_files = #{ test_files.inspect }
spec.add_dependency 'fattr', '>= 2.1.0'
spec.add_dependency 'arrayfields', '>= 4.7.4'
+ spec.add_dependency 'map', '>= 2.0.0'
spec.extensions.push(*#{ extensions.inspect })
@@ -92,8 +93,9 @@ task :gemspec do
}
end
- open("#{ lib }.gemspec", "w"){|fd| fd.puts template}
- This.gemspec = "#{ lib }.gemspec"
+ Fu.mkdir_p(This.pkgdir)
+ This.gemspec = File.join(This.pkgdir, "gemspec.rb")
+ open("#{ This.gemspec }", "w"){|fd| fd.puts(template)}
end
task :gem => [:clean, :gemspec] do
@@ -103,7 +105,7 @@ task :gem => [:clean, :gemspec] do
`#{ cmd }`
after = Dir['*.gem']
gem = ((after - before).first || after.first) or abort('no gem!')
- Fu.mv gem, This.pkgdir
+ Fu.mv(gem, This.pkgdir)
This.gem = File.basename(gem)
end
View
1  TODO
@@ -1,4 +1,5 @@
todo:
+ - support for logging/logs too!
- examples of new features
- use map.rb
View
3  lib/main.rb
@@ -2,7 +2,7 @@ module Main
#
# top level constants
#
- Main::VERSION = '4.4.0' unless
+ Main::VERSION = '4.5.1' unless
defined? Main::VERSION
def self.version() Main::VERSION end
@@ -40,6 +40,7 @@ def self.libdir() Main::LIBDIR end
require 'fattr'
require 'arrayfields'
+ require 'map'
#
# main's own libs
#
View
4 lib/main/program/class_methods.rb
@@ -302,7 +302,7 @@ def config(*args, &block)
unless defined?(@config)
require 'yaml' unless defined?(YAML)
if test(?s, config_path)
- @config = YAML.load(IO.read(config_path))
+ @config = Map.for(YAML.load(IO.read(config_path)))
else
config = args.last.is_a?(Hash) ? args.last : {}
lines = config.to_yaml.split(/\n/)
@@ -314,7 +314,7 @@ def config(*args, &block)
end
editor = ENV['EDITOR'] || ENV['EDIT'] || 'vi'
system("#{ editor.inspect } #{ config_path }")
- @config = YAML.load(IO.read(config_path))
+ @config = Map.for(YAML.load(IO.read(config_path)))
end
end
@config
View
29 main.gemspec
@@ -1,29 +0,0 @@
-## main.gemspec
-#
-
-Gem::Specification::new do |spec|
- spec.name = "main"
- spec.description = 'a class factory and dsl for generating command line programs real quick'
- spec.version = "4.4.0"
- spec.platform = Gem::Platform::RUBY
- spec.summary = "main"
-
- spec.files = ["a.rb", "lib", "lib/main", "lib/main/cast.rb", "lib/main/dsl.rb", "lib/main/factories.rb", "lib/main/getoptlong.rb", "lib/main/logger.rb", "lib/main/mode.rb", "lib/main/parameter.rb", "lib/main/program", "lib/main/program/class_methods.rb", "lib/main/program/instance_methods.rb", "lib/main/program.rb", "lib/main/softspoken.rb", "lib/main/stdext.rb", "lib/main/test.rb", "lib/main/usage.rb", "lib/main/util.rb", "lib/main.rb", "LICENSE", "main.gemspec", "Rakefile", "README", "README.erb", "samples", "samples/a.rb", "samples/b.rb", "samples/c.rb", "samples/d.rb", "samples/e.rb", "samples/f.rb", "samples/g.rb", "samples/h.rb", "samples/j.rb", "test", "test/main.rb", "TODO"]
- spec.executables = []
-
-
- spec.require_path = "lib"
-
-
- spec.has_rdoc = true
- spec.test_files = "test/main.rb"
- spec.add_dependency 'fattr', '>= 2.1.0'
- spec.add_dependency 'arrayfields', '>= 4.7.4'
-
- spec.extensions.push(*[])
-
- spec.rubyforge_project = "codeforpeople"
- spec.author = "Ara T. Howard"
- spec.email = "ara.t.howard@gmail.com"
- spec.homepage = "http://github.com/ahoward/main/tree/master"
-end
Please sign in to comment.
Something went wrong with that request. Please try again.