rubocopfmt 0.1.0.beta3 → 0.1.0.beta4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 670799ba9de4c1e7446930905a3decb4212e6ae9
4
- data.tar.gz: 2f02bc7f06cad9d23c8f74dc476d53d50cad8d77
3
+ metadata.gz: 4caf033607e3f55dc1e4dce78e4f5ffeded58566
4
+ data.tar.gz: ef5a0d55ffa56e6e2103dfdbb6e90aeffb0d731b
5
5
  SHA512:
6
- metadata.gz: 3c64289852893568c1eefb3edff608ca6e70cfc84436e789dcbabd5f01ca2d7bbf9cc3adc7eede5973af4e0ded3559147afe51077045d10b881532fc8310b442
7
- data.tar.gz: 580314ca1bb4c094313d002bc8d522f315c6bdb11831640358cd3696ca56f55f2e271c2374d7e1571a7ea72222ea3eacce3c1bbcc29c967b2278cec6a9f8b07c
6
+ metadata.gz: 3d8618a439c6691bf5b52ecdee3a9e67513985d5dc5364c3e1d185d80c9b3dd9285422763e20ced467efac3de92eb22f10c72cf38b4b17f5e357da1a5984c16c
7
+ data.tar.gz: 7205b46d71e7fc7382bfe4baa5599003ed769a6250243827f6b45b9acf49f2f56b8aa1726a9efb4afbcd4654a4bcd989d7ed2ad4fcd22a6f2fffc62c659ea78f
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ Documentation:
2
+ Enabled: false
3
+
4
+ Style/HashSyntax:
5
+ EnforcedStyle: ruby19_no_mixed_keys
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
@@ -1,6 +1,6 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "rubocopfmt"
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 "irb"
13
+ require 'irb'
14
14
  IRB.start
@@ -48,7 +48,9 @@ module RuboCopFMT
48
48
 
49
49
  def print_diff_of_corrections
50
50
  for_corrected_source do |source|
51
- puts "diff #{source.path} rubocopfmt/#{source.path}" if source.path
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
@@ -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
- return FORMATS[format.downcase.to_sym] if format
37
- FORMATS[DEFAULT_FORMAT]
36
+ format ? FORMATS[format.downcase.to_sym] : DEFAULT_FORMAT
38
37
  end
39
38
  end
40
39
  end
@@ -1,3 +1,3 @@
1
1
  module RuboCopFMT
2
- VERSION = '0.1.0.beta3'.freeze
2
+ VERSION = '0.1.0.beta4'.freeze
3
3
  end
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.beta3
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-08 00:00:00.000000000 Z
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