xot 0.1.38 → 0.1.40

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: 70ef8d346d272678d1c09f8049c30fc999a9df3f93305b439bb876b39e45d2d1
4
- data.tar.gz: baad19acaadf8fa7686e090292d948ecfaf39304a967f1a456fab40a7ce1b31f
3
+ metadata.gz: c8a7546d3950d5f6bc2e300f3def88e6e2c271e69bb777bb62fc0983a6a3960f
4
+ data.tar.gz: 60edc53409168b473879cae63532e807c7ea170aa673f96843305928f74e9dac
5
5
  SHA512:
6
- metadata.gz: d28323fc4973cc91da9c6a0b4ff7dfde3c4872d7f254737beea20033d0aa3bd66b95bce3e046b704d7abcc9bbfb2566e90aa6d3d9528cab3579d933a850a7a95
7
- data.tar.gz: da95f79ad18932b40a6eae1c69795286f0825e1d36b8ff84fd19a9852657a859941c00e84e4604b18272252468f5f6ee2ca391e9388c9c308a0d1f7c603def91
6
+ metadata.gz: 59c9183fe7ab8c3b6acc01de08ce98e462fdb62bef3c12537f23fc6ffe27b2175d73848f35b6a3ef5658c8fff8bd1c3cb2b3e197163412c7d81a03e1f04ad89d
7
+ data.tar.gz: e638a86a7aba092ceeb1e9daad1b66a4d84f184825c37e704769314a0040c10597d6fed5e95820469e15edfb3c56745cd5e40e29566b9ddbe0da3befc4ecb9e8
@@ -17,19 +17,19 @@ jobs:
17
17
  - name: checkout
18
18
  uses: actions/checkout@v2
19
19
 
20
+ - name: setup gems
21
+ run: bundle install
22
+
20
23
  - name: setup dependencies
21
24
  run: "ruby -I.github/workflows -rutils -e 'setup_dependencies'"
22
25
 
23
- - name: install gems
24
- run: gem install yard
25
-
26
26
  - name: test
27
- run: rake quiet test
27
+ run: bundle exec rake quiet test
28
28
 
29
29
  - name: create gem
30
30
  id: gem
31
31
  run: |
32
- rake gem
32
+ bundle exec rake gem
33
33
  echo path=$(ruby -e 'print Dir.glob("*.gem").first') >> $GITHUB_OUTPUT
34
34
 
35
35
  - name: create github release
@@ -59,4 +59,4 @@ jobs:
59
59
  touch $HOME/.gem/credentials
60
60
  chmod 0600 $HOME/.gem/credentials
61
61
  printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
62
- rake upload
62
+ bundle exec rake upload
@@ -19,8 +19,11 @@ jobs:
19
19
  - name: checkout
20
20
  uses: actions/checkout@v2
21
21
 
22
+ - name: setup gems
23
+ run: bundle install
24
+
22
25
  - name: setup dependencies
23
26
  run: "ruby -I.github/workflows -rutils -e 'setup_dependencies'"
24
27
 
25
28
  - name: test
26
- run: rake test
29
+ run: bundle exec rake test
data/ChangeLog.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # xot ChangeLog
2
2
 
3
3
 
4
+ ## [v0.1.40] - 2023-11-09
5
+
6
+ - Use Gemfile to install gems for development instead of add_development_dependency in gemspec
7
+
8
+
9
+ ## [v0.1.39] - 2023-06-11
10
+
11
+ - Add mask_flag()
12
+
13
+
4
14
  ## [v0.1.38] - 2023-05-29
5
15
 
6
16
  - Refactoring
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rake'
4
+ gem 'test-unit'
5
+ gem 'yard'
data/Gemfile.lock ADDED
@@ -0,0 +1,20 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ power_assert (2.0.3)
5
+ rake (13.1.0)
6
+ test-unit (3.6.1)
7
+ power_assert
8
+ yard (0.9.34)
9
+
10
+ PLATFORMS
11
+ arm64-darwin-21
12
+ x86_64-darwin-20
13
+
14
+ DEPENDENCIES
15
+ rake
16
+ test-unit
17
+ yard
18
+
19
+ BUNDLED WITH
20
+ 2.4.13
data/Rakefile CHANGED
@@ -14,6 +14,7 @@ EXTENSIONS = [Xot]
14
14
  DLNAME = 'tester'
15
15
 
16
16
  default_tasks :ext
17
+ use_bundler
17
18
  build_native_library
18
19
  build_ruby_extension dlname: DLNAME, liboutput: false
19
20
  test_ruby_extension
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.38
1
+ 0.1.40
data/include/xot/util.h CHANGED
@@ -73,12 +73,19 @@ namespace Xot
73
73
  *pvalue &= ~flag;
74
74
  }
75
75
 
76
+ template <typename T>
77
+ inline uint
78
+ mask_flag (T value, uint mask)
79
+ {
80
+ return value & mask;
81
+ }
82
+
76
83
  template <typename T>
77
84
  inline bool
78
85
  has_flag (T value, uint flag)
79
86
  {
80
87
  if (flag == 0) return false;
81
- return (value & flag) == flag;
88
+ return mask_flag(value, flag) == flag;
82
89
  }
83
90
 
84
91
  template <typename T>
data/lib/xot/rake.rb CHANGED
@@ -52,6 +52,22 @@ module Xot
52
52
  env :TESTS_EXCLUDE, []
53
53
  end
54
54
 
55
+ def use_bundler()
56
+ task :clobber => 'bundle:clobber'
57
+
58
+ task :bundle => 'bundle:install'
59
+
60
+ namespace :bundle do
61
+ task :clobber do
62
+ sh %( rm -rf vendor/bundle )
63
+ end
64
+
65
+ task :install do
66
+ sh %( bundle install )
67
+ end
68
+ end
69
+ end
70
+
55
71
  def build_native_library()
56
72
  outname = "lib#{target_name}.a"
57
73
  out = File.join lib_dir, outname
data/xot.gemspec CHANGED
@@ -25,9 +25,6 @@ Gem::Specification.new do |s|
25
25
  s.platform = Gem::Platform::RUBY
26
26
  s.required_ruby_version = '>= 3.0.0'
27
27
 
28
- s.add_development_dependency 'rake'
29
- s.add_development_dependency 'test-unit'
30
-
31
28
  s.files = `git ls-files`.split $/
32
29
  s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
33
30
  s.test_files = s.files.grep %r{^(test|spec|features)/}
metadata CHANGED
@@ -1,43 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.38
4
+ version: 0.1.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - xordog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-29 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rake
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: test-unit
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
11
+ date: 2023-11-08 00:00:00.000000000 Z
12
+ dependencies: []
41
13
  description: This library include some useful utility classes and functions for development
42
14
  with C++.
43
15
  email: xordog@gmail.com
@@ -51,6 +23,8 @@ files:
51
23
  - ".github/workflows/test.yml"
52
24
  - ".github/workflows/utils.rb"
53
25
  - ChangeLog.md
26
+ - Gemfile
27
+ - Gemfile.lock
54
28
  - LICENSE
55
29
  - README.md
56
30
  - Rakefile