dodonki_sample 0.1.3 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ba2ec72d26837d25fa72d2844d40e95dd093e126d650c6966bef02fd9585772
4
- data.tar.gz: 60a3819caa4ebcc94f7a8562e738a4ecbbc737d844ad390341937dfce073e84c
3
+ metadata.gz: 98a75d44828cfe2bf735062482b5ba28c6444b73d544d2d11d25e12e3a64025e
4
+ data.tar.gz: d0e6d6588491892bb39661284ac488b55ca1998d26fa92fbb3a850fc772003cb
5
5
  SHA512:
6
- metadata.gz: 85ee6874496185a6b55edf93411ecd2ab237da2c6c28b70595d766286b906de51572ae9836cc2f15240b7193a054aa11c7dcc2071c717741eda455719536165a
7
- data.tar.gz: 53f78df3c0bc1bca12403c41d0d9aa37bba480124bc9d51f434b184fd441dcdb9015af0e4ea9a68f5b55193875ca0da07c27ff599b507525761ab0f0852eaecd
6
+ metadata.gz: 888a5c648373edd94e5b6243814425f49ded1adb663186b8953ff7d492bcb3ec360fd70379c8b3121561a613a477bc0ee4ccc856e629ae808afcb681db6a488f
7
+ data.tar.gz: 5331bd7b7340e8776129dd7ca300d09b80f6beb0926ad0375a556d5c96ba4649b33858d583d7826c87dafc09099ac6c421a31223b5cb7e56155200907e92235a
@@ -0,0 +1,135 @@
1
+ version: 2 # use CircleCI 2.0
2
+ jobs: # a collection of steps
3
+ build: # runs not using Workflows must have a `build` job as entry point
4
+ parallelism: 3 # run three instances of this job in parallel
5
+ docker: # run the steps with Docker
6
+ - image: circleci/ruby:2.4.2-jessie-node # ...with this image as the primary container; this is where all `steps` will run
7
+ environment: # environment variables for primary container
8
+ BUNDLE_JOBS: 3
9
+ BUNDLE_RETRY: 3
10
+ BUNDLE_PATH: vendor/bundle
11
+
12
+ steps: # a collection of executable commands
13
+ - checkout # special step to check out source code to working directory
14
+
15
+ - run:
16
+ name: install Bundler
17
+ command: |
18
+ echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
19
+ source $BASH_ENV
20
+ gem install bundler
21
+
22
+ # Which version of bundler?
23
+ - run:
24
+ name: Which bundler?
25
+ command: bundle -v
26
+
27
+ # Restore bundle cache
28
+ # Read about caching dependencies: https://circleci.com/docs/2.0/caching/
29
+ - restore_cache:
30
+ keys:
31
+ - gem-sample-{{ checksum "Gemfile.lock" }}
32
+ - gem-sample-
33
+
34
+ - run: # Install Ruby dependencies
35
+ name: Bundle Install
36
+ command: bundle check --path vendor/bundle || bundle install --deployment
37
+
38
+ # Store bundle cache for Ruby dependencies
39
+ - save_cache:
40
+ key: gem-sample-{{ checksum "Gemfile.lock" }}
41
+ paths:
42
+ - vendor/bundle
43
+
44
+ # run rubocop!
45
+ - run:
46
+ name: run rubocop
47
+ command: |
48
+ bundle exec rubocop
49
+ - run:
50
+ name: Run rspec in parallel
51
+ command: |
52
+ bundle exec rspec --profile 10 \
53
+ --format RspecJunitFormatter \
54
+ --out test_results/rspec.xml \
55
+ --format progress \
56
+ $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
57
+ # create document
58
+ - run:
59
+ name: create document
60
+ command: |
61
+ bundle exec yard
62
+
63
+ # Save test results for timing analysis
64
+ - store_test_results: # Upload test results for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/
65
+ path: test_results
66
+ - store_artifacts:
67
+ # テスト結果をtest-resultsディレクトリに吐き出す
68
+ path: test_results
69
+ destination: test-results
70
+ - store_artifacts:
71
+ # カバレッジの結果をcoverage-resultsディレクトリに吐き出す
72
+ path: coverage
73
+ destination: coverage-results
74
+ - store_artifacts:
75
+ # ドキュメントの結果をyard-resultsディレクトリに吐き出す
76
+ path: ./doc
77
+ destination: yard-results
78
+ # See https://circleci.com/docs/2.0/deployment-integrations/ for example deploy configs
79
+
80
+ deploy:
81
+ docker: # run the steps with Docker
82
+ - image: circleci/ruby:2.4.2-jessie-node # ...with this image as the primary container; this is where all `steps` will run
83
+
84
+ steps: # a collection of executable commands
85
+ - checkout # special step to check out source code to working directory
86
+
87
+ - run:
88
+ name: install Bundler
89
+ command: |
90
+ echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
91
+ source $BASH_ENV
92
+ gem install bundler
93
+
94
+ # Which version of bundler?
95
+ - run:
96
+ name: Which bundler?
97
+ command: bundle -v
98
+
99
+ # Restore bundle cache
100
+ # Read about caching dependencies: https://circleci.com/docs/2.0/caching/
101
+ - restore_cache:
102
+ keys:
103
+ - gem-deploy-{{ checksum "Gemfile.lock" }}
104
+ - gem-deploy-
105
+
106
+ - run: # Install Ruby dependencies
107
+ name: Bundle Install
108
+ command: bundle check --path vendor/bundle || bundle install
109
+
110
+ # Store bundle cache for Ruby dependencies
111
+ - save_cache:
112
+ key: gem-deploy-{{ checksum "Gemfile.lock" }}
113
+ paths:
114
+ - vendor/bundle
115
+
116
+ - run:
117
+ name: deploy
118
+ command: |
119
+ curl -u dodonki1223:$RUBYGEMS_PASSWORD https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials
120
+ git config user.name dodonki1223
121
+ git config user.email $RUBYGEMS_EMAIL
122
+ bundle exec rake build
123
+ bundle exec rake release
124
+
125
+ workflows:
126
+ version: 2
127
+ build-and-deploy:
128
+ jobs:
129
+ - build
130
+ - deploy:
131
+ requires:
132
+ - build
133
+ filters:
134
+ branches:
135
+ only: master
data/.rubocop.yml ADDED
@@ -0,0 +1,68 @@
1
+ # Rspec用のrubocopの読み込み
2
+ require: rubocop-rspec
3
+
4
+ AllCops:
5
+ # Rubyのバージョン指定
6
+ TargetRubyVersion: 2.6.0
7
+
8
+ # クラス名Moduleの説明をなしでもOKとする
9
+ Style/Documentation:
10
+ Enabled: false
11
+
12
+ # 日本語でのコメントを許可
13
+ AsciiComments:
14
+ Enabled: false
15
+
16
+ # メソッドの引数の文字数を2文字以上とする
17
+ Naming/UncommunicativeMethodParamName:
18
+ MinNameLength: 2
19
+
20
+ # 1行の長さのMAXを150文字とする
21
+ Metrics/LineLength:
22
+ Max: 150
23
+
24
+ # メソッドの行数をコメントを除いて50行までとする
25
+ MethodLength:
26
+ CountComments: true
27
+ Max: 50
28
+
29
+ # if文の実行結果が4行以上の場合にチェックするように設定する
30
+ GuardClause:
31
+ MinBodyLength: 4
32
+
33
+ IfUnlessModifier:
34
+ Enabled: false
35
+
36
+ # メソッドの複雑度を7→18に変更
37
+ # ※複雑度の計算方法は「https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/cop/metrics/perceived_complexity.rb」
38
+ Metrics/PerceivedComplexity:
39
+ Max: 18
40
+
41
+ # メソッドの循環的複雑度を6→15に変更
42
+ # ※循環的複雑度の計算方法は「https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/cop/metrics/cyclomatic_complexity.rb」
43
+ Metrics/CyclomaticComplexity:
44
+ Max: 15
45
+
46
+ # メソッドのABC sizeチェックの合計ポイントを15→40に変更
47
+ # ABC sizeチェックの計算方法は「https://github.com/rubocop-hq/rubocop/blob/master/lib/rubocop/cop/metrics/abc_size.rb」
48
+ Metrics/AbcSize:
49
+ Max: 40
50
+
51
+ # ブロックの長さの制限をRspecは除外する
52
+ # ※RspecはDSLのため1つのブロックで行数が増えてしまうのはしょうがないため
53
+ Metrics/BlockLength:
54
+ Max: 30
55
+ Exclude:
56
+ - 'spec/**/*'
57
+
58
+ # クラスの行数(コメントは除いて)を100→150に変更
59
+ Metrics/ClassLength:
60
+ Max: 150
61
+
62
+ # モジュールの行数(コメントは除いて)を100→150に変更
63
+ Metrics/ModuleLength:
64
+ Max: 150
65
+
66
+ # Rspec句のitの行数を5→10に変更
67
+ RSpec/ExampleLength:
68
+ Max: 10
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in dodonki_sample.gemspec
4
6
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dodonki_sample (0.1.3)
4
+ dodonki_sample (0.1.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
data/bin/console CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "dodonki_sample"
4
+ require 'bundler/setup'
5
+ require 'dodonki_sample'
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
7
8
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "dodonki_sample"
10
11
  # require "pry"
11
12
  # Pry.start
12
13
 
13
- require "irb"
14
+ require 'irb'
14
15
  IRB.start(__FILE__)
@@ -1,12 +1,14 @@
1
- lib = File.expand_path("lib", __dir__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "dodonki_sample/version"
5
+ require 'dodonki_sample/version'
4
6
 
5
7
  Gem::Specification.new do |spec|
6
- spec.name = "dodonki_sample"
8
+ spec.name = 'dodonki_sample'
7
9
  spec.version = DodonkiSample::VERSION
8
- spec.authors = ["dodonki1223"]
9
- spec.email = ["make.an.effort.wish.come.true@gmail.com"]
10
+ spec.authors = ['dodonki1223']
11
+ spec.email = ['make.an.effort.wish.come.true@gmail.com']
10
12
 
11
13
  spec.summary = 'dodonki sample gem file'
12
14
  spec.description = 'dodonki sample gem file'
@@ -21,16 +23,16 @@ Gem::Specification.new do |spec|
21
23
 
22
24
  # Specify which files should be added to the gem when it is released.
23
25
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
26
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
27
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
28
  end
27
- spec.bindir = "exe"
29
+ spec.bindir = 'exe'
28
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
- spec.require_paths = ["lib"]
31
+ spec.require_paths = ['lib']
30
32
 
31
- spec.add_development_dependency "bundler", "~> 2.0"
32
- spec.add_development_dependency "rake", "~> 10.0"
33
- spec.add_development_dependency "rspec", "~> 3.0"
33
+ spec.add_development_dependency 'bundler', '~> 2.0'
34
+ spec.add_development_dependency 'rake', '~> 10.0'
35
+ spec.add_development_dependency 'rspec', '~> 3.0'
34
36
  spec.add_development_dependency 'rspec_junit_formatter'
35
37
  spec.add_development_dependency 'rubocop', '~> 0.62'
36
38
  spec.add_development_dependency 'rubocop-rspec'
@@ -1,7 +1,9 @@
1
- require "dodonki_sample/version"
1
+ # frozen_string_literal: true
2
+
3
+ require 'dodonki_sample/version'
2
4
 
3
5
  module DodonkiSample
4
- def self.test
6
+ def self.test
5
7
  'Hello World'
6
8
  end
7
9
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DodonkiSample
2
- VERSION = "0.1.3"
4
+ VERSION = '0.1.6'
3
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dodonki_sample
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - dodonki1223
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-16 00:00:00.000000000 Z
11
+ date: 2019-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -129,8 +129,10 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
+ - ".circleci/config.yml"
132
133
  - ".gitignore"
133
134
  - ".rspec"
135
+ - ".rubocop.yml"
134
136
  - ".travis.yml"
135
137
  - Gemfile
136
138
  - Gemfile.lock
@@ -161,7 +163,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
163
  - !ruby/object:Gem::Version
162
164
  version: '0'
163
165
  requirements: []
164
- rubygems_version: 3.0.4
166
+ rubyforge_project:
167
+ rubygems_version: 2.7.3
165
168
  signing_key:
166
169
  specification_version: 4
167
170
  summary: dodonki sample gem file