jwtgen 0.1.1 → 0.1.2

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -0
  3. data/exe/jwtgen +7 -0
  4. data/lib/jwtgen/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c513f1d42f21c55e5f6a5ba526ba3206899461c1
4
- data.tar.gz: d0f48c7e175acfa4c255929f176466852d825153
3
+ metadata.gz: 360a095c47aae5b5533663ce79f25cc2c5c0cb78
4
+ data.tar.gz: 1145235c3f6480dc2f635509960db5fc26676d90
5
5
  SHA512:
6
- metadata.gz: 3daadfe06fc15081791c035f6da9aa44ce9824741ce2daf4fdddeda1f320ffffe3c5c40ce50db4b5ab9f1475fe5a44769c1a1ba7b3a70300a3eab3601c22d395
7
- data.tar.gz: 36e2676787c48c632ffe7f96d353c32ba0d53711fd564b695d748aa9f523580585bec4cba8c9030fd02d7a41cc93f1370ab98a743553f0bc72e531b91f007ee0
6
+ metadata.gz: 8752b58743f6ef5eec4ec6af7d7add0b5bdc57e00455034860af9f5b11dd8f63de4a1bfe1f7fdf7181289ec85a043f9607f87839d03716ddb030bd514d0e0bb5
7
+ data.tar.gz: 82b71897108c9fd5ba3560e563fdb389c46a9c6b1d327ff29c0abfe77361ec152f017f03c2b482962cbeeb24e4ae46db3bf19d5774a093b85fc281a578023e77
data/README.md CHANGED
@@ -30,6 +30,17 @@ Provide HMAC algorithm and secret key:
30
30
  role Manager
31
31
  The JWT has been copied to your clipboard!
32
32
 
33
+ You can store options `key` and `algorithm` in configuration file `.jwtgen` stored in your user folder
34
+
35
+ --key 2f27090cf62f34c1dcfd4b1de3809bb8b1ab31f0b376d1cf8c36827f4d5ad2dd
36
+ --algorithm HS512
37
+
38
+ NOTE: Supplied options have a higher priority than options stored in the configuration file.
39
+
40
+ Create file with single cammand (don't forget to replace the key):
41
+
42
+ $ echo "--key 2f27090cf62f34c1dcfd4b1de3809bb8b1ab31f0b376d1cf8c36827f4d5ad2dd\n--algorithm HS512" > ~/.jwtgen
43
+
33
44
  ## Development
34
45
 
35
46
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/exe/jwtgen CHANGED
@@ -1,4 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
+
3
+ config_file = File.join(File.expand_path('~'), '.jwtgen')
4
+ if File.exist?(config_file)
5
+ default_argv = File.read(config_file).split
6
+ ARGV.unshift(*default_argv)
7
+ end
8
+
2
9
  require 'optparse'
3
10
 
4
11
  options = {}
@@ -1,3 +1,3 @@
1
1
  class Jwtgen
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwtgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleksandr Avoyants