apiotics 0.2.18 → 0.2.19

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: f2f43e23f801f7fd9a12d4b00943f2d59187fa81
4
- data.tar.gz: c45d244b79996a9b58ce7d23b249cea04f68e2d6
3
+ metadata.gz: 43521f096d07021fdbda18417c3028d33e026954
4
+ data.tar.gz: 2fc356b20128e5d3438039760cbf3d08fe9de76e
5
5
  SHA512:
6
- metadata.gz: 8be30ae215a4d55d0034111979eb08678e60fee5053994b1d9475ac3b5e087cfb3284b75278fb02847b5da1ffcd2828b05f33daa4756e8760ed605f34510d099
7
- data.tar.gz: f795386b8fa7baa1cb605666d84d4f596295ad29f2d27320d73c6c76f75810d65b70a6995a43c051ecd0e6113b366d137121672048d6e905263e2f51a22315a5
6
+ metadata.gz: 78eb58c866de592aa996834f0448eb5aee8e7a7c0e6cbe8b4ff097f4c0701c162a6e06695c033448cabdd17fcb0380d39623bea6f31999dec342b5fcef9623e6
7
+ data.tar.gz: 0fec758f674bbeb9ede4cd387913ba48c8c6783711e390d2a0838f3f309318db3d56ef704fa358c6949ed675029d398464267aecf6e200f031ad1b5826ca2c4d
@@ -3,7 +3,11 @@ require 'openssl'
3
3
  class String
4
4
  def apiotics_encrypt(key)
5
5
  cipher = OpenSSL::Cipher.new('DES-EDE3-CBC').encrypt
6
- cipher.key = Digest::SHA1.hexdigest key
6
+ begin
7
+ cipher.key = Digest::SHA1.hexdigest key
8
+ rescue
9
+ cipher.key = (Digest::SHA1.hexdigest key)[0..23]
10
+ end
7
11
  s = cipher.update(self) + cipher.final
8
12
 
9
13
  s.unpack('H*')[0].upcase
@@ -11,7 +15,11 @@ class String
11
15
 
12
16
  def apiotics_decrypt(key)
13
17
  cipher = OpenSSL::Cipher.new('DES-EDE3-CBC').decrypt
14
- cipher.key = Digest::SHA1.hexdigest key
18
+ begin
19
+ cipher.key = Digest::SHA1.hexdigest key
20
+ rescue
21
+ cipher.key = (Digest::SHA1.hexdigest key)[0..23]
22
+ end
15
23
  s = [self].pack("H*").unpack("C*").pack("c*")
16
24
 
17
25
  cipher.update(s) + cipher.final
@@ -1,3 +1,3 @@
1
1
  module Apiotics
2
- VERSION = '0.2.18'
2
+ VERSION = '0.2.19'
3
3
  end
@@ -22,6 +22,7 @@ module Apiotics
22
22
  copy_file "publish_script.rake", "lib/tasks/publish_script.rake"
23
23
  copy_file "install_firmware.rake", "lib/tasks/install_firmware.rake"
24
24
  copy_file "set_wifi.rake", "lib/tasks/set_wifi.rake"
25
+ copy_file "set_cellular.rake", "lib/tasks/set_cellular.rake"
25
26
  FileUtils.chmod 0775, "lib/scripts/server_control.rb"
26
27
  FileUtils.chmod 0775, "lib/scripts/heroku_server_control.rb"
27
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiotics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.18
4
+ version: 0.2.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - MicroArx Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-08 00:00:00.000000000 Z
11
+ date: 2018-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails