Permalink
Browse files

modify for bundle & travis-ci

  • Loading branch information...
1 parent aa35e4f commit 7f342a3b257c5f5b069d734325b15fc1b3c9184b @kachick committed Aug 21, 2012
Showing with 80 additions and 25 deletions.
  1. +6 −0 .gitignore
  2. +8 −0 .travis.yml
  3. +12 −0 Gemfile
  4. +1 −1 LICENSE
  5. +3 −1 Manifest.txt
  6. +20 −10 README.rdoc
  7. +7 −12 Rakefile
  8. +22 −0 integer-base.gemspec
  9. +1 −1 lib/integer/base.rb
  10. 0 lib/integer/base/{singleton_class.rb → singletonclass.rb}
View
@@ -13,6 +13,9 @@ test/tmp
test/version_tmp
tmp
+# bundler
+vendor/
+
# YARD artifacts
.yardoc
_yardoc
@@ -24,3 +27,6 @@ doc/
# editor
*~
.redcar
+
+# other
+*.lock
View
@@ -0,0 +1,8 @@
+language: ruby
+rvm:
+ - ruby-head
+ - 1.9.3
+ - 1.9.2
+ - jruby-head
+ - jruby-19mode # JRuby in 1.9 mode
+ - rbx-19mode # Rubinius in 1.9 mode
View
@@ -0,0 +1,12 @@
+source 'https://rubygems.org'
+
+gemspec
+
+group :development do
+ gem 'rake'
+ gem 'yard', '>=0.8.2.1'
+end
+
+group :test do
+ gem 'rake'
+end
View
@@ -1,4 +1,4 @@
-(The MIT X11 License)
+(The MIT X License)
Copyright (c) 2011 Kenichi Kamiya
View
@@ -3,8 +3,10 @@ LICENSE
History.rdoc
Manifest.txt
Rakefile
+Gemfile
+integer-base.gemspec
lib/integer/base.rb
-lib/integer/base/singleton_class.rb
+lib/integer/base/singletonclass.rb
lib/integer/base/standard_chars.rb
lib/integer/base/version.rb
lib/integer/base/ext.rb
View
@@ -1,11 +1,10 @@
= integer-base
-code :: http://github.com/kachick/integer-base
-gem :: http://rubygems.org/gems/integer-base
+{<img src="https://secure.travis-ci.org/kachick/integer-base.png" />}[http://travis-ci.org/kachick/integer-base]
== Description
-Own formats come into positional/unary numeral systems.
+Original formats come into positional/unary numeral systems.
== Feautures
@@ -21,49 +20,60 @@ Own formats come into positional/unary numeral systems.
== Usage
* Setup
+
require 'integer/base'
* Basic
+
Integer::Base.parse '10', %w[0 1] #=> 2
* Extend Ruby's Interface
+
require 'integer/base/ext'
* to_i
+
'a'.to_i ['0', *'A'..'I'] #=> 1
'a0'.to_i ['0', *'A'..'I'] #=> 10
'aib'.to_i ['0', *'A'..'I'] #=> 192
* to_s
+
192.to_s ['0', *'A'..'I'] #=> 'aib'
* Already defined useful chars
+
'10'.to_i Integer::Base::STANDARD_CHARS[36].last #=> :Z
'10'.to_i Integer::Base::STANDARD_CHARS[:BINARY].last #=> :"1"
* Get own formats
+
'a'.to_i %w[0 a] #=> 1
'a0'.to_i %w[0 a] #=> 2
* Upper 36 basenumbers
+
'1!'.to_i([*Integer::Base::STANDARD_CHARS[36], '!']) #=> 73
== Requirements
* Ruby 1.9.2 or later
-
- Focusing
-
- * 1.9.3-p194
- * 1.9.2-p290
== Installation
-* gem install integer-base
+ gem install integer-base
+
+== Links
+
+code :: https://github.com/kachick/integer-base
+issues :: https://github.com/kachick/integer-base/issues
+CI :: http://travis-ci.org/#!/kachick/integer-base
+gem :: https://rubygems.org/gems/integer-base
+gem+ :: http://metagem.info/gems/integer-base
== License
-The MIT X11 License
+The MIT X License
Copyright (c) 2011 Kenichi Kamiya
View
@@ -1,16 +1,11 @@
-require 'rubygems'
-gem 'hoe', '~> 3.0.6'
-require 'hoe'
-require 'fileutils'
+#!/usr/bin/env rake
+require 'bundler/gem_tasks'
-Hoe.plugin :newgem
+require 'rake/testtask'
-$hoe = Hoe.spec 'integer-base' do
- developer 'Kenichi Kamiya', 'kachick1+ruby@gmail.com'
- self.rubyforge_name = name
- require_ruby_version '>= 1.9.2'
- dependency 'yard', '~> 0.8.1', :development
+task default: [:test]
+
+Rake::TestTask.new do |tt|
+ tt.verbose = true
end
-require 'newgem/tasks'
-Dir['tasks/**/*.rake'].each { |t| load t }
View
@@ -0,0 +1,22 @@
+# I don't know why dose occur errors below.
+# require_relative 'lib/integer/base/version'
+require File.expand_path('../lib/integer/base/version', __FILE__)
+
+Gem::Specification.new do |gem|
+ gem.authors = ['Kenichi Kamiya']
+ gem.email = ['kachick1+ruby@gmail.com']
+ gem.description = %q{Original formats come into positional/unary numeral systems.}
+ gem.summary = %q{Original formats come into positional/unary numeral systems.}
+ gem.homepage = 'https://github.com/kachick/integer-base'
+
+ gem.files = `git ls-files`.split($\)
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+ gem.test_files = gem.files.grep(%r{^(test|spec|features|declare)/})
+ gem.name = 'integer-base'
+ gem.require_paths = ['lib']
+ gem.version = Integer::Base::VERSION.dup # dup for https://github.com/rubygems/rubygems/commit/48f1d869510dcd325d6566df7d0147a086905380#-P0
+
+ gem.required_ruby_version = '>=1.9.2'
+ gem.add_development_dependency 'yard', '>=0.8.2.1'
+end
+
View
@@ -13,5 +13,5 @@ class InvalidCharacter < TypeError; end
end
require_relative 'base/version'
-require_relative 'base/singleton_class'
+require_relative 'base/singletonclass'
require_relative 'base/standard_chars'

0 comments on commit 7f342a3

Please sign in to comment.