pstore 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/push_gem.yml +46 -0
- data/.github/workflows/test.yml +14 -4
- data/{LICENSE.txt → BSDL} +3 -3
- data/COPYING +56 -0
- data/Gemfile +1 -0
- data/Rakefile +0 -7
- data/lib/pstore.rb +6 -10
- data/pstore.gemspec +2 -2
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75a1d55b1053930ad5ecc7c77872a7d8c80ca14305e534838d383a82d1d396cf
|
4
|
+
data.tar.gz: 119f5f9c66a142f97ad033f46bcad509b4516fe2b2f662ff07fdbdb9cc98ec7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acc852bbbe7904f61327c4f9979e63effea00dd2e462b90601680ca13d885b91edde7ef362c775db0e372161a4008571f83cc592804283062e41b045bba0773a
|
7
|
+
data.tar.gz: b44da9620e0c4bfa20d7e39931a7a7a0a8af3a0008527378df196edefef0e2600cb4e580b7eaca2880aa7f463f35526c58823f360cd4098c79ac27072a4ceddb
|
@@ -0,0 +1,46 @@
|
|
1
|
+
name: Publish gem to rubygems.org
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- 'v*'
|
7
|
+
|
8
|
+
permissions:
|
9
|
+
contents: read
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
push:
|
13
|
+
if: github.repository == 'ruby/pstore'
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
|
16
|
+
environment:
|
17
|
+
name: rubygems.org
|
18
|
+
url: https://rubygems.org/gems/pstore
|
19
|
+
|
20
|
+
permissions:
|
21
|
+
contents: write
|
22
|
+
id-token: write
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- name: Harden Runner
|
26
|
+
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
|
27
|
+
with:
|
28
|
+
egress-policy: audit
|
29
|
+
|
30
|
+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
31
|
+
|
32
|
+
- name: Set up Ruby
|
33
|
+
uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
|
34
|
+
with:
|
35
|
+
bundler-cache: true
|
36
|
+
ruby-version: ruby
|
37
|
+
|
38
|
+
- name: Publish to RubyGems
|
39
|
+
uses: rubygems/release-gem@9e85cb11501bebc2ae661c1500176316d3987059 # v1.1.0
|
40
|
+
|
41
|
+
- name: Create GitHub release
|
42
|
+
run: |
|
43
|
+
tag_name="$(git describe --tags --abbrev=0)"
|
44
|
+
gh release create "${tag_name}" --verify-tag --generate-notes
|
45
|
+
env:
|
46
|
+
GITHUB_TOKEN: ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}
|
data/.github/workflows/test.yml
CHANGED
@@ -3,20 +3,30 @@ name: test
|
|
3
3
|
on: [push, pull_request]
|
4
4
|
|
5
5
|
jobs:
|
6
|
-
|
6
|
+
ruby-versions:
|
7
|
+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
|
8
|
+
with:
|
9
|
+
engine: cruby
|
10
|
+
min_version: 2.4
|
11
|
+
|
12
|
+
test:
|
13
|
+
needs: ruby-versions
|
7
14
|
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
|
8
15
|
strategy:
|
9
16
|
matrix:
|
10
|
-
ruby:
|
17
|
+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
|
11
18
|
os: [ ubuntu-latest, macos-latest ]
|
19
|
+
exclude:
|
20
|
+
- { os: macos-latest, ruby: '2.4' }
|
21
|
+
- { os: macos-latest, ruby: '2.5' }
|
12
22
|
runs-on: ${{ matrix.os }}
|
13
23
|
steps:
|
14
|
-
- uses: actions/checkout@
|
24
|
+
- uses: actions/checkout@v4
|
15
25
|
- name: Set up Ruby
|
16
26
|
uses: ruby/setup-ruby@v1
|
17
27
|
with:
|
18
28
|
ruby-version: ${{ matrix.ruby }}
|
19
29
|
- name: Install dependencies
|
20
|
-
run:
|
30
|
+
run: gem i test-unit test-unit-ruby-core
|
21
31
|
- name: Run test
|
22
32
|
run: rake test
|
data/{LICENSE.txt → BSDL}
RENAMED
@@ -4,10 +4,10 @@ Redistribution and use in source and binary forms, with or without
|
|
4
4
|
modification, are permitted provided that the following conditions
|
5
5
|
are met:
|
6
6
|
1. Redistributions of source code must retain the above copyright
|
7
|
-
notice, this list of conditions and the following disclaimer.
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
8
8
|
2. Redistributions in binary form must reproduce the above copyright
|
9
|
-
notice, this list of conditions and the following disclaimer in the
|
10
|
-
documentation and/or other materials provided with the distribution.
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
10
|
+
documentation and/or other materials provided with the distribution.
|
11
11
|
|
12
12
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
13
13
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
data/COPYING
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
|
2
|
+
You can redistribute it and/or modify it under either the terms of the
|
3
|
+
2-clause BSDL (see the file BSDL), or the conditions below:
|
4
|
+
|
5
|
+
1. You may make and give away verbatim copies of the source form of the
|
6
|
+
software without restriction, provided that you duplicate all of the
|
7
|
+
original copyright notices and associated disclaimers.
|
8
|
+
|
9
|
+
2. You may modify your copy of the software in any way, provided that
|
10
|
+
you do at least ONE of the following:
|
11
|
+
|
12
|
+
a. place your modifications in the Public Domain or otherwise
|
13
|
+
make them Freely Available, such as by posting said
|
14
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
+
the author to include your modifications in the software.
|
16
|
+
|
17
|
+
b. use the modified software only within your corporation or
|
18
|
+
organization.
|
19
|
+
|
20
|
+
c. give non-standard binaries non-standard names, with
|
21
|
+
instructions on where to get the original software distribution.
|
22
|
+
|
23
|
+
d. make other distribution arrangements with the author.
|
24
|
+
|
25
|
+
3. You may distribute the software in object code or binary form,
|
26
|
+
provided that you do at least ONE of the following:
|
27
|
+
|
28
|
+
a. distribute the binaries and library files of the software,
|
29
|
+
together with instructions (in the manual page or equivalent)
|
30
|
+
on where to get the original distribution.
|
31
|
+
|
32
|
+
b. accompany the distribution with the machine-readable source of
|
33
|
+
the software.
|
34
|
+
|
35
|
+
c. give non-standard binaries non-standard names, with
|
36
|
+
instructions on where to get the original software distribution.
|
37
|
+
|
38
|
+
d. make other distribution arrangements with the author.
|
39
|
+
|
40
|
+
4. You may modify and include the part of the software into any other
|
41
|
+
software (possibly commercial). But some files in the distribution
|
42
|
+
are not written by the author, so that they are not under these terms.
|
43
|
+
|
44
|
+
For the list of those files and their copying conditions, see the
|
45
|
+
file LEGAL.
|
46
|
+
|
47
|
+
5. The scripts and library files supplied as input to or produced as
|
48
|
+
output from the software do not automatically fall under the
|
49
|
+
copyright of the software, but belong to whomever generated them,
|
50
|
+
and may be sold commercially, and may be aggregated with this
|
51
|
+
software.
|
52
|
+
|
53
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
54
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
55
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
56
|
+
PURPOSE.
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -7,11 +7,4 @@ Rake::TestTask.new(:test) do |t|
|
|
7
7
|
t.test_files = FileList["test/**/test_*.rb"]
|
8
8
|
end
|
9
9
|
|
10
|
-
task :sync_tool do
|
11
|
-
require 'fileutils'
|
12
|
-
FileUtils.cp "../ruby/tool/lib/core_assertions.rb", "./test/lib"
|
13
|
-
FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
|
14
|
-
FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
|
15
|
-
end
|
16
|
-
|
17
10
|
task :default => :test
|
data/lib/pstore.rb
CHANGED
@@ -326,7 +326,7 @@ require "digest"
|
|
326
326
|
# end
|
327
327
|
#
|
328
328
|
class PStore
|
329
|
-
VERSION = "0.1.
|
329
|
+
VERSION = "0.1.4"
|
330
330
|
|
331
331
|
RDWR_ACCESS = {mode: IO::RDWR | IO::CREAT | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze
|
332
332
|
RD_ACCESS = {mode: IO::RDONLY | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze
|
@@ -437,7 +437,7 @@ class PStore
|
|
437
437
|
in_transaction
|
438
438
|
unless @table.key? key
|
439
439
|
if default == PStore::Error
|
440
|
-
raise PStore::Error, format("undefined key
|
440
|
+
raise PStore::Error, format("undefined key '%s'", key)
|
441
441
|
else
|
442
442
|
return default
|
443
443
|
end
|
@@ -487,8 +487,6 @@ class PStore
|
|
487
487
|
# end
|
488
488
|
#
|
489
489
|
# Raises an exception if called outside a transaction block.
|
490
|
-
#
|
491
|
-
# PStore#roots is an alias for PStore#keys.
|
492
490
|
def keys
|
493
491
|
in_transaction
|
494
492
|
@table.keys
|
@@ -504,8 +502,6 @@ class PStore
|
|
504
502
|
# end
|
505
503
|
#
|
506
504
|
# Raises an exception if called outside a transaction block.
|
507
|
-
#
|
508
|
-
# PStore#root? is an alias for PStore#key?.
|
509
505
|
def key?(key)
|
510
506
|
in_transaction
|
511
507
|
@table.key? key
|
@@ -521,8 +517,8 @@ class PStore
|
|
521
517
|
end
|
522
518
|
|
523
519
|
# Exits the current transaction block, committing any changes
|
524
|
-
# specified in the
|
525
|
-
#
|
520
|
+
# specified in the
|
521
|
+
# {transaction block}[rdoc-ref:PStore@The+Transaction+Block].
|
526
522
|
#
|
527
523
|
# Raises an exception if called outside a transaction block.
|
528
524
|
def commit
|
@@ -532,8 +528,8 @@ class PStore
|
|
532
528
|
end
|
533
529
|
|
534
530
|
# Exits the current transaction block, discarding any changes
|
535
|
-
# specified in the
|
536
|
-
#
|
531
|
+
# specified in the
|
532
|
+
# {transaction block}[rdoc-ref:PStore@The+Transaction+Block].
|
537
533
|
#
|
538
534
|
# Raises an exception if called outside a transaction block.
|
539
535
|
def abort
|
data/pstore.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
name = File.basename(__FILE__, ".gemspec")
|
4
|
-
version = ["lib", Array.new(name.count("-")+1, "
|
4
|
+
version = ["lib", Array.new(name.count("-")+1, ".").join("/")].find do |dir|
|
5
5
|
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
6
6
|
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
7
7
|
end rescue nil
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
# Specify which files should be added to the gem when it is released.
|
25
25
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
26
26
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
27
|
-
`git ls-files -z 2
|
27
|
+
`git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
28
28
|
end
|
29
29
|
spec.bindir = "exe"
|
30
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pstore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yukihiro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Transactional File Storage for Ruby Objects
|
14
14
|
email:
|
@@ -18,10 +18,12 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- ".github/dependabot.yml"
|
21
|
+
- ".github/workflows/push_gem.yml"
|
21
22
|
- ".github/workflows/test.yml"
|
22
23
|
- ".gitignore"
|
24
|
+
- BSDL
|
25
|
+
- COPYING
|
23
26
|
- Gemfile
|
24
|
-
- LICENSE.txt
|
25
27
|
- README.md
|
26
28
|
- Rakefile
|
27
29
|
- bin/console
|
@@ -50,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
52
|
- !ruby/object:Gem::Version
|
51
53
|
version: '0'
|
52
54
|
requirements: []
|
53
|
-
rubygems_version: 3.
|
55
|
+
rubygems_version: 3.5.11
|
54
56
|
signing_key:
|
55
57
|
specification_version: 4
|
56
58
|
summary: Transactional File Storage for Ruby Objects
|