kgl 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -2
  3. data/lib/kgl/version.rb +1 -1
  4. data/lib/kgl.rb +15 -0
  5. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30e20e48ed60a45026814266fff22b53f7f53462aad625ec3768ec13195c0d34
4
- data.tar.gz: 80731aa26aa804db73782c513985602f00164ffcbfcdde3a0755a7eb094faca8
3
+ metadata.gz: 4bc114cb34920ec7950a6874a45e45cc62ffcc6451adeb30382ed64d892b265c
4
+ data.tar.gz: e06a04ee09a85dec8c6a68c08cf226955f1ed0d73f4bcb59d9cf64634a824481
5
5
  SHA512:
6
- metadata.gz: 736af74321aad6d1d1bbd46ee8a752af68209fbba3eab2caacaff80148b22754fd98dc69e92a4600bff7bfc4981ff25684a4b43fa8bcb04695b3a4324a84c6b2
7
- data.tar.gz: acea80d6781b37203bf2739a827795635003b1c016d421b29c3df0d5451ac12c09a206240b774c17d75773d4c1f22a3583ca92dbcf63a4cb7d3e268b97be5946
6
+ metadata.gz: 919d930965c4975a63f0421195eaa0b1125b0f6e3142cca2fc2c4b077353876076dc82d5c4858be623235f4a8d06fb4dfeef034f0ee70c83e87341134ce2ea4f
7
+ data.tar.gz: e72edc905d3658ab0b90993c5f8a868579b1aa8e6790db2ca711ae41f7ff21d6263f1f904018230be715b303e10a5eebbf4c3621fd0e826ed380aa64b5e831f1
data/CHANGELOG.md CHANGED
@@ -1,7 +1,10 @@
1
1
  # Change Log
2
2
 
3
- ## 0.0.1 2019/08/31
4
- - First release.
3
+ ## 0.0.3 2024/12/03
4
+ - Add Kgl.#rpw.
5
5
 
6
6
  ## 0.0.2 2020/04/23
7
7
  - Change default value of the Integer#to_msm's argument to 59.94.
8
+
9
+ ## 0.0.1 2019/08/31
10
+ - First release.
data/lib/kgl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kgl
2
- VERSION = "0.0.2"
2
+ VERSION = '0.0.3'
3
3
  end
data/lib/kgl.rb CHANGED
@@ -10,3 +10,18 @@ class Integer
10
10
  %Q|#{m}:#{s}.#{ms}|
11
11
  end
12
12
  end
13
+
14
+ module Kgl
15
+ module_function def rpw(n, sym='!#$%&*+,-./:;<=>?@')
16
+ ls = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' + sym
17
+ m = ls.length
18
+ `openssl rand #{n}`.bytes.map do |i|
19
+ while m <= i
20
+ i = `openssl rand 1`.bytes[0]
21
+ end
22
+ ls[i]
23
+ end.join
24
+ rescue Errno::ENOENT => e
25
+ raise 'Kgl.#rpw requires openssl command'
26
+ end
27
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kgl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - KAZOON
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-23 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.12.2
55
- description:
55
+ description:
56
56
  email:
57
57
  - cycloawaodorin+gem@gmail.com
58
58
  executables: []
@@ -81,7 +81,7 @@ metadata:
81
81
  homepage_uri: https://github.com/cycloawaodorin/
82
82
  source_code_uri: https://github.com/cycloawaodorin/kgl
83
83
  changelog_uri: https://github.com/cycloawaodorin/kgl/blob/master/CHANGELOG.md
84
- post_install_message:
84
+ post_install_message:
85
85
  rdoc_options: []
86
86
  require_paths:
87
87
  - lib
@@ -96,8 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  requirements: []
99
- rubygems_version: 3.1.2
100
- signing_key:
99
+ rubygems_version: 3.5.23
100
+ signing_key:
101
101
  specification_version: 4
102
102
  summary: A gem for personal use.
103
103
  test_files: []