securerandom 0.2.0 → 0.2.1

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: 6852f43d47cdb9a38bd51e8981b8db11542785bdcc9cb12d99cff489ac09a75c
4
- data.tar.gz: ad104da5f10efc9897ec75e0ea0b84867fdb23c599fe42b914e6b8b68fe35471
3
+ metadata.gz: 396cd8fff3b7710c09c49c19017c3b32b81810ab7aa4d4d468e88e0231294da4
4
+ data.tar.gz: c0a2fa9b2e657eff48a221877b49a3c7d20d18ca955cfcc90594b28a4adcef74
5
5
  SHA512:
6
- metadata.gz: '09ffdc8afb40305864b664da22060adfeb63a544a4066f38bbb61641694970da98d260359e3ac1ce88a339637281e8518f5955d819ef5cb2ca675a63d5311b5d'
7
- data.tar.gz: 77991f3b46bcdf3da8c6637f695c72de4a270834c91ad8e1bfc44b61629d324b651051ff059e7c01c02b327459dbb1190afb17d6337f5ea1bd2260581f5f8bf9
6
+ metadata.gz: 7f562481a1134ea11d151e3167c700b9995767aa7f643c8d95b112af872c9a2884e74194550329b618a05081b05bc96e21d1e7c7e117940c4a8edbb5a94897d7
7
+ data.tar.gz: 81aea2e28ad6406656700f8b2df92f9a87d1b6eca6ab5b2edd9753dcf444968bdbedda317a1785ad781ddf4ddbdefac117cc91871466f1a8c7af4f36d7ed1f15
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: 'github-actions'
4
+ directory: '/'
5
+ schedule:
6
+ interval: 'weekly'
@@ -11,7 +11,7 @@ jobs:
11
11
  os: [ ubuntu-latest, macos-latest, windows-latest ]
12
12
  runs-on: ${{ matrix.os }}
13
13
  steps:
14
- - uses: actions/checkout@v2
14
+ - uses: actions/checkout@v3
15
15
  - name: Set up Ruby
16
16
  uses: ruby/setup-ruby@v1
17
17
  with:
data/lib/securerandom.rb CHANGED
@@ -72,8 +72,11 @@ module SecureRandom
72
72
  ret
73
73
  end
74
74
 
75
- ret = Random.urandom(1)
76
- if ret.nil?
75
+ begin
76
+ # Check if Random.urandom is available
77
+ Random.urandom(1)
78
+ alias gen_random gen_random_urandom
79
+ rescue RuntimeError
77
80
  begin
78
81
  require 'openssl'
79
82
  rescue NoMethodError
@@ -81,8 +84,6 @@ module SecureRandom
81
84
  else
82
85
  alias gen_random gen_random_openssl
83
86
  end
84
- else
85
- alias gen_random gen_random_urandom
86
87
  end
87
88
 
88
89
  public :gen_random
data/securerandom.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "securerandom"
3
- spec.version = "0.2.0"
3
+ spec.version = "0.2.1"
4
4
  spec.authors = ["Tanaka Akira"]
5
5
  spec.email = ["akr@fsij.org"]
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: securerandom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanaka Akira
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-28 00:00:00.000000000 Z
11
+ date: 2022-12-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Interface for secure random number generator.
14
14
  email:
@@ -17,6 +17,7 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - ".github/dependabot.yml"
20
21
  - ".github/workflows/test.yml"
21
22
  - ".gitignore"
22
23
  - Gemfile