faker-rubimas 0.1.0
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 +13 -0
- data/.rspec +3 -0
- data/.rubocop.yml +24 -0
- data/.travis.yml +17 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +72 -0
- data/LICENSE.txt +21 -0
- data/README.md +66 -0
- data/Rakefile +6 -0
- data/faker-rubimas.gemspec +27 -0
- data/lib/faker/rubimas.rb +59 -0
- data/lib/faker/rubimas/version.rb +5 -0
- data/lib/faker_rubimas.rb +1 -0
- data/spec/faker/rubimas_spec.rb +95 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/support/matchers/be_an_element_of.rb +5 -0
- metadata +133 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 86850bef26ccd7f7d21aae57d11625b0fb814fdeebc1109013cdf66a31c97815
|
4
|
+
data.tar.gz: 2dab5f506617b5d92eba41dd83cf5805e9f77bd66865c86f25583184fa040099
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0d0224fa3a2e5931a126f56ad2e21f5002a8b539c954b214a46c8a13b96edab35fdb592821e42ff2604b93adc10326fca343effed1f9cc4ef6c4172c6b75b0dd
|
7
|
+
data.tar.gz: 9548fe51396bac13e921ec1a19243eb0de12b1da7590fd863c62a9cc1a7e0c4b36f8854dd105dcbdcccfdbf15d55f188371c1a9c66aac4cd6baa8f707e495ed6
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- 'vendor/**/*'
|
4
|
+
- 'tmp/**/*'
|
5
|
+
TargetRubyVersion: 2.3
|
6
|
+
|
7
|
+
Metrics/BlockLength:
|
8
|
+
Exclude:
|
9
|
+
- 'Rakefile'
|
10
|
+
- 'spec/**/*.rb'
|
11
|
+
|
12
|
+
Metrics/ModuleLength:
|
13
|
+
Exclude:
|
14
|
+
- 'spec/**/*.rb'
|
15
|
+
|
16
|
+
Metrics/LineLength:
|
17
|
+
Exclude:
|
18
|
+
- 'spec/**/*.rb'
|
19
|
+
|
20
|
+
Style/Documentation:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
Style/FrozenStringLiteralComment:
|
24
|
+
Enabled: false
|
data/.travis.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
sudo: false
|
3
|
+
language: ruby
|
4
|
+
cache: bundler
|
5
|
+
rvm:
|
6
|
+
- 2.3
|
7
|
+
- 2.4
|
8
|
+
- 2.5
|
9
|
+
- 2.6.1
|
10
|
+
- ruby-head
|
11
|
+
before_install: gem install bundler -v 1.17.2
|
12
|
+
script:
|
13
|
+
- bundle exec rubocop
|
14
|
+
- bundle exec rspec
|
15
|
+
notifications:
|
16
|
+
slack:
|
17
|
+
secure: "DaqI7wGW+trLFr96//smCuKD9Irs1S9KRAddX+atNpnUMrHyY+ru2XPEz3G1DAB8eYxtSokvgbAkyH/YNP6oxxpK3uWU7l39jP1IZPKfAAKr0aog4i2m/T0ZFgmLMNYBBGXG8GalMStx37wJWuoPSANSr2IfFgoSiC+n7q1M4MlHVDOTorM2HYDhvgBchJ4Yjjqc+qHiocE7ZytgRz1Jh9UyovRaUnl48lcQ4g5e2KQ6fh1Bmz5JirP9YbhQMK+dWXwVO0aSQY8ugSbYt5+rUi/i8UBaBvK8RjMcPeUJGS+ISL7SVzlt7RWXaSBnqoArJA+vq4rTddhIaBK/MQIxvL09dLCqRqeUXr+rd4acO+NhWpeyeO/OEZkRnNHWbVcesiOfvlSpYqavv9l8l2qJtGCjcv4MGaSIVwRZrNhBt+yM8nfkrtBPo9fhFDbQKdZq4iNWqGTKpP5tY1iFfJUcSAbwjLOZ4x5GJU+eJF46bgoJb8DGjNqznclzyMOe43bmJDRBwQvO/1lQ9vff1n0uP5PEifb9w11rchAME8ohCI4z1XdUGT8R69gwfErMrk1t2SsWMR1/d0w5RQpQBTwvZDS1wqD32G1hcGB4AIDqnJaEmNMPF7tCecNk1kJz60byzWB7+YEONgvU9D8Ip10Q6ofr4z3OT1QbMK1QiCvaCEQ="
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at you.goto.510@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
faker-rubimas (0.1.0)
|
5
|
+
rubimas (>= 1.0.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activesupport (5.2.2)
|
11
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
+
i18n (>= 0.7, < 2)
|
13
|
+
minitest (~> 5.1)
|
14
|
+
tzinfo (~> 1.1)
|
15
|
+
ast (2.4.0)
|
16
|
+
concurrent-ruby (1.1.4)
|
17
|
+
diff-lcs (1.3)
|
18
|
+
hashie (3.6.0)
|
19
|
+
i18n (1.5.3)
|
20
|
+
concurrent-ruby (~> 1.0)
|
21
|
+
jaro_winkler (1.5.2)
|
22
|
+
minitest (5.11.3)
|
23
|
+
parallel (1.14.0)
|
24
|
+
parser (2.6.0.0)
|
25
|
+
ast (~> 2.4.0)
|
26
|
+
powerpack (0.1.2)
|
27
|
+
psych (3.1.0)
|
28
|
+
rainbow (3.0.0)
|
29
|
+
rake (10.5.0)
|
30
|
+
rspec (3.8.0)
|
31
|
+
rspec-core (~> 3.8.0)
|
32
|
+
rspec-expectations (~> 3.8.0)
|
33
|
+
rspec-mocks (~> 3.8.0)
|
34
|
+
rspec-core (3.8.0)
|
35
|
+
rspec-support (~> 3.8.0)
|
36
|
+
rspec-expectations (3.8.2)
|
37
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
+
rspec-support (~> 3.8.0)
|
39
|
+
rspec-mocks (3.8.0)
|
40
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
+
rspec-support (~> 3.8.0)
|
42
|
+
rspec-support (3.8.0)
|
43
|
+
rubimas (1.0.0)
|
44
|
+
activesupport (>= 4.0)
|
45
|
+
hashie (>= 3.0)
|
46
|
+
rubocop (0.65.0)
|
47
|
+
jaro_winkler (~> 1.5.1)
|
48
|
+
parallel (~> 1.10)
|
49
|
+
parser (>= 2.5, != 2.5.1.1)
|
50
|
+
powerpack (~> 0.1)
|
51
|
+
psych (>= 3.1.0)
|
52
|
+
rainbow (>= 2.2.2, < 4.0)
|
53
|
+
ruby-progressbar (~> 1.7)
|
54
|
+
unicode-display_width (~> 1.4.0)
|
55
|
+
ruby-progressbar (1.10.0)
|
56
|
+
thread_safe (0.3.6)
|
57
|
+
tzinfo (1.2.5)
|
58
|
+
thread_safe (~> 0.1)
|
59
|
+
unicode-display_width (1.4.1)
|
60
|
+
|
61
|
+
PLATFORMS
|
62
|
+
ruby
|
63
|
+
|
64
|
+
DEPENDENCIES
|
65
|
+
bundler (~> 1.17)
|
66
|
+
faker-rubimas!
|
67
|
+
rake (~> 10.0)
|
68
|
+
rspec (~> 3.0)
|
69
|
+
rubocop (~> 0.65.0)
|
70
|
+
|
71
|
+
BUNDLED WITH
|
72
|
+
1.17.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 YutaGoto
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
# Faker::Rubimas
|
2
|
+
|
3
|
+
Test data generator using 765PRO all stars (include million stars).
|
4
|
+
|
5
|
+
This gem is inspired by [sue445/faker-precure](https://github.com/sue445/faker-precure) and [imas/rubimas](https://github.com/imas/rubimas).
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'faker-rubimas'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install faker-rubimas
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'faker/rubimas'
|
27
|
+
|
28
|
+
Faker::Rubimas.name
|
29
|
+
# => "望月杏奈"
|
30
|
+
|
31
|
+
Faker::Rubimas.favorite
|
32
|
+
# => "ハト"
|
33
|
+
|
34
|
+
Faker::Rubimas.hobby
|
35
|
+
# => "登山"
|
36
|
+
|
37
|
+
Faker::Rubimas.talent
|
38
|
+
# => "ポーカーフェイス"
|
39
|
+
|
40
|
+
Faker::Rubimas.idol_type
|
41
|
+
# => "Princess"
|
42
|
+
|
43
|
+
Faker::Rubimas.color
|
44
|
+
# => "#ffe43f"
|
45
|
+
|
46
|
+
Faker::Rubimas.cv
|
47
|
+
# => "長谷川明子"
|
48
|
+
|
49
|
+
Faker::Rubimas.unit_name
|
50
|
+
# => "クレシェンドブルー"
|
51
|
+
|
52
|
+
Faker::Rubimas.unit_member_names
|
53
|
+
# => ["天海春香", "周防桃子", "福田のり子", "松田亜利沙", "横山奈緒"]
|
54
|
+
```
|
55
|
+
|
56
|
+
## Contributing
|
57
|
+
|
58
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/YutaGoto/faker-rubimas. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
59
|
+
|
60
|
+
## License
|
61
|
+
|
62
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
63
|
+
|
64
|
+
## Code of Conduct
|
65
|
+
|
66
|
+
Everyone interacting in the Faker::Rubimas project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/YutaGoto/faker-rubimas/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'faker/rubimas/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'faker-rubimas'
|
7
|
+
spec.version = Faker::Rubimas::VERSION
|
8
|
+
spec.authors = ['YutaGoto']
|
9
|
+
spec.email = ['you.goto.510@gmail.com']
|
10
|
+
|
11
|
+
spec.summary = 'Test data generator using idolmaster.'
|
12
|
+
spec.description = 'Test data generator using idolmaster.'
|
13
|
+
spec.homepage = 'https://github.com/YutaGoto/faker-rubimas'
|
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 'rubimas', '>= 1.0.0'
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.17'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
26
|
+
spec.add_development_dependency 'rubocop', '~> 0.65.0'
|
27
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'faker/rubimas/version'
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
module Rubimas
|
5
|
+
require 'rubimas'
|
6
|
+
|
7
|
+
class Error < StandardError; end
|
8
|
+
|
9
|
+
::Rubimas.theaterdays!
|
10
|
+
|
11
|
+
class << self
|
12
|
+
def name
|
13
|
+
sample_idol.name.full
|
14
|
+
end
|
15
|
+
|
16
|
+
def favorite
|
17
|
+
sample_idol.favorites.sample
|
18
|
+
end
|
19
|
+
|
20
|
+
def hobby
|
21
|
+
::Rubimas.all.map(&:hobbies).flatten.sample
|
22
|
+
end
|
23
|
+
|
24
|
+
def talent
|
25
|
+
sample_idol.talents.sample
|
26
|
+
end
|
27
|
+
|
28
|
+
def idol_type
|
29
|
+
sample_idol.idol_type
|
30
|
+
end
|
31
|
+
|
32
|
+
def color
|
33
|
+
sample_idol.color
|
34
|
+
end
|
35
|
+
|
36
|
+
def cv
|
37
|
+
sample_idol.cv
|
38
|
+
end
|
39
|
+
|
40
|
+
def unit_name
|
41
|
+
sample_unit.name
|
42
|
+
end
|
43
|
+
|
44
|
+
def unit_member_names
|
45
|
+
sample_unit.members.map { |member| member.name.full }
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def sample_idol
|
51
|
+
::Rubimas.all.sample
|
52
|
+
end
|
53
|
+
|
54
|
+
def sample_unit
|
55
|
+
::Rubimas::Unit.all.sample
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'faker/rubimas'
|
@@ -0,0 +1,95 @@
|
|
1
|
+
RSpec.describe Faker::Rubimas do
|
2
|
+
it 'has a version number' do
|
3
|
+
expect(Faker::Rubimas::VERSION).not_to be nil
|
4
|
+
end
|
5
|
+
|
6
|
+
describe '.name' do
|
7
|
+
subject { Faker::Rubimas.name }
|
8
|
+
|
9
|
+
let(:all_idols) { ::Rubimas.all.map { |idol| idol.name.full } }
|
10
|
+
|
11
|
+
it { should_not be_blank }
|
12
|
+
it { should be_an_element_of all_idols }
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '.favorite' do
|
16
|
+
subject { Faker::Rubimas.favorite }
|
17
|
+
|
18
|
+
let(:all_favs) { ::Rubimas.all.map(&:favorites).flatten }
|
19
|
+
|
20
|
+
it { should_not be_blank }
|
21
|
+
it { should be_an_element_of all_favs }
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '.hobby' do
|
25
|
+
subject { Faker::Rubimas.hobby }
|
26
|
+
|
27
|
+
let(:all_hobbies) { ::Rubimas.all.map(&:hobbies).flatten.compact }
|
28
|
+
|
29
|
+
it { should_not be_blank }
|
30
|
+
it { should be_an_element_of all_hobbies }
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '.color' do
|
34
|
+
subject { Faker::Rubimas.color }
|
35
|
+
|
36
|
+
let(:all_colors) { ::Rubimas.all.map(&:color).flatten }
|
37
|
+
|
38
|
+
it { should_not be_blank }
|
39
|
+
it { should be_an_element_of all_colors }
|
40
|
+
end
|
41
|
+
|
42
|
+
describe '.cv' do
|
43
|
+
subject { Faker::Rubimas.cv }
|
44
|
+
|
45
|
+
let(:all_cvs) { ::Rubimas.all.map(&:cv).flatten }
|
46
|
+
|
47
|
+
it { should_not be_blank }
|
48
|
+
it { should be_an_element_of all_cvs }
|
49
|
+
end
|
50
|
+
|
51
|
+
describe '.talent' do
|
52
|
+
subject { Faker::Rubimas.talent }
|
53
|
+
|
54
|
+
let(:all_talents) { ::Rubimas.all.map(&:talents).flatten }
|
55
|
+
|
56
|
+
it { should_not be_blank }
|
57
|
+
it { should be_an_element_of all_talents }
|
58
|
+
end
|
59
|
+
|
60
|
+
describe '.idol_type' do
|
61
|
+
subject { Faker::Rubimas.idol_type }
|
62
|
+
|
63
|
+
let(:all_types) { ::Rubimas.all.map(&:idol_type).uniq }
|
64
|
+
|
65
|
+
it { should_not be_blank }
|
66
|
+
it { should be_an_element_of all_types }
|
67
|
+
end
|
68
|
+
|
69
|
+
describe '.color' do
|
70
|
+
subject { Faker::Rubimas.color }
|
71
|
+
|
72
|
+
let(:all_colors) { ::Rubimas.all.map(&:color).uniq }
|
73
|
+
|
74
|
+
it { should_not be_blank }
|
75
|
+
it { should be_an_element_of all_colors }
|
76
|
+
end
|
77
|
+
|
78
|
+
describe '.unit_name' do
|
79
|
+
subject { Faker::Rubimas.unit_name }
|
80
|
+
|
81
|
+
let(:all_units) { ::Rubimas::Unit.all.map(&:name) }
|
82
|
+
|
83
|
+
it { should_not be_blank }
|
84
|
+
it { should be_an_element_of all_units }
|
85
|
+
end
|
86
|
+
|
87
|
+
describe '.unit_member_names' do
|
88
|
+
subject { Faker::Rubimas.unit_member_names }
|
89
|
+
|
90
|
+
let(:all_unit_members) { ::Rubimas::Unit.all.map { |unit| unit.members.map { |member| member.name.full } } }
|
91
|
+
|
92
|
+
it { should_not be_blank }
|
93
|
+
it { should be_an_element_of all_unit_members }
|
94
|
+
end
|
95
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
require 'faker/rubimas'
|
3
|
+
|
4
|
+
RSpec.configure do |config|
|
5
|
+
# Enable flags like --only-failures and --next-failure
|
6
|
+
config.example_status_persistence_file_path = '.rspec_status'
|
7
|
+
|
8
|
+
# Disable RSpec exposing methods globally on `Module` and `main`
|
9
|
+
config.disable_monkey_patching!
|
10
|
+
|
11
|
+
config.expect_with :rspec do |c|
|
12
|
+
c.syntax = :expect
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
metadata
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: faker-rubimas
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- YutaGoto
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-03-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubimas
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.0.0
|
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.17'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.17'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.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'
|
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'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.65.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.65.0
|
83
|
+
description: Test data generator using idolmaster.
|
84
|
+
email:
|
85
|
+
- you.goto.510@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".rubocop.yml"
|
93
|
+
- ".travis.yml"
|
94
|
+
- CODE_OF_CONDUCT.md
|
95
|
+
- Gemfile
|
96
|
+
- Gemfile.lock
|
97
|
+
- LICENSE.txt
|
98
|
+
- README.md
|
99
|
+
- Rakefile
|
100
|
+
- faker-rubimas.gemspec
|
101
|
+
- lib/faker/rubimas.rb
|
102
|
+
- lib/faker/rubimas/version.rb
|
103
|
+
- lib/faker_rubimas.rb
|
104
|
+
- spec/faker/rubimas_spec.rb
|
105
|
+
- spec/spec_helper.rb
|
106
|
+
- spec/support/matchers/be_an_element_of.rb
|
107
|
+
homepage: https://github.com/YutaGoto/faker-rubimas
|
108
|
+
licenses:
|
109
|
+
- MIT
|
110
|
+
metadata: {}
|
111
|
+
post_install_message:
|
112
|
+
rdoc_options: []
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubygems_version: 3.0.1
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: Test data generator using idolmaster.
|
130
|
+
test_files:
|
131
|
+
- spec/faker/rubimas_spec.rb
|
132
|
+
- spec/spec_helper.rb
|
133
|
+
- spec/support/matchers/be_an_element_of.rb
|