yaml-lint 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/bin/yaml-lint +10 -6
  3. data/lib/yaml-lint.rb +4 -0
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzBkMTg3YjFhODU5YjllMWYwY2U2NDM2NTgxMDgzNWRjNjY1YjlmZQ==
4
+ OTAxYTk0NjJkZjM2NzUwOTllY2UyYjM2MGNkYTVlNmJjMGU2NzcyNg==
5
5
  data.tar.gz: !binary |-
6
- OGI5OTk3Mjg5YjU1ZDNmMzNiYmMxODRkNDAzZWUyMzEwNzE3Njk1NA==
6
+ M2FhMDAyYWEwNzlhNDhhNzdkN2EzNWMyNGRkOTU5OTlmOWVkMDBjYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzEyODNmYTNkMWQ5ODk1YmZhYjFhNDUxZGY3MWEyM2NkOTExZmE2M2Q1ZWNh
10
- ZTcyYWI4NTJjYzFkYmVhNGI1YjQ1ZTIyMmE3OGJmMjhmNThmYWY3MTk5ZDNk
11
- YzFhODNhNzc1MjUxMjAwOGQ1NmQwNTI0YTI3NjQzMjM0NmE1YTM=
9
+ NDhiZDgyY2JkNWE4NjJmNjYwMjI0ZmIwN2VlMTNiNzhiNDRkMjA5YjU0MDU0
10
+ ZWJjOGZmNmQ3M2E3OTBiMTI3OWFlOGMxNzYxMmFkZjk3MWVhMWUxMzc1Nzdh
11
+ NDgwZmZhNTRhMTY5YzMzYjc4YWI2ZDgwZDk0ZTU3MjhhZmZhYzc=
12
12
  data.tar.gz: !binary |-
13
- MTgwZjY5M2Y2OGY1NTQ0NzFhYWMwMGNkYWQ2MzE4ZDg1YmIxYjI1OTk4NWI1
14
- ZmE3OTBjNWY5NmZlMTQ2NjM4ZjliZTAwNDQwOGZmZjFmN2UxYjliYTY5ZTE3
15
- MWU4MTIxZTU2ZGFhMGUzZjU2OGJmM2E1NTViMDMwM2JiYzI0YjU=
13
+ YTI2ZTk4OGUzZTM3YmE2MTI0N2NjNDJiMWY2ZmNlZDI2ZTk3YzY5ZTg1YWYy
14
+ YTg1YjU4YzZlMGYxZmMwNWNlMWMyOTFjZjMzYjE4MDc0ZmE1YjQ5MTk4NjFj
15
+ M2MwMDc4Mzk1ODRhNmE5NWVhMmM4NzlhNWYxMjVmYjU2ZGY4MDc=
@@ -3,16 +3,16 @@
3
3
  require 'yaml'
4
4
  require 'optparse'
5
5
 
6
- begin
7
- require 'yaml-lint'
8
- rescue LoadError
6
+ #begin
7
+ # require 'yaml-lint'
8
+ #rescue LoadError
9
9
  $: << File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
10
10
  require 'yaml-lint'
11
- end
11
+ #end
12
12
 
13
13
  options = {}
14
14
  OptionParser.new do |opts|
15
- opts.banner = "Usage: yaml-lint <file(s) or folder(s)>"
15
+ opts.banner = "Usage: yaml-lint [options] <file(s) or folder(s)>"
16
16
 
17
17
  opts.on("-q", "--quiet", "Run quiet. Only log failing files.") do |q|
18
18
  options[:quiet] = q
@@ -25,9 +25,13 @@ OptionParser.new do |opts|
25
25
  options[:nocheckfileext] = true
26
26
  end
27
27
 
28
+ opts.on("-i", "--ignore-non-yaml-files", "Ignoring non-yaml files.") do |n|
29
+ options[:ignorenoyaml] = true
30
+ end
31
+
28
32
  opts.on_tail("-h", "--help") do |q|
29
33
  puts 'yaml-lint is a tool to check the syntax of your YAML files'
30
- puts 'Usage: yaml-lint <file(s) or folder(s)>'
34
+ puts opts
31
35
  exit -1
32
36
  end
33
37
  end.parse!
@@ -65,6 +65,10 @@ class YamlLint
65
65
 
66
66
  def parse_file(file)
67
67
  if (not File.extname(file) =~ /.(yaml|yml)$/) && (not @config[:nocheckfileext])
68
+ if @config[:ignorenoyaml]
69
+ info "File : #{file}, Ignored"
70
+ return 0
71
+ end
68
72
  error "The extension of the file #{file} should be .yaml or .yml"
69
73
  return 1
70
74
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Fabre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-16 00:00:00.000000000 Z
11
+ date: 2016-06-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Check if your YAML files can be loaded.
14
14
  email: ju.pryz@gmail.com
@@ -39,9 +39,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
39
  version: '0'
40
40
  requirements: []
41
41
  rubyforge_project:
42
- rubygems_version: 2.4.5
42
+ rubygems_version: 2.5.1
43
43
  signing_key:
44
44
  specification_version: 4
45
45
  summary: Really simple YAML lint
46
46
  test_files: []
47
- has_rdoc: