laowaihua 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +13 -0
- data/lib/lao_wai_hua.rb +30 -0
- data/lib/lao_wai_hua/railtie.rb +10 -0
- data/lib/laowaihua.rb +1 -0
- data/lib/tasks/lao_wai_hua.rake +7 -0
- metadata +67 -0
data/README
ADDED
data/lib/lao_wai_hua.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
module LaoWaiHua
|
2
|
+
|
3
|
+
WORDS = %w(
|
4
|
+
一 位 爷 爷 他 姓 顾 ,
|
5
|
+
上 街 打 醋 又 买 布 。
|
6
|
+
买 了 布 , 打 了 醋 ,
|
7
|
+
回 头 看 见 鹰 抓 兔 。
|
8
|
+
放 下 布 , 搁 下 醋 ,
|
9
|
+
上 前 去 追 鹰 和 兔 ,
|
10
|
+
飞 了 鹰 , 跑 了 兔 。
|
11
|
+
打 翻 醋 , 醋 湿 布
|
12
|
+
)
|
13
|
+
|
14
|
+
def self.generate(length=WORDS.length)
|
15
|
+
words = []
|
16
|
+
while words.length < length
|
17
|
+
words += LaoWaiHua::WORDS[0, length]
|
18
|
+
end
|
19
|
+
words.join("")
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
def LaoWaiHua(*args)
|
25
|
+
LaoWaiHua.generate(*args)
|
26
|
+
end
|
27
|
+
|
28
|
+
if defined?(Rails)
|
29
|
+
require 'lao_wai_hua/railtie'
|
30
|
+
end
|
data/lib/laowaihua.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'lao_wai_hua'
|
metadata
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: laowaihua
|
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
|
+
- Matthew Rudy
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-04-25 00:00:00 +08:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description:
|
22
|
+
email: matthewrudyjacobs@gmail.com
|
23
|
+
executables: []
|
24
|
+
|
25
|
+
extensions: []
|
26
|
+
|
27
|
+
extra_rdoc_files:
|
28
|
+
- README
|
29
|
+
files:
|
30
|
+
- README
|
31
|
+
- lib/lao_wai_hua/railtie.rb
|
32
|
+
- lib/lao_wai_hua.rb
|
33
|
+
- lib/laowaihua.rb
|
34
|
+
- lib/tasks/lao_wai_hua.rake
|
35
|
+
has_rdoc: true
|
36
|
+
homepage: http://github.com/matthewrudy/laowaihua
|
37
|
+
licenses: []
|
38
|
+
|
39
|
+
post_install_message:
|
40
|
+
rdoc_options:
|
41
|
+
- --main
|
42
|
+
- README
|
43
|
+
require_paths:
|
44
|
+
- lib
|
45
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
segments:
|
50
|
+
- 0
|
51
|
+
version: "0"
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
version: "0"
|
59
|
+
requirements: []
|
60
|
+
|
61
|
+
rubyforge_project:
|
62
|
+
rubygems_version: 1.3.6
|
63
|
+
signing_key:
|
64
|
+
specification_version: 3
|
65
|
+
summary: a Lorem Ipsum generator for Chinese
|
66
|
+
test_files: []
|
67
|
+
|