bas 1.6.0 → 1.6.2

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
  SHA256:
3
- metadata.gz: 2cd36e19f37702304576b44e8ab38c16ad18d3cb8ca59a44ff80fd8197ec2ba6
4
- data.tar.gz: 67fd4cd540aafb0460a5a8ca4c7a630e8372483045f73298f3ccf6fe9fd3b69e
3
+ metadata.gz: 5128c22f8ba67518e5171077718313c0f540655f1a83b3954adc18613fe6863d
4
+ data.tar.gz: 71a7085f7dc92004aaf6271601d2d83a0e35f19c2e053f8050a959839347c87a
5
5
  SHA512:
6
- metadata.gz: 8cff215e83e700143b36682d9a5dc0a222adb877a6ee525a105706b4e5f9797f21ac624627cc1f68102eecd6cc5ff2be3e4211cb42d3da1d31393dc98cef53c8
7
- data.tar.gz: 69e0e74411e93720777fa1a4c4ae453d65b4f288f826297b38f2a208cea6aa213842f6de04fe311185ab30fb4b4671dd49e2ee19f464f9be5da58677d9bf84b4
6
+ metadata.gz: 80d344d73476474246f4f3020ccd3adeac789f4e9d76dcf16aa5f872f3030f58c9b193f8b22bc5dbdf5dede180c6bcc42a63c403dfa42135837474f52f2fd777
7
+ data.tar.gz: 508c9b6ec55f0f5a28029a09f830fc4ce1284df19a05892e6f35ab3f21aefc3519583103e76ab44c37db529d1912801251d34688177d91b8ed3b01aca7cad2aa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ # 1.6.2 (12.12.2024)
4
+ - [Bots with default shared storage reader are not saving data](https://github.com/kommitters/bas/issues/122)
5
+
6
+ # 1.6.1 (11.12.2024)
7
+ - [Add config option to avoid writing empty data](https://github.com/kommitters/bas/issues/120)
8
+
3
9
  # 1.6.0 (12.11.2024)
4
10
  - [Add Shared Storage Abstraction](https://github.com/kommitters/bas/issues/115)
5
11
 
data/lib/bas/bot/base.rb CHANGED
@@ -44,9 +44,17 @@ module Bas
44
44
  end
45
45
 
46
46
  def write
47
+ return if @process_options[:avoid_empty_data] && empty_data?
48
+
47
49
  @shared_storage_writer.write(process_response)
48
50
  end
49
51
 
52
+ def empty_data?
53
+ process_response.nil? || process_response == {} || process_response.any? do |_key, value|
54
+ [[], "", nil, {}].include?(value)
55
+ end
56
+ end
57
+
50
58
  def unprocessable_response
51
59
  read_data = read_response.data
52
60
 
@@ -27,7 +27,6 @@ module Bas
27
27
 
28
28
  def write(data)
29
29
  params = { connection: write_options[:connection], query: write_query(data) }
30
-
31
30
  @write_response = Utils::Postgres::Request.execute(params)
32
31
  end
33
32
 
data/lib/bas/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bas
4
4
  # Gem version
5
- VERSION = "1.6.0"
5
+ VERSION = "1.6.2"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bas
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kommitters Open Source
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-12 00:00:00.000000000 Z
11
+ date: 2024-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gmail_xoauth