bfc-lint 0.0.3 → 0.0.4
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 +4 -4
- data/lib/bfc-lint/generator.rb +19 -1
- data/lib/bfc-lint/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9849103c2aa5f4e8cd1b4c173079f4e05c882fb
|
4
|
+
data.tar.gz: ba95f95fc95f96d5a9ceef823bb43936f2bde0cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caf5cfb5bc1504b8c35eaeaf3e2f68ecb68e722feb8a8515547f75dda4686c8772673b347e603f6dfe4fc0b24f16cb1f1a644977be62b95d7ec02a86f989b460
|
7
|
+
data.tar.gz: 579aae22cae800828a9ad4a3bf41a9ac340475f02a621fe30636300c396bd47fedcf5cd722339a42f4584a72e9ba50f460323c28ebe8f84057e3f67e2ecaa3da
|
data/lib/bfc-lint/generator.rb
CHANGED
@@ -11,15 +11,33 @@ module BFCLint
|
|
11
11
|
install_files
|
12
12
|
end
|
13
13
|
|
14
|
+
desc "update", "Update Barefoot linting defaults"
|
15
|
+
def update
|
16
|
+
remove_files
|
17
|
+
install_files
|
18
|
+
end
|
19
|
+
|
14
20
|
private
|
15
21
|
|
16
22
|
def install_files
|
23
|
+
FileUtils.mkdir("lintfiles")
|
17
24
|
all_lint_files.each do |file|
|
18
25
|
puts "Installing #{file}..."
|
19
26
|
file_parts = file.split("/")
|
20
27
|
file_name = '.' + file_parts.last
|
21
|
-
FileUtils.cp(file, file_name)
|
28
|
+
FileUtils.cp(file, "lintfiles/#{file_name}")
|
29
|
+
FileUtils.ln_s("lintfiles/#{file_name}", ".#{file_name}")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def remove_files
|
34
|
+
all_lint_files.each do |file|
|
35
|
+
puts "Removing #{file}..."
|
36
|
+
file_parts = file.split("/")
|
37
|
+
file_name = '.' + file_parts.last
|
38
|
+
FileUtils.rm_rf(".#{file_name}")
|
22
39
|
end
|
40
|
+
FileUtils.rm_rf("lintfiles/")
|
23
41
|
end
|
24
42
|
|
25
43
|
def all_lint_files
|
data/lib/bfc-lint/version.rb
CHANGED