ruby-beautify 0.97.1 → 0.97.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/WHATSNEW.md +3 -0
- data/bin/rbeautify +1 -1
- data/bin/ruby-beautify +1 -1
- data/lib/ruby-beautify/version.rb +1 -1
- data/spec/lib/ruby-beautify_spec.rb +24 -0
- data/spec/usage_scenarios/pre_indented_pretty_space.rb +12 -0
- metadata +18 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95b3bdeb89a34b2183b43d667c71c8ce3e95c6e4
|
4
|
+
data.tar.gz: b4d4147b1c41919ce93522b0489c3dcd1e958461
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 892a887b34598ab7918c33efe425f61a268ac8ca30f405ae887456187e5efe37b3b0593f421416cfd83248f2cbd0597c4b07f2c88b5fa72d97d55ae9b0c5d832
|
7
|
+
data.tar.gz: e352c5f70a78c3c11ae9cfbd1cd4779218c9ab07eb21c7be46ab74543df45776cf36eb82ce3550d3c8be0a32e51abcdf681ed9b213fbe6efa2a87a38b48a8f5f
|
data/WHATSNEW.md
CHANGED
data/bin/rbeautify
CHANGED
data/bin/ruby-beautify
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper.rb'
|
2
|
+
|
3
|
+
# unit tests suck. But I do want to make sure this one function behaves as expected.
|
4
|
+
# it simplifies the rest of the testing process (by not requiring multiple passes of each scenario).
|
5
|
+
describe "Ruby Beautify Library" do
|
6
|
+
before :all do
|
7
|
+
@ugly_string = File.open('spec/usage_scenarios/pre_indented.rb').read
|
8
|
+
@pretty_string = File.open('spec/usage_scenarios/pre_indented_pretty.rb').read
|
9
|
+
@pretty_string_tabs = @pretty_string.gsub("\t", "\t\t")
|
10
|
+
@pretty_string_space = File.open('spec/usage_scenarios/pre_indented_pretty_space.rb').read
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "#pretty_string" do
|
14
|
+
it "will indent by tab ( by default )" do
|
15
|
+
expect(RubyBeautify.pretty_string(@ugly_string)).to eq @pretty_string
|
16
|
+
end
|
17
|
+
it "will indent by space" do
|
18
|
+
expect(RubyBeautify.pretty_string(@ugly_string, indent_token:' ')).to eq @pretty_string_space
|
19
|
+
end
|
20
|
+
it "will honor indent count" do
|
21
|
+
expect(RubyBeautify.pretty_string(@ugly_string)).to eq @pretty_string
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-beautify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.97.
|
4
|
+
version: 0.97.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ernie Brodeur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: a cli tool (and module) to beautify ruby code.
|
@@ -60,9 +60,9 @@ executables:
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
-
- .gitignore
|
64
|
-
- .rspec
|
65
|
-
- .travis.yml
|
63
|
+
- ".gitignore"
|
64
|
+
- ".rspec"
|
65
|
+
- ".travis.yml"
|
66
66
|
- CONTRIB.md
|
67
67
|
- Gemfile
|
68
68
|
- Guardfile
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- spec/binary_scenarios/small_example.rb
|
85
85
|
- spec/binary_scenarios/spaces_after.rb
|
86
86
|
- spec/binary_scenarios/spaces_before.rb
|
87
|
+
- spec/lib/ruby-beautify_spec.rb
|
87
88
|
- spec/ruby-beautify.dotfile
|
88
89
|
- spec/spec_helper.rb
|
89
90
|
- spec/usage_scenarios/README.md
|
@@ -101,6 +102,7 @@ files:
|
|
101
102
|
- spec/usage_scenarios/or_equals_pretty.rb
|
102
103
|
- spec/usage_scenarios/pre_indented.rb
|
103
104
|
- spec/usage_scenarios/pre_indented_pretty.rb
|
105
|
+
- spec/usage_scenarios/pre_indented_pretty_space.rb
|
104
106
|
- spec/usage_scenarios_spec.rb
|
105
107
|
homepage: https://github.com/erniebrodeur/ruby-beautify
|
106
108
|
licenses: []
|
@@ -111,17 +113,17 @@ require_paths:
|
|
111
113
|
- lib
|
112
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
113
115
|
requirements:
|
114
|
-
- -
|
116
|
+
- - ">="
|
115
117
|
- !ruby/object:Gem::Version
|
116
118
|
version: '2.0'
|
117
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
120
|
requirements:
|
119
|
-
- -
|
121
|
+
- - ">="
|
120
122
|
- !ruby/object:Gem::Version
|
121
123
|
version: '0'
|
122
124
|
requirements: []
|
123
125
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.2.2
|
125
127
|
signing_key:
|
126
128
|
specification_version: 4
|
127
129
|
summary: a cli tool (and module) to beautify ruby code.
|
@@ -135,6 +137,7 @@ test_files:
|
|
135
137
|
- spec/binary_scenarios/small_example.rb
|
136
138
|
- spec/binary_scenarios/spaces_after.rb
|
137
139
|
- spec/binary_scenarios/spaces_before.rb
|
140
|
+
- spec/lib/ruby-beautify_spec.rb
|
138
141
|
- spec/ruby-beautify.dotfile
|
139
142
|
- spec/spec_helper.rb
|
140
143
|
- spec/usage_scenarios/README.md
|
@@ -152,4 +155,5 @@ test_files:
|
|
152
155
|
- spec/usage_scenarios/or_equals_pretty.rb
|
153
156
|
- spec/usage_scenarios/pre_indented.rb
|
154
157
|
- spec/usage_scenarios/pre_indented_pretty.rb
|
158
|
+
- spec/usage_scenarios/pre_indented_pretty_space.rb
|
155
159
|
- spec/usage_scenarios_spec.rb
|