porky_lib 0.9.3 → 0.9.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
2
  SHA256:
3
- metadata.gz: 63d12d040a5b5f4c6b96940a29bd3ff771e713327fa7269488ea731b76fb59aa
4
- data.tar.gz: a086399a4c16939060522f80e0e1421268781973ffd15e7fac42dfece572782a
3
+ metadata.gz: 3fdbc4311ca319836e44898d3ad018416d03decf224941ae3f24a37ea1de9bad
4
+ data.tar.gz: bf572e33f77188a0a5b057c77bc91034e98044ba1b8e5f54d0a59d1561557948
5
5
  SHA512:
6
- metadata.gz: cd5e4418205489c4705648c575d23011a139eac1622202e638b3bb20a0a8e753996601b52be9ba05cf4148f3e1b8779b944c7fb87f0c8af834a1c42554b99c8e
7
- data.tar.gz: 29b4c3e1243a851e61b2a288666dcd98a6f1d6f4f892a4f250cc0d3edcaf81562a19202dc016dce201b2cb2a0c92df2fe601f8cb64ab822ceb2e04aadcfbb505
6
+ metadata.gz: f25cc53a69235ee25eca951ac3fe6fcce8317baf99e7188a7a83d880d13545eeb73d6f68572999361d6e595087013b322e90b3a513815a448083b9090aab9d1f
7
+ data.tar.gz: cbf5794b8098c9a0fbb6562fa6c9e3d1cceed6e24798f1133eab5cee5f776797f82676a1bd6c8356a37046b642d8d7907c3e7cf2657d9c75018a45dff58b9a0c
data/.rubocop.yml CHANGED
@@ -10,7 +10,7 @@ AllCops:
10
10
  - output/**/*
11
11
  - vendor/**/*
12
12
  - spec/porky_lib/data/*
13
- TargetRubyVersion: 2.3.7
13
+ TargetRubyVersion: 2.6.5
14
14
  RSpec:
15
15
  Patterns:
16
16
  - _spec.rb
@@ -18,9 +18,21 @@ AllCops:
18
18
  SpecTypes:
19
19
  Feature: 'spec/features/**/*'
20
20
 
21
- Documentation:
21
+ Style/Documentation:
22
22
  Enabled: false
23
23
 
24
+ Security/MarshalLoad:
25
+ Enabled: true
26
+
27
+ Security/Eval:
28
+ Enabled: true
29
+
30
+ Security/YAMLLoad:
31
+ Enabled: true
32
+
33
+ Security/JSONLoad:
34
+ Enabled: true
35
+
24
36
  Metrics/LineLength:
25
37
  Max: 160
26
38
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- porky_lib (0.9.3)
4
+ porky_lib (0.9.4)
5
5
  aws-sdk-kms
6
6
  aws-sdk-s3
7
7
  msgpack
@@ -13,17 +13,17 @@ GEM
13
13
  specs:
14
14
  ast (2.4.0)
15
15
  aws-eventstream (1.0.3)
16
- aws-partitions (1.232.0)
17
- aws-sdk-core (3.72.1)
16
+ aws-partitions (1.243.0)
17
+ aws-sdk-core (3.80.0)
18
18
  aws-eventstream (~> 1.0, >= 1.0.2)
19
- aws-partitions (~> 1, >= 1.228.0)
19
+ aws-partitions (~> 1, >= 1.239.0)
20
20
  aws-sigv4 (~> 1.1)
21
21
  jmespath (~> 1.0)
22
22
  aws-sdk-kms (1.25.0)
23
23
  aws-sdk-core (~> 3, >= 3.71.0)
24
24
  aws-sigv4 (~> 1.1)
25
- aws-sdk-s3 (1.53.0)
26
- aws-sdk-core (~> 3, >= 3.71.0)
25
+ aws-sdk-s3 (1.57.0)
26
+ aws-sdk-core (~> 3, >= 3.77.0)
27
27
  aws-sdk-kms (~> 1)
28
28
  aws-sigv4 (~> 1.1)
29
29
  aws-sigv4 (1.1.0)
@@ -39,15 +39,15 @@ GEM
39
39
  diff-lcs (1.3)
40
40
  docile (1.3.2)
41
41
  ffi (1.10.0)
42
- jaro_winkler (1.5.3)
42
+ jaro_winkler (1.5.4)
43
43
  jmespath (1.4.0)
44
44
  json (2.2.0)
45
45
  msgpack (1.3.1)
46
- parallel (1.18.0)
46
+ parallel (1.19.1)
47
47
  parser (2.6.5.0)
48
48
  ast (~> 2.4.0)
49
49
  rainbow (3.0.0)
50
- rake (13.0.0)
50
+ rake (13.0.1)
51
51
  rbnacl (5.0.0)
52
52
  ffi
53
53
  rbnacl-libsodium (1.0.16)
@@ -76,9 +76,9 @@ GEM
76
76
  rainbow (>= 2.2.2, < 4.0)
77
77
  ruby-progressbar (~> 1.7)
78
78
  unicode-display_width (>= 1.4.0, < 1.7)
79
- rubocop-performance (1.5.0)
79
+ rubocop-performance (1.5.1)
80
80
  rubocop (>= 0.71.0)
81
- rubocop-rspec (1.36.0)
81
+ rubocop-rspec (1.37.0)
82
82
  rubocop (>= 0.68.1)
83
83
  rubocop_runner (2.2.0)
84
84
  ruby-progressbar (1.10.1)
@@ -91,11 +91,10 @@ class PorkyLib::FileService
91
91
  file_key
92
92
  end
93
93
 
94
- def overwrite_file(file, file_key, bucket_name, key_id, options = {})
95
- raise FileServiceError, 'Invalid input. One or more input values is nil' if overwrite_input_invalid?(file, file_key, bucket_name, key_id)
94
+ def overwrite_file(data, file_key, bucket_name, key_id, options = {})
95
+ raise FileServiceError, 'Invalid input. One or more input values is nil' if overwrite_input_invalid?(data, file_key, bucket_name, key_id)
96
96
  raise FileServiceError, 'Invalid input. file_key cannot be nil if overwriting an existing file' if file_key.nil?
97
97
 
98
- data = file_data(file)
99
98
  raise FileSizeTooLargeError, "File size is larger than maximum allowed size of #{max_file_size}" if data_size_invalid?(data)
100
99
 
101
100
  tempfile = encrypt_file_contents(data, key_id, file_key, options)
@@ -109,7 +108,6 @@ class PorkyLib::FileService
109
108
  # Remove tempfile from disk
110
109
  tempfile.unlink
111
110
  end
112
- deprecate :overwrite_file, :none, 2020, 0o1
113
111
 
114
112
  def presigned_post_url(bucket_name, options = {})
115
113
  file_name = options[:file_name] || SecureRandom.uuid
@@ -11,15 +11,6 @@ module PorkyLib::FileServiceHelper
11
11
  data.bytesize > max_size
12
12
  end
13
13
 
14
- def file_data(file_or_content)
15
- if file?(file_or_content)
16
- read_file(file_or_content)
17
- else
18
- file_or_content
19
- end
20
- end
21
- deprecate :file_data, :none, 2020, 1
22
-
23
14
  def file?(file_or_content)
24
15
  a_file?(file_or_content) || a_path?(file_or_content)
25
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PorkyLib
4
- VERSION = "0.9.3"
4
+ VERSION = "0.9.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: porky_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Fletcher
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2019-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-kms