faker-japanese 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +0 -1
- data/Rakefile +9 -12
- data/VERSION +1 -1
- data/example/your_friends.rb +1 -0
- data/lib/faker/japanese.rb +0 -1
- data/lib/faker/japanese/name.rb +6 -2
- data/spec/name_spec.rb +1 -0
- metadata +30 -69
- data/.gitignore +0 -21
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -10,7 +10,6 @@ begin
|
|
10
10
|
gem.email = "tily05@gmail.com"
|
11
11
|
gem.homepage = "http://github.com/tily/ruby-faker-japanese"
|
12
12
|
gem.authors = ["tily"]
|
13
|
-
gem.add_dependency "faker"
|
14
13
|
gem.add_development_dependency "rspec", ">= 1.2.9"
|
15
14
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
15
|
end
|
@@ -19,17 +18,15 @@ rescue LoadError
|
|
19
18
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
20
19
|
end
|
21
20
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
# spec.rcov = true
|
32
|
-
#end
|
21
|
+
require 'rspec/core/rake_task'
|
22
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
23
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
24
|
+
end
|
25
|
+
|
26
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
27
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
28
|
+
spec.rcov = true
|
29
|
+
end
|
33
30
|
|
34
31
|
task :spec => :check_dependencies
|
35
32
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
data/example/your_friends.rb
CHANGED
data/lib/faker/japanese.rb
CHANGED
data/lib/faker/japanese/name.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# -*- coding:utf-8 -*
|
2
2
|
module Faker
|
3
3
|
module Japanese
|
4
4
|
module Name
|
@@ -32035,7 +32035,7 @@ module Faker
|
|
32035
32035
|
|
32036
32036
|
[:first_name, :last_name].each do |m|
|
32037
32037
|
define_method m do
|
32038
|
-
chosen = instance_variable_get("@#{m}s")
|
32038
|
+
chosen = rand(instance_variable_get("@#{m}s"))
|
32039
32039
|
name = chosen[0]
|
32040
32040
|
set_yomi(name, chosen[1])
|
32041
32041
|
name
|
@@ -32046,6 +32046,10 @@ module Faker
|
|
32046
32046
|
name.instance_variable_set('@yomi', yomi)
|
32047
32047
|
def name.yomi; @yomi end
|
32048
32048
|
end
|
32049
|
+
|
32050
|
+
def rand(array)
|
32051
|
+
array[Kernel.rand(array.size)]
|
32052
|
+
end
|
32049
32053
|
end
|
32050
32054
|
end
|
32051
32055
|
end
|
data/spec/name_spec.rb
CHANGED
metadata
CHANGED
@@ -1,66 +1,38 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: faker-japanese
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 0
|
10
|
-
version: 0.0.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- tily
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2010-11-03 00:00:00 +09:00
|
12
|
+
date: 2011-09-29 00:00:00.000000000 +09:00
|
19
13
|
default_executable:
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
name: faker
|
23
|
-
prerelease: false
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
33
|
-
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
36
16
|
name: rspec
|
37
|
-
|
38
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
17
|
+
requirement: &142730700 !ruby/object:Gem::Requirement
|
39
18
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
hash: 13
|
44
|
-
segments:
|
45
|
-
- 1
|
46
|
-
- 2
|
47
|
-
- 9
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
48
22
|
version: 1.2.9
|
49
23
|
type: :development
|
50
|
-
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *142730700
|
51
26
|
description: Faker in Japanese
|
52
27
|
email: tily05@gmail.com
|
53
28
|
executables: []
|
54
|
-
|
55
29
|
extensions: []
|
56
|
-
|
57
|
-
extra_rdoc_files:
|
30
|
+
extra_rdoc_files:
|
58
31
|
- LICENSE
|
59
32
|
- LICENSE.naist-jdic
|
60
33
|
- README.md
|
61
|
-
files:
|
34
|
+
files:
|
62
35
|
- .document
|
63
|
-
- .gitignore
|
64
36
|
- LICENSE
|
65
37
|
- LICENSE.naist-jdic
|
66
38
|
- README.md
|
@@ -76,37 +48,26 @@ files:
|
|
76
48
|
has_rdoc: true
|
77
49
|
homepage: http://github.com/tily/ruby-faker-japanese
|
78
50
|
licenses: []
|
79
|
-
|
80
51
|
post_install_message:
|
81
|
-
rdoc_options:
|
82
|
-
|
83
|
-
require_paths:
|
52
|
+
rdoc_options: []
|
53
|
+
require_paths:
|
84
54
|
- lib
|
85
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
86
56
|
none: false
|
87
|
-
requirements:
|
88
|
-
- -
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
|
91
|
-
|
92
|
-
- 0
|
93
|
-
version: "0"
|
94
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ! '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
62
|
none: false
|
96
|
-
requirements:
|
97
|
-
- -
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
|
100
|
-
segments:
|
101
|
-
- 0
|
102
|
-
version: "0"
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
103
67
|
requirements: []
|
104
|
-
|
105
68
|
rubyforge_project:
|
106
|
-
rubygems_version: 1.
|
69
|
+
rubygems_version: 1.6.2
|
107
70
|
signing_key:
|
108
71
|
specification_version: 3
|
109
72
|
summary: Faker in Japanese
|
110
|
-
test_files:
|
111
|
-
- spec/name_spec.rb
|
112
|
-
- spec/spec_helper.rb
|
73
|
+
test_files: []
|