cased-ruby 0.4.6 → 0.4.7

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: a98d48b740d571c68ad950fe60ecd5af5126fa9567b80030c50bc9cf3f7428c3
4
- data.tar.gz: b1fdbda8126943f5421176269d42d60144425790c22d57179abe6cf892e99cb6
3
+ metadata.gz: 4592facfed9641c5f262e1c82905e77b8ba687cf3a32e056688a7521573ea3ca
4
+ data.tar.gz: bb5c406b6423b618a0ad9c6356fcfe4e67cfce24c80fc97951aea1cbb846f138
5
5
  SHA512:
6
- metadata.gz: b519bd5dac037cc8ae8c5e795f44d658f44f44ad879e0456e1368dd18378323e5e9f4c8c8ea2e23a12958c4acc7c4c78a0b18afc95a57b6b78be8fe535bbfb0a
7
- data.tar.gz: 9ce3b66f202ea6b431ae70d28cc4c22327eb4c5b25ac100a320a733964d91c08b139ecc75fbf4a5932f3603cc796983b9a9de39d68a80c54c80ada772bc7f3c3
6
+ metadata.gz: 86d308c4698823a52959e7fcd32f62c4d023539162fea109d4c893f524e43bb57a845140a21a8177c2e2c1c0fbde5e58832ec8637383b4ea76db0e6f49605ad5
7
+ data.tar.gz: fe135b92df5a2987e01f2b8272af7b45479bc59ea9a73c35c246602c4ffe7b0e42bd766049b4867d574c14113b5fb83ff515f9e1ad62027a4a1aa347e0a1eb87
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cased-ruby (0.4.6)
4
+ cased-ruby (0.4.7)
5
5
  activesupport (~> 6)
6
6
  dotpath (= 0.1.0)
7
7
  faraday (~> 1.0)
@@ -15,12 +15,17 @@ module Cased
15
15
  end
16
16
 
17
17
  def self.from_cast(cast)
18
+ return if cast.blank?
19
+
18
20
  stream = cast.split("\n").collect do |data|
19
21
  JSON.parse(data)
20
22
  end
21
23
  header = stream.shift
24
+ return unless header.is_a?(Hash)
22
25
 
23
26
  new(header, stream)
27
+ rescue JSON::ParserError
28
+ nil
24
29
  end
25
30
 
26
31
  # Required
data/lib/cased/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cased
4
- VERSION = '0.4.6'
4
+ VERSION = '0.4.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cased-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garrett Bjerkhoel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-09 00:00:00.000000000 Z
11
+ date: 2021-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport