Permalink
Browse files

re-init with self

  • Loading branch information...
1 parent 0153bdf commit a0d21d58cd9841b339c425b3d9b3a75b0de952d0 @sunaku committed Apr 21, 2011
Showing with 58 additions and 41 deletions.
  1. +1 −0 BEYOND
  2. +3 −0 Gemfile
  3. +4 −4 HACKING
  4. +47 −0 inochi.gemspec
  5. +2 −36 lib/inochi/inochi.rb
  6. +1 −1 test/runner
  7. 0 test/{helper.rb → test_helper.rb}
View
1 BEYOND
@@ -7,6 +7,7 @@ rsync(1), <<AsciiDoc,asciidoc(1)>>, xsltproc(1), <<Lynx,lynx(1)>>
[horizontal]
[[[AsciiDoc]]]:: http://www.methods.co.nz/asciidoc/
+[[[Bundler]]]:: http://gembundler.com
[[[Ember]]]:: <%= Ember::WEBSITE %>
[[[ERBook]]]:: http://snk.tuxfamily.org/lib/erbook/
[[[eRuby]]]:: http://en.wikipedia.org/wiki/ERuby
View
@@ -0,0 +1,3 @@
+source :rubygems
+
+gem 'detest', '>= 3.1.0', '< 4' # for unit testing
View
@@ -2,10 +2,10 @@
=== Prerequisites
-Install Ruby libraries necessary for development:
+Install Ruby libraries necessary for development using <<Bundler>>:
------------------------------------------------------------------------------
-gem install inochi --development
+bundle install
------------------------------------------------------------------------------
=== Infrastructure
@@ -71,7 +71,7 @@ set -x RUBYOPT -rubygems # fish
=== Running tests
Simply execute the included test runner, which sets up Ruby's `$LOAD_PATH` for
-testing, loads the `test/helper.rb` file, and then evaluates all
+testing, loads the included `test/test_helper.rb` file, and then evaluates all
`test/**/*_test.rb` files:
------------------------------------------------------------------------------
@@ -80,7 +80,7 @@ ruby test/runner
Its exit status will indicate whether all tests have passed. It may also
print additional pass/fail information depending on the testing library used
-in the `test/helper.rb` file.
+in the `test/test_helper.rb` file.
=== Contributing
View
@@ -0,0 +1,47 @@
+# -*- encoding: utf-8 -*-
+
+gemspec = Gem::Specification.new do |s|
+ s.name = %q{inochi}
+ s.version = "5.1.0"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Suraj N. Kurapati"]
+ s.date = %q{2010-08-14}
+ s.default_executable = %q{inochi}
+ s.description = %q{Inochi is an infrastructure that helps you create, test, document, package, publish, and announce your [Ruby] projects.}
+ s.executables = ["inochi"]
+ s.files = ["bin/inochi", "lib/inochi", "lib/inochi/templates", "lib/inochi/templates/CREDITS.rbs", "lib/inochi/templates/INSTALL.rbs", "lib/inochi/templates/Gemfile.rbs", "lib/inochi/templates/HACKING.rbs", "lib/inochi/templates/LICENSE.rbs", "lib/inochi/templates/MANUAL.rbs", "lib/inochi/templates/inochi.rb.rbs", "lib/inochi/templates/README.rbs", "lib/inochi/templates/test_runner.rbs", "lib/inochi/templates/library.rbs", "lib/inochi/templates/SYNOPSIS.rbs", "lib/inochi/templates/HISTORY.rbs", "lib/inochi/templates/inochi.conf.rbs", "lib/inochi/templates/library_test.rb.rbs", "lib/inochi/templates/USAGE.rbs", "lib/inochi/templates/test_helper.rb.rbs", "lib/inochi/templates/command.rbs", "lib/inochi/templates/BEYOND.rbs", "lib/inochi/generate.rb", "lib/inochi/inochi.rb", "lib/inochi/engine.rb", "lib/inochi/tasks", "lib/inochi/tasks/2-man.css", "lib/inochi/tasks/5-pub.rake", "lib/inochi/tasks/3-ann.rake", "lib/inochi/tasks/1-api.rake", "lib/inochi/tasks/4-gem.rake", "lib/inochi/tasks/2-man.rake", "lib/inochi.rb", "LICENSE", "man/man1/inochi.1"]
+ s.homepage = %q{http://snk.tuxfamily.org/lib/inochi/}
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.6.2}
+ s.summary = %q{Gives life to Ruby projects}
+
+ if s.respond_to? :specification_version then
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<ember>, ["< 1", ">= 0.3.0"])
+ s.add_runtime_dependency(%q<highline>, ["< 2", ">= 1.5"])
+ s.add_runtime_dependency(%q<mechanize>, ["< 2", ">= 1"])
+ s.add_runtime_dependency(%q<nokogiri>, ["< 2", ">= 1.4"])
+ s.add_runtime_dependency(%q<rake>, ["< 1", ">= 0.8.4"])
+ s.add_runtime_dependency(%q<yard>, ["< 1", ">= 0.5.8"])
+ else
+ s.add_dependency(%q<ember>, ["< 1", ">= 0.3.0"])
+ s.add_dependency(%q<highline>, ["< 2", ">= 1.5"])
+ s.add_dependency(%q<mechanize>, ["< 2", ">= 1"])
+ s.add_dependency(%q<nokogiri>, ["< 2", ">= 1.4"])
+ s.add_dependency(%q<rake>, ["< 1", ">= 0.8.4"])
+ s.add_dependency(%q<yard>, ["< 1", ">= 0.5.8"])
+ end
+ else
+ s.add_dependency(%q<ember>, ["< 1", ">= 0.3.0"])
+ s.add_dependency(%q<highline>, ["< 2", ">= 1.5"])
+ s.add_dependency(%q<mechanize>, ["< 2", ">= 1"])
+ s.add_dependency(%q<nokogiri>, ["< 2", ">= 1.4"])
+ s.add_dependency(%q<rake>, ["< 1", ">= 0.8.4"])
+ s.add_dependency(%q<yard>, ["< 1", ">= 0.5.8"])
+ end
+end
+system 'inochi', *gemspec.files
+gemspec
View
@@ -42,7 +42,7 @@ def self.inspect
#
# @example
#
- # RUNTIME = {
+ # GEMDEPS = {
# # this project needs exactly version 1.2.3 of the "an_example" gem
# 'an_example' => [ '1.2.3' ],
#
@@ -54,45 +54,11 @@ def self.inspect
# 'yet_another_example' => [],
# }
#
- RUNTIME = {
+ GEMDEPS = {
'ember' => [ '>= 0.3.0' , '< 1' ], # for eRuby templates
'nokogiri' => [ '>= 1.4' , '< 2' ], # for parsing HTML and XML
'rake' => [ '>= 0.8.4' , '< 1' ], # for Inochi::Engine
'yard' => [ '>= 0.5.8' , '< 1' ], # for making API documentation
}
- ##
- # RubyGems required by this project during development.
- #
- # @example
- #
- # DEVTIME = {
- # # this project needs exactly version 1.2.3 of the "an_example" gem
- # 'an_example' => [ '1.2.3' ],
- #
- # # this project needs at least version 1.2 (but not
- # # version 1.2.4 or newer) of the "another_example" gem
- # 'another_example' => [ '>= 1.2' , '< 1.2.4' ],
- #
- # # this project needs any version of the "yet_another_example" gem
- # "yet_another_example" => [],
- # }
- #
- DEVTIME = {
- 'detest' => [ '>= 3.1.0', '< 4' ], # for unit testing
- }
-
- # establish gem version dependencies
- if respond_to? :gem, true
- [RUNTIME, DEVTIME].each do |deps|
- deps.each do |gem_name, gem_version|
- begin
- gem gem_name, *Array(gem_version)
- rescue LoadError => error
- warn "#{self.inspect}: #{error}"
- end
- end
- end
- end
-
end
View
@@ -24,7 +24,7 @@ lib_dir = File.expand_path('../../lib', __FILE__)
test_dir = File.expand_path('..', __FILE__)
$LOAD_PATH.unshift lib_dir, test_dir
-load File.join(test_dir, 'helper.rb')
+require 'test_helper'
ARGV << "#{test_dir}/**/*_test.rb" if ARGV.empty?
ARGV.each {|glob| Dir[glob].each {|test| load test } }
File renamed without changes.

0 comments on commit a0d21d5

Please sign in to comment.