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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f4b2b3c54b65eabf04399a42340e9638cc2786397cfbc9ac23e355690f6749d
4
- data.tar.gz: 601028349dfbc1ae52c2183518a7ce552929e692fbbc4dc44de889860fa6a162
3
+ metadata.gz: 4971ca8cf81caf52a3bb2d54d16cfc509d885d1d7f5ff1624bc3687ef8a90fb6
4
+ data.tar.gz: d93bf7996e39abb8af95667cb5d7a7ac6066644962e7d827a0c11c3e6ba35b59
5
5
  SHA512:
6
- metadata.gz: 8c9139803964451848c0505332c0957007e7a02f6ffe4d28ba7c8ccc5eb8c5d410f08d4b9ed78cfb2bfc6cbd77049cedd7dd23be1a8b24e55e2ba4b5445d5f7e
7
- data.tar.gz: 32c8b44c138b96ab5b4909d2dade0b2cd00aa1c735c8af593e9f2c41f81a63c4953a555b383286c111de38f8d99b8473df9f5fec4b1b6f9e029ebf469de9fc05
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-2018 Jakub Jirutka <jakub@jirutka.cz>.
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://travis-ci.org/jirutka/ruby-beautify2.png?branch=master)](https://travis-ci.org/jirutka/ruby-beautify2)
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
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env ruby
2
+ load File.join(__dir__, 'ruby-beautify')
@@ -1,3 +1,3 @@
1
1
  module RubyBeautify
2
- VERSION = '0.98.0'
2
+ VERSION = '0.98.1'
3
3
  end
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
@@ -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['bin/*'].map { |f| File.basename(f) }
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', '~> 1.16'
20
- s.add_development_dependency 'rake', '~> 12.0'
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.0
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: bin
10
+ bindir: exe
11
11
  cert_chain: []
12
- date: 2018-06-18 00:00:00.000000000 Z
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: '1.16'
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: '1.16'
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: '12.0'
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: '12.0'
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
- - bin/rbeautify
82
- - bin/ruby-beautify
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
- rubyforge_project:
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
File without changes