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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb7297851cfd008ee3599e64f49212fb3545dccf
4
- data.tar.gz: 4a9dbf15bd94c8f8c8cfddc972f9b31bd20ce362
3
+ metadata.gz: d9849103c2aa5f4e8cd1b4c173079f4e05c882fb
4
+ data.tar.gz: ba95f95fc95f96d5a9ceef823bb43936f2bde0cb
5
5
  SHA512:
6
- metadata.gz: 0369da3a2ab63391fd3a8b1b4d4010c972fcecbb28669d795e90342e5c9b9f003f9a3c61325e938e0bfd5631ccbd14d0aa6d6360811990e1c7e3169c425ec3c1
7
- data.tar.gz: 34b005d7ed27bf87fd6797b3219aa404ca95fa4170504ee4fbd35bf514f63263bcdfef9fe1ced089919dc95174d3af07c335d5ecbdf991ff9a8fb9670be4cb2e
6
+ metadata.gz: caf5cfb5bc1504b8c35eaeaf3e2f68ecb68e722feb8a8515547f75dda4686c8772673b347e603f6dfe4fc0b24f16cb1f1a644977be62b95d7ec02a86f989b460
7
+ data.tar.gz: 579aae22cae800828a9ad4a3bf41a9ac340475f02a621fe30636300c396bd47fedcf5cd722339a42f4584a72e9ba50f460323c28ebe8f84057e3f67e2ecaa3da
@@ -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
@@ -1,3 +1,3 @@
1
1
  module BFCLint
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bfc-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Berlinsky