underlock 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: efeef63eb2420dcfc642b0ee17b5cf03820ad6dd
4
- data.tar.gz: 8b8817fe84302875634819cf9a5709bbe494e169
3
+ metadata.gz: 119bd81d62404e27d72d8f5fe722dbc1d0dd66e6
4
+ data.tar.gz: 6823f03d3443e52af8826a173575b40e4affa5a0
5
5
  SHA512:
6
- metadata.gz: 521f822d0cfa8b6a3a5d7152e1edb280cece2af86cefcd7ca696f2085c290d3815da0987a74d8a99c7eead0c2e92e2525d3e9cdc4697a9931db962fa6be4ab68
7
- data.tar.gz: 0538a17b60e37d57b0f2d87e009d280888159f404a80d2b975e1855e4efca2cd8b14b15df9b7340d213e769611a1a876734dcaf867327060b9f2fa1b5447a74e
6
+ metadata.gz: d6aa47621603772e05c99ee9f34a72240696893310fae5607198b24b6dbc071e6dcd996a11b66b60aaf449059020a316398076fde85c599d6dc9738d538a0ef9
7
+ data.tar.gz: acc029d3252215bda7309b9b25b910fec694e51107e6d1c816edeab6826c87fe69d8fb1415fae9c12b7edca323de5058768cdfd4fc004c535424b367c5265e35
data/.travis.yml CHANGED
@@ -1,5 +1,24 @@
1
- sudo: false
2
1
  language: ruby
2
+ dist: trusty
3
+ sudo: required
4
+ cache: bundler
5
+ bundler_args: --without console
6
+ script:
7
+ - bundle exec rake spec
3
8
  rvm:
9
+ - 2.0
10
+ - 2.1
11
+ - 2.2
4
12
  - 2.3.1
5
- before_install: gem install bundler -v 1.13.6
13
+ - rbx-3
14
+ - jruby-9.1.5.0
15
+ - ruby-head
16
+ - jruby-head
17
+ env:
18
+ global:
19
+ - JRUBY_OPTS='--dev -J-Xmx1024M'
20
+ - COVERAGE='true'
21
+ matrix:
22
+ allow_failures:
23
+ - rvm: ruby-head
24
+ - rvm: jruby-head
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Underlock makes it dead simple to encrypt and decrypt your data and files. It comes with little to no dependencies and has a very small API surface.
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/underlock.svg)](https://badge.fury.io/rb/underlock) [![Code Climate](https://codeclimate.com/github/metaware/underlock/badges/gpa.svg)](https://codeclimate.com/github/metaware/underlock) [![Build Status](https://travis-ci.org/metaware/underlock.svg?branch=master)](https://travis-ci.org/metaware/underlock)
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
@@ -30,6 +32,8 @@ end
30
32
 
31
33
  For the `config.cipher` value, all algorithms available in `OpenSSL::Cipher.ciphers` are supported.
32
34
 
35
+ **Important Note: Choose your algorithm carefully and stick to it. It'll kind of suck to be not able to decrypt your encrypted data.**
36
+
33
37
  ## Generating Public/Private keypair
34
38
 
35
39
  ```ruby
@@ -10,12 +10,9 @@ module Underlock
10
10
  class << self
11
11
 
12
12
  def encrypt(unencrypted_value)
13
- if Pathname.new(unencrypted_value).exist?
14
- unencrypted_value = File.new(unencrypted_value)
15
- end
16
13
  case unencrypted_value
17
- when File then FileEncryptor.new.encrypt(unencrypted_value)
18
- when String then Encryptor.new.encrypt(unencrypted_value)
14
+ when File, Pathname then FileEncryptor.new.encrypt(unencrypted_value)
15
+ when String then Encryptor.new.encrypt(unencrypted_value)
19
16
  end
20
17
  end
21
18
 
@@ -1,3 +1,3 @@
1
1
  module Underlock
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: underlock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jasdeep Singh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-26 00:00:00.000000000 Z
11
+ date: 2017-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable