From 011d4713b2d6503e7d66eebe837c51d50c1cd98c Mon Sep 17 00:00:00 2001 From: Norman Clarke Date: Mon, 30 Aug 2010 09:54:51 -0300 Subject: [PATCH] Docs and clean up setup files. --- Gemfile.default | 4 ++-- bench.rb | 4 +++- init.rb | 4 ++-- lib/babosa/identifier.rb | 6 +++--- test/babosa_test.rb | 2 -- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Gemfile.default b/Gemfile.default index 1b7c8eb..2cc79b7 100644 --- a/Gemfile.default +++ b/Gemfile.default @@ -1,3 +1,3 @@ source :rubygems -# gem "unicode" -# gem "activesupport" +gem "rbench" +gemspec diff --git a/bench.rb b/bench.rb index d2d61e6..e15d07a 100644 --- a/bench.rb +++ b/bench.rb @@ -1,6 +1,8 @@ # encoding: utf-8 require "benchmark" -require File.expand_path("../init", __FILE__) +require "rubygems" +require "bundler/setup" +require "babosa" def sample "Ja, żołnierz Wojska Polskiego, przysięgam służyć wiernie Rzeczypospolitej Polskiej".to_slug diff --git a/init.rb b/init.rb index e48b9d0..2ab7259 100644 --- a/init.rb +++ b/init.rb @@ -1,3 +1,3 @@ -$LOAD_PATH << File.expand_path("../lib", __FILE__) -$LOAD_PATH.uniq! +require "rubygems" +require "bundler/setup" require "babosa" diff --git a/lib/babosa/identifier.rb b/lib/babosa/identifier.rb index 3fe4b79..c257589 100644 --- a/lib/babosa/identifier.rb +++ b/lib/babosa/identifier.rb @@ -66,8 +66,8 @@ def initialize(string) # string.transliterate # => "日本" # # You can pass any key(s) from +Characters.approximations+ as arguments. This allows - # for contextual approximations. By default; +:spanish+ and +:german+ are - # provided: + # for contextual approximations. Danish, German, Serbian and Spanish are currently + # supported. # # string = Identifier.new "Jürgen Müller" # string.transliterate # => "Jurgen Muller" @@ -244,6 +244,6 @@ def send_to_new_instance(*args) end end - # Support older versions of FriendlyId. + # Identifier is aliased as SlugString to support older versions of FriendlyId. SlugString = Identifier end diff --git a/test/babosa_test.rb b/test/babosa_test.rb index 02672c5..ef855a1 100644 --- a/test/babosa_test.rb +++ b/test/babosa_test.rb @@ -1,7 +1,5 @@ # encoding: utf-8 $KCODE = 'UTF8' if RUBY_VERSION < '1.9' -$LOAD_PATH << File.expand_path("../../lib", __FILE__) -$LOAD_PATH.uniq! require "rubygems" require "bundler/setup"