faker-precure 0.0.2 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/test.yml +96 -0
- data/.rspec +1 -1
- data/CHANGELOG.md +36 -0
- data/README.md +9 -14
- data/faker-precure.gemspec +7 -2
- data/lib/faker/precure/version.rb +1 -1
- data/lib/faker/precure.rb +8 -3
- data/lib/faker-precure.rb +1 -0
- data/spec/faker/precure_spec.rb +18 -9
- data/spec/spec_helper.rb +5 -3
- metadata +20 -16
- data/.travis.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1219da6f946db4aae347159b44a09505ad7a30ef52a8ec3aedc08002a2ddcc6b
|
4
|
+
data.tar.gz: 0113e9882a6a3d1c81c77690922de77107d2527ed9705595cc6e240e5bcb834d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f92834cbd09bdee9e02f1f335fbc85ec2ed7eddd4769b4059ee26065f4968a15f43d63a094f334104bf5858cfdd9d185a7670bdb00640908165580e7b6c5729f
|
7
|
+
data.tar.gz: 8c1b756943e0297f6f906b4b57386542e53badee156d61ea8f50fae1fcb9eeb020f132255b3179e2b0e03d2a1954b588c1762da8e288e13972001849b81d722b
|
@@ -0,0 +1,96 @@
|
|
1
|
+
name: test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
types:
|
9
|
+
- opened
|
10
|
+
- synchronize
|
11
|
+
- reopened
|
12
|
+
schedule:
|
13
|
+
- cron: "0 10 * * 5" # JST 19:00 (Fri)
|
14
|
+
|
15
|
+
env:
|
16
|
+
CI: "true"
|
17
|
+
RUBYOPT: -EUTF-8
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
test:
|
21
|
+
runs-on: ubuntu-latest
|
22
|
+
|
23
|
+
container: ${{ matrix.ruby }}
|
24
|
+
|
25
|
+
strategy:
|
26
|
+
fail-fast: false
|
27
|
+
|
28
|
+
matrix:
|
29
|
+
ruby:
|
30
|
+
- ruby:2.2
|
31
|
+
- ruby:2.3
|
32
|
+
- ruby:2.4
|
33
|
+
- ruby:2.5
|
34
|
+
- ruby:2.6
|
35
|
+
- ruby:2.7
|
36
|
+
- ruby:3.0
|
37
|
+
- rubylang/ruby:master-nightly-bionic
|
38
|
+
include:
|
39
|
+
- ruby: rubylang/ruby:master-nightly-bionic
|
40
|
+
allow_failures: "true"
|
41
|
+
|
42
|
+
steps:
|
43
|
+
- uses: actions/checkout@v2
|
44
|
+
|
45
|
+
|
46
|
+
- name: Cache vendor/bundle
|
47
|
+
uses: actions/cache@v1
|
48
|
+
id: cache_gem
|
49
|
+
with:
|
50
|
+
path: vendor/bundle
|
51
|
+
key: v1-gem-${{ runner.os }}-${{ matrix.ruby }}-${{ github.sha }}
|
52
|
+
restore-keys: |
|
53
|
+
v1-gem-${{ runner.os }}-${{ matrix.ruby }}-
|
54
|
+
continue-on-error: ${{ matrix.allow_failures == 'true' }}
|
55
|
+
|
56
|
+
- name: bundle update
|
57
|
+
run: |
|
58
|
+
set -xe
|
59
|
+
bundle config path vendor/bundle
|
60
|
+
bundle update --jobs $(nproc) --retry 3
|
61
|
+
continue-on-error: ${{ matrix.allow_failures == 'true' }}
|
62
|
+
|
63
|
+
- name: Run test
|
64
|
+
run: |
|
65
|
+
set -xe
|
66
|
+
bundle exec rspec
|
67
|
+
continue-on-error: ${{ matrix.allow_failures == 'true' }}
|
68
|
+
|
69
|
+
- name: Slack Notification (not success)
|
70
|
+
uses: lazy-actions/slatify@master
|
71
|
+
if: "! success()"
|
72
|
+
continue-on-error: true
|
73
|
+
with:
|
74
|
+
job_name: ${{ format('*build* ({0})', matrix.ruby) }}
|
75
|
+
type: ${{ job.status }}
|
76
|
+
icon_emoji: ":octocat:"
|
77
|
+
url: ${{ secrets.SLACK_WEBHOOK }}
|
78
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
79
|
+
|
80
|
+
notify:
|
81
|
+
needs:
|
82
|
+
- test
|
83
|
+
|
84
|
+
runs-on: ubuntu-latest
|
85
|
+
|
86
|
+
steps:
|
87
|
+
- name: Slack Notification (success)
|
88
|
+
uses: lazy-actions/slatify@master
|
89
|
+
if: always()
|
90
|
+
continue-on-error: true
|
91
|
+
with:
|
92
|
+
job_name: '*build*'
|
93
|
+
type: ${{ job.status }}
|
94
|
+
icon_emoji: ":octocat:"
|
95
|
+
url: ${{ secrets.SLACK_WEBHOOK }}
|
96
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
data/.rspec
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Changelog
|
2
|
+
## master
|
3
|
+
[full changelog](http://github.com/sue445/faker-precure/compare/v0.0.6...master)
|
4
|
+
|
5
|
+
## v0.0.6
|
6
|
+
[full changelog](http://github.com/sue445/faker-precure/compare/v0.0.5...v0.0.6)
|
7
|
+
|
8
|
+
* Enable MFA requirement for gem releasing
|
9
|
+
* https://github.com/sue445/faker-precure/pull/28
|
10
|
+
|
11
|
+
## v0.0.5
|
12
|
+
[full changelog](http://github.com/sue445/faker-precure/compare/v0.0.4...v0.0.5)
|
13
|
+
|
14
|
+
* Fixed: Doesn't run with rubicure v1.0.5+
|
15
|
+
* https://github.com/sue445/faker-precure/issues/9
|
16
|
+
* https://github.com/sue445/faker-precure/pull/10
|
17
|
+
|
18
|
+
## v0.0.4
|
19
|
+
[full changelog](http://github.com/sue445/faker-precure/compare/v0.0.3...v0.0.4)
|
20
|
+
|
21
|
+
* Follow rubicure 1.0.0+
|
22
|
+
* https://github.com/sue445/faker-precure/pull/8
|
23
|
+
|
24
|
+
## v0.0.3
|
25
|
+
[full changelog](http://github.com/sue445/faker-precure/compare/v0.0.2...v0.0.3)
|
26
|
+
|
27
|
+
* Impl `Faker::Precure#cast_name`
|
28
|
+
* https://github.com/sue445/faker-precure/pull/3
|
29
|
+
|
30
|
+
## v0.0.2
|
31
|
+
[full changelog](http://github.com/sue445/faker-precure/compare/v0.0.1...v0.0.2)
|
32
|
+
|
33
|
+
* Update dependency gem versions
|
34
|
+
|
35
|
+
## v0.0.1
|
36
|
+
* first release
|
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
-
# Faker::Precure
|
1
|
+
# Faker::Precure
|
2
|
+
Test data generator using Precure(Pretty Cure)
|
2
3
|
|
3
|
-
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/faker-precure.svg)](http://badge.fury.io/rb/faker-precure)
|
5
|
+
[![Build Status](https://github.com/sue445/faker-precure/workflows/test/badge.svg?branch=master)](https://github.com/sue445/faker-precure/actions?query=workflow%3Atest)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/sue445/faker-precure.png)](https://codeclimate.com/github/sue445/faker-precure)
|
7
|
+
[![Coverage Status](https://coveralls.io/repos/sue445/faker-precure/badge.png)](https://coveralls.io/r/sue445/faker-precure)
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
@@ -27,6 +31,9 @@ Faker::Precure.human_name
|
|
27
31
|
Faker::Precure.precure_name
|
28
32
|
#=> "キュアアクア"
|
29
33
|
|
34
|
+
Faker::Precure.cast_name
|
35
|
+
#=> "豊口めぐみ"
|
36
|
+
|
30
37
|
Faker::Precure.title
|
31
38
|
#=> "Yes! プリキュア5"
|
32
39
|
|
@@ -46,18 +53,6 @@ FactoryGirl.define do
|
|
46
53
|
end
|
47
54
|
```
|
48
55
|
|
49
|
-
## Changelog
|
50
|
-
### master
|
51
|
-
[full changelog](http://github.com/sue445/faker-precure/compare/v0.0.2...master)
|
52
|
-
|
53
|
-
### v0.0.2
|
54
|
-
[full changelog](http://github.com/sue445/faker-precure/compare/v0.0.1...v0.0.2)
|
55
|
-
|
56
|
-
* Update dependency gem versions
|
57
|
-
|
58
|
-
### v0.0.1
|
59
|
-
* first release
|
60
|
-
|
61
56
|
## Contributing
|
62
57
|
|
63
58
|
1. Fork it ( https://github.com/sue445/faker-precure/fork )
|
data/faker-precure.gemspec
CHANGED
@@ -13,16 +13,21 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "https://github.com/sue445/faker-precure"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
18
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
|
19
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
20
|
+
|
16
21
|
spec.files = `git ls-files -z`.split("\x0")
|
17
22
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
23
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
24
|
spec.require_paths = ["lib"]
|
20
25
|
|
21
|
-
spec.add_dependency "rubicure"
|
26
|
+
spec.add_dependency "rubicure", ">= 1.0.5"
|
22
27
|
|
23
28
|
spec.add_development_dependency "bundler", ">= 1.5"
|
24
29
|
spec.add_development_dependency "rake"
|
25
|
-
spec.add_development_dependency "rspec"
|
30
|
+
spec.add_development_dependency "rspec"
|
26
31
|
spec.add_development_dependency "yard"
|
27
32
|
spec.add_development_dependency "coveralls"
|
28
33
|
end
|
data/lib/faker/precure.rb
CHANGED
@@ -16,7 +16,12 @@ module Faker
|
|
16
16
|
|
17
17
|
# @return [String]
|
18
18
|
def self.transform_message
|
19
|
-
|
19
|
+
::Precure.all.map(&:transform_message).compact.sample
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [String]
|
23
|
+
def self.cast_name
|
24
|
+
sample_girl.cast_name
|
20
25
|
end
|
21
26
|
|
22
27
|
# @return [String]
|
@@ -31,11 +36,11 @@ module Faker
|
|
31
36
|
|
32
37
|
private
|
33
38
|
def self.sample_girl
|
34
|
-
::Precure.
|
39
|
+
::Precure.all.sample
|
35
40
|
end
|
36
41
|
|
37
42
|
def self.sample_series
|
38
|
-
::
|
43
|
+
::Precure.to_a.sample
|
39
44
|
end
|
40
45
|
end
|
41
46
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require "faker/precure"
|
data/spec/faker/precure_spec.rb
CHANGED
@@ -3,34 +3,34 @@ describe Faker::Precure do
|
|
3
3
|
expect(Faker::Precure::VERSION).not_to be nil
|
4
4
|
end
|
5
5
|
|
6
|
-
describe "
|
6
|
+
describe ".human_name" do
|
7
7
|
subject{ Faker::Precure.human_name }
|
8
8
|
|
9
|
-
let(:all_human_names){ ::Precure.
|
9
|
+
let(:all_human_names){ ::Precure.all.map(&:human_name) }
|
10
10
|
|
11
11
|
it{ should_not be_blank }
|
12
12
|
it{ should be_an_element_of all_human_names }
|
13
13
|
end
|
14
14
|
|
15
|
-
describe "
|
15
|
+
describe ".precure_name" do
|
16
16
|
subject{ Faker::Precure.precure_name }
|
17
17
|
|
18
|
-
let(:all_precure_names){ ::Precure.
|
18
|
+
let(:all_precure_names){ ::Precure.all.map(&:precure_name) }
|
19
19
|
|
20
20
|
it{ should_not be_blank }
|
21
21
|
it{ should be_an_element_of all_precure_names }
|
22
22
|
end
|
23
23
|
|
24
|
-
describe "
|
24
|
+
describe ".transform_message" do
|
25
25
|
subject{ Faker::Precure.transform_message }
|
26
26
|
|
27
|
-
let(:all_transform_messages){ ::Precure.
|
27
|
+
let(:all_transform_messages){ ::Precure.all.map(&:transform_message) }
|
28
28
|
|
29
29
|
it{ should_not be_blank }
|
30
30
|
it{ should be_an_element_of all_transform_messages }
|
31
31
|
end
|
32
32
|
|
33
|
-
describe "
|
33
|
+
describe ".user_name" do
|
34
34
|
subject{ Faker::Precure.user_name }
|
35
35
|
|
36
36
|
let(:all_user_names){ ::Rubicure::Girl.uniq_names.map(&:to_s) }
|
@@ -40,12 +40,21 @@ describe Faker::Precure do
|
|
40
40
|
it{ should match /^[0-9a-z_]+$/ }
|
41
41
|
end
|
42
42
|
|
43
|
-
describe "
|
43
|
+
describe ".title" do
|
44
44
|
subject{ Faker::Precure.title }
|
45
45
|
|
46
|
-
let(:all_titles){ ::
|
46
|
+
let(:all_titles){ ::Precure.to_a.map(&:title) }
|
47
47
|
|
48
48
|
it{ should_not be_blank }
|
49
49
|
it{ should be_an_element_of all_titles }
|
50
50
|
end
|
51
|
+
|
52
|
+
describe ".cast_name" do
|
53
|
+
subject{ Faker::Precure.cast_name }
|
54
|
+
|
55
|
+
let(:all_cast_names){ ::Precure.all.map(&:cast_name) }
|
56
|
+
|
57
|
+
it{ should_not be_blank }
|
58
|
+
it{ should be_an_element_of all_cast_names }
|
59
|
+
end
|
51
60
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
+
if ENV["CI"]
|
2
|
+
require 'coveralls'
|
3
|
+
Coveralls.wear!
|
4
|
+
end
|
5
|
+
|
1
6
|
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
7
|
require 'faker/precure'
|
3
8
|
|
4
|
-
require 'coveralls'
|
5
|
-
Coveralls.wear!
|
6
|
-
|
7
9
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
8
10
|
# in spec/support/ and its subdirectories.
|
9
11
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faker-precure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubicure
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.0.5
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.0.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: yard
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,15 +102,17 @@ extensions: []
|
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
104
|
- ".coveralls.yml"
|
105
|
+
- ".github/workflows/test.yml"
|
105
106
|
- ".gitignore"
|
106
107
|
- ".rspec"
|
107
|
-
- ".travis.yml"
|
108
108
|
- ".yardopts"
|
109
|
+
- CHANGELOG.md
|
109
110
|
- Gemfile
|
110
111
|
- LICENSE.txt
|
111
112
|
- README.md
|
112
113
|
- Rakefile
|
113
114
|
- faker-precure.gemspec
|
115
|
+
- lib/faker-precure.rb
|
114
116
|
- lib/faker/precure.rb
|
115
117
|
- lib/faker/precure/version.rb
|
116
118
|
- spec/faker/precure_spec.rb
|
@@ -119,8 +121,12 @@ files:
|
|
119
121
|
homepage: https://github.com/sue445/faker-precure
|
120
122
|
licenses:
|
121
123
|
- MIT
|
122
|
-
metadata:
|
123
|
-
|
124
|
+
metadata:
|
125
|
+
homepage_uri: https://github.com/sue445/faker-precure
|
126
|
+
source_code_uri: https://github.com/sue445/faker-precure
|
127
|
+
changelog_uri: https://github.com/sue445/faker-precure/blob/master/CHANGELOG.md
|
128
|
+
rubygems_mfa_required: 'true'
|
129
|
+
post_install_message:
|
124
130
|
rdoc_options: []
|
125
131
|
require_paths:
|
126
132
|
- lib
|
@@ -135,13 +141,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
141
|
- !ruby/object:Gem::Version
|
136
142
|
version: '0'
|
137
143
|
requirements: []
|
138
|
-
|
139
|
-
|
140
|
-
signing_key:
|
144
|
+
rubygems_version: 3.2.22
|
145
|
+
signing_key:
|
141
146
|
specification_version: 4
|
142
147
|
summary: Test data generator using precure
|
143
148
|
test_files:
|
144
149
|
- spec/faker/precure_spec.rb
|
145
150
|
- spec/spec_helper.rb
|
146
151
|
- spec/support/matchers/be_an_element_of.rb
|
147
|
-
has_rdoc:
|