moretext 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +5 -0
- data/README.rdoc +0 -0
- data/Rakefile +14 -0
- data/bin/moretext +6 -0
- data/lib/moretext.rb +13 -0
- data/moretext.gemspec +32 -0
- metadata +75 -0
data/Manifest
ADDED
data/README.rdoc
ADDED
File without changes
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'echoe'
|
4
|
+
|
5
|
+
Echoe.new('moretext', '0.1.0') do |p|
|
6
|
+
p.description = "Generate random chinese text"
|
7
|
+
p.url = "http://github.com/siuying/ruby-moretext"
|
8
|
+
p.author = "Francis Chong"
|
9
|
+
p.email = "francis@ignition.hk"
|
10
|
+
p.ignore_pattern = ["tmp/*", "script/*"]
|
11
|
+
p.development_dependencies = []
|
12
|
+
end
|
13
|
+
|
14
|
+
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
|
data/bin/moretext
ADDED
data/lib/moretext.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module MoreText
|
5
|
+
def self.sentenses(number=1)
|
6
|
+
return JSON(open("http://more.handlino.com/sentences.json?n=#{number}").read)["sentences"]
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
# Shorthands
|
11
|
+
def MoreText(number)
|
12
|
+
MoreText.sentenses(number)
|
13
|
+
end
|
data/moretext.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{moretext}
|
5
|
+
s.version = "0.1.0"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Francis Chong"]
|
9
|
+
s.date = %q{2010-05-14}
|
10
|
+
s.default_executable = %q{moretext}
|
11
|
+
s.description = %q{Generate random chinese text}
|
12
|
+
s.email = %q{francis@ignition.hk}
|
13
|
+
s.executables = ["moretext"]
|
14
|
+
s.extra_rdoc_files = ["README.rdoc", "bin/moretext", "lib/moretext.rb"]
|
15
|
+
s.files = ["README.rdoc", "Rakefile", "bin/moretext", "lib/moretext.rb", "Manifest", "moretext.gemspec"]
|
16
|
+
s.homepage = %q{http://github.com/siuying/ruby-moretext}
|
17
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Moretext", "--main", "README.rdoc"]
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
s.rubyforge_project = %q{moretext}
|
20
|
+
s.rubygems_version = %q{1.3.6}
|
21
|
+
s.summary = %q{Generate random chinese text}
|
22
|
+
|
23
|
+
if s.respond_to? :specification_version then
|
24
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
25
|
+
s.specification_version = 3
|
26
|
+
|
27
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
28
|
+
else
|
29
|
+
end
|
30
|
+
else
|
31
|
+
end
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: moretext
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 0.1.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Francis Chong
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-05-14 00:00:00 +08:00
|
18
|
+
default_executable: moretext
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: Generate random chinese text
|
22
|
+
email: francis@ignition.hk
|
23
|
+
executables:
|
24
|
+
- moretext
|
25
|
+
extensions: []
|
26
|
+
|
27
|
+
extra_rdoc_files:
|
28
|
+
- README.rdoc
|
29
|
+
- bin/moretext
|
30
|
+
- lib/moretext.rb
|
31
|
+
files:
|
32
|
+
- README.rdoc
|
33
|
+
- Rakefile
|
34
|
+
- bin/moretext
|
35
|
+
- lib/moretext.rb
|
36
|
+
- Manifest
|
37
|
+
- moretext.gemspec
|
38
|
+
has_rdoc: true
|
39
|
+
homepage: http://github.com/siuying/ruby-moretext
|
40
|
+
licenses: []
|
41
|
+
|
42
|
+
post_install_message:
|
43
|
+
rdoc_options:
|
44
|
+
- --line-numbers
|
45
|
+
- --inline-source
|
46
|
+
- --title
|
47
|
+
- Moretext
|
48
|
+
- --main
|
49
|
+
- README.rdoc
|
50
|
+
require_paths:
|
51
|
+
- lib
|
52
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
version: "0"
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
segments:
|
64
|
+
- 1
|
65
|
+
- 2
|
66
|
+
version: "1.2"
|
67
|
+
requirements: []
|
68
|
+
|
69
|
+
rubyforge_project: moretext
|
70
|
+
rubygems_version: 1.3.6
|
71
|
+
signing_key:
|
72
|
+
specification_version: 3
|
73
|
+
summary: Generate random chinese text
|
74
|
+
test_files: []
|
75
|
+
|