chess 0.3.3 → 0.3.4

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: 00f424b92a6c4551574198f0f90be9b15a868ff51793e78c2d203b757ad7c735
4
- data.tar.gz: 2fe26a9a27b7a2ab68745ed8469dd3a0fe4a0222a33662e0f1a669b7ecd8c9db
3
+ metadata.gz: 36668063cb71d331dbb172611791d43e0b5d465c0cd9e87baf80bc35cf11e551
4
+ data.tar.gz: 516ebc6fb472885ec871c6fbd955f489a6afec26c52250a9612210e61f6ce883
5
5
  SHA512:
6
- metadata.gz: 1f595f0999604ca4599c178276e54dbd0394f3c637116958c89887b452ece5d8b43fa9e3930a08577d922b35edcbbf95a86a0314dc8a5ee5aee22e522a5e2069
7
- data.tar.gz: 151b85e0ea1605ede20d1d8615903b6ccc2a51586ab5ab309405d70c4d3af1d9b64f3745859b0df5740101168f511288c64f1eed5b41ea131e1014409671523e
6
+ metadata.gz: d3e811ed0ac4ad177ef1991cd38bbabf84b2139a8d12ea18b0f251621ed744cc54afe9252b489874a6f121551899a5382cffff67158281ca6ce64b5fe0ce2b61
7
+ data.tar.gz: cad20b859cc7c41b4dfba6b92e0de8bc14317b86f0e4ffeb9f656819a2f507160534eeca6c0944a251964bf2d8ec20fc199548c50d293cf4f7a1c6b64797ae3c
@@ -18,7 +18,7 @@ jobs:
18
18
  runs-on: ubuntu-latest
19
19
  strategy:
20
20
  matrix:
21
- ruby-version: ['2.6', '2.7', '3.0', '3.1']
21
+ ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
22
22
 
23
23
  steps:
24
24
  - uses: actions/checkout@v2
@@ -28,7 +28,7 @@ jobs:
28
28
  ruby-version: ${{ matrix.ruby-version }}
29
29
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
30
30
  - name: Compile extension
31
- working-directory: ./ext
31
+ working-directory: ./ext/chess
32
32
  run: |
33
33
  ruby extconf.rb
34
34
  make
@@ -45,7 +45,7 @@ jobs:
45
45
  runs-on: ubuntu-latest
46
46
  strategy:
47
47
  matrix:
48
- ruby-version: ['2.6', '2.7', '3.0', '3.1']
48
+ ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
49
49
 
50
50
  steps:
51
51
  - uses: actions/checkout@v2
data/.gitignore CHANGED
@@ -4,9 +4,9 @@
4
4
  .ruby-version
5
5
  .yardoc/
6
6
  coverage/
7
- ext/chess
8
- ext/Makefile
9
- ext/*.bundle
10
- ext/*.o
7
+ ext/chess/Makefile
8
+ ext/chess/*.bundle
9
+ ext/chess/*.o
10
+ lib/chess/chess.bundle
11
11
  main.rb
12
12
  pkg/*
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chess (0.3.3)
4
+ chess (0.3.4)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'bundler/gem_tasks'
2
2
 
3
3
  require 'yard'
4
4
  YARD::Rake::YardocTask.new do |t|
5
- t.files = ['lib/**/*.rb', 'ext/*.c']
5
+ t.files = ['lib/**/*.rb', 'ext/**/*.c']
6
6
  t.options << '-rREADME.md'
7
7
  t.options << '--title=Chess'
8
8
  t.options << '-mmarkdown'
@@ -12,7 +12,7 @@ end
12
12
  require 'rake/testtask'
13
13
  task default: :test
14
14
  Rake::TestTask.new do |test|
15
- test.libs << 'test'
15
+ test.libs += %w[ext lib test]
16
16
  test.warning = true
17
17
  test.test_files = FileList["test/test_#{ENV.fetch('T', '*')}.rb"]
18
18
  end
data/chess.gemspec CHANGED
@@ -1,5 +1,4 @@
1
- $LOAD_PATH.push File.expand_path('lib', __dir__)
2
- require 'chess/version'
1
+ require_relative 'lib/chess/version'
3
2
 
4
3
  Gem::Specification.new do |s|
5
4
  s.name = 'chess'
@@ -13,7 +12,7 @@ Gem::Specification.new do |s|
13
12
 
14
13
  s.files = `git ls-files`.split("\n")
15
14
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
16
- s.extensions = ['ext/extconf.rb']
15
+ s.extensions = ['ext/chess/extconf.rb']
17
16
  s.require_paths = ['lib']
18
17
 
19
18
  s.metadata['rubygems_mfa_required'] = 'true'
Binary file
@@ -716,6 +716,7 @@ Init_chess ()
716
716
  * This ensures a fast library.
717
717
  */
718
718
  board_klass = rb_define_class_under (chess, "Board", rb_cObject);
719
+ rb_undef_alloc_func (board_klass);
719
720
  rb_define_method (board_klass, "placement", board_placement, 0);
720
721
  rb_define_method (board_klass, "[]", board_get_piece, 1);
721
722
  rb_define_method (board_klass, "check?", board_king_in_check, 0);
data/lib/chess/game.rb CHANGED
@@ -1,5 +1,3 @@
1
- require File.join(File.dirname(__FILE__), '../../ext/chess')
2
-
3
1
  module Chess
4
2
  # This class rappresents a chess game.
5
3
  class Game < CGame
data/lib/chess/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # The Chess library module.
2
2
  module Chess
3
3
  # The library version.
4
- VERSION = '0.3.3'.freeze
4
+ VERSION = '0.3.4'.freeze
5
5
  end
data/lib/chess.rb CHANGED
@@ -1,5 +1,13 @@
1
- require 'chess/exceptions'
2
- require 'chess/game'
3
- require 'chess/gnuchess'
4
- require 'chess/pgn'
5
- require 'chess/version'
1
+ require 'chess/chess' # this is the compiled ruby extension (chess.so or chess.bundle)
2
+ require_relative 'chess/exceptions'
3
+ require_relative 'chess/game'
4
+ require_relative 'chess/gnuchess'
5
+ require_relative 'chess/pgn'
6
+ require_relative 'chess/version'
7
+
8
+ # While development to require 'chess' from irb run with `irb -I lib:ext`
9
+ # $ irb -I lib:ext
10
+ # irb(main):001:0> require 'chess'
11
+ # => true
12
+ # irb(main):002:0> Chess::Game.new
13
+ # => #<Chess::Game:0x0000000000000001>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Enrico Pilotto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-12 00:00:00.000000000 Z
11
+ date: 2023-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -169,7 +169,7 @@ email:
169
169
  - epilotto@gmx.com
170
170
  executables: []
171
171
  extensions:
172
- - ext/extconf.rb
172
+ - ext/chess/extconf.rb
173
173
  extra_rdoc_files: []
174
174
  files:
175
175
  - ".github/FUNDING.yml"
@@ -207,20 +207,21 @@ files:
207
207
  - docs/js/jquery.js
208
208
  - docs/method_list.html
209
209
  - docs/top-level-namespace.html
210
- - ext/MakefileC
211
- - ext/bitboard.c
212
- - ext/bitboard.h
213
- - ext/board.c
214
- - ext/board.h
215
- - ext/chess.c
216
- - ext/chess.h
217
- - ext/common.c
218
- - ext/common.h
219
- - ext/extconf.rb
220
- - ext/game.c
221
- - ext/game.h
222
- - ext/special.c
223
- - ext/special.h
210
+ - ext/chess/MakefileC
211
+ - ext/chess/bitboard.c
212
+ - ext/chess/bitboard.h
213
+ - ext/chess/board.c
214
+ - ext/chess/board.h
215
+ - ext/chess/chess.bundle
216
+ - ext/chess/chess.c
217
+ - ext/chess/chess.h
218
+ - ext/chess/common.c
219
+ - ext/chess/common.h
220
+ - ext/chess/extconf.rb
221
+ - ext/chess/game.c
222
+ - ext/chess/game.h
223
+ - ext/chess/special.c
224
+ - ext/chess/special.h
224
225
  - lib/chess.rb
225
226
  - lib/chess/exceptions.rb
226
227
  - lib/chess/game.rb
@@ -1471,7 +1472,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1471
1472
  - !ruby/object:Gem::Version
1472
1473
  version: '0'
1473
1474
  requirements: []
1474
- rubygems_version: 3.3.7
1475
+ rubygems_version: 3.4.7
1475
1476
  signing_key:
1476
1477
  specification_version: 4
1477
1478
  summary: A fast chess library to play chess with Ruby.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes