hachiwari 0.4.0 → 1.0.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.
@@ -0,0 +1,205 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "yaml/store"
4
+ require "fileutils"
5
+ require_relative "results"
6
+
7
+ module Hachiwari
8
+ # `YAML::Store` を使った永続化層。勝率データの読み書きを担う
9
+ class Storage
10
+ DEFAULT_PATH = ENV.fetch("HACHIWARI_STORE_PATH", File.join(Dir.home, ".hachiwari"))
11
+ PERMITTED_SYMBOLS = %i[wins losses target language results ja en].freeze
12
+
13
+ # パスを差し替え可能にしてテストしやすくする
14
+ def initialize(path = DEFAULT_PATH)
15
+ @path = path
16
+ end
17
+
18
+ # 保存された結果を `Results` に変換して返却
19
+ def load
20
+ migrate_legacy_if_needed
21
+ data = load_raw
22
+ data ||= load_legacy
23
+ coerce(data)
24
+ end
25
+
26
+ # 与えられた結果を YAML に書き出す
27
+ def save(results)
28
+ migrate_legacy_if_needed
29
+ store.transaction { store[:results] = results.to_h }
30
+ end
31
+
32
+ # 保存済みデータを削除
33
+ def clear
34
+ existed = File.exist?(path)
35
+ FileUtils.rm_f(path)
36
+ @store = nil
37
+ existed
38
+ end
39
+
40
+ private
41
+
42
+ attr_reader :path
43
+
44
+ # 遅延初期化した `YAML::Store` を返す
45
+ def store
46
+ @store ||= YAML::Store.new(path)
47
+ end
48
+
49
+ # Store から Hash を読み込む。安全な読み込みに失敗した場合はレガシーデータを試みる
50
+ def load_raw
51
+ store.transaction(true) { store[:results] }
52
+ rescue Psych::DisallowedClass
53
+ load_legacy
54
+ rescue Psych::Exception
55
+ nil
56
+ end
57
+
58
+ # レガシー YAML 保存データを安全な形式へ読み込み直す
59
+ def load_legacy
60
+ return unless File.exist?(path)
61
+
62
+ content = File.read(path)
63
+ sanitized = sanitize_legacy_yaml(content)
64
+
65
+ data = Psych.safe_load(
66
+ sanitized,
67
+ permitted_classes: [Hachiwari::Results, Symbol],
68
+ permitted_symbols: PERMITTED_SYMBOLS,
69
+ aliases: true,
70
+ symbolize_names: true
71
+ )
72
+ extract_results_data(data)
73
+ rescue Psych::Exception, Errno::ENOENT
74
+ nil
75
+ end
76
+
77
+ # `safe_load` で得た構造から結果部分を抽出
78
+ def extract_results_data(data)
79
+ return unless data
80
+
81
+ object = data[:results] || data["results"] || data
82
+ case object
83
+ when Hash, Hachiwari::Results
84
+ object
85
+ else
86
+ legacy_struct_to_hash(object)
87
+ end
88
+ end
89
+
90
+ # 各種形式を `Results` に変換
91
+ def coerce(data)
92
+ case data
93
+ when Hachiwari::Results
94
+ data
95
+ when Hash
96
+ hash_to_results(data)
97
+ else
98
+ default_results
99
+ end
100
+ end
101
+
102
+ # Hash を想定した構造へ落とし込む
103
+ def hash_to_results(data)
104
+ Hachiwari::Results.new(
105
+ integer_value(data, :wins, 0),
106
+ integer_value(data, :losses, 0),
107
+ integer_value(data, :target, 80),
108
+ symbol_value(data, :language, :ja)
109
+ )
110
+ end
111
+
112
+ # 数値項目を安全に取得
113
+ def integer_value(data, key, fallback)
114
+ value = data[key] || data[key.to_s]
115
+ value ? value.to_i : fallback
116
+ end
117
+
118
+ # 言語項目をシンボルとして取得
119
+ def symbol_value(data, key, fallback)
120
+ value = data[key] || data[key.to_s]
121
+ value ? value.to_sym : fallback
122
+ end
123
+
124
+ # デフォルト値を表す結果
125
+ def legacy_struct_to_hash(object)
126
+ return object.to_h if object.respond_to?(:to_h)
127
+ return unless object.respond_to?(:members) && object.respond_to?(:[]) # Struct 互換
128
+
129
+ object.members.each_with_object({}) do |member, hash|
130
+ hash[member.to_sym] = object[member]
131
+ end
132
+ end
133
+
134
+ # 多様な結果データを Hash 形式へ正規化する
135
+ def normalize_results_hash(data)
136
+ case data
137
+ when Hachiwari::Results
138
+ data.to_h
139
+ when Hash
140
+ data.transform_keys do |key|
141
+ key.to_sym
142
+ rescue StandardError
143
+ key
144
+ end
145
+ else
146
+ legacy_struct_to_hash(data) || {}
147
+ end
148
+ end
149
+
150
+ # レガシー YAML タグを除去して安全にデシリアライズできるよう整形する
151
+ def sanitize_legacy_yaml(content)
152
+ return content unless content
153
+
154
+ patterns = [
155
+ %r{!ruby/struct:Hachiwari::CLI::Results},
156
+ %r{!ruby/object:Hachiwari::CLI::Results},
157
+ %r{!ruby/struct:Hachiwari::Results},
158
+ %r{!ruby/object:Hachiwari::Results}
159
+ ]
160
+
161
+ patterns.reduce(content) { |text, pattern| text.gsub(pattern, "") }
162
+ end
163
+
164
+ # レガシーファイルが存在すれば最新形式へ移行する
165
+ def migrate_legacy_if_needed
166
+ return unless File.exist?(path)
167
+
168
+ content = File.read(path)
169
+ return unless legacy_yaml?(content)
170
+
171
+ sanitized = sanitize_legacy_yaml(content)
172
+ data = Psych.safe_load(
173
+ sanitized,
174
+ permitted_classes: [Hachiwari::Results, Symbol],
175
+ permitted_symbols: PERMITTED_SYMBOLS,
176
+ aliases: true,
177
+ symbolize_names: true
178
+ )
179
+
180
+ results_hash = extract_results_data(data)
181
+ return unless results_hash && !results_hash.empty?
182
+
183
+ normalized = normalize_results_hash(results_hash)
184
+ FileUtils.rm_f(path)
185
+ yaml_store = YAML::Store.new(path)
186
+ yaml_store.transaction { yaml_store[:results] = normalized }
187
+ @store = nil
188
+ rescue Psych::Exception
189
+ # 破損データは削除してデフォルトに戻す
190
+ clear
191
+ end
192
+
193
+ # YAML 内に旧形式のマーカーが含まれるかを判定する
194
+ def legacy_yaml?(content)
195
+ return false unless content
196
+
197
+ content.include?("Hachiwari::CLI::Results") || content.include?("Hachiwari::Results")
198
+ end
199
+
200
+ # 保存データがない場合に利用する初期値を生成する
201
+ def default_results
202
+ Hachiwari::Results.new(0, 0, 80, :ja)
203
+ end
204
+ end
205
+ end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hachiwari
4
- VERSION = "0.4.0"
4
+ # gem の現在バージョンを表す定数
5
+ VERSION = "1.0.0"
5
6
  end
data/lib/hachiwari.rb CHANGED
@@ -1,9 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # gem 利用者が `require "hachiwari"` した際に読み込まれるエントリポイント
4
+
3
5
  require_relative "hachiwari/version"
6
+ require_relative "hachiwari/results"
7
+ require_relative "hachiwari/status_calculator"
8
+ require_relative "hachiwari/status_presenter"
9
+ require_relative "hachiwari/status_runner"
4
10
  require_relative "hachiwari/cli"
11
+ require_relative "hachiwari/locales"
5
12
 
6
13
  module Hachiwari
14
+ # gem 全体で共通的に利用できる基底エラークラス
7
15
  class Error < StandardError; end
8
- # Your code goes here...
9
16
  end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rubygems"
4
+
5
+ begin
6
+ require_relative "hachiwari"
7
+ rescue LoadError
8
+ warn "[hachiwari] Unable to load gem components for uninstall hook"
9
+ end
10
+
11
+ module Hachiwari
12
+ module Hooks
13
+ module_function
14
+
15
+ # Rubygems のアンインストールフックへコールバックを登録する
16
+ def register
17
+ Gem.pre_uninstall(&method(:handle_pre_uninstall))
18
+ end
19
+
20
+ # 対象の gem をアンインストールする際に保存データを消去する
21
+ def handle_pre_uninstall(uninstaller)
22
+ return unless target_gem?(uninstaller)
23
+
24
+ run_clear_command
25
+ end
26
+
27
+ # フック対象が `hachiwari` の gem かどうかを判定する
28
+ def target_gem?(uninstaller)
29
+ spec = uninstaller&.spec
30
+ spec&.name == "hachiwari"
31
+ end
32
+
33
+ # CLI が利用可能なら `clear` を実行し、エラー時は警告を出す
34
+ def run_clear_command
35
+ unless defined?(Hachiwari::CLI)
36
+ warn "[hachiwari] CLI is unavailable; skipping clear"
37
+ return
38
+ end
39
+
40
+ Hachiwari::CLI.start(["clear"])
41
+ rescue StandardError => e
42
+ warn "[hachiwari] Failed to clear saved data during uninstall: #{e.message}"
43
+ end
44
+ end
45
+ end
46
+
47
+ Hachiwari::Hooks.register
metadata CHANGED
@@ -1,15 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hachiwari
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atelier-Mirai
8
- autorequire:
9
- bindir: exe
8
+ bindir: bin
10
9
  cert_chain: []
11
- date: 2022-04-27 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: pstore
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
13
26
  - !ruby/object:Gem::Dependency
14
27
  name: thor
15
28
  requirement: !ruby/object:Gem::Requirement
@@ -24,7 +37,8 @@ dependencies:
24
37
  - - ">="
25
38
  - !ruby/object:Gem::Version
26
39
  version: '0'
27
- description: Calculate the number of wins needed to achieve an 80% win rate.
40
+ description: Enter your record and instantly see how many wins you need to reach 80%
41
+ or a custom goal.
28
42
  email:
29
43
  - contact@atelier-mirai.net
30
44
  executables:
@@ -34,20 +48,33 @@ extra_rdoc_files: []
34
48
  files:
35
49
  - ".rubocop.yml"
36
50
  - CHANGELOG.md
37
- - CODE_OF_CONDUCT.md
38
51
  - Gemfile
39
52
  - Gemfile.lock
40
- - LICENSE.txt
53
+ - LICENSE
54
+ - README.de.md
55
+ - README.en.md
56
+ - README.es.md
57
+ - README.fr.md
41
58
  - README.md
59
+ - RELEASE_NOTES_v1.0.0.md
42
60
  - Rakefile
43
- - bin/console
44
- - bin/setup
45
- - exe/hachiwari
61
+ - bin/hachiwari
62
+ - config/locales/de.yml
63
+ - config/locales/en.yml
64
+ - config/locales/es.yml
65
+ - config/locales/fr.yml
66
+ - config/locales/ja.yml
46
67
  - hachiwari.gemspec
47
68
  - lib/hachiwari.rb
48
69
  - lib/hachiwari/cli.rb
70
+ - lib/hachiwari/locales.rb
71
+ - lib/hachiwari/results.rb
72
+ - lib/hachiwari/status_calculator.rb
73
+ - lib/hachiwari/status_presenter.rb
74
+ - lib/hachiwari/status_runner.rb
75
+ - lib/hachiwari/storage.rb
49
76
  - lib/hachiwari/version.rb
50
- - lib/results.yml
77
+ - lib/rubygems_plugin.rb
51
78
  homepage: https://github.com/Atelier-Mirai/hachiwari
52
79
  licenses:
53
80
  - MIT
@@ -55,7 +82,6 @@ metadata:
55
82
  homepage_uri: https://github.com/Atelier-Mirai/hachiwari
56
83
  source_code_uri: https://github.com/Atelier-Mirai/hachiwari
57
84
  changelog_uri: https://github.com/Atelier-Mirai/hachiwari/blob/master/CHANGELOG.md
58
- post_install_message:
59
85
  rdoc_options: []
60
86
  require_paths:
61
87
  - lib
@@ -63,15 +89,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
89
  requirements:
64
90
  - - ">="
65
91
  - !ruby/object:Gem::Version
66
- version: 2.6.0
92
+ version: 3.3.0
67
93
  required_rubygems_version: !ruby/object:Gem::Requirement
68
94
  requirements:
69
95
  - - ">="
70
96
  - !ruby/object:Gem::Version
71
97
  version: '0'
72
98
  requirements: []
73
- rubygems_version: 3.3.7
74
- signing_key:
99
+ rubygems_version: 3.7.1
75
100
  specification_version: 4
76
- summary: Winning rate 80%
101
+ summary: Track progress toward your target win rate
77
102
  test_files: []
data/CODE_OF_CONDUCT.md DELETED
@@ -1,163 +0,0 @@
1
- # コントリビューター誓約書 行動規範
2
-
3
- ## 私たちの誓い
4
-
5
- メンバー、コントリビューター、リーダーである私たちは、年齢、体格、目に見えるか見えないかにかかわらず、民族、性の特徴、性自認と表現、経験のレベル、教育、社会経済的地位、国籍、個人的な外見、人種、宗教、性的なアイデンティティと指向にかかわらず、すべての人にとってコミュニティへの参加がハラスメントのない経験となることを誓います。
6
-
7
- 私たちは、開かれた、歓迎された、多様な、包括的で健全なコミュニティに貢献する方法で行動し、交流することを誓います。
8
-
9
- ## 私たちの基準
10
-
11
- 私たちのコミュニティの良好な環境に貢献する行動の例としては、以下のようなものがあります。
12
-
13
- * 他者への共感と優しさを示す。
14
- * 異なる意見、視点、経験を尊重すること
15
- * 建設的なフィードバックを与え、潔く受け止める。
16
- * 自分の過ちによって影響を受けた人々に責任と謝罪を受け入れ、その経験から学ぶ。
17
- * 私たち個人にとってだけでなく、コミュニティ全体にとって何が最善であるかを重視すること
18
-
19
- 容認できない行動の例としては、以下のようなものがあります。
20
-
21
- * 性的な言葉やイメージの使用、あらゆる種類の性的な注目や誘い。
22
- 性的な言葉やイメージの使用、あらゆる種類の性的注目や誘い
23
- * 荒らし、侮辱的または軽蔑的なコメント、個人的または政治的な攻撃
24
- * 公的または私的なハラスメント
25
- * 本人の明示的な許可なく、他人の個人情報(住所や電子メールアドレスなど)を公開すること
26
- 明示的な許可なく、他人の個人情報(住所、メール)を公開すること
27
- * その他、プロの現場で不適切と思われる行為
28
-
29
- ## 施行の責任
30
-
31
- コミュニティリーダーは、当社の許容できる行動の基準を明確にし、それを実施する責任があります。また、不適切、脅迫的、攻撃的、または有害であると判断された行動に対しては、適切かつ公正な是正措置を取るものとします。
32
-
33
- コミュニティリーダーは、この行動規範にそぐわないコメント、コミット、コード、ウィキの編集、課題、その他の貢献を削除、編集、拒否する権利と責任を持ち、必要に応じてモデレーションの決定理由を伝えるものとします。
34
-
35
- ## 範囲
36
-
37
- この行動規範は、コミュニティのすべてのスペースで適用されます。また、個人がコミュニティを公式に代表して公共の場で活動する場合にも適用されます。コミュニティを代表する例としては、公式の電子メールアドレスの使用、公式のソーシャルメディアアカウントによる投稿、オンラインまたはオフラインのイベントで任命された代表者としての行動などがあります。
38
-
39
- ## 実施要項
40
-
41
- 地域社会のリーダーは、この行動規範に違反していると判断した行為の結果を決定する際に、以下の地域社会への影響に関するガイドラインに従います。
42
-
43
- ### 1. 訂正
44
-
45
- **コミュニティへの影響**。地域社会への影響**: 不適切な言葉の使用、または職業上好ましくない、または地域社会で歓迎されないとみなされるその他の行動。
46
-
47
- **結果**: 地域社会のリーダーからの私的な書面による警告で、違反行為の性質を明確にし、なぜその行為が不適切なのかを説明します。公的な謝罪を求められることもあります。
48
-
49
- ### 2. 警告
50
-
51
- **コミュニティへの影響**。コミュニティへの影響**: 1つの事件または一連の行動による違反。
52
-
53
- **結果**: 継続的な行動に対する結果を伴う警告。行動規範を執行する者との未承諾の交流を含め、関係者との交流を一定期間行わないこと。これには、コミュニティスペースでの交流だけでなく、ソーシャルメディアのような外部チャネルでの交流を避けることも含まれます。これらの条件に違反すると、一時的または永久的な禁止措置がとられることがあります。
54
-
55
- ### 3. 一時的な禁止
56
-
57
- **コミュニティへの影響**。コミュニティへの影響**: 継続的な不適切な行為を含む、コミュニティの基準に対する重大な違反。
58
-
59
- **結果**: 一定期間、コミュニティとのあらゆる種類の交流や公的なコミュニケーションを一時的に禁止します。この期間中は、行動規範を施行している人との未承諾の交流を含め、関係者との公私にわたる交流はできません。これらの条件に違反すると、永久追放となる可能性があります。
60
-
61
- ### 4. 永久追放
62
-
63
- **コミュニティへの影響**。コミュニティへの影響**: 継続的な不適切な行為、個人への嫌がらせ、特定の個人への攻撃や蔑視など、コミュニティの基準に違反するパターンを示した場合。
64
-
65
- **結果**: コミュニティ内でのあらゆる公共の場での交流を永久に禁止する。
66
-
67
- ## 帰属
68
-
69
- この行動規範は、[Contributor Covenant][homepage], version 2.0から引用しています。
70
- https://www.contributor-covenant.org/version/2/0/code_of_conduct.html に掲載されています。
71
-
72
- コミュニティ・インパクト・ガイドラインは、[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity)を参考にしています。
73
-
74
- [ホームページ]: https://www.contributor-covenant.org
75
-
76
- この行動規範に関する一般的な質問への回答は、以下のFAQを参照してください。
77
- https://www.contributor-covenant.org/faq。翻訳版は https://www.contributor-covenant.org/translations にあります。 無料版のDeepL翻訳(www.DeepL.com/Translator)で翻訳しました。
78
-
79
-
80
- # Contributor Covenant Code of Conduct
81
-
82
- ## Our Pledge
83
-
84
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
85
-
86
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
87
-
88
- ## Our Standards
89
-
90
- Examples of behavior that contributes to a positive environment for our community include:
91
-
92
- * Demonstrating empathy and kindness toward other people
93
- * Being respectful of differing opinions, viewpoints, and experiences
94
- * Giving and gracefully accepting constructive feedback
95
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
96
- * Focusing on what is best not just for us as individuals, but for the overall community
97
-
98
- Examples of unacceptable behavior include:
99
-
100
- * The use of sexualized language or imagery, and sexual attention or
101
- advances of any kind
102
- * Trolling, insulting or derogatory comments, and personal or political attacks
103
- * Public or private harassment
104
- * Publishing others' private information, such as a physical or email
105
- address, without their explicit permission
106
- * Other conduct which could reasonably be considered inappropriate in a
107
- professional setting
108
-
109
- ## Enforcement Responsibilities
110
-
111
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
112
-
113
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
114
-
115
- ## Scope
116
-
117
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
118
-
119
- ## Enforcement
120
-
121
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at contact@atelier-mirai.net. All complaints will be reviewed and investigated promptly and fairly.
122
-
123
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
124
-
125
- ## Enforcement Guidelines
126
-
127
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
128
-
129
- ### 1. Correction
130
-
131
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
132
-
133
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
134
-
135
- ### 2. Warning
136
-
137
- **Community Impact**: A violation through a single incident or series of actions.
138
-
139
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
140
-
141
- ### 3. Temporary Ban
142
-
143
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
144
-
145
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
146
-
147
- ### 4. Permanent Ban
148
-
149
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
150
-
151
- **Consequence**: A permanent ban from any sort of public interaction within the community.
152
-
153
- ## Attribution
154
-
155
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
156
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
157
-
158
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
159
-
160
- [homepage]: https://www.contributor-covenant.org
161
-
162
- For answers to common questions about this code of conduct, see the FAQ at
163
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2021 Atelier-Mirai
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/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "hachiwari"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/exe/hachiwari DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "hachiwari"
4
-
5
- Hachiwari::CLI.start
data/lib/results.yml DELETED
@@ -1,5 +0,0 @@
1
- ---
2
- :results: !ruby/struct:Hachiwari::CLI::Results
3
- target: 0.8
4
- wins: 7169
5
- losses: 1824