rubocopfmt 0.1.0.beta3 → 0.1.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/README.md +1 -1
- data/Rakefile +3 -3
- data/bin/console +3 -3
- data/lib/rubocopfmt/cli.rb +3 -1
- data/lib/rubocopfmt/diff.rb +2 -3
- data/lib/rubocopfmt/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4caf033607e3f55dc1e4dce78e4f5ffeded58566
|
4
|
+
data.tar.gz: ef5a0d55ffa56e6e2103dfdbb6e90aeffb0d731b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d8618a439c6691bf5b52ecdee3a9e67513985d5dc5364c3e1d185d80c9b3dd9285422763e20ced467efac3de92eb22f10c72cf38b4b17f5e357da1a5984c16c
|
7
|
+
data.tar.gz: 7205b46d71e7fc7382bfe4baa5599003ed769a6250243827f6b45b9acf49f2f56b8aa1726a9efb4afbcd4654a4bcd989d7ed2ad4fcd22a6f2fffc62c659ea78f
|
data/.rubocop.yml
ADDED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# rubocopfmt [![Build Status](https://api.travis-ci.org/jimeh/rubocopfmt.svg)](https://travis-ci.org/jimeh/rubocopfmt)
|
1
|
+
# rubocopfmt [![Gem Version](https://badge.fury.io/rb/rubocopfmt.svg)](https://badge.fury.io/rb/rubocopfmt) [![Build Status](https://api.travis-ci.org/jimeh/rubocopfmt.svg)](https://travis-ci.org/jimeh/rubocopfmt)
|
2
2
|
|
3
3
|
Easy formatting of Ruby code
|
4
4
|
using [RuboCop](https://github.com/bbatsov/rubocop). Analogous
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'rubocopfmt'
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +10,5 @@ require "rubocopfmt"
|
|
10
10
|
# require "pry"
|
11
11
|
# Pry.start
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'irb'
|
14
14
|
IRB.start
|
data/lib/rubocopfmt/cli.rb
CHANGED
@@ -48,7 +48,9 @@ module RuboCopFMT
|
|
48
48
|
|
49
49
|
def print_diff_of_corrections
|
50
50
|
for_corrected_source do |source|
|
51
|
-
|
51
|
+
if source.path && sources.size > 1
|
52
|
+
puts "diff #{source.path} rubocopfmt/#{source.path}"
|
53
|
+
end
|
52
54
|
puts diff_source(source)
|
53
55
|
end
|
54
56
|
end
|
data/lib/rubocopfmt/diff.rb
CHANGED
@@ -8,7 +8,7 @@ module RuboCopFMT
|
|
8
8
|
context: '-C 3'
|
9
9
|
}.freeze
|
10
10
|
|
11
|
-
DEFAULT_FORMAT = :unified
|
11
|
+
DEFAULT_FORMAT = FORMATS[:unified]
|
12
12
|
|
13
13
|
attr_reader :source
|
14
14
|
|
@@ -33,8 +33,7 @@ module RuboCopFMT
|
|
33
33
|
private
|
34
34
|
|
35
35
|
def diff_opts(format = nil)
|
36
|
-
|
37
|
-
FORMATS[DEFAULT_FORMAT]
|
36
|
+
format ? FORMATS[format.downcase.to_sym] : DEFAULT_FORMAT
|
38
37
|
end
|
39
38
|
end
|
40
39
|
end
|
data/lib/rubocopfmt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocopfmt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Myhrberg
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -118,6 +118,7 @@ extra_rdoc_files: []
|
|
118
118
|
files:
|
119
119
|
- ".gitignore"
|
120
120
|
- ".rspec"
|
121
|
+
- ".rubocop.yml"
|
121
122
|
- ".travis.yml"
|
122
123
|
- Gemfile
|
123
124
|
- LICENSE
|