ngxlint 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/ngxlint +10 -0
- data/lib/ngxlint.rb +4 -0
- data/lib/ngxlint/command_line.rb +27 -0
- data/lib/ngxlint/version.rb +4 -0
- metadata +69 -0
data/bin/ngxlint
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require_relative '../lib/ngxlint'
|
3
|
+
module NgxLint
|
4
|
+
CommandLine.run
|
5
|
+
# cmd_line = CommandLine.new(ARGV)
|
6
|
+
# review, status = Linter.check(cmd_line)
|
7
|
+
# printer = cmd_line.show_context? ? ContextOutput.new : SummaryOutput.new
|
8
|
+
# printer.output(review)
|
9
|
+
# exit status.to_i
|
10
|
+
end
|
data/lib/ngxlint.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
module NgxLint
|
2
|
+
|
3
|
+
# Command line parsing.
|
4
|
+
class CommandLine < Clamp::Command
|
5
|
+
|
6
|
+
option "--version", :flag, "Display the ngxlint version."
|
7
|
+
|
8
|
+
# A new NgxLint::Command
|
9
|
+
def initialize(*args)
|
10
|
+
super(*args)
|
11
|
+
end
|
12
|
+
|
13
|
+
# Execute this command.
|
14
|
+
def execute
|
15
|
+
version if version? # --version
|
16
|
+
end
|
17
|
+
|
18
|
+
# The version string.
|
19
|
+
#
|
20
|
+
# @return [String] Current installed version.
|
21
|
+
def version
|
22
|
+
puts "ngxlint #{NgxLint::VERSION}"
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ngxlint
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Michael Pellon
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-10-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: clamp
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - '='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.5.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - '='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.5.0
|
30
|
+
description: Lint tool for Nginx configs.
|
31
|
+
email:
|
32
|
+
executables:
|
33
|
+
- ngxlint
|
34
|
+
extensions: []
|
35
|
+
extra_rdoc_files: []
|
36
|
+
files:
|
37
|
+
- lib/ngxlint/command_line.rb
|
38
|
+
- lib/ngxlint/version.rb
|
39
|
+
- lib/ngxlint.rb
|
40
|
+
- bin/ngxlint
|
41
|
+
homepage: ''
|
42
|
+
licenses:
|
43
|
+
- ISC
|
44
|
+
post_install_message:
|
45
|
+
rdoc_options: []
|
46
|
+
require_paths:
|
47
|
+
- lib
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.9.2
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ! '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
hash: -3855245616088461058
|
63
|
+
requirements: []
|
64
|
+
rubyforge_project:
|
65
|
+
rubygems_version: 1.8.23
|
66
|
+
signing_key:
|
67
|
+
specification_version: 3
|
68
|
+
summary: ngxlint-0.1.0
|
69
|
+
test_files: []
|