bonobot 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e9eaa44c2e0f1388d2fae379becd62eee2cabdbc6d9cdb63d3a13e240fad180
4
- data.tar.gz: 33cf0a5fb51ca3e3c277dcc0cb0f8f0c83103deb154f35549d85580252835c67
3
+ metadata.gz: 60d190ca5c05e4d29f7622276e6f387e53b06b87de3bfed7ed31446ac28b2fd9
4
+ data.tar.gz: 8a900dfeb52e73e177d02363e98ce429e0012a94f0d184048208968d9841dbbe
5
5
  SHA512:
6
- metadata.gz: 935bc736b1bfa50db8ed5ff9415feac5b0e8870e39c658a0234ce11e02adc95cba6ce1435580f1dad90a67e3ac704022eb17eb72631d9a95de19dc42cedbf04c
7
- data.tar.gz: 17cf099a01f76279f4cb22cd0cab31eadc513ec3ac3e32c5a9dec468956cd0bf100a424a080471fccf2a57fe9a9d4f46a1c39057b752e4ce60a36f1b2bcf4727
6
+ metadata.gz: 5c72443158105126ae949850fcb70a588517837344c1b6cc4da90400da3e227dc44acb2bed7caf614fb64b9455739091882ae07177783b2a41aea6afbd5a9bd8
7
+ data.tar.gz: 31a93680b3b218ebda245eeeb1b97717bdc92e95727042523f85ae599b559635305bc030f996525bc70c76341e12304c2fd3b1a8ff42a4eee74a331c5d1a0540
@@ -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.json"
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?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bonobot
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
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.3
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-03 00:00:00.000000000 Z
11
+ date: 2023-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails