sha256_seal 0.1.5 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d5bc9bfba878593900947fc081b861ecd4470df6721e41645088276663351ac
4
- data.tar.gz: 6cc71d89a3aef7555dcb4343753c862764014c5948961fc3167d9e50bccf0335
3
+ metadata.gz: e95ae1ddb44ca61aa91a68db10a46619021f07736d431c1826b36f6eafd0eb36
4
+ data.tar.gz: fb423e6d812bd333615dbec1e5c4ef3bd84532a900901a6571750acf99b09179
5
5
  SHA512:
6
- metadata.gz: c309221d7e727a863b89a4faae7b9f417d5ea42f10c59c9adb7c09a4d992e04e77e58eb0bbc86912abc2676fd2f0f98561d687699caca82054b8a04ba59b4f7e
7
- data.tar.gz: 04d5c6640cb92472856166bdfb2dbb205c89fe8d040b33a790fb153acd56167bf3dc7bb8eedb1ba0e65b5fc852f70d90b377a184f98129f14d82eff161c1d726
6
+ metadata.gz: 02d9426b1b2dd0bf32319f4ecd42fe70989810f62e01d11aaeb5f316b3d237b9bd08ab6d27d256c5465d0f06e28a57cd4dafc7cb154bd1cd4057123cad8746d2
7
+ data.tar.gz: e52c05f43c203a29365514aab321508cff5c2b0ad55387a0f9f0fbe3dfeeded50fd30b6da1831e8252bd752caeaf852b6bd4c20bd53710da6d7726525ec45a70
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ # The MIT License
2
+
3
+ Copyright (c) 2017-2022 Cyril Kato
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/README.md CHANGED
@@ -1,53 +1,62 @@
1
1
  # Sha256 Seal 🔏
2
2
 
3
- A tiny library to sign documents, and check their integrity.
3
+ A small library allowing to sign documents, and to check their integrity.
4
+
5
+ ## Status
6
+
7
+ [![Version](https://img.shields.io/github/v/tag/cyril/sha256_seal.rb?label=Version&logo=github)](https://github.com/cyril/sha256_seal.rb/tags)
8
+ [![Yard documentation](https://img.shields.io/badge/Yard-documentation-blue.svg?logo=github)](https://rubydoc.info/github/cyril/sha256_seal.rb/main)
9
+ [![Ruby](https://github.com/cyril/sha256_seal.rb/workflows/Ruby/badge.svg?branch=main)](https://github.com/cyril/sha256_seal.rb/actions?query=workflow%3Aruby+branch%3Amain)
10
+ [![RuboCop](https://github.com/cyril/sha256_seal.rb/workflows/RuboCop/badge.svg?branch=main)](https://github.com/cyril/sha256_seal.rb/actions?query=workflow%3Arubocop+branch%3Amain)
11
+ [![License](https://img.shields.io/github/license/cyril/sha256_seal.rb?label=License&logo=github)](https://github.com/cyril/sha256_seal.rb/raw/main/LICENSE.md)
4
12
 
5
13
  ## Installation
6
14
 
7
15
  Add this line to your application's Gemfile:
8
16
 
9
17
  ```ruby
10
- gem 'sha256_seal'
18
+ gem "sha256_seal"
11
19
  ```
12
20
 
13
21
  And then execute:
14
22
 
15
- $ bundle
23
+ ```sh
24
+ bundle install
25
+ ```
16
26
 
17
27
  Or install it yourself as:
18
28
 
19
- $ gem install sha256_seal
29
+ ```sh
30
+ gem install sha256_seal
31
+ ```
20
32
 
21
33
  ## Usage
22
34
 
23
- Sign values and verify signatures of values.
35
+ Sign information and verify their signature.
24
36
 
25
37
  ## Example
26
38
 
27
39
  In the context of a Web application, CSRF tokens could be embedded in URLs.
28
40
 
29
41
  ```ruby
30
- SECRET = 'secret'
42
+ SECRET = "secret".freeze
31
43
 
32
-
33
- document_string = '/.__SIGNATURE_HERE__/accounts/42?editable=false'
34
- signature_field = '__SIGNATURE_HERE__'
44
+ document_string = "/.__SIGNATURE_HERE__/accounts/42?editable=false"
45
+ signature_field = "__SIGNATURE_HERE__"
35
46
 
36
47
  builder = Sha256Seal::Builder.new(document_string, SECRET, signature_field)
37
48
  builder.signed_value? # => false
38
49
  builder.signed_value # => "/.a31c3936f236684a8ebc51dcfef168ce124450d71ae1ec404552ec9e0090a8db/accounts/42?editable=false"
39
50
 
40
-
41
- document_string = '/.a31c3936f236684a8ebc51dcfef168ce124450d71ae1ec404552ec9e0090a8db/accounts/42?editable=false'
42
- signature_field = 'a31c3936f236684a8ebc51dcfef168ce124450d71ae1ec404552ec9e0090a8db'
51
+ document_string = "/.a31c3936f236684a8ebc51dcfef168ce124450d71ae1ec404552ec9e0090a8db/accounts/42?editable=false"
52
+ signature_field = "a31c3936f236684a8ebc51dcfef168ce124450d71ae1ec404552ec9e0090a8db"
43
53
 
44
54
  builder = Sha256Seal::Builder.new(document_string, SECRET, signature_field)
45
55
  builder.signed_value? # => true
46
56
  builder.signed_value # => "/.a31c3936f236684a8ebc51dcfef168ce124450d71ae1ec404552ec9e0090a8db/accounts/42?editable=false"
47
57
 
48
-
49
- document_string = '/.a31c3936f236684a8ebc51dcfef168ce124450d71ae1ec404552ec9e0090a8db/accounts/42?editable=true'
50
- signature_field = 'a31c3936f236684a8ebc51dcfef168ce124450d71ae1ec404552ec9e0090a8db'
58
+ document_string = "/.a31c3936f236684a8ebc51dcfef168ce124450d71ae1ec404552ec9e0090a8db/accounts/42?editable=true"
59
+ signature_field = "a31c3936f236684a8ebc51dcfef168ce124450d71ae1ec404552ec9e0090a8db"
51
60
 
52
61
  builder = Sha256Seal::Builder.new(document_string, SECRET, signature_field)
53
62
  builder.signed_value? # => false
@@ -67,8 +76,8 @@ Route:
67
76
  ```ruby
68
77
  # config/routes.rb
69
78
  Rails.application.routes.draw do
70
- scope module: :verified_requests, path: '.:csrf', as: 'verified_request' do
71
- get '/accounts/:id', to: 'accounts#show', as: 'account'
79
+ scope module: :verified_requests, path: ".:csrf", as: "verified_request" do
80
+ get "/accounts/:id", to: "accounts#show", as: "account"
72
81
  end
73
82
  end
74
83
  ```
@@ -77,35 +86,40 @@ Controller:
77
86
 
78
87
  ```ruby
79
88
  # app/controllers/verified_requests/base_controller.rb
80
- class VerifiedRequests::BaseController < ApplicationController
81
- # @see https://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html#method-i-verified_request-3F
82
- def verified_request?
83
- secret = ENV.fetch('CSRF_SECRET_KEY')
84
- document_string = request.original_url.force_encoding('utf-8')
85
- signature_field = request.path_parameters.fetch(:csrf)
86
-
87
- builder = Sha256Seal::Builder.new(document_string, secret, signature_field)
88
- builder.signed_value? || Rails.env.test?
89
- end
90
-
91
- def signed_url(route_method, **options)
92
- url_route_method = "#{route_method}_url".to_sym
93
- incorrect_csrf = '__CSRF_SECRET_KEY__'
94
- url_route_string = public_send(url_route_method, csrf: incorrect_csrf, **options)
95
-
96
- replace_incorrect_csrf_by_correct_csrf(url_route_string, incorrect_csrf: incorrect_csrf)
97
- end
98
- helper_method :signed_url
99
-
100
- def replace_incorrect_csrf_by_correct_csrf(value, incorrect_csrf:)
101
- secret = ENV.fetch('CSRF_SECRET_KEY')
102
- field = incorrect_csrf
103
- builder = Sha256Seal::Builder.new(value, secret, field)
104
- value = builder.signed_value
105
- field = builder.send(:signature)
106
- builder = Sha256Seal::Builder.new(value, secret, field)
107
-
108
- builder.signed_value
89
+ module VerifiedRequests
90
+ class BaseController < ::ApplicationController
91
+ def signed_url(route_method, **options)
92
+ url_route_method = "#{route_method}_url".to_sym
93
+ incorrect_csrf = "__CSRF_SECRET_KEY__"
94
+ url_route_string = public_send(url_route_method, csrf: incorrect_csrf, **options)
95
+
96
+ replace_incorrect_csrf_by_correct_csrf(url_route_string, incorrect_csrf:)
97
+ end
98
+ helper_method :signed_url
99
+
100
+ private
101
+
102
+ def replace_incorrect_csrf_by_correct_csrf(value, incorrect_csrf:)
103
+ secret = ::ENV.fetch("CSRF_SECRET_KEY")
104
+ field = incorrect_csrf
105
+ builder = ::Sha256Seal::Builder.new(value, secret, field)
106
+ value = builder.signed_value
107
+ field = builder.send(:signature)
108
+
109
+ builder = ::Sha256Seal::Builder.new(value, secret, field)
110
+ builder.signed_value
111
+ end
112
+
113
+ # @see https://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html#method-i-verified_request-3F
114
+ # @see https://github.com/rails/rails/blob/8015c2c2cf5c8718449677570f372ceb01318a32/actionpack/lib/action_controller/metal/request_forgery_protection.rb#L333-L341
115
+ def verified_request?
116
+ secret = ::ENV.fetch("CSRF_SECRET_KEY")
117
+ document_string = request.original_url.force_encoding("utf-8")
118
+ signature_field = request.path_parameters.fetch(:csrf)
119
+
120
+ builder = ::Sha256Seal::Builder.new(document_string, secret, signature_field)
121
+ builder.signed_value? || ::Rails.env.test?
122
+ end
109
123
  end
110
124
  end
111
125
  ```
@@ -115,11 +129,14 @@ View:
115
129
  ```ruby
116
130
  # app/views/verified_requests/accounts/show.html.erb
117
131
 
118
- <%
119
- signed_url(:verified_request_account, id: 'bob', admin: true) # => "http://0.0.0.0:5000/.405d7c8f14389c9ae7f1d97ff66699093bf2d89d13b4f4280a35d62f9e616259/accounts/bob?admin=true"
120
- %>
132
+ signed_url(:verified_request_account, id: "bob", admin: true)
133
+ # => "http://0.0.0.0:5000/.405d7c8f14389c9ae7f1d97ff66699093bf2d89d13b4f4280a35d62f9e616259/accounts/bob?admin=true"
121
134
  ```
122
135
 
123
- ## Contributing
136
+ ## Versioning
137
+
138
+ __Sha256Seal__ uses [Semantic Versioning 2.0.0](https://semver.org/)
139
+
140
+ ## License
124
141
 
125
- Bug reports and pull requests are welcome on GitHub at https://github.com/cyril/sha256_seal.rb.
142
+ The [gem](https://rubygems.org/gems/sha256_seal) is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/lib/sha256_seal.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'digest/sha2'
3
+ require "digest/sha2"
4
4
 
5
5
  # Namespace for the Sha256Seal library.
6
6
  module Sha256Seal
metadata CHANGED
@@ -1,123 +1,183 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sha256_seal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Kato
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-09 00:00:00.000000000 Z
11
+ date: 2022-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: fix
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.18'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0.18'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: r_spec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop-gitlab-security
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
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'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-performance
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
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'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-rspec
43
113
  requirement: !ruby/object:Gem::Requirement
44
114
  requirements:
45
- - - "~>"
115
+ - - ">="
46
116
  - !ruby/object:Gem::Version
47
- version: '13.0'
117
+ version: '0'
48
118
  type: :development
49
119
  prerelease: false
50
120
  version_requirements: !ruby/object:Gem::Requirement
51
121
  requirements:
52
- - - "~>"
122
+ - - ">="
53
123
  - !ruby/object:Gem::Version
54
- version: '13.0'
124
+ version: '0'
55
125
  - !ruby/object:Gem::Dependency
56
- name: rubocop
126
+ name: rubocop-thread_safety
57
127
  requirement: !ruby/object:Gem::Requirement
58
128
  requirements:
59
- - - "~>"
129
+ - - ">="
60
130
  - !ruby/object:Gem::Version
61
- version: '0.75'
131
+ version: '0'
62
132
  type: :development
63
133
  prerelease: false
64
134
  version_requirements: !ruby/object:Gem::Requirement
65
135
  requirements:
66
- - - "~>"
136
+ - - ">="
67
137
  - !ruby/object:Gem::Version
68
- version: '0.75'
138
+ version: '0'
69
139
  - !ruby/object:Gem::Dependency
70
140
  name: simplecov
71
141
  requirement: !ruby/object:Gem::Requirement
72
142
  requirements:
73
- - - "~>"
143
+ - - ">="
74
144
  - !ruby/object:Gem::Version
75
- version: '0.17'
145
+ version: '0'
76
146
  type: :development
77
147
  prerelease: false
78
148
  version_requirements: !ruby/object:Gem::Requirement
79
149
  requirements:
80
- - - "~>"
150
+ - - ">="
81
151
  - !ruby/object:Gem::Version
82
- version: '0.17'
152
+ version: '0'
83
153
  - !ruby/object:Gem::Dependency
84
154
  name: yard
85
155
  requirement: !ruby/object:Gem::Requirement
86
156
  requirements:
87
- - - "~>"
157
+ - - ">="
88
158
  - !ruby/object:Gem::Version
89
- version: '0.9'
159
+ version: '0'
90
160
  type: :development
91
161
  prerelease: false
92
162
  version_requirements: !ruby/object:Gem::Requirement
93
163
  requirements:
94
- - - "~>"
164
+ - - ">="
95
165
  - !ruby/object:Gem::Version
96
- version: '0.9'
166
+ version: '0'
97
167
  description: Seal device with SHA-256 hash function, for Ruby.
98
- email:
99
- - contact@cyril.email
168
+ email: contact@cyril.email
100
169
  executables: []
101
170
  extensions: []
102
171
  extra_rdoc_files: []
103
172
  files:
104
- - ".gitignore"
105
- - ".rubocop.yml"
106
- - ".rubocop_todo.yml"
107
- - ".travis.yml"
108
- - Gemfile
109
- - Gemfile.lock
173
+ - LICENSE.md
110
174
  - README.md
111
- - Rakefile
112
- - VERSION.semver
113
- - bin/console
114
- - bin/setup
115
175
  - lib/sha256_seal.rb
116
- - sha256_seal.gemspec
117
176
  homepage: https://github.com/cyril/sha256_seal.rb
118
177
  licenses:
119
178
  - MIT
120
- metadata: {}
179
+ metadata:
180
+ rubygems_mfa_required: 'true'
121
181
  post_install_message:
122
182
  rdoc_options: []
123
183
  require_paths:
@@ -126,14 +186,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
186
  requirements:
127
187
  - - ">="
128
188
  - !ruby/object:Gem::Version
129
- version: '0'
189
+ version: 3.1.2
130
190
  required_rubygems_version: !ruby/object:Gem::Requirement
131
191
  requirements:
132
192
  - - ">="
133
193
  - !ruby/object:Gem::Version
134
194
  version: '0'
135
195
  requirements: []
136
- rubygems_version: 3.0.3
196
+ rubygems_version: 3.3.7
137
197
  signing_key:
138
198
  specification_version: 4
139
199
  summary: Seal device with SHA-256 hash function.
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /tmp/
8
- .DS_Store
data/.rubocop.yml DELETED
@@ -1 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
data/.rubocop_todo.yml DELETED
@@ -1,20 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2019-10-09 21:12:32 +0200 using RuboCop version 0.75.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Configuration parameters: CountComments, ExcludedMethods.
11
- # ExcludedMethods: refine
12
- Metrics/BlockLength:
13
- Max: 32
14
-
15
- # Offense count: 6
16
- # Cop supports --auto-correct.
17
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
18
- # URISchemes: http, https
19
- Metrics/LineLength:
20
- Max: 176
data/.travis.yml DELETED
@@ -1,22 +0,0 @@
1
- ---
2
- language: ruby
3
- sudo: false
4
- cache: bundler
5
- before_install:
6
- - gem install bundler
7
- script:
8
- - bundle exec rubocop
9
- - bundle exec rake test
10
- rvm:
11
- - 2.3.8
12
- - 2.4.5
13
- - 2.5.3
14
- - 2.6.3
15
- - ruby-head
16
- - jruby-head
17
- - rbx-3
18
- matrix:
19
- allow_failures:
20
- - rvm: ruby-head
21
- - rvm: jruby-head
22
- - rvm: rbx-3
data/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}.rb" }
6
-
7
- gemspec
data/Gemfile.lock DELETED
@@ -1,58 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- sha256_seal (0.1.5)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- ast (2.4.0)
10
- aw (0.1.6)
11
- defi (1.1.5)
12
- docile (1.3.2)
13
- fix (0.18.2)
14
- aw (~> 0.1.6)
15
- defi (~> 1.1.5)
16
- spectus (~> 3.0.9)
17
- jaro_winkler (1.5.3)
18
- json (2.2.0)
19
- matchi (1.0.4)
20
- parallel (1.18.0)
21
- parser (2.6.5.0)
22
- ast (~> 2.4.0)
23
- rainbow (3.0.0)
24
- rake (13.0.0)
25
- rubocop (0.75.0)
26
- jaro_winkler (~> 1.5.1)
27
- parallel (~> 1.10)
28
- parser (>= 2.6)
29
- rainbow (>= 2.2.2, < 4.0)
30
- ruby-progressbar (~> 1.7)
31
- unicode-display_width (>= 1.4.0, < 1.7)
32
- ruby-progressbar (1.10.1)
33
- simplecov (0.17.1)
34
- docile (~> 1.1)
35
- json (>= 1.8, < 3)
36
- simplecov-html (~> 0.10.0)
37
- simplecov-html (0.10.2)
38
- spectus (3.0.9)
39
- aw (~> 0.1.6)
40
- defi (~> 1.1.5)
41
- matchi (~> 1.0.4)
42
- unicode-display_width (1.6.0)
43
- yard (0.9.20)
44
-
45
- PLATFORMS
46
- ruby
47
-
48
- DEPENDENCIES
49
- bundler (~> 2.0)
50
- fix (~> 0.18)
51
- rake (~> 13.0)
52
- rubocop (~> 0.75)
53
- sha256_seal!
54
- simplecov (~> 0.17)
55
- yard (~> 0.9)
56
-
57
- BUNDLED WITH
58
- 2.0.2
data/Rakefile DELETED
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rake/testtask'
5
- require 'rubocop/rake_task'
6
-
7
- RuboCop::RakeTask.new
8
-
9
- Rake::TestTask.new do |t|
10
- t.verbose = true
11
- t.warning = true
12
- t.pattern = File.join('fix', '**', '*_fix.rb')
13
- end
14
-
15
- namespace :test do
16
- task :coverage do
17
- ENV['COVERAGE'] = 'true'
18
- Rake::Task['test'].invoke
19
- end
20
- end
21
-
22
- task default: %i[test]
data/VERSION.semver DELETED
@@ -1 +0,0 @@
1
- 0.1.5
data/bin/console DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'sha256_seal'
6
-
7
- require 'irb'
8
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euo pipefail
4
- IFS=$'\n\t'
5
- set -vx
6
-
7
- bundle install
data/sha256_seal.gemspec DELETED
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = 'sha256_seal'
5
- spec.version = File.read('VERSION.semver').chomp
6
- spec.authors = ['Cyril Kato']
7
- spec.email = ['contact@cyril.email']
8
-
9
- spec.summary = 'Seal device with SHA-256 hash function.'
10
- spec.description = 'Seal device with SHA-256 hash function, for Ruby.'
11
- spec.homepage = 'https://github.com/cyril/sha256_seal.rb'
12
- spec.license = 'MIT'
13
-
14
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
15
- f.match(%r{^(fix)/})
16
- end
17
- spec.bindir = 'exe'
18
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ['lib']
20
-
21
- spec.add_development_dependency 'bundler', '~> 2.0'
22
- spec.add_development_dependency 'fix', '~> 0.18'
23
- spec.add_development_dependency 'rake', '~> 13.0'
24
- spec.add_development_dependency 'rubocop', '~> 0.75'
25
- spec.add_development_dependency 'simplecov', '~> 0.17'
26
- spec.add_development_dependency 'yard', '~> 0.9'
27
- end