fido_metadata 0.2.0 → 0.3.0

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: 2881c4ebdb1827ac7d037d7e4460bd8708451c7a1c5e0501d5144a6119b64a1e
4
- data.tar.gz: b01d388d2710097a8e84319963c528c4933ce0ceb4a2fee2ee68ee63d0d6b38c
3
+ metadata.gz: '08330439dce6050e6e099e11620382b947e17777a40744f72283a1be18a07c3e'
4
+ data.tar.gz: 2377b8900e5593832e965d53c41cac920d23bc846eb0be698b42f8d499f0d976
5
5
  SHA512:
6
- metadata.gz: 01e1e3c685c0b88708067a451f5236607ee6bdc0a3d7f5b20bb5ff50bc053a24e49da71247d72e722cc46b302cf996f576f77acf71a47ad8d131af8f71a4a605
7
- data.tar.gz: e28acf6f1afacf9f39a8309a9b0eff3f4222049a0c6ea6fb3e56b367e403753d9ae068fe867862dd2348d43d382d54495b5d523b2929a9a3377233d06562573e
6
+ metadata.gz: 1122f49d0fe46db1464763d37db667c09e7794b2acdac868effc6a5bac03c1ec9f38a6b2a4beb87b419f2f9028cd84021aaab6b858a8e645ff452c4c4b53f595
7
+ data.tar.gz: c60c889a0e9c3088d27530be2fa9f3a97ead8dbbdf638d18909ed66d78431fc969548282b4b6a41e030b5160abd42f171860c455aabbf993ed4fa0faeaabe189
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.0] - 2019-11-24
10
+ ### Changed
11
+ - Made `FidoMetada::TestCacheStore` available for gem users. It is not required by default.
12
+
9
13
  ## [0.2.0] - 2019-11-16
10
14
  ### Added
11
15
  - This CHANGELOG.md file.
@@ -21,4 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
25
  ### Added
22
26
  - Extracted from [webauthn-ruby PR 208](https://github.com/cedarcode/webauthn-ruby/pull/208) after discussion with the maintainers. Thanks for the feedback @grzuy and @brauliomartinezlm!
23
27
 
28
+ [Unreleased]: https://github.com/bdewater/fido_metadata/compare/v0.2.0...HEAD
29
+ [0.3.0]: https://github.com/bdewater/fido_metadata/compare/v0.2.0...v0.3.0
30
+ [0.2.0]: https://github.com/bdewater/fido_metadata/compare/v0.1.0...v0.2.0
24
31
  [0.1.0]: https://github.com/bdewater/fido_metadata/releases/tag/v0.1.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fido_metadata (0.2.0)
4
+ fido_metadata (0.3.0)
5
5
  jwt (~> 2.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -69,7 +69,9 @@ end
69
69
 
70
70
  ## Development
71
71
 
72
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
72
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/rspec` to run the tests.
73
+
74
+ You can also run `MDS_TOKEN=yourtoken bin/console` for an interactive prompt that will allow you to experiment. It is configured to use a simple in-memory cache. If you don't supply the token via the environment variable, the prompt will print instructions to set it in another way.
73
75
 
74
76
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
75
77
 
data/bin/console CHANGED
@@ -5,10 +5,10 @@ require "bundler/setup"
5
5
  require "fido_metadata"
6
6
 
7
7
  # Configure in-memory cache
8
- require_relative "../spec/support/test_cache_store"
8
+ require "fido_metadata/test_cache_store"
9
9
  FidoMetadata.configure do |config|
10
10
  config.metadata_token = ENV["MDS_TOKEN"]
11
- config.cache_backend = TestCacheStore.new
11
+ config.cache_backend = FidoMetadata::TestCacheStore.new
12
12
  end
13
13
 
14
14
  unless FidoMetadata.configuration.metadata_token
@@ -5,6 +5,7 @@ require "net/http"
5
5
  require "openssl"
6
6
  require "fido_metadata/refinement/fixed_length_secure_compare"
7
7
  require "fido_metadata/x5c_key_finder"
8
+ require "fido_metadata/version"
8
9
 
9
10
  module FidoMetadata
10
11
  class Client
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A very simple cache story for the test suite that mimics the ActiveSupport::Cache::Store interface
4
+ module FidoMetadata
5
+ class TestCacheStore
6
+ def initialize
7
+ @store = {}
8
+ end
9
+
10
+ def read(name, _options = nil)
11
+ @store[name]
12
+ end
13
+
14
+ def write(name, value, _options = nil)
15
+ @store[name] = value
16
+ end
17
+
18
+ def delete(name, _options = nil)
19
+ @store.delete(name)
20
+ end
21
+
22
+ def clear(_options = nil)
23
+ @store.clear
24
+ end
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FidoMetadata
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fido_metadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bart de Water
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-16 00:00:00.000000000 Z
11
+ date: 2019-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -153,6 +153,7 @@ files:
153
153
  - lib/fido_metadata/status_report.rb
154
154
  - lib/fido_metadata/store.rb
155
155
  - lib/fido_metadata/table_of_contents.rb
156
+ - lib/fido_metadata/test_cache_store.rb
156
157
  - lib/fido_metadata/verification_method_descriptor.rb
157
158
  - lib/fido_metadata/version.rb
158
159
  - lib/fido_metadata/x5c_key_finder.rb