cryptatron 0.1.0 → 1.0.0

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjYwNGUwOGMyYTdmNGI3MDFjZmFkNzdkZDYxMzE1ZWQxMDliZTEyYw==
4
+ ZmU2YjIwNjUzNWZhOTUyZDM3Yzg3Njg2MDY3MzFhMWRhNzcyNTQ5Zg==
5
5
  data.tar.gz: !binary |-
6
- ZGVmNzcyYjBjN2YzM2Q4ZjVkYzI2ZDg3NjlkY2VjZTdmYWI5OTlkNQ==
6
+ MGI2MDYwNDkzNDJkNTg3YzAwZGY4YzU5OTFjODEwNGEyZDdjZmM0YQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ODQ1ZWYzNWQxMjI2MGE5YmYyZDYxYmY4MDBjNTEyNzI1OTcwMmNlNTIzOWQ5
10
- MDcwMTE1NDhiZjYxMjc4M2QyMGI1NmU3ZTUyYjM5NGUyZDUyNGI4ZTBlZGE1
11
- MzhhNDRiMDNiMDIxNDYyOWU2MzY3NmM2ZDgwOTI0ODFlODAzZmE=
9
+ NTRjYzU2ZjY3ZmM2OGJkNzNiZmQ3MzYxZTE3NzQxNzQ3MzBjZWUyZDI1YmY4
10
+ OWIwMGY1ZTZlOWJjZGQ1ZGNmZjUxYzdhMTQ3NmFlZTQyMzhhMjEyZDhjNDFm
11
+ NmYxYjFiMjFlYmQxYjMxMDNjNWQwYTAxNTI4ZmE2ZTVmNDVkMWY=
12
12
  data.tar.gz: !binary |-
13
- OTE3YjMwMWYwNjAzZGU2ZDQ2YmI0N2EzMjljYjk0OWY5NjIxZjI1MzE5YmIy
14
- ZmQzYzg3M2QyM2FkYTYzZWRkNmY1YmU5MTQ5NDI3MzllNjY4MGE1Nzk4ZTA3
15
- MjIzYzg4MjNmYWViY2ExNTY4ZGE1YzEzOThmY2VmY2VkN2JmMzA=
13
+ YWJiNWRkZjM1ZGIyNjQ0MTExNTJhMDc0M2QyM2JiZDY4YTdiNDcwYzg2MWRj
14
+ NTVhOWNmNzFhNTgwMmJmNmMyYzczZjU0MDI5YTExZmVhNWUxYjNhM2ZlZTUw
15
+ MjljNjY1YjU5ZTFjOTg3MzZmMWI1ZDE1YzBhMzkwZjYzNTA2MjE=
@@ -13,5 +13,5 @@ Gem::Specification.new do |spec|
13
13
  spec.require_paths = ['lib']
14
14
 
15
15
  spec.add_dependency 'gibberish'
16
- spec.add_dependency 'rails', '>= 3'
16
+ spec.add_dependency 'figaro'
17
17
  end
@@ -1,6 +1,7 @@
1
1
  require 'base64'
2
2
  require 'yaml'
3
3
  require 'gibberish'
4
+ require 'figaro'
4
5
 
5
6
  module Cryptatron
6
7
  def self.encrypt(body, magic)
@@ -33,8 +34,7 @@ module Cryptatron
33
34
  def self.setup
34
35
  return if @initialized
35
36
 
36
- settings = YAML.load(ERB.new(File.read("#{Rails.root}/config/crypt-a-tron.yml")).result)
37
- @key = Base64.strict_decode64 settings['key']
37
+ @key = Base64.strict_decode64 Figaro.env.cryptatron_key
38
38
  @cipher = Gibberish::AES.new(@key, @key.length * 8)
39
39
 
40
40
  @initialized = true
@@ -1,3 +1,3 @@
1
1
  module Cryptatron
2
- VERSION = '0.1.0'
2
+ VERSION = '1.0.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptatron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Reed
@@ -27,19 +27,19 @@ dependencies:
27
27
  - !ruby/object:Gem::Version
28
28
  version: '0'
29
29
  - !ruby/object:Gem::Dependency
30
- name: rails
30
+ name: figaro
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - ! '>='
34
34
  - !ruby/object:Gem::Version
35
- version: '3'
35
+ version: '0'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - ! '>='
41
41
  - !ruby/object:Gem::Version
42
- version: '3'
42
+ version: '0'
43
43
  description:
44
44
  email:
45
45
  - alexreed@outlook.com