linterbot 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/linterbot +2 -0
- data/lib/linterbot/runner_configuration.rb +9 -3
- data/lib/linterbot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c2e9bd02e15964967d9c7006c8069ece73e5e67
|
4
|
+
data.tar.gz: 2034fbd20f8876edd421ecca00a001f96ba99a65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c776bac236b0e9954ae61411fb3fcff3682dcc208c350a69cf2ac9925efb6de0110136d527fbfe164a777ebb928b451d91be5c319cf136dd3f10f350299b8dd7
|
7
|
+
data.tar.gz: 502c31793d29772ede43f838cf0673f5059633aa56e9075469a6d25560726db5edcf8aa8b7d2d1fa79ebfecb9cb1296e98e286d419fcc1bd3c8c609e437d678b
|
data/exe/linterbot
CHANGED
@@ -41,7 +41,9 @@ command :run do |c|
|
|
41
41
|
begin
|
42
42
|
configuration = Linterbot::RunnerConfiguration.configuration!(options)
|
43
43
|
runner = Linterbot::Runner.new(configuration)
|
44
|
+
puts "Running linterbot for '#{repository}##{pull_request_number}' ..."
|
44
45
|
runner.run(repository, pull_request_number)
|
46
|
+
puts "Linterbot has successfully reviewed your PR ;-)"
|
45
47
|
rescue Linterbot::RunnerConfiguration::MissingAttribute => exception
|
46
48
|
STDERR.puts "Missing configuration attribute '#{exception.attribute_name}'"
|
47
49
|
STDERR.puts "#{exception.fix_description}"
|
@@ -39,11 +39,17 @@ module Linterbot
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def load_config_file(config_file_path)
|
42
|
-
|
43
|
-
|
42
|
+
return {} unless File.exist?(config_file_path)
|
43
|
+
file_content = File.read(config_file_path)
|
44
|
+
config = YAML.load(file_content)
|
45
|
+
# YAML.load retunrs false if file could not be parsed
|
46
|
+
# for example in the case of an empty file.
|
47
|
+
if config
|
44
48
|
Hash[config.each.map { |key, value| [key.to_sym, value] }]
|
45
49
|
else
|
46
|
-
{}
|
50
|
+
STDERR.puts "WARNING: Linterbot configuration file '#{config_file_path}' " \
|
51
|
+
"has been ignored because is not a valid YAML file."
|
52
|
+
return {}
|
47
53
|
end
|
48
54
|
end
|
49
55
|
|
data/lib/linterbot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linterbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guido Marucci Blas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|