feen 4.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a033acfb60b8db7f259e6e787c71c6e9cae62ef3127faeddfec5c881e9a0171
4
- data.tar.gz: f62cf07a12178a848df661c9a695bc7eb9c8adcac1ea399c252f7c4d9aee77af
3
+ metadata.gz: 59e59d257cf32a7580d7a751f27046a94dc4cc042237d165a2a941d34928c0c5
4
+ data.tar.gz: d17e95bad6d8868e37f1a2dab71d198f44b9fd742400bb70d3f314b8e79c2155
5
5
  SHA512:
6
- metadata.gz: d96c233e0adb0998281b40e8b282526275ace24c53d9200fffd66907617b0b905d34c592ad7f45659d3f8df9dfa64e738c825c2582b6e5d18da443008a2ae348
7
- data.tar.gz: 443ec302a41d65bc96ca9605edc8d3b2f8fbfd323d042da95a3d783c86f7af301389d8d61f9e1114ec019084d94afe1af8602a70e9b4511ce6a8df177e8f6b82
6
+ metadata.gz: d32ac92d63927327f269559bbafe824265504981178ace24f748ec3201f274669802ea3658c813df3747d5b66cbfb183de92fa9aa57444b807a6f3a5989d1fc7
7
+ data.tar.gz: 6352db3b19a703f15102ccba19bb8491605307575a901d862fa19df550558af37610d9ed720afe865975f4e7701b85efae55fcfbab9539786c03c1ec7d780921
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Sashite
3
+ Copyright (c) 2020-2021 Sashite
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,7 +1,10 @@
1
1
  # FEEN.rb
2
2
 
3
- [![Build Status](https://travis-ci.org/sashite/feen.rb.svg?branch=master)](https://travis-ci.org/sashite/feen.rb)
4
- [![Documentation](https://img.shields.io/:yard-docs-38c800.svg)](https://rubydoc.info/gems/feen/frames)
3
+ [![Version](https://img.shields.io/github/v/tag/sashite/feen.rb?label=Version&logo=github)](https://github.com/sashite/feen.rb/releases)
4
+ [![Yard documentation](https://img.shields.io/badge/Yard-documentation-blue.svg?logo=github)](https://rubydoc.info/github/sashite/feen.rb/main)
5
+ [![CI](https://github.com/sashite/feen.rb/workflows/CI/badge.svg?branch=main)](https://github.com/sashite/feen.rb/actions?query=workflow%3Aci+branch%3Amain)
6
+ [![RuboCop](https://github.com/sashite/feen.rb/workflows/RuboCop/badge.svg?branch=main)](https://github.com/sashite/feen.rb/actions?query=workflow%3Arubocop+branch%3Amain)
7
+ [![License](https://img.shields.io/github/license/sashite/feen.rb?label=License&logo=github)](https://github.com/sashite/feen.rb/raw/main/LICENSE.md)
5
8
 
6
9
  > __FEEN__ (Forsyth–Edwards Expanded Notation) support for the Ruby language.
7
10
 
@@ -20,16 +23,20 @@ More exotic variants are also supported, like: [Dai dai shogi](https://en.wikipe
20
23
  Add this line to your application's Gemfile:
21
24
 
22
25
  ```ruby
23
- gem 'feen'
26
+ gem "feen"
24
27
  ```
25
28
 
26
29
  And then execute:
27
30
 
28
- $ bundle
31
+ ```sh
32
+ bundle
33
+ ```
29
34
 
30
35
  Or install it yourself as:
31
36
 
32
- $ gem install feen
37
+ ```sh
38
+ gem install feen
39
+ ```
33
40
 
34
41
  ## Usage
35
42
 
@@ -38,13 +45,13 @@ require "feen"
38
45
 
39
46
  # Dump a classic Tsume Shogi problem
40
47
  FEEN.dump(
41
- "in_hand": %w[S r r b g g g g s n n n n p p p p p p p p p p p p p p p p p],
42
- "shape": [9, 9],
43
- "side_id": 0,
44
- "square": {
45
- 3 => "s",
46
- 4 => "k",
47
- 5 => "s",
48
+ in_hand: %w[S r r b g g g g s n n n n p p p p p p p p p p p p p p p p p],
49
+ shape: [9, 9],
50
+ side_id: 0,
51
+ square: {
52
+ 3 => "s",
53
+ 4 => "k",
54
+ 5 => "s",
48
55
  22 => "+P",
49
56
  43 => "+B"
50
57
  }
data/lib/feen.rb CHANGED
@@ -8,7 +8,7 @@ require_relative File.join("feen", "parser")
8
8
  #
9
9
  # @see https://developer.sashite.com/specs/forsyth-edwards-expanded-notation
10
10
  module FEEN
11
- # @example Dumps position params into a FEEN string.
11
+ # Dumps position params into a FEEN string.
12
12
  #
13
13
  # @param in_hand [Array] The list of pieces in hand.
14
14
  # @param shape [Array] The shape of the board.
@@ -20,7 +20,7 @@ module FEEN
20
20
  def self.dump(piece_names)
21
21
  return "-" if piece_names.empty?
22
22
 
23
- piece_names.sort.join("/")
23
+ piece_names.sort.join(",")
24
24
  end
25
25
  end
26
26
  end
data/lib/feen/parser.rb CHANGED
@@ -28,7 +28,7 @@ module FEEN
28
28
  #
29
29
  # @return [Hash] The position params representing the position.
30
30
  def self.call(feen)
31
- square_str, side_id_str, in_hand_str = feen.split(" ")
31
+ square_str, side_id_str, in_hand_str = feen.split
32
32
 
33
33
  {
34
34
  in_hand: InHand.parse(in_hand_str),
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feen
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Kato
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-03 00:00:00.000000000 Z
11
+ date: 2021-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: brutal
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-md
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'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rubocop-performance
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +94,20 @@ dependencies:
80
94
  - - ">="
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-rake
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: rubocop-thread_safety
85
113
  requirement: !ruby/object:Gem::Requirement
@@ -147,7 +175,7 @@ metadata:
147
175
  bug_tracker_uri: https://github.com/sashite/feen.rb/issues
148
176
  documentation_uri: https://rubydoc.info/gems/feen/index
149
177
  source_code_uri: https://github.com/sashite/feen.rb
150
- post_install_message:
178
+ post_install_message:
151
179
  rdoc_options: []
152
180
  require_paths:
153
181
  - lib
@@ -155,15 +183,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
183
  requirements:
156
184
  - - ">="
157
185
  - !ruby/object:Gem::Version
158
- version: 2.7.0
186
+ version: 3.0.0
159
187
  required_rubygems_version: !ruby/object:Gem::Requirement
160
188
  requirements:
161
189
  - - ">="
162
190
  - !ruby/object:Gem::Version
163
191
  version: '0'
164
192
  requirements: []
165
- rubygems_version: 3.1.2
166
- signing_key:
193
+ rubygems_version: 3.2.22
194
+ signing_key:
167
195
  specification_version: 4
168
196
  summary: FEEN support for the Ruby language.
169
197
  test_files: []