yasst 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTk4MmY5N2RmODI2NDBmZGY4NzkzNGY2NzAyZTQ5M2U5ZTA4ODU4ZQ==
4
+ N2Y1N2Y4ZjIwNDY5ZjUzNWNmNDQzOTU0OTIzZDRhN2ViZWFkMTcxYg==
5
5
  data.tar.gz: !binary |-
6
- N2E0YTU5M2Y5ZjliYzcwNzY0Y2M4MDI1OGE0MGJmNTU0YWQwMTk0NA==
6
+ M2ExMWRhNDA2MDYzZjhmMTk2NTkzMDllZWNjMmRhMjM3NDk5ZTE1MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2EwNDA1MDI5YjQ5N2VkNzhiMDUxZDVlYjU1ZmEyZjgwOWQ3ZGVmZDM2NDJm
10
- NzlhOWI3NDQzNTRlNTY5ZjVmNmI0Njg0ZDVhYWYzZjhmYjNlZWVjY2VmYmM2
11
- Zjc5ZDNiMDJlZjViYzI5OTU0NjJkYjM4MDc0NzhkZWY2MTZhZWU=
9
+ ZTE2MWQ0NGY1YjBkODUxY2YyYTE5NzA4ZWJmZjllNTcwM2RiYjY5NzU2NmUx
10
+ MGIxNWNlMjhhZjA3MmMwYWRmN2U2YzIyZWM3MTAxYjI3NzA5MDFmNTEyMWJh
11
+ NWQ3YzI5YzI3ZTc1ODViMDc5YzllM2UyN2IwYjdjNjZkZDNkMDQ=
12
12
  data.tar.gz: !binary |-
13
- YWQ2YjBkNWEwYTZhZTMzZjFjOTU4NzEwNDM3MTZiOWEwNGQ1MmEyNDMzZmFm
14
- MTA5NTI0NWZlNmE5NjQwZTk3YTExMDQyN2Q4NGU5MzEyNzdiNGI3MTVlYTVm
15
- OWQ3NmZkYTE1YzUyOGQ4ZmUxZjI1ZDc2YTY5OTEyYWMxOTM4ZWE=
13
+ ZDc4NWYzYWMwZWQ0MWZhZjM4ODQ4ZmEyYWQ1NmExOTVlM2FmN2NhMGY2MTI2
14
+ NWZkMWZiOWFiNjcxMDJlMzU0Zjk3Mzc2OTE4YWZkMWFhNWE0MzcxOTlmY2Qz
15
+ ODk5YjlkYTZhZGZmNDk0YWYzYzNhNzJjNTA1YTlhZGU1YTc2YzI=
data/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # CHANGELOG
2
+ All notable changes to this project will be documented in this file.
3
+ This project adheres to [Semantic Versioning](http://semver.org/).
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.1] - 2016-02-11
8
+ ### Changed
9
+ * Slim down list of files published via gemspec
10
+ * add some more examples of YasstString
11
+ ### Added
12
+ * add a changelog
13
+
14
+ ## [0.1.0] - 2016-02-11
15
+ ### Added
16
+ * Initial Release
17
+
18
+ [Unreleased]: https://github.com/rdark/yasst/compare/0.1.1...develop
19
+ [0.1.1]: https://github.com/rdark/yasst/tree/0.1.0...0.1.1
20
+ [0.1.0]: https://github.com/rdark/yasst/tree/0.1.0
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Yasst
2
2
 
3
3
  [![Build Status](https://travis-ci.org/rdark/yasst.svg?branch=master)](https://travis-ci.org/rdark/yasst)
4
+ [![Gem Version](https://badge.fury.io/rb/yasst.svg)](https://badge.fury.io/rb/yasst)
5
+ ![](http://ruby-gem-downloads-badge.herokuapp.com/yasst?type=total)
4
6
 
5
7
  Yet Another Secret Stashing Toolkit.
6
8
 
@@ -34,6 +36,8 @@ Additionally, the OpenSSL provider will ensure that there is:
34
36
 
35
37
  ### YasstString
36
38
 
39
+ #### Set up a Provider
40
+
37
41
  provider = Yasst::Provider::OpenSSL.new(passphrase: 'a really strong passphrase')
38
42
  provider.profile.algorithm
39
43
  => "AES-256-CBC"
@@ -41,17 +45,34 @@ Additionally, the OpenSSL provider will ensure that there is:
41
45
  => :pbkdf2
42
46
  provider.profile.pbkdf2_iterations
43
47
  => 50000
48
+
49
+ #### Setup a Plain YasstString
50
+
44
51
  secrets = YasstString.new('some really secret data')
45
52
  secrets.encrypted?
46
53
  => false
54
+
55
+ #### Encrypt a YasstString
56
+
47
57
  secrets.encrypt(provider)
48
- => "Ubvxrj7-E7QCNqiof00RwxTka5V2debHX6gdIPdAmdRvsgB2YpjGD4IU5EYYN6uFk5iKo76k6mvK4tTIXbcBlhFmnN4mptpG
58
+ => "KQ0xVcHcNuX_CZU4HheZf5B4CdjelDeWkGVDiufcPWhHO_MA5-P1-qm9usTVY8Yka7jRmWNe6aKk-kLd1fEHK6-gxhK_gHSC"
49
59
  secrets.encrypted?
50
60
  => true
51
61
 
62
+ #### Decrypt a YasstString
63
+
64
+ secrets.decrypt(provider)
65
+ => "some really secret data"
66
+
67
+ #### Decrypt an Already Encrypted YasstString
68
+
69
+ already_encrypted = YasstString.new('KQ0xVcHcNuX_CZU4HheZf5B4CdjelDeWkGVDiufcPWhHO_MA5-P1-qm9usTVY8Yka7jRmWNe6aKk-kLd1fEHK6-gxhK_gHSC', true)
70
+ already_encrypted.decrypt(provider)
71
+ => "some really secret data"
72
+
52
73
  ### YasstFile
53
74
 
54
- NotYetImplemented
75
+ NotImplementedError
55
76
 
56
77
  ## Installation
57
78
 
data/lib/yasst/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yasst
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
data/yasst.gemspec CHANGED
@@ -16,13 +16,11 @@ Gem::Specification.new do |spec|
16
16
  spec.license = 'MIT'
17
17
 
18
18
  spec.require_paths = ['lib']
19
- spec.files = `git ls-files -z`.split("\x0").reject { |f|
20
- f.match(%r{^(TODO|test|spec|features)/})
21
- }
22
- # ensure gem is built out of versioned files
23
- spec.executables = `git ls-files -- bin/*`.split("\n").map { |f|
24
- File.basename(f)
25
- }
19
+
20
+ dir_exclude = Regexp.new(%r{^(test|spec|features|bin)/})
21
+ file_exclude = Regexp.new(/^(\.gitignore|\.travis|\.rubocop|\.rspec|Guardfile)/)
22
+ excludes = Regexp.union(dir_exclude, file_exclude)
23
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(excludes) }
26
24
 
27
25
  spec.add_development_dependency 'bundler', '~> 1'
28
26
  spec.add_development_dependency 'rake', '~> 10.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yasst
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Clark
@@ -111,24 +111,16 @@ dependencies:
111
111
  description: Yasst is a toolset for managing encryption and decryption of secrets
112
112
  email:
113
113
  - richard@fohnet.co.uk
114
- executables:
115
- - console
116
- - setup
114
+ executables: []
117
115
  extensions: []
118
116
  extra_rdoc_files: []
119
117
  files:
120
- - .gitignore
121
- - .rspec
122
- - .rubocop.yml
123
- - .travis.yml
118
+ - CHANGELOG.md
124
119
  - Gemfile
125
- - Guardfile
126
120
  - LICENSE.txt
127
121
  - README.md
128
122
  - Rakefile
129
123
  - TODO.md
130
- - bin/console
131
- - bin/setup
132
124
  - lib/yasst.rb
133
125
  - lib/yasst/error.rb
134
126
  - lib/yasst/primatives/openssl.rb
data/.gitignore DELETED
@@ -1,28 +0,0 @@
1
- # Default ignores for vim editor
2
- .*.sw[a-z]
3
- *.un~
4
- Session.vim
5
- .netrwhist
6
- # Default ignores for emacs editor
7
- *~
8
- \#*\#
9
- /.emacs.desktop
10
- /.emacs.desktop.lock
11
- .elc
12
- auto-save-list
13
- tramp
14
- .\#*
15
-
16
- # docs
17
- /doc
18
-
19
- # as this is a gem, we don't check Gemfile.lock into version control
20
- Gemfile.lock
21
-
22
- # test harness
23
- pkg/*
24
- vendor/bundle
25
- vendor/cache
26
- .bundle
27
-
28
- tmp
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.rubocop.yml DELETED
@@ -1,14 +0,0 @@
1
- ---
2
- Style/RegexpLiteral:
3
- Exclude:
4
- - 'Guardfile'
5
- # TODO - simplify Yasst::Profiles::OpenSSL
6
- Metrics/PerceivedComplexity:
7
- Exclude:
8
- - 'lib/yasst/profiles/openssl.rb'
9
- Metrics/CyclomaticComplexity:
10
- Exclude:
11
- - 'lib/yasst/profiles/openssl.rb'
12
- Metrics/AbcSize:
13
- Exclude:
14
- - 'lib/yasst/profiles/openssl.rb'
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.3
4
- - 2.1.0
5
- deploy:
6
- provider: rubygems
7
- gem: yasst
8
- on:
9
- tags: true
10
- api_key:
11
- secure: l2mduN8h2tjuBSr0G/XdAD5DNbiV87vZwQoLoH2PX1KQKdgaSzlJ4Mus9pSQzhq5JsLFRNtNdMvRp1AvxEajAf4Oy+H3tBSoeQEz9/wDfZvkAje1BlZyN6fXcIzj1HkDHoA8Da6y8o5xnA3Q8f+bVDloUJyjadT5Y8tOBDBo1QY4s/qPXoqUIsGLgJtBg29MqKGj/lVrvxf/+GRs62VlJny0jRhWJK+OzyxyKHB17wIs5wg+blayd8studtpJBvFFNMSFlwF1YvTCqsCyU4d9DHaR5GS0ZOev1y63E+EkkgJiXpBh+yDXVzpSjVcm4jygJdo7n6wdW+uv7yUP8rm9ULZG6TZmDIU8I1plVjD7aOMgRBvPckomHZ8maj+1FAz8Axl/bDQhM/TT0uT2ckS6h9sXMv1uSIm/hVyiTmETg7JyETHzvd/VrH4QssGdNo60MdhQJ/Cl0US/mt2xiMlAQB4qZCakWv3A8aCCg6dswouYgewvXkrSG3mUpPpmBAjBGNLkG9IRs1lUISqBOp452HuBQ5nyR9l8ATRJvHI8hdD7tPuGfQILG0k6c9ePpFrVD7odB9KkVTd7Zd8iMh0np4oc/XeZdYVelRyeGLS7vh7QdND3w0dSr5svgfzX45lD5kwYzST6JqpaJcBZu76ctMg37AV3hlZA1Ut6etZWa8=
data/Guardfile DELETED
@@ -1,22 +0,0 @@
1
- # Note: The cmd option is now required due to the increasing number of ways
2
- # rspec may be run, below are examples of the most common uses.
3
- # * bundler: 'bundle exec rspec'
4
- # * bundler binstubs: 'bin/rspec'
5
- # * spring: 'bin/rspec' (This will use spring if running and you have
6
- # installed the spring binstubs per the docs)
7
- # * zeus: 'zeus rspec' (requires the server to be started separately)
8
- # * 'just' rspec: 'rspec'
9
-
10
- guard :rspec, cmd: 'rspec' do
11
- watch(%r{^spec/.+_spec\.rb$})
12
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
13
- watch('spec/spec_helper.rb') { 'spec' }
14
- end
15
-
16
- guard :rubocop do
17
- watch(%r{^spec/.+_spec\.rb$})
18
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
19
- watch(%r{[^\/]+\.rb$})
20
- watch(%r{.+\.gemspec$})
21
- watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
22
- end
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'yasst'
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require 'pry'
11
- # Pry.start
12
-
13
- require 'irb'
14
- IRB.start
data/bin/setup DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- bundle install
6
-
7
- # Do any other automated setup that you need to do here