faker-precure 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/.rspec +3 -0
- data/.travis.yml +10 -0
- data/.yardopts +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +55 -0
- data/Rakefile +9 -0
- data/faker-precure.gemspec +27 -0
- data/lib/faker/precure.rb +41 -0
- data/lib/faker/precure/version.rb +5 -0
- data/spec/faker/precure_spec.rb +51 -0
- data/spec/spec_helper.rb +7 -0
- data/spec/support/matchers/be_an_element_of.rb +7 -0
- metadata +132 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 59629837fb52b6d625dd7f082553d6bbad72ced8
|
|
4
|
+
data.tar.gz: c0e5225606c2ca1fa41e558374ff504abe01cef3
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 9cc7b87cbdae63c65f094c8e1ed7c794922709242cccad2773a9f476dce49d149e01b96e1126253f4a55022d5343eae1c88a2af88e17da3a25efcb0f7ad930a9
|
|
7
|
+
data.tar.gz: 55865e28814c0c64057be07d6116df4a155066c8bb1451796c94431e61c4b369fe5536c58b29df96a0949ccd00a18fb6e130d37794a91a3fe20a9922c5bf373b
|
data/.gitignore
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
*.gem
|
|
2
|
+
*.rbc
|
|
3
|
+
.bundle
|
|
4
|
+
.config
|
|
5
|
+
.yardoc
|
|
6
|
+
Gemfile.lock
|
|
7
|
+
InstalledFiles
|
|
8
|
+
_yardoc
|
|
9
|
+
coverage
|
|
10
|
+
doc/
|
|
11
|
+
lib/bundler/man
|
|
12
|
+
pkg
|
|
13
|
+
rdoc
|
|
14
|
+
spec/reports
|
|
15
|
+
test/tmp
|
|
16
|
+
test/version_tmp
|
|
17
|
+
tmp
|
|
18
|
+
*.bundle
|
|
19
|
+
*.so
|
|
20
|
+
*.o
|
|
21
|
+
*.a
|
|
22
|
+
mkmf.log
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/.yardopts
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2014 sue445
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Faker::Precure
|
|
2
|
+
|
|
3
|
+
Test data generator using precure
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add this line to your application's Gemfile:
|
|
8
|
+
|
|
9
|
+
gem 'faker-precure'
|
|
10
|
+
|
|
11
|
+
And then execute:
|
|
12
|
+
|
|
13
|
+
$ bundle
|
|
14
|
+
|
|
15
|
+
Or install it yourself as:
|
|
16
|
+
|
|
17
|
+
$ gem install faker-precure
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require "faker/precure"
|
|
23
|
+
|
|
24
|
+
Faker::Precure.human_name
|
|
25
|
+
#=> "黄瀬やよい"
|
|
26
|
+
|
|
27
|
+
Faker::Precure.precure_name
|
|
28
|
+
#=> "キュアアクア"
|
|
29
|
+
|
|
30
|
+
Faker::Precure.title
|
|
31
|
+
#=> "Yes! プリキュア5"
|
|
32
|
+
|
|
33
|
+
Faker::Precure.transform_message
|
|
34
|
+
#=> "レッツプレイ!プリキュアモジュレーション!!\n爪弾くは女神の調べ! キュアミューズ!\n届け4人の組曲!スイートプリキュア!"
|
|
35
|
+
|
|
36
|
+
Faker::Precure.user_name
|
|
37
|
+
#=> "cure_mint"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Example of factory
|
|
41
|
+
```ruby
|
|
42
|
+
FactoryGirl.define do
|
|
43
|
+
factory :user do
|
|
44
|
+
name { Faker::Precure.human_name }
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Contributing
|
|
50
|
+
|
|
51
|
+
1. Fork it ( https://github.com/sue445/faker-precure/fork )
|
|
52
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
53
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
54
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
55
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'faker/precure/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "faker-precure"
|
|
8
|
+
spec.version = Faker::Precure::VERSION
|
|
9
|
+
spec.authors = ["sue445"]
|
|
10
|
+
spec.email = ["sue445@sue445.net"]
|
|
11
|
+
spec.summary = %q{Test data generator using precure}
|
|
12
|
+
spec.description = %q{Test data generator using precure}
|
|
13
|
+
spec.homepage = "https://github.com/sue445/faker-precure"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ["lib"]
|
|
20
|
+
|
|
21
|
+
spec.add_dependency "rubicure", "~> 0.0.5"
|
|
22
|
+
|
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
|
24
|
+
spec.add_development_dependency "rake"
|
|
25
|
+
spec.add_development_dependency "rspec", "3.0.0.beta2"
|
|
26
|
+
spec.add_development_dependency "yard"
|
|
27
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
require "faker/precure/version"
|
|
2
|
+
|
|
3
|
+
module Faker
|
|
4
|
+
module Precure
|
|
5
|
+
require "rubicure"
|
|
6
|
+
|
|
7
|
+
# @return [String]
|
|
8
|
+
def self.human_name
|
|
9
|
+
sample_girl.human_name
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# @return [String]
|
|
13
|
+
def self.precure_name
|
|
14
|
+
sample_girl.precure_name
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# @return [String]
|
|
18
|
+
def self.transform_message
|
|
19
|
+
sample_girl.transform_message
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# @return [String]
|
|
23
|
+
def self.user_name
|
|
24
|
+
::Rubicure::Girl.uniq_names.sample.to_s
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @return [String]
|
|
28
|
+
def self.title
|
|
29
|
+
sample_series.title
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
private
|
|
33
|
+
def self.sample_girl
|
|
34
|
+
::Precure.all_stars.sample
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def self.sample_series
|
|
38
|
+
::Rubicure.core.to_a.sample
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
describe Faker::Precure do
|
|
2
|
+
it 'has a version number' do
|
|
3
|
+
expect(Faker::Precure::VERSION).not_to be nil
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
describe "#human_name" do
|
|
7
|
+
subject{ Faker::Precure.human_name }
|
|
8
|
+
|
|
9
|
+
let(:all_human_names){ ::Precure.all_stars.map(&:human_name) }
|
|
10
|
+
|
|
11
|
+
it{ should_not be_blank }
|
|
12
|
+
it{ should be_an_element_of all_human_names }
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
describe "#precure_name" do
|
|
16
|
+
subject{ Faker::Precure.precure_name }
|
|
17
|
+
|
|
18
|
+
let(:all_precure_names){ ::Precure.all_stars.map(&:precure_name) }
|
|
19
|
+
|
|
20
|
+
it{ should_not be_blank }
|
|
21
|
+
it{ should be_an_element_of all_precure_names }
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
describe "#transform_message" do
|
|
25
|
+
subject{ Faker::Precure.transform_message }
|
|
26
|
+
|
|
27
|
+
let(:all_transform_messages){ ::Precure.all_stars.map(&:transform_message) }
|
|
28
|
+
|
|
29
|
+
it{ should_not be_blank }
|
|
30
|
+
it{ should be_an_element_of all_transform_messages }
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
describe "#user_name" do
|
|
34
|
+
subject{ Faker::Precure.user_name }
|
|
35
|
+
|
|
36
|
+
let(:all_user_names){ ::Rubicure::Girl.uniq_names.map(&:to_s) }
|
|
37
|
+
|
|
38
|
+
it{ should_not be_blank }
|
|
39
|
+
it{ should be_an_element_of all_user_names }
|
|
40
|
+
it{ should match /^[0-9a-z_]+$/ }
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
describe "#title" do
|
|
44
|
+
subject{ Faker::Precure.title }
|
|
45
|
+
|
|
46
|
+
let(:all_titles){ ::Rubicure.core.map(&:title) }
|
|
47
|
+
|
|
48
|
+
it{ should_not be_blank }
|
|
49
|
+
it{ should be_an_element_of all_titles }
|
|
50
|
+
end
|
|
51
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
|
2
|
+
require 'faker/precure'
|
|
3
|
+
|
|
4
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
|
5
|
+
# in spec/support/ and its subdirectories.
|
|
6
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
|
7
|
+
|
metadata
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: faker-precure
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- sue445
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: rubicure
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 0.0.5
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 0.0.5
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.6'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.6'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rspec
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - '='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 3.0.0.beta2
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - '='
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: 3.0.0.beta2
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: yard
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
description: Test data generator using precure
|
|
84
|
+
email:
|
|
85
|
+
- sue445@sue445.net
|
|
86
|
+
executables: []
|
|
87
|
+
extensions: []
|
|
88
|
+
extra_rdoc_files: []
|
|
89
|
+
files:
|
|
90
|
+
- ".gitignore"
|
|
91
|
+
- ".rspec"
|
|
92
|
+
- ".travis.yml"
|
|
93
|
+
- ".yardopts"
|
|
94
|
+
- Gemfile
|
|
95
|
+
- LICENSE.txt
|
|
96
|
+
- README.md
|
|
97
|
+
- Rakefile
|
|
98
|
+
- faker-precure.gemspec
|
|
99
|
+
- lib/faker/precure.rb
|
|
100
|
+
- lib/faker/precure/version.rb
|
|
101
|
+
- spec/faker/precure_spec.rb
|
|
102
|
+
- spec/spec_helper.rb
|
|
103
|
+
- spec/support/matchers/be_an_element_of.rb
|
|
104
|
+
homepage: https://github.com/sue445/faker-precure
|
|
105
|
+
licenses:
|
|
106
|
+
- MIT
|
|
107
|
+
metadata: {}
|
|
108
|
+
post_install_message:
|
|
109
|
+
rdoc_options: []
|
|
110
|
+
require_paths:
|
|
111
|
+
- lib
|
|
112
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - ">="
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: '0'
|
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
|
+
requirements:
|
|
119
|
+
- - ">="
|
|
120
|
+
- !ruby/object:Gem::Version
|
|
121
|
+
version: '0'
|
|
122
|
+
requirements: []
|
|
123
|
+
rubyforge_project:
|
|
124
|
+
rubygems_version: 2.2.2
|
|
125
|
+
signing_key:
|
|
126
|
+
specification_version: 4
|
|
127
|
+
summary: Test data generator using precure
|
|
128
|
+
test_files:
|
|
129
|
+
- spec/faker/precure_spec.rb
|
|
130
|
+
- spec/spec_helper.rb
|
|
131
|
+
- spec/support/matchers/be_an_element_of.rb
|
|
132
|
+
has_rdoc:
|