bonobot 0.0.2 → 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/bonobot/status.rb +15 -9
- data/lib/bonobot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60d190ca5c05e4d29f7622276e6f387e53b06b87de3bfed7ed31446ac28b2fd9
|
4
|
+
data.tar.gz: 8a900dfeb52e73e177d02363e98ce429e0012a94f0d184048208968d9841dbbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c72443158105126ae949850fcb70a588517837344c1b6cc4da90400da3e227dc44acb2bed7caf614fb64b9455739091882ae07177783b2a41aea6afbd5a9bd8
|
7
|
+
data.tar.gz: 31a93680b3b218ebda245eeeb1b97717bdc92e95727042523f85ae599b559635305bc030f996525bc70c76341e12304c2fd3b1a8ff42a4eee74a331c5d1a0540
|
data/lib/bonobot/status.rb
CHANGED
@@ -5,38 +5,44 @@ require "json"
|
|
5
5
|
module Bonobot
|
6
6
|
class Status
|
7
7
|
def self.generate
|
8
|
-
puts "
|
8
|
+
puts "-----"
|
9
9
|
puts "🙈 🙉 🙊 Bonobot 🙈 🙉 🙊"
|
10
10
|
puts "-----"
|
11
|
-
puts "🛠 Generating status
|
11
|
+
puts "🛠 Generating status"
|
12
12
|
File.write("status.json", JSON.pretty_generate({ rails_files: rails_files, engines_files: engines_files, overloads: overloads }))
|
13
13
|
puts File.expand_path("status.json")
|
14
14
|
puts "-----"
|
15
15
|
|
16
16
|
unless up_to_date.empty?
|
17
17
|
puts "🥳 Up to date fingerprint count: #{up_to_date.count}"
|
18
|
-
puts "-> Up to date fingerprint: #{up_to_date}"
|
18
|
+
puts "-> Up to date fingerprint: #{present(up_to_date)}"
|
19
19
|
puts ""
|
20
20
|
end
|
21
21
|
|
22
22
|
unless out_of_date.empty?
|
23
23
|
puts "😱 Out of date fingerprint count: #{out_of_date.count}"
|
24
|
-
puts "-> Out of date fingerprint: #{out_of_date}"
|
24
|
+
puts "-> Out of date fingerprint: #{present(out_of_date)}"
|
25
25
|
puts ""
|
26
26
|
end
|
27
27
|
|
28
28
|
unless missing.empty?
|
29
29
|
puts "🤬 Files missing fingerprint count: #{missing.count}"
|
30
|
-
puts "-> Missing fingerprint: #{missing}"
|
30
|
+
puts "-> Missing fingerprint: #{present(missing)}"
|
31
31
|
puts ""
|
32
32
|
end
|
33
33
|
|
34
34
|
puts "-----"
|
35
|
-
puts "#####"
|
36
|
-
|
37
35
|
out_of_date.empty? && missing.empty?
|
38
36
|
end
|
39
37
|
|
38
|
+
def self.present(entry)
|
39
|
+
entries = entry.map do |(engine_name, source_path)|
|
40
|
+
" - #{engine_name}: #{source_path[:short_path]} (#{source_path[:fingerprint]})"
|
41
|
+
end.join("\n")
|
42
|
+
|
43
|
+
"\n#{entries}"
|
44
|
+
end
|
45
|
+
|
40
46
|
def self.out_of_date
|
41
47
|
overloads.fetch(:out_of_date, [])
|
42
48
|
end
|
@@ -57,7 +63,7 @@ module Bonobot
|
|
57
63
|
source_path = engines_files[engine_name].fetch(path, nil)
|
58
64
|
next unless source_path
|
59
65
|
|
60
|
-
result = [engine_name, source_path]
|
66
|
+
result = [engine_name, source_path.merge(short_path: path)]
|
61
67
|
|
62
68
|
key = status_key(source_path[:fingerprint], fingerprint)
|
63
69
|
if hash[key].nil?
|
@@ -109,7 +115,7 @@ module Bonobot
|
|
109
115
|
|
110
116
|
def self.read_annotation(path)
|
111
117
|
File.readlines(path).map do |line|
|
112
|
-
line.sub(/#
|
118
|
+
line.sub(/# bonobot_fingerprint:/, "").sub("<%", "").sub("%>", "").strip if line.match?(/# bonobot_fingerprint:/) || line.match?(/<%# bonobot_fingerprint:/)
|
113
119
|
end.compact.first
|
114
120
|
end
|
115
121
|
|
data/lib/bonobot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bonobot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- armandfardeau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|