ruby-beautify2 0.98.0 → 0.98.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/exe/rbeautify +2 -0
- data/lib/ruby-beautify/version.rb +1 -1
- data/lib/ruby-beautify.rb +5 -1
- data/ruby-beautify2.gemspec +4 -3
- metadata +10 -11
- data/bin/rbeautify +0 -1
- /data/{bin → exe}/ruby-beautify +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4971ca8cf81caf52a3bb2d54d16cfc509d885d1d7f5ff1624bc3687ef8a90fb6
|
4
|
+
data.tar.gz: d93bf7996e39abb8af95667cb5d7a7ac6066644962e7d827a0c11c3e6ba35b59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 346e5767aaad37fb07ccd6cac3cc3ac3781274ff9ce1a98dcc425f9950e77fc60db8c3941f66364683b1919ab944bffeb6dc61c80ffbc62e62de80b31e414e2a
|
7
|
+
data.tar.gz: b5d5b93ee503bc941dda84145747605fc6b53ff10ad99bbae931a9606f1b4a619e8f34964a103a2819a02a3a05af08680f9c683d4d87833adcdeddbbbced70e2
|
data/LICENSE
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
The MIT License
|
2
2
|
|
3
3
|
Copyright (c) 2012-2016 Ernie Brodeur.
|
4
|
-
Copyright (c) 2017-
|
4
|
+
Copyright (c) 2017-present Jakub Jirutka <jakub@jirutka.cz>.
|
5
5
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining
|
7
7
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Beautify
|
2
2
|
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://github.com/jirutka/ruby-beautify2/workflows/CI/badge.svg)](https://github.com/jirutka/ruby-beautify2/actions?query=workflow%3A%22CI%22)
|
4
4
|
|
5
5
|
This gem provides a cli binary named 'ruby-beautify' that will pretty up ruby code.
|
6
6
|
|
data/exe/rbeautify
ADDED
data/lib/ruby-beautify.rb
CHANGED
@@ -25,8 +25,12 @@ module RubyBeautify
|
|
25
25
|
# walk through line tokens
|
26
26
|
lex.each do |token|
|
27
27
|
line_lex << token
|
28
|
-
if NEW_LINES.include? token[1] # if type of this token is a new line
|
29
28
|
|
29
|
+
if token[1] == :on_heredoc_end
|
30
|
+
output_string << line_lex.map {|l| l[2]}.join
|
31
|
+
line_lex.clear
|
32
|
+
|
33
|
+
elsif NEW_LINES.include? token[1] # if type of this token is a new line
|
30
34
|
# did we just close something? if so, lets bring it down a level.
|
31
35
|
if closing_block?(line_lex) || closing_assignment?(line_lex)
|
32
36
|
indent_level -= 1 if indent_level > 0
|
data/ruby-beautify2.gemspec
CHANGED
@@ -12,12 +12,13 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.description = "#{s.summary}. This is a maintained fork of the original ruby-beautify."
|
13
13
|
|
14
14
|
s.files = Dir['lib/**/*', '*.gemspec', 'LICENSE*', 'README*']
|
15
|
-
s.executables = Dir['
|
15
|
+
s.executables = Dir['exe/*'].map { |f| File.basename(f) }
|
16
|
+
s.bindir = 'exe'
|
16
17
|
|
17
18
|
s.required_ruby_version = '>= 2.0'
|
18
19
|
|
19
|
-
s.add_development_dependency 'bundler', '~>
|
20
|
-
s.add_development_dependency 'rake', '~>
|
20
|
+
s.add_development_dependency 'bundler', '~> 2.0'
|
21
|
+
s.add_development_dependency 'rake', '~> 13.0'
|
21
22
|
s.add_development_dependency 'rspec', '~> 3.7'
|
22
23
|
s.add_development_dependency 'simplecov', '~> 0.15'
|
23
24
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-beautify2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.98.
|
4
|
+
version: 0.98.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub Jirutka
|
8
8
|
- Ernie Brodeur
|
9
9
|
autorequire:
|
10
|
-
bindir:
|
10
|
+
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-07-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '2.0'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '2.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '13.0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '13.0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rspec
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,8 +78,8 @@ extra_rdoc_files: []
|
|
78
78
|
files:
|
79
79
|
- LICENSE
|
80
80
|
- README.md
|
81
|
-
-
|
82
|
-
-
|
81
|
+
- exe/rbeautify
|
82
|
+
- exe/ruby-beautify
|
83
83
|
- lib/ruby-beautify.rb
|
84
84
|
- lib/ruby-beautify/version.rb
|
85
85
|
- ruby-beautify2.gemspec
|
@@ -102,8 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
|
-
|
106
|
-
rubygems_version: 2.7.3
|
105
|
+
rubygems_version: 3.4.10
|
107
106
|
signing_key:
|
108
107
|
specification_version: 4
|
109
108
|
summary: A CLI tool (and module) to beautify Ruby code
|
data/bin/rbeautify
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
bin/ruby-beautify
|
/data/{bin → exe}/ruby-beautify
RENAMED
File without changes
|