code-ruby 0.15.12 → 0.15.13

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: ab71cebcf9036058b0aa1e3a6eaf2b09afca6152ca4fc79f4cf42c7bad5168e3
4
- data.tar.gz: 1aab6b0efed936151557b27b4ac5fb66cfa6c5c91c9c9042f9430ed62da1720d
3
+ metadata.gz: d25709cc45c81b913c88e19a5c3981db53a787211b18ed5e0ae9ca562450e98b
4
+ data.tar.gz: 5dda0a4c74c867ab304454519ea27242db1f8b4dbbc9ee48d7bffed8fb1ffba9
5
5
  SHA512:
6
- metadata.gz: 8f495313b944bc0cdf210fee2c19365442192e37131e7a1043f40cebcbe10754dc7c168d575d2d241a45154445bda2e23e2925f52192a97a1bbe1d11dd09b883
7
- data.tar.gz: caef23b5de281011909169a3968c72c95cc9cf20d86825838b40d5ae0efa869ce60aeb86acc2ab78c23dffd5544bd076adc4ad74e85efe2ae2ffe784201fcbb7
6
+ metadata.gz: 605e509a867be495750727afd3059ab4e93f3dd5123c1b0716f3008b77ab8a07dbb29f26e6785b1bbb5f408859f89edaa8efd7d5c65fe893237a591ade7e859d
7
+ data.tar.gz: 04b087fea330fb2e729952d116e8304673ae82696e7fdaeef3e7480dc779cf9b602ad5930c7578b80dfeed4750437d9920d5f49643fb0c987094d30145526ecf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- code-ruby (0.15.12)
4
+ code-ruby (0.15.13)
5
5
  activesupport
6
6
  bigdecimal
7
7
  did-you-mean
data/bin/code CHANGED
@@ -64,7 +64,10 @@ argv =
64
64
  end
65
65
  .parse!
66
66
 
67
- options[:input] = argv.join(" ") if options[:input].empty?
67
+ if options[:input].empty?
68
+ options[:input] = argv.join(" ")
69
+ options[:input] = File.read(options[:input]) if File.exist?(options[:input])
70
+ end
68
71
 
69
72
  abort <<~HELP if options[:input].empty?
70
73
  Usage: code INPUT
data/lib/code/version.rb CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  require_relative "../code"
4
4
 
5
- Code::Version = Gem::Version.new("0.15.12")
5
+ Code::Version = Gem::Version.new("0.15.13")
data/spec/code_spec.rb CHANGED
@@ -323,4 +323,19 @@ RSpec.describe Code do
323
323
  expect(output.string).to eq(expected)
324
324
  end
325
325
  end
326
+
327
+ it "doesn't crash with dictionnary as parameter" do
328
+ Code.evaluate(<<~INPUT)
329
+ [
330
+ {
331
+ videos: [{}]
332
+ },
333
+ {
334
+ videos: [{}]
335
+ }
336
+ ].map do |post|
337
+ post.videos.map { |video| }
338
+ end
339
+ INPUT
340
+ end
326
341
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.12
4
+ version: 0.15.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié