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 +4 -4
- data/Gemfile +0 -3
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/bin/dorian +2 -27
- data/lib/dorian/bin.rb +2 -1
- data/samples/people.csv +0 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5be546b017e86ccac1da3edf4b8a9f5335c11aa07643923d76468ff4e654777b
|
4
|
+
data.tar.gz: fda136a48bba0661d9534b83d1f6eeaeedcab109169ddfdc56ddf236ce4a2033
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
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
|
-
|
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
|
-
|
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