sym 2.8.2 → 2.8.4

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
- SHA1:
3
- metadata.gz: 0e1260cd469a3e3c85dc8292258b1e18321ac6a5
4
- data.tar.gz: ae70450ca3dd896d89b45b164e97d6854ab00140
2
+ SHA256:
3
+ metadata.gz: 7b4e7a7bb7dc3ee54ccded4f83769002f748486b3980b5a79a29367c09f014cc
4
+ data.tar.gz: 1abbad854da79052c0a48217453fd2949bbf5204018d0a0464c7eaac9d9e0609
5
5
  SHA512:
6
- metadata.gz: b791bd290037fe563a594b94dd11b7bfa1a38a2117c2f982ef4ab15ee316421f739bdf8077ed61fb17f27b3a854f5d02e4daeb20013a452e465a46b0ba81d352
7
- data.tar.gz: 38f4f26dd977d2e4225e46525bb2c91a62afe65b5b6c46f035df710469fbbf7c2a49bb637b50ff2a6e9b4ff1ee5ff2b8f187bb4af8b54c0dbb6e3d3418fab502
6
+ metadata.gz: 61f1a355404478cae7d5866a0d1a30dce57a779ffe5d043fb85af304f43e55a90776d9f6bad5e4b357c35084509c750a3554a7320fa802a62f1fa1bc3b9317f3
7
+ data.tar.gz: ebe1db5a92fe6fd4a80deba2659a6736b45f61544f438b374dace2acf9912225d4e1e2d129e8200f9a6133f116ec0d79ef3fef5edd656738f260a4b01d9791bc
@@ -8,6 +8,10 @@ jobs:
8
8
  docker:
9
9
  # specify the version you desire here
10
10
  - image: circleci/ruby:2.4.1-node-browsers
11
+ environment:
12
+ TEST_DRB: false
13
+
14
+ - image: memcached:1.4-alpine
11
15
 
12
16
  working_directory: ~/repo
13
17
 
@@ -15,8 +19,7 @@ jobs:
15
19
  - checkout
16
20
  - restore_cache:
17
21
  keys:
18
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
19
- - v1-dependencies-
22
+ - v1-dependencies-{{ checksum "Gemfile" }}
20
23
 
21
24
  - run:
22
25
  name: install dependencies
@@ -25,29 +28,26 @@ jobs:
25
28
 
26
29
  - save_cache:
27
30
  paths:
28
- - ./vendor/bundle
29
- key: v1-dependencies-{{ checksum "Gemfile.lock" }}
31
+ - ./vendor/bundle
32
+ key: v1-dependencies-{{ checksum "Gemfile" }}
30
33
 
31
34
  - run:
32
- name: install memcached
33
- command: |
34
- sudo apt-get update && sudo apt-get install -y memcached
35
- sudo service start memcached || true
36
- memcached -d || true
37
- echo "checking if memcached is running...."
38
- ps -ef | grep [m]emcached
35
+ name: install dockerize
36
+ command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
37
+ environment:
38
+ DOCKERIZE_VERSION: v0.3.0
39
39
 
40
40
  - run:
41
- name: install sym bash helpers
42
- command: |
43
- bundle exec exe/sym -B ~/.bash_profile
44
- [[ -f ~/.sym.completion.bash ]] || exit 1
45
- [[ -f ~/.sym.symit.bash ]] || exit 1
41
+ name: Wait for memcached
42
+ command: dockerize -wait tcp://localhost:11211 -timeout 1m
46
43
 
47
44
  - run:
48
45
  name: run tests
49
46
  command: |
50
47
  bundle exec rspec --version
51
48
  bundle exec exe/sym --version
52
- bundle exec rspec --backtrace --format documentation
49
+ if [[ -t 1 ]]; then echo "this is a TTY!"; else echo "this is NOT a tty"; fi
50
+ if [[ -p /dev/stdout ]]; then echo "this is a PIPE!"; else echo "this is NOT a pipe"; fi
51
+ if [[ ! -t 1 && ! -p /dev/stdout ]]; then echo "this is a REDIRECT!"; else echo "this is NOT a redirect"; fi
52
+ CI=true timeout -k 2 -s HUP 30 bundle exec rspec --order random --format documentation --backtrace
53
53
 
@@ -1,11 +1,14 @@
1
1
  language: ruby
2
2
  env:
3
- - CODECLIMATE_REPO_TOKEN=c71874cc22acffe1e2543d3388d3a96c73a65f0cfe17169dadd8de4a6c062c39 TEST_DRB=true HOME=/home/travis USER=travis
3
+ global:
4
+ secure: TQeUpdDH/j5AefVh2NRvU8t/ftxXQqaIO5m0ir7vzJgEBuP8twTqx/CFeZWogd/u0McMgL48NHgQZGXz1n04ZZasovcrk4wd7kMwSyNTtyAa/0D5u6k1JyiynNV26MWvxXGBw4OCCfVCa4WXIM0s7YI2S/q9ZYKSWWYtw/Lo+MDHjJEIaM4EdL+b9SxF94y8DcDXy2qt7H58nUJV/RVz9uG++kuDbpoobwO8mEGGuUIcxubgFoKqOCjXkX1Qe2vY2LgJGb7OZsVDj7QhARwm1NwspxTZDgfQzeSHM5uCW5JJ40Ur4bAb4bFXDPV2yF64cagYWcQow20To1qO17UR+xIFMMV+pxnhTiiRtGzyDCoYLCc5ldXyrnVskQYtXLwrY92Na4avdWCalL8fBO7IfBVHHADowED2AW8thExf4ljVR1wzjs0vIeVmVz9ApJr25sgZjKawaosv7BHt9MDKruK7tQBY8HIAjEsP50cb42VOucY+vabWtTG6QzX+//tjsDlM0rOhSiMlqxpbrwpWxpnhc+kn3TeMPr1oU0j9gDCRMghcaCVD18JKwZMx45LEX7LZY2lQcnLmJJOwnwamuReLc/w6cMO1ORjBgRsDkyz0Jila90cTUSJq21I41srDauprolfrqT1igZ3rB/C++vA/SiG+hz7WzvMWXBv/fzs=
4
5
  services:
5
6
  - memcached
6
7
  rvm:
7
- - 2.3.5
8
- - 2.4.2
8
+ - 2.2.9
9
+ - 2.3.6
10
+ - 2.4.3
11
+ - 2.5.0
9
12
  notifications:
10
13
  email:
11
14
  recipients:
@@ -15,17 +18,16 @@ notifications:
15
18
  slack:
16
19
  rooms:
17
20
  secure: GcACCHmcmo99lYE5dgt2TmY4YIPMWr75q0Bkm4Lddegq/1eMXgcZDz00j8iHWtnveyJSjEUpZFQ9uyx+P7dvxT7D5gl43arKZEylS4vMRg9QRgZu7/ROrXbJtrUyKulFRUTdFrmOiK9nDKpAzlvLvMKC4kaQnn88Xtu9pYMU8y4n5fCtl29gZM9ZjVbrBBvV/SumnTDLla2oQ7oFgUZdZhQZ1qsevYknxNq4eIcvPDjbon+bovfsIISEVRSNo2C3yjO+mqWKed3jfuCA4taAZ8/aVVFEKURMH10HFms1CiC3lE/gF4YfBXsqKpjnB+bKjBcWox2FQrp96FulMEIfkKQrnuncO96o7MGHX9oNqKSMoycf3+SZFwNa+5Mfq7SBepbHYCoU7/ow31UTyStrc5idG19XzYgI85yjQHdzQN299Xf0O8cGf9q9qAu7rS7JlM3ekR+3rZYO+OxNYTF8rcW1fYIj6GKcbsV8BvuhAVQRFOsk/ibcIb2N7rGVd/ZbU4HAk3RE1ywt+XowinpIHktu2PQUPDNpgRQwM6xqZHO/7s9r7oW0ULmZCMLZ9CMKNjKzrQ9wfh90+v+FiEiUKsaVj4cCwF3PvhVYvxU2AKbCeHtSEb7K6to86+DYNoIKnGH1ryKoyCtyOTZpNMLGFt34Msv7WfEylhG+DpVMvkM=
18
- addons:
19
- code_climate:
20
- repo_token: c71874cc22acffe1e2543d3388d3a96c73a65f0cfe17169dadd8de4a6c062c39
21
- # regular test configuration
22
- after_success:
23
- - bundle exec codeclimate-test-reporter
24
21
  before_script:
25
- - echo stats | nc localhost 11211
26
- script:
22
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
23
+ - chmod +x ./cc-test-reporter
24
+ - ./cc-test-reporter before-build
27
25
  - bundle exec exe/sym -B ~/.bash_profile -vTD
26
+ - source ~/.sym.symit.bash
28
27
  - ls -alF ~/.sym*
29
28
  - ls -alF .
30
29
  - mkdir -p temp
31
- - bundle exec rspec --format documentation
30
+ after_script:
31
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
32
+ script:
33
+ - USER=travis bundle exec rspec --format documentation --order random
@@ -2,7 +2,13 @@
2
2
 
3
3
  ## [HEAD](https://github.com/kigster/sym/tree/HEAD)
4
4
 
5
- [Changes since the last tag](https://github.com/kigster/sym/compare/v2.7.0...HEAD)
5
+ [Changes since the last tag](https://github.com/kigster/sym/compare/v2.8.4...HEAD)
6
+
7
+ ## [v2.8.4](https://github.com/kigster/sym/tree/v2.8.4) (2018-04-12)
8
+ [Full Changelog](https://github.com/kigster/sym/compare/v2.8.0...v2.8.4)
9
+
10
+ - Fixed CircleCI
11
+ - made BASH completions faster
6
12
 
7
13
  ## [v2.8.0](https://github.com/kigster/sym/tree/v2.8.0) (2018-01-05)
8
14
  [Full Changelog](https://github.com/kigster/sym/compare/v2.7.0...v2.8.0)
data/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
  [![Sym Downloads](http://ruby-gem-downloads-badge.herokuapp.com/sym?extension=png)](https://rubygems.org/gems/sym)
5
5
 
6
6
  [![Build Status](https://travis-ci.org/kigster/sym.svg?branch=master)](https://travis-ci.org/kigster/sym)
7
+ [![CircleCI](https://circleci.com/gh/kigster/sym.svg?style=svg)](https://circleci.com/gh/kigster/sym)
8
+
7
9
  [![Code Climate](https://codeclimate.com/github/kigster/sym/badges/gpa.svg)](https://codeclimate.com/github/kigster/sym)
8
10
  [![Test Coverage](https://codeclimate.com/github/kigster/sym/badges/coverage.svg)](https://codeclimate.com/github/kigster/sym/coverage)
9
11
  [![Issue Count](https://codeclimate.com/github/kigster/sym/badges/issue_count.svg)](https://codeclimate.com/github/kigster/sym)
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'rspec/core/rake_task'
3
3
  require 'yard'
4
-
4
+ require 'timeout'
5
5
 
6
6
  def shell(*args)
7
7
  puts "running: #{args.join(' ')}"
@@ -34,3 +34,5 @@ RSpec::Core::RakeTask.new(:spec)
34
34
  task :default => :spec
35
35
 
36
36
 
37
+
38
+
@@ -14,14 +14,16 @@
14
14
  bash_version=$(bash --version | awk '{FS="version"}{print $4}')
15
15
  bash_version=${bash_version:0:1}
16
16
 
17
- declare -a bash_completion_locations=(/usr/local/etc/bash_completion /usr/etc/bash_completion /etc/bash_completion)
18
- loaded=false
19
- for file in ${bash_completion_locations[@]}; do
17
+ [[ -z $(type _filedir 2>/dev/null) ]] && {
18
+ declare -a bash_completion_locations=(/usr/local/etc/bash_completion /usr/etc/bash_completion /etc/bash_completion)
19
+ loaded=false
20
+ for file in ${bash_completion_locations[@]}; do
20
21
  [[ -s ${file} ]] && {
21
22
  source ${file}
22
23
  break
23
24
  }
24
- done
25
+ done
26
+ }
25
27
 
26
28
  _sym_long_opts() {
27
29
  sym -h | grep -- '--' | egrep '^ -' | awk '{print $2}' | sort
@@ -27,7 +27,13 @@ module Sym
27
27
  end
28
28
 
29
29
  def prompt(message, color)
30
- raise Sym::Errors::CantReadPasswordNoTTY.new('key requires a password, however STDIN is not a TTY') unless stdin.tty?
30
+ unless STDIN.isatty && STDIN.tty?
31
+ raise Sym::Errors::CantReadPasswordNoTTY.new('key requires a password, however STDIN is not a TTY')
32
+ end
33
+ highline(message, color)
34
+ end
35
+
36
+ def highline(message, color)
31
37
  HighLine.new(stdin, stderr).ask(message.bold) { |q| q.echo = '•'.send(color) }
32
38
  end
33
39
 
@@ -1,5 +1,5 @@
1
1
  module Sym
2
- VERSION = '2.8.2'
2
+ VERSION = '2.8.4'
3
3
  DESCRIPTION = <<-eof
4
4
  Sym is a ruby library (gem) that offers both the command line interface (CLI) and a set of rich Ruby APIs, which make it rather trivial to add encryption and decryption of sensitive data to your development or deployment flow. As a layer of additional security, you can encrypt the private key itself with a password. Unlike many other existing encryption tools, Sym focuses on getting out of the way — by offering its streamlined interface, hoping to make encryption of application secrets nearly completely transparent to the developers. For the data encryption Sym uses a symmetric 256-bit key with the AES-256-CBC cipher, same cipher as used by the US Government. For password-protecting the key Sym uses AES-128-CBC cipher. The resulting data is zlib-compressed and base64-encoded. The keys are also base64 encoded for easy copying/pasting/etc.
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sym
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.2
4
+ version: 2.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Gredeskoul
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-10 00:00:00.000000000 Z
11
+ date: 2018-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2
@@ -255,7 +255,6 @@ extensions: []
255
255
  extra_rdoc_files: []
256
256
  files:
257
257
  - ".circleci/config.yml"
258
- - ".codeclimate.yml"
259
258
  - ".document"
260
259
  - ".gitignore"
261
260
  - ".rspec"
@@ -359,7 +358,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
359
358
  version: '0'
360
359
  requirements: []
361
360
  rubyforge_project:
362
- rubygems_version: 2.4.5.2
361
+ rubygems_version: 2.7.6
363
362
  signing_key:
364
363
  specification_version: 4
365
364
  summary: Dead-simple and easy to use encryption library on top of OpenSSL, offering
@@ -1,30 +0,0 @@
1
- ---
2
- engines:
3
- duplication:
4
- enabled: true
5
- config:
6
- languages:
7
- - ruby
8
- - javascript
9
- - python
10
- - php
11
- fixme:
12
- enabled: true
13
- rubocop:
14
- enabled: true
15
- checks:
16
- Rubocop/Metrics/MethodLength:
17
- enabled: false
18
- Rubocop/Metrics/CyclomaticComplexity:
19
- enabled: false
20
- ratings:
21
- paths:
22
- - "**.inc"
23
- - "**.js"
24
- - "**.jsx"
25
- - "**.module"
26
- - "**.php"
27
- - "**.py"
28
- - "**.rb"
29
- exclude_paths:
30
- - spec/