Skip to content

Commit

Permalink
rubocop is clean.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfaller committed Oct 20, 2016
1 parent b7f0d00 commit 1689cff
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -11,6 +11,7 @@
/test/version_tmp/
/tmp/
.vagrant/
.Vagrantfile.swp

tags

Expand Down
13 changes: 13 additions & 0 deletions .rubocop.yml
Expand Up @@ -10,6 +10,16 @@ ModuleLength:
Metrics/LineLength:
Max: 120

Metrics/BlockLength:
CountComments: false # count full line comments?
Max: 25
Exclude:
- 'Rakefile'
- '**/*.rake'
- '*.gemspec'
- 'spec/**/*.rb'
- 'bin/dgit'

Metrics/ClassLength:
Max: 200

Expand All @@ -25,6 +35,9 @@ Style/Tab:
Style/IndentationWidth:
Enabled: false

Style/MethodMissing:
Enabled: false

Style/StringLiterals:
Enabled: false

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -24,5 +24,5 @@ begin
RuboCop::RakeTask.new(:rubocop)
RSpec::Core::RakeTask.new(:spec)

task default: [:spec, :rubocop]
task default: [:rubocop, :spec]
end
19 changes: 19 additions & 0 deletions Vagrantfile
@@ -1,3 +1,22 @@
# encoding: utf-8
#
# This file is part of Diggit.
#
# Diggit is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Diggit is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Diggit. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright 2015 Jean-Rémy Falleri <jr.falleri@gmail.com>

# -*- mode: ruby -*-
# vi: set ft=ruby :

Expand Down
11 changes: 5 additions & 6 deletions lib/dgit/core.rb
Expand Up @@ -334,12 +334,11 @@ def self.init_dir(folder = '.')
Oj.to_file(File.expand_path(DGIT_JOURNAL, dgit_folder), Journal.new)
end
FileUtils.mkdir(File.expand_path('sources', folder)) unless File.exist?(File.expand_path('sources', folder))
unless File.exist?(File.expand_path("plugins", folder))
FileUtils.mkdir_p(File.expand_path("plugins", folder))
FileUtils.mkdir_p(File.expand_path("plugins/analysis", folder))
FileUtils.mkdir_p(File.expand_path("plugins/addon", folder))
FileUtils.mkdir_p(File.expand_path("plugins/join", folder))
end
return if File.exist?(File.expand_path("plugins", folder))
FileUtils.mkdir_p(File.expand_path("plugins", folder))
FileUtils.mkdir_p(File.expand_path("plugins/analysis", folder))
FileUtils.mkdir_p(File.expand_path("plugins/addon", folder))
FileUtils.mkdir_p(File.expand_path("plugins/join", folder))
end

# Return the path of the given config file
Expand Down

0 comments on commit 1689cff

Please sign in to comment.