sym 3.0.0 → 3.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96b146e9f4e68299d11d3aa550f32cf34c85de0ce8b91829e2d7db0e39d9da8a
4
- data.tar.gz: c55848a53c59090e471b207d3e170fa803aa61969f4689c4cdffe507ebe8babf
3
+ metadata.gz: 67acdb213e1c14e6d1eb34a4a0b27e1e3724b1a98d715bff0716290674c3afbb
4
+ data.tar.gz: 92ae116832760799ed97301189e4b339984163db7881d630044a39a20af9ecd5
5
5
  SHA512:
6
- metadata.gz: 1a577c64acd5fb45c06526757602810b210c9fc4af413961be85618abdb88754e3689b4e7d78ed1dd3714abb22484bae86d7111b6a6c887568ab57c818cdc94e
7
- data.tar.gz: dd26342b6c02825c85f847268f4a69f0da85dd42bcae7e6064515bf88c32f17eb08e19e9b65758825dbb28ff5b7fd0a878dcc9b2e0fb83be915120b0ce0284ae
6
+ metadata.gz: 9202cee6a164dd7bb7fa12f6cc475bf822ecdbd4b613295009362099fd4cd431a41e5a60df701bccf3aec9828826bb7026164e72208123ebce7f0fd5ca69d0f5
7
+ data.tar.gz: 97437a1e56195daae154c529f65ea878ca5f6cdacfe89ecd4211897a77bad5922a20d6c72d10f6720d56851b029a01dc15dd5b478db08bbf9c019cd5e8f55ed7
data/.envrc CHANGED
@@ -1,5 +1,5 @@
1
1
  # vim: ft=bash
2
- export DEBUG=true
2
+ export DEBUG=
3
3
 
4
4
  [[ -f .envrc.local ]] && source .envrc.local
5
5
 
@@ -0,0 +1,30 @@
1
+ name: Rubocop
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-20.04
12
+ strategy:
13
+ matrix:
14
+ ruby: [ '3.1' ]
15
+ name: Ruby ${{ matrix.ruby }} Tests
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - uses: actions/setup-ruby@v1
19
+ with:
20
+ ruby-version: ${{ matrix.ruby }}
21
+ - uses: actions/cache@v2
22
+ with:
23
+ path: vendor/bundle
24
+ key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
25
+ restore-keys: |
26
+ ${{ runner.os }}-gems-
27
+ - run: |
28
+ gem install bundler -N
29
+ bundle install --jobs 10
30
+ bundle exec rubocop
@@ -0,0 +1,30 @@
1
+ name: Ruby
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-20.04
12
+ strategy:
13
+ matrix:
14
+ ruby: [ '2.6', '2.7', '3.0', '3.1' ]
15
+ name: Ruby ${{ matrix.ruby }} Tests
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - uses: actions/setup-ruby@v1
19
+ with:
20
+ ruby-version: ${{ matrix.ruby }}
21
+ - uses: actions/cache@v2
22
+ with:
23
+ path: vendor/bundle
24
+ key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
25
+ restore-keys: |
26
+ ${{ runner.os }}-gems-
27
+ - run: |
28
+ gem install bundler -N
29
+ bundle install --jobs 10
30
+ bundle exec rspec
data/.rubocop.yml CHANGED
@@ -1,8 +1,15 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
1
3
  inherit_gem:
2
4
  relaxed-rubocop: .rubocop.yml
3
5
 
6
+ require:
7
+ - rubocop-rspec
8
+ - rubocop-rake
9
+
4
10
  AllCops:
5
- TargetRubyVersion: 2.3
11
+ NewCops: enable
12
+ TargetRubyVersion: 2.6
6
13
 
7
14
  Style/Alias:
8
15
  Enabled: false
@@ -47,6 +54,10 @@ Style/FormatString:
47
54
  Enabled: false
48
55
  StyleGuide: https://relaxed.ruby.style/#styleformatstring
49
56
 
57
+ Style/StringConcatenation:
58
+ Enabled: false
59
+
60
+
50
61
  Style/IfUnlessModifier:
51
62
  Enabled: false
52
63
  StyleGuide: https://relaxed.ruby.style/#styleifunlessmodifier
@@ -223,7 +234,7 @@ Style/BarePercentLiterals:
223
234
  Style/FormatStringToken:
224
235
  Enabled: false
225
236
 
226
- Style/MethodMissingSuper:
237
+ Lint/MissingSuper:
227
238
  Enabled: false
228
239
 
229
240
  Style/MissingRespondToMissing:
@@ -376,3 +387,8 @@ Style/HashTransformKeys:
376
387
  Style/HashTransformValues:
377
388
  Enabled: true
378
389
 
390
+ Lint/ConstantDefinitionInBlock:
391
+ Enabled: false
392
+
393
+ Lint/Debugger:
394
+ Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,143 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2022-09-22 23:53:51 UTC using RuboCop version 1.36.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: 6
10
+ RSpec/AnyInstance:
11
+ Exclude:
12
+ - 'spec/sym/app/cli_spec.rb'
13
+ - 'spec/sym/app/password/providers_spec.rb'
14
+
15
+ # Offense count: 97
16
+ # Configuration parameters: Prefixes, AllowedPatterns.
17
+ # Prefixes: when, with, without
18
+ RSpec/ContextWording:
19
+ Enabled: false
20
+
21
+ # Offense count: 4
22
+ # Configuration parameters: CountAsOne.
23
+ RSpec/ExampleLength:
24
+ Max: 25
25
+
26
+ # Offense count: 20
27
+ RSpec/ExpectInHook:
28
+ Exclude:
29
+ - 'spec/sym/app/cli_spec.rb'
30
+ - 'spec/sym/app/commands/print_key_spec.rb'
31
+ - 'spec/sym/app/password/providers_spec.rb'
32
+ - 'spec/sym/app/private_key/detector_spec.rb'
33
+ - 'spec/sym/app/private_key/handler_spec.rb'
34
+ - 'spec/sym/application_spec.rb'
35
+ - 'spec/sym/magic_file_spec.rb'
36
+
37
+ # Offense count: 2
38
+ RSpec/IdenticalEqualityAssertion:
39
+ Exclude:
40
+ - 'spec/sym/sym_spec.rb'
41
+
42
+ # Offense count: 11
43
+ RSpec/LeakyConstantDeclaration:
44
+ Exclude:
45
+ - 'spec/integration/sym_cli_spec.rb'
46
+ - 'spec/support/contexts.rb'
47
+ - 'spec/sym/app/cli_spec.rb'
48
+ - 'spec/sym/app/keychain_spec.rb'
49
+
50
+ # Offense count: 1
51
+ RSpec/LetSetup:
52
+ Exclude:
53
+ - 'spec/sym/app/cli_spec.rb'
54
+
55
+ # Offense count: 20
56
+ # Configuration parameters: .
57
+ # SupportedStyles: have_received, receive
58
+ RSpec/MessageSpies:
59
+ EnforcedStyle: receive
60
+
61
+ # Offense count: 36
62
+ RSpec/MultipleExpectations:
63
+ Max: 6
64
+
65
+ # Offense count: 14
66
+ # Configuration parameters: AllowSubject.
67
+ RSpec/MultipleMemoizedHelpers:
68
+ Max: 9
69
+
70
+ # Offense count: 11
71
+ # Configuration parameters: IgnoreSharedExamples.
72
+ RSpec/NamedSubject:
73
+ Exclude:
74
+ - 'spec/sym/app/commands_spec.rb'
75
+ - 'spec/sym/app/password/providers_spec.rb'
76
+
77
+ # Offense count: 10
78
+ # Configuration parameters: AllowedGroups.
79
+ RSpec/NestedGroups:
80
+ Max: 6
81
+
82
+ # Offense count: 3
83
+ RSpec/NoExpectationExample:
84
+ Exclude:
85
+ - 'spec/sym/app/commands/encrypt_decrypt_spec.rb'
86
+ - 'spec/sym/app/commands/generate_key_spec.rb'
87
+ - 'spec/sym/data_spec.rb'
88
+
89
+ # Offense count: 1
90
+ RSpec/OverwritingSetup:
91
+ Exclude:
92
+ - 'spec/sym/app/commands/generate_key_spec.rb'
93
+
94
+ # Offense count: 12
95
+ RSpec/RepeatedDescription:
96
+ Exclude:
97
+ - 'spec/sym/app/commands_spec.rb'
98
+ - 'spec/sym/app/password/providers_spec.rb'
99
+
100
+ # Offense count: 2
101
+ RSpec/RepeatedExampleGroupDescription:
102
+ Exclude:
103
+ - 'spec/sym/app/password/providers_spec.rb'
104
+
105
+ # Offense count: 2
106
+ RSpec/ScatteredSetup:
107
+ Exclude:
108
+ - 'spec/integration/sym_cli_spec.rb'
109
+
110
+ # Offense count: 10
111
+ RSpec/StubbedMock:
112
+ Exclude:
113
+ - 'spec/support/contexts.rb'
114
+ - 'spec/sym/app/cli_spec.rb'
115
+ - 'spec/sym/app/commands/print_key_spec.rb'
116
+ - 'spec/sym/app/input/handler_spec.rb'
117
+ - 'spec/sym/app/private_key/detector_spec.rb'
118
+ - 'spec/sym/application_spec.rb'
119
+
120
+ # Offense count: 2
121
+ # This cop supports safe autocorrection (--autocorrect).
122
+ Rake/Desc:
123
+ Exclude:
124
+ - 'Rakefile'
125
+
126
+ # Offense count: 1
127
+ # This cop supports safe autocorrection (--autocorrect).
128
+ # Configuration parameters: AllowedVars.
129
+ Style/FetchEnvVar:
130
+ Exclude:
131
+ - 'lib/sym/app/private_key/key_source_check.rb'
132
+
133
+ # Offense count: 2
134
+ # This cop supports unsafe autocorrection (--autocorrect-all).
135
+ Style/GlobalStdStream:
136
+ Exclude:
137
+ - 'spec/sym/app/cli_spec.rb'
138
+
139
+ # Offense count: 1
140
+ # This cop supports unsafe autocorrection (--autocorrect-all).
141
+ Style/MapToHash:
142
+ Exclude:
143
+ - 'lib/sym/application.rb'
data/CHANGELOG.md CHANGED
@@ -1,8 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased](https://github.com/kigster/sym/tree/HEAD)
4
+
5
+ [Full Changelog](https://github.com/kigster/sym/compare/v3.0.1...HEAD)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Adding github actions [\#33](https://github.com/kigster/sym/pull/33) ([kigster](https://github.com/kigster))
10
+
11
+ ## [v3.0.1](https://github.com/kigster/sym/tree/v3.0.1) (2021-02-12)
12
+
13
+ [Full Changelog](https://github.com/kigster/sym/compare/v3.0.0...v3.0.1)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Fixing args expansion for Ruby 3.0.0 [\#32](https://github.com/kigster/sym/pull/32) ([kigster](https://github.com/kigster))
18
+
19
+ ## [v3.0.0](https://github.com/kigster/sym/tree/v3.0.0) (2020-08-15)
20
+
21
+ [Full Changelog](https://github.com/kigster/sym/compare/v2.10.1...v3.0.0)
22
+
3
23
  ## [v2.10.1](https://github.com/kigster/sym/tree/v2.10.1) (2020-08-15)
4
24
 
5
- [Full Changelog](https://github.com/kigster/sym/compare/v2.10.0...v2.10.1)
25
+ [Full Changelog](https://github.com/kigster/sym/compare/list...v2.10.1)
26
+
27
+ ## [list](https://github.com/kigster/sym/tree/list) (2020-08-15)
28
+
29
+ [Full Changelog](https://github.com/kigster/sym/compare/v2.10.0...list)
6
30
 
7
31
  **Closed issues:**
8
32
 
@@ -16,6 +40,10 @@
16
40
 
17
41
  [Full Changelog](https://github.com/kigster/sym/compare/v2.8.5...v2.10.0)
18
42
 
43
+ **Fixed bugs:**
44
+
45
+ - First pass on Version 2.9.0 — dropping the coin gem [\#20](https://github.com/kigster/sym/pull/20) ([kigster](https://github.com/kigster))
46
+
19
47
  **Closed issues:**
20
48
 
21
49
  - Switch to Codecov for test coverage [\#29](https://github.com/kigster/sym/issues/29)
@@ -27,7 +55,6 @@
27
55
  - Switch to Codecov for test coverage; version bump 2.10.0 [\#28](https://github.com/kigster/sym/pull/28) ([kigster](https://github.com/kigster))
28
56
  - Fix remaining 2.7 warnings; memcached & keychain [\#27](https://github.com/kigster/sym/pull/27) ([kigster](https://github.com/kigster))
29
57
  - Adding Rubocop, and fixing minor issues. [\#21](https://github.com/kigster/sym/pull/21) ([kigster](https://github.com/kigster))
30
- - First pass on Version 2.9.0 — dropping the coin gem [\#20](https://github.com/kigster/sym/pull/20) ([kigster](https://github.com/kigster))
31
58
  - CI: Update matrix [\#19](https://github.com/kigster/sym/pull/19) ([olleolleolle](https://github.com/olleolleolle))
32
59
 
33
60
  ## [v2.8.5](https://github.com/kigster/sym/tree/v2.8.5) (2018-10-13)
@@ -60,14 +87,14 @@
60
87
 
61
88
  [Full Changelog](https://github.com/kigster/sym/compare/v2.8.0...v2.8.1)
62
89
 
63
- ## [v2.8.0](https://github.com/kigster/sym/tree/v2.8.0) (2018-01-06)
64
-
65
- [Full Changelog](https://github.com/kigster/sym/compare/v2.7.0...v2.8.0)
66
-
67
90
  **Merged pull requests:**
68
91
 
69
92
  - Changing -t to expect a file argument; Version 2.7.0 [\#13](https://github.com/kigster/sym/pull/13) ([kigster](https://github.com/kigster))
70
93
 
94
+ ## [v2.8.0](https://github.com/kigster/sym/tree/v2.8.0) (2018-01-06)
95
+
96
+ [Full Changelog](https://github.com/kigster/sym/compare/v2.7.0...v2.8.0)
97
+
71
98
  ## [v2.7.0](https://github.com/kigster/sym/tree/v2.7.0) (2017-06-23)
72
99
 
73
100
  [Full Changelog](https://github.com/kigster/sym/compare/v2.6.3...v2.7.0)
data/README.adoc CHANGED
@@ -1,14 +1,20 @@
1
- = *sym* — _Symmetric Encryption for Humans_
1
+ = **Sym** — _Symmetric Encryption for Humans_
2
+ :source-highlighter: rouge
3
+ :rouge-style: base16.monokai
4
+ :icons: font
2
5
  :toc:
3
6
  :sectnum:
4
7
  :toclevel: 4
5
8
 
6
9
  ====
7
- image:https://badge.fury.io/rb/sym.svg[Gem Version,link=https://badge.fury.io/rb/sym]
8
- image:https://travis-ci.org/kigster/sym.svg?branch=master[Build Status,link=https://travis-ci.org/kigster/sym]
9
- image:https://circleci.com/gh/kigster/sym.svg?style=shield[CircleCI,link=https://circleci.com/gh/kigster/sym?style=shield]
10
+
11
+ image:https://github.com/kigster/sym/actions/workflows/ruby.yml/badge.svg[Ruby,link=https://github.com/kigster/sym/actions/workflows/ruby.yml]
12
+ image:https://github.com/kigster/sym/actions/workflows/rubocop.yml/badge.svg[Rubocop,link=https://github.com/kigster/sym/actions/workflows/rubocop.yml]
13
+
10
14
  image:https://api.codeclimate.com/v1/badges/4f1d1614ccaa61c974dd/maintainability[Maintainability,link=https://codeclimate.com/github/kigster/sym/maintainability]
11
15
 
16
+ image:https://badge.fury.io/rb/sym.svg[Gem Version,link=https://badge.fury.io/rb/sym]
17
+
12
18
  image:https://codecov.io/gh/kigster/sym/branch/master/graph/badge.svg?style=shield[Coverage,link="https://codecov.io/gh/kigster/sym"]
13
19
  image:https://img.shields.io/gitter/room/gitterHQ/gitter.svg[Gitter,link=https://gitter.im/kigster/sym]
14
20
  image:https://ruby-gem-downloads-badge.herokuapp.com/sym?extension=svg[Sym Downloads,link=https://rubygems.org/gems/sym]
@@ -16,15 +22,16 @@ image:https://ruby-gem-downloads-badge.herokuapp.com/sym?extension=svg[Sym Downl
16
22
  image:https://codecov.io/gh/kigster/sym/branch/master/graphs/sunburst.svg[Coverage Map,link=https://codecov.io/gh/kigster/sym]
17
23
  ====
18
24
 
19
- Please checkout the following post — _http://kig.re/2017/03/10/dead-simple-encryption-with-sym.html[Dead Simple Encryption with Sym]_ — that announced the initial release of this library, and provides further in-depth discussion. Your donation of absolutely any amount is much appreciated but never required.
25
+ NOTE: Please checkout the following post — _http://kig.re/2017/03/10/dead-simple-encryption-with-sym.html[Dead Simple Encryption with Sym]_ — that announced the initial release of this library, and provides further in-depth discussion. Your donation of absolutely any amount is much appreciated but never required.
20
26
 
21
27
  image:https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif[Donate,link=https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FSFYYNEQ8RKWU]
22
28
 
29
+ NOTE: You can read this README in the properly rendered for print format, by downloading the xref:README.pdf[PDF].
30
+
23
31
  == Introduction
24
32
 
25
33
  NOTE: *SYM* is an open source command line utility and a Ruby library, which makes it _trivial to encrypt your application secrets with mathematically proven models and ciphers offered in a much larger project — Open SSL.
26
34
 
27
-
28
35
  Unlike many existing encryption tools, *sym* focuses on narrowing the gap between convenience and security, by offering enhanced usability and a streamlined ruby API and a CLI. The primary goal of the library is to make encryption very easy and transparent. +
29
36
 
30
37
  * *sym* uses the _https://en.wikipedia.org/wiki/Symmetric-key_algorithm[Symmetric Encryption]_ algorithm. This means that the same key is used to encrypt and decrypt data. In addition to the key, the encryption uses a randomized IV vector, which is automatically generated per each encryption and serialized with the data. Result of encryption is zlib-compressed, and base64 encoded, to be suitable for storage as string. The generated keys are also base64-encoded for convenience. +
@@ -47,6 +54,8 @@ Additionally, Sym comes with a helpful BASH wrapper `symit`.
47
54
 
48
55
  == Supported Ruby Versions
49
56
 
57
+ NOTE: Ruby 3.0.0 is only supported by Sym version 3.0.1 and later.
58
+
50
59
  Sym currently builds and runs on the following ruby versions on Travis CI:
51
60
 
52
61
  .Ruby Version Compatibility
@@ -665,6 +674,5 @@ Please submit feature requests, bugs, or donations :)
665
674
 
666
675
  * link:http:/kig.re[Konstantin Gredeskoul] (primary developer)
667
676
  * https://github.com/bosswissam[Wissam Jarjoui] (testing, inspiration)
668
- * https://github.com/meganmmathews[Megan Mathews] (UX, CLI suggestions)
669
677
  * https://twitter.com/z3ndrag0n[Barry Anderson] (sanity checking, review)
670
678
  * https://github.com/JustinNazari[Justin Nazari] (bug fixes)