dorian 2.5.2 → 2.6.0

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: 1dcd07e19e424772b965202cc544ba7d4bf8c0670c792c79b5678b50f546a5a7
4
- data.tar.gz: b2f8d9bde82e265fee6aa29dfce68535322b32ffdda2388d86ee9163a544902c
3
+ metadata.gz: 5be546b017e86ccac1da3edf4b8a9f5335c11aa07643923d76468ff4e654777b
4
+ data.tar.gz: fda136a48bba0661d9534b83d1f6eeaeedcab109169ddfdc56ddf236ce4a2033
5
5
  SHA512:
6
- metadata.gz: db846256d0dc2b5d4c7e44b560b1f4b0977cb7aa31b5fc965e10b61ac99f4ed4bd62f36bd9deb9c7b1f63c303119c730286be6c7009c95c3e28c048599a022cc
7
- data.tar.gz: 353d55f6a0221ddd6c75485a452a26f1ffb64bcc7077aa6947d911e90c9847037531f156a99c3b54fa797cb0677ded9b8d57050bbebf0834025c9c13359d3a7c
6
+ metadata.gz: abe42d9852fa499b1fb7145d6e2a8ad302da867c0ce43a63409cf5bed80a22bcc614fe1cf72920715e274de96d5d3e5442a31774a4f1c78b6d26c73801f91a77
7
+ data.tar.gz: b846a7389a51627f1d8701f05cd908b57e452196edf1e3905bfb41b21a30752677757547c5fbfd17621f403080dca69e999efc1a887cf2e5aa4e8f13384bcbae
data/Gemfile CHANGED
@@ -7,14 +7,11 @@ gemspec
7
7
  ruby "3.3.5"
8
8
 
9
9
  gem "rspec"
10
-
11
10
  gem "bundler-audit"
12
-
13
11
  gem "rubocop-factory_bot"
14
12
  gem "rubocop-performance"
15
13
  gem "rubocop-rails"
16
14
  gem "rubocop-rake"
17
15
  gem "rubocop-rspec"
18
16
  gem "rubocop-rspec_rails"
19
-
20
17
  gem "rubocop-capybara"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dorian (2.5.2)
4
+ dorian (2.6.0)
5
5
  csv
6
6
  dorian-arguments
7
7
  dorian-eval
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.2
1
+ 2.6.0
data/bin/dorian CHANGED
@@ -1,31 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'dorian' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
4
+ require_relative "../lib/dorian/bin"
10
5
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
-
13
- bundle_binstub = File.expand_path("bundle", __dir__)
14
-
15
- if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300).include?(
17
- "This file was generated by Bundler"
18
- )
19
- load(bundle_binstub)
20
- else
21
- abort(
22
- "Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
23
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again."
24
- )
25
- end
26
- end
27
-
28
- require "rubygems"
29
- require "bundler/setup"
30
-
31
- load Gem.bin_path("dorian", "dorian")
6
+ Dorian::Bin.run
data/lib/dorian/bin.rb CHANGED
@@ -16,6 +16,7 @@ require "syntax_tree"
16
16
  require "syntax_tree/erb"
17
17
  require "syntax_tree/haml"
18
18
  require "syntax_tree/xml"
19
+ require "syntax_tree/json"
19
20
  require "tempfile"
20
21
  require "terminal-table"
21
22
  require "uri"
@@ -1591,7 +1592,7 @@ class Dorian
1591
1592
  "#{before.lines.map { |line| JSON.parse(line).to_json }.join("\n")}\n"
1592
1593
  when :csv
1593
1594
  after =
1594
- "#{CSV.generate { |csv| CSV.parse(before).each { |row| csv << row } }}\n"
1595
+ CSV.generate { |csv| CSV.parse(before).each { |row| csv << row } }
1595
1596
  when :yaml
1596
1597
  after = sort(YAML.safe_load(before)).to_yaml
1597
1598
  when :yamll
data/samples/people.csv CHANGED
@@ -4,4 +4,3 @@ Bob,25,Los Angeles,Designer
4
4
  Charlie,35,Chicago,Teacher
5
5
  Diana,28,Miami,Developer
6
6
  Edward,40,San Francisco,Manager
7
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorian
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié