Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
init commit
- Loading branch information
0 parents
commit eb90c67
Showing
14 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
README.rdoc | |||
Rakefile | |||
bin/moretext | |||
lib/moretext.rb | |||
Manifest |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
require 'rubygems' | |||
require 'rake' | |||
require 'echoe' | |||
|
|||
Echoe.new('moretext', '0.1.0') do |p| | |||
p.description = "Generate random chinese text" | |||
p.url = "http://github.com/siuying/ruby-moretext" | |||
p.author = "Francis Chong" | |||
p.email = "francis@ignition.hk" | |||
p.ignore_pattern = ["tmp/*", "script/*"] | |||
p.development_dependencies = [] | |||
end | |||
|
|||
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,6 @@ | |||
require 'rubygems' | |||
require 'moretext' | |||
|
|||
number = ARGV[0].nil? ? 1 : ARGV[0].to_i | |||
|
|||
puts MoreText.sentenses(number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
require 'open-uri' | |||
require 'json' | |||
|
|||
module MoreText | |||
def self.sentenses(number=1) | |||
return JSON(open("http://more.handlino.com/sentences.json?n=#{number}").read)["sentences"] | |||
end | |||
end | |||
|
|||
# Shorthands | |||
def MoreText(number) | |||
MoreText.sentenses(number) | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,32 @@ | |||
# -*- encoding: utf-8 -*- | |||
|
|||
Gem::Specification.new do |s| | |||
s.name = %q{moretext} | |||
s.version = "0.1.0" | |||
|
|||
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version= | |||
s.authors = ["Francis Chong"] | |||
s.date = %q{2010-05-14} | |||
s.default_executable = %q{moretext} | |||
s.description = %q{Generate random chinese text} | |||
s.email = %q{francis@ignition.hk} | |||
s.executables = ["moretext"] | |||
s.extra_rdoc_files = ["README.rdoc", "bin/moretext", "lib/moretext.rb"] | |||
s.files = ["README.rdoc", "Rakefile", "bin/moretext", "lib/moretext.rb", "Manifest", "moretext.gemspec"] | |||
s.homepage = %q{http://github.com/siuying/ruby-moretext} | |||
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Moretext", "--main", "README.rdoc"] | |||
s.require_paths = ["lib"] | |||
s.rubyforge_project = %q{moretext} | |||
s.rubygems_version = %q{1.3.6} | |||
s.summary = %q{Generate random chinese text} | |||
|
|||
if s.respond_to? :specification_version then | |||
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION | |||
s.specification_version = 3 | |||
|
|||
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then | |||
else | |||
end | |||
else | |||
end | |||
end |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
README.rdoc | |||
Rakefile | |||
bin/moretext | |||
lib/moretext.rb | |||
Manifest |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
require 'rubygems' | |||
require 'rake' | |||
require 'echoe' | |||
|
|||
Echoe.new('moretext', '0.1.0') do |p| | |||
p.description = "Generate random chinese text" | |||
p.url = "http://github.com/siuying/ruby-moretext" | |||
p.author = "Francis Chong" | |||
p.email = "francis@ignition.hk" | |||
p.ignore_pattern = ["tmp/*", "script/*"] | |||
p.development_dependencies = [] | |||
end | |||
|
|||
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,6 @@ | |||
require 'rubygems' | |||
require 'moretext' | |||
|
|||
number = ARGV[0].nil? ? 1 : ARGV[0].to_i | |||
|
|||
puts MoreText.sentenses(number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
require 'open-uri' | |||
require 'json' | |||
|
|||
module MoreText | |||
def self.sentenses(number=1) | |||
return JSON(open("http://more.handlino.com/sentences.json?n=#{number}").read)["sentences"] | |||
end | |||
end | |||
|
|||
# Shorthands | |||
def MoreText(number) | |||
MoreText.sentenses(number) | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,32 @@ | |||
# -*- encoding: utf-8 -*- | |||
|
|||
Gem::Specification.new do |s| | |||
s.name = %q{moretext} | |||
s.version = "0.1.0" | |||
|
|||
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version= | |||
s.authors = ["Francis Chong"] | |||
s.date = %q{2010-05-14} | |||
s.default_executable = %q{moretext} | |||
s.description = %q{Generate random chinese text} | |||
s.email = %q{francis@ignition.hk} | |||
s.executables = ["moretext"] | |||
s.extra_rdoc_files = ["README.rdoc", "bin/moretext", "lib/moretext.rb"] | |||
s.files = ["README.rdoc", "Rakefile", "bin/moretext", "lib/moretext.rb", "Manifest", "moretext.gemspec"] | |||
s.homepage = %q{http://github.com/siuying/ruby-moretext} | |||
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Moretext", "--main", "README.rdoc"] | |||
s.require_paths = ["lib"] | |||
s.rubyforge_project = %q{moretext} | |||
s.rubygems_version = %q{1.3.6} | |||
s.summary = %q{Generate random chinese text} | |||
|
|||
if s.respond_to? :specification_version then | |||
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION | |||
s.specification_version = 3 | |||
|
|||
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then | |||
else | |||
end | |||
else | |||
end | |||
end |