bas 1.5.3 → 1.6.1

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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +92 -50
  4. data/lib/bas/bot/base.rb +44 -52
  5. data/lib/bas/shared_storage/base.rb +35 -0
  6. data/lib/bas/shared_storage/default.rb +18 -0
  7. data/lib/bas/shared_storage/postgres.rb +94 -0
  8. data/lib/bas/shared_storage/types/read.rb +22 -0
  9. data/lib/bas/utils/openai/run_assistant.rb +1 -0
  10. data/lib/bas/utils/postgres/request.rb +3 -1
  11. data/lib/bas/version.rb +1 -1
  12. metadata +8 -41
  13. data/lib/bas/bot/compare_wip_limit_count.rb +0 -92
  14. data/lib/bas/bot/create_work_item.rb +0 -142
  15. data/lib/bas/bot/fetch_billing_from_digital_ocean.rb +0 -87
  16. data/lib/bas/bot/fetch_birthdays_from_notion.rb +0 -128
  17. data/lib/bas/bot/fetch_domain_services_from_notion.rb +0 -93
  18. data/lib/bas/bot/fetch_domains_wip_counts_from_notion.rb +0 -121
  19. data/lib/bas/bot/fetch_domains_wip_limit_from_notion.rb +0 -134
  20. data/lib/bas/bot/fetch_emails_from_imap.rb +0 -99
  21. data/lib/bas/bot/fetch_github_issues.rb +0 -147
  22. data/lib/bas/bot/fetch_images_from_discord.rb +0 -78
  23. data/lib/bas/bot/fetch_media_from_notion.rb +0 -186
  24. data/lib/bas/bot/fetch_next_week_birthdays_from_notion.rb +0 -142
  25. data/lib/bas/bot/fetch_next_week_ptos_from_notion.rb +0 -197
  26. data/lib/bas/bot/fetch_ptos_from_notion.rb +0 -160
  27. data/lib/bas/bot/format_birthdays.rb +0 -97
  28. data/lib/bas/bot/format_do_bill_alert.rb +0 -108
  29. data/lib/bas/bot/format_emails.rb +0 -124
  30. data/lib/bas/bot/format_wip_limit_exceeded.rb +0 -97
  31. data/lib/bas/bot/garbage_collector.rb +0 -85
  32. data/lib/bas/bot/humanize_pto.rb +0 -117
  33. data/lib/bas/bot/notify_discord.rb +0 -96
  34. data/lib/bas/bot/notify_do_bill_alert_email.rb +0 -94
  35. data/lib/bas/bot/review_domain_availability.rb +0 -96
  36. data/lib/bas/bot/review_media.rb +0 -139
  37. data/lib/bas/bot/update_review_media_state.rb +0 -102
  38. data/lib/bas/bot/update_work_item.rb +0 -181
  39. data/lib/bas/bot/verify_issue_existance_in_notion.rb +0 -131
  40. data/lib/bas/bot/write_domain_review_requests.rb +0 -104
  41. data/lib/bas/bot/write_media_review_in_discord.rb +0 -98
  42. data/lib/bas/bot/write_media_review_requests.rb +0 -104
  43. data/lib/bas/read/base.rb +0 -30
  44. data/lib/bas/read/default.rb +0 -16
  45. data/lib/bas/read/postgres.rb +0 -44
  46. data/lib/bas/read/types/response.rb +0 -18
  47. data/lib/bas/write/base.rb +0 -31
  48. data/lib/bas/write/postgres.rb +0 -45
  49. data/lib/bas/write/postgres_update.rb +0 -49
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f9ecde6c8836bfd46cea02acf33258d6671f59ec283917ce4cb50adbb78cedd
4
- data.tar.gz: bf5e546ca7985a2892ddf02859c3cb18ee12e90919542d780742972816b0c58a
3
+ metadata.gz: a130605e5a4c878528268bbb18f887ecd2e711ace2ceb50483e24dd6e2dba89a
4
+ data.tar.gz: 93d57203f080290dbae45e88fd67d27500eb91a05900f16c4eb6309d1d27f386
5
5
  SHA512:
6
- metadata.gz: 7cf193eb6e6460aa0a5670d04655b8ea9b51eb012721d3e1749dd70fede86150fa9ef17f45b355eae5b3233f5c448647b3ecf5cd16e78a19ad6a696a45bf4e56
7
- data.tar.gz: 6ffca4b33a7dc68721a73230e64b86175f34df1b30abaf14346b7415bc60c81b8bca1afc4f1d8585c93e424d1e7334610b2d7340ea7032708a83546fab18a6f3
6
+ metadata.gz: f2eb665e9e7da99f3ba8f51cf280a7beac5a58feea971ce47e1868929797840f946c771376c8ea391bb58403762b9b7f70255d2d26505637ea3a7bb0d0922b59
7
+ data.tar.gz: 6851bc26907769f63574a783cab56485a28fb28d86ddee6945e968ab59470209cbb0b09298f7d711cd30f68063af903c3997b39c86593c7376016bdbe010ebed
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ # 1.6.1 (11.12.2024)
4
+ - [Add config option to avoid writing empty data](https://github.com/kommitters/bas/issues/120)
5
+
6
+ # 1.6.0 (12.11.2024)
7
+ - [Add Shared Storage Abstraction](https://github.com/kommitters/bas/issues/115)
8
+
3
9
  # 1.5.3 (28.10.2024)
4
10
  - [Fix response length limitations](https://github.com/kommitters/bas/issues/112)
5
11
 
data/README.md CHANGED
@@ -26,84 +26,126 @@ If bundler is not being used to manage dependencies, install the gem by executin
26
26
 
27
27
  * Ruby 2.6.0 or higher
28
28
 
29
- ## BOT
30
- A bot is a tool in charge of executing a specific automation task. The pipeline of a bot consists of reading from a data source, processing a specific task, and then writing a result in storage.
29
+ ## Terms
31
30
 
32
- ## Use case
33
- A use case is an automation problem greater than the one managed by a single bot. A use case comprises a set of bots that are agnostic between them and each one solves a specific task (parts of the automation problem). To connect the bots, a shared storage should be used. This shared storage could be a PostgresDB database, an S3 bucket, or any kind of storage where the bots will read and write data so another bot can use it to execute their tasks.
31
+ ### BOT
32
+ A bot is a tool responsible for executing a specific automation task. The bot's pipeline consists of reading from a shared storage (if required), processing a particular task, and then writing the result to a shared storage.
34
33
 
35
- For example, a system to notify birthdays in a company (automation problem) can be solved with three bots: one to fetch the data from an external data source, one to format the birthday message, and the last one to notify somewhere.
34
+ ### Shared Storage
35
+ Shared storage is a central location where data can be read and written by multiple bots to facilitate coordination in an automation task. It serves as a common data exchange point, allowing each bot to access information generated by others as needed to complete its specific task. Examples of shared storage include a PostgreSQL database, an S3 bucket, or other types of storage systems that support concurrent access and data persistence.
36
36
 
37
- ## Building my own BOT
38
-
39
- The gem provides with basic interfaces, types, and methods to shape your own bot in an easy way. Since the process of reading and writing in a shared storage is separated from the main task, two base classes were defined to deal with this executions, leaving the logic of the specific task in the bot file.
37
+ ### Use case
38
+ A use case refers to an automation problem larger than what a single bot can manage. It typically involves a set of bots, each solving a specific part of the overall problem independently. To enable these bots to interact, shared storage is used. This shared storage could be a PostgreSQL database, an S3 bucket, or another shared storage type, allowing bots to read and write data that other bots can access to complete their tasks.
40
39
 
41
- ### 1. Read - Obtaining the data from the Shared Storage
40
+ ## Building my own BOT
42
41
 
43
- Specifically, a reader is an object in charged of bringing data from a shared storage. The gem already provides the base interface
44
- for building your own reader for your specific shared storage, or rely on already built classes if they match your purpose.
42
+ The gem provides essential interfaces, types, and methods to help you easily create your own bot. For instance, two base classes are provided: one for handling shared storage read-write operations and another for defining the bot’s specific task logic.
45
43
 
46
- The base interface for a reader can be found under the `bas/read/base.rb` class.
44
+ ### 1. SharedStorage - Read and Write data.
47
45
 
48
- ### 2. Write - Apply changes in a shared storage
49
- The **Write** is in charge of creating or updating information in a shared storage. This is the last step for every BOT. These changes can be a transaction in a database, adding files in a cloud storage, or simply creating logs.
46
+ The `SharedStorage` class abstracts the process of reading from and writing to shared storage. This class specification is available in `bas/shared_storage/base.rb`, from which custom implementations can be built.
50
47
 
51
- The base interface for a writer can be found under the `bas/write/base.rb` class.
48
+ Currently, the gem supports: `PostgreSQL`.
52
49
 
53
- ### 3. Bot - Solve a specific automation task
54
- The bot execute the logic to solve an specific task. For this, it can use the data from the read step, and then returns a processed response to be wrote by the write component. Every bot reads from a shared storage and writes in a shared storage.
50
+ ### 2. Bot - Solve a specific automation task
51
+ The bot executes the logic required to complete a specific task. For this, an instance of shared storage (for reading and for writing) must be provided to the bot.
55
52
 
56
- The base interface for a bot can be found under the `bas/bot/base.rb` class.
53
+ The base interface for a bot is available in the `bas/bot/base.rb class`.
57
54
 
58
55
  ## Examples
59
56
 
60
- In this example, we demonstrate how to instantiate a birthday notification bot and execute it in a basic Ruby project. We'll also cover its deployment in a serverless configuration, specifically using a simple Lambda deployment.
61
-
62
57
  ### Preparing the configurations
63
58
 
64
- We'll need some configurations for this specific use case:
65
- * A **Notion database ID**, from a database with the following structure:
59
+ The current implementation of the PostgreSQL shared storage expect a table with the following structure:
60
+
61
+ ```sql
62
+ CREATE TABLE api_data(
63
+ id SERIAL NOT NULL,
64
+ "data" jsonb,
65
+ tag varchar(255),
66
+ archived boolean,
67
+ stage varchar(255),
68
+ status varchar(255),
69
+ error_message jsonb,
70
+ version varchar(255),
71
+ inserted_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
72
+ updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
73
+ PRIMARY KEY(id)
74
+ );
75
+ ```
66
76
 
67
- | Complete Name (text) | BD_this_year (formula) | BD (date) |
68
- | -------------------- | --------------------------- | ------------------------ |
69
- | John Doe | January 24, 2024 | January 24, 2000 |
70
- | Jane Doe | June 20, 2024 | June 20, 2000 |
77
+ ### Define the bot
71
78
 
72
- With the following formula for the **BD_this_year** column: `dateAdd(prop("BD"), year(now()) - year(prop("BD")), "years")`
79
+ In this example, we demonstrate how to configure a bot to fetch data from an API and save it in a postgres database.
73
80
 
74
- * A Notion secret, which can be obtained, by creating an integration here: `https://developers.notion.com/`, browsing on the **View my integrations** option, and selecting the **New Integration** or **Create new integration** buttons.
81
+ For this, a bot could be defined as follow:
82
+ ```ruby
83
+ require "httparty"
75
84
 
76
- ### Instantiating the FetchBirthdayFromNotion Bot
85
+ module Bas
86
+ module Bot
87
+ class FetchFromAPi
88
+ URL = 'some-url.com'
77
89
 
78
- The specific bot can be found in the `bas/bot/fetch_birthdays_from_notion.rb` file.
90
+ def process
91
+ request = HTTParty.get(URL, { headers: })
79
92
 
80
- **Normal ruby code**
93
+ if request.code == 200
94
+ { success: request.body }
95
+ else
96
+ { error: request.error_message }
97
+ end
98
+ end
99
+
100
+ private
101
+
102
+ def headers
103
+ {
104
+ "Authorization" => "Bearer #{process_options[:token]}",
105
+ "Content-Type" => "application/json"
106
+ }
107
+ end
108
+ end
109
+ end
110
+ end
81
111
  ```
112
+
113
+ The `Bot::Base` interface expects the process method to return a hash with a single key, which can be `success` (when the response is valid) or `error` (when an error occurs). This consistency allows SharedStorage to handle the same data types regardless of the specific bot used.
114
+
115
+ Finally, to execute the bot we could define it like follows:
116
+
117
+ ```ruby
118
+ connection = {
119
+ host: "localhost",
120
+ port: 5432,
121
+ dbname: "bas",
122
+ user: "postgres",
123
+ password: "postgres"
124
+ }
125
+
126
+ read_options = {
127
+ connection:,
128
+ db_table: "api_data",
129
+ tag: "AnotherBot"
130
+ }
131
+
132
+ write_options = {
133
+ connection:,
134
+ db_table: "api_data",
135
+ tag: "FetchFromAPi"
136
+ }
137
+
82
138
  options = {
83
- process_options: {
84
- database_id: "notion database id",
85
- secret: "notion secret"
86
- },
87
- write_options: {
88
- connection: {
89
- host: "host",
90
- port: 5432,
91
- dbname: "bas",
92
- user: "postgres",
93
- password: "postgres"
94
- },
95
- db_table: "use_cases",
96
- bot_name: "FetchBirthdaysFromNotion"
97
- }
139
+ token: "api_token"
98
140
  }
99
141
 
100
- bot = Bot::FetchBirthdaysFromNotion.new(options)
101
- bot.execute
142
+ shared_storage = SharedStorage.new(read_options:, write_options:)
102
143
 
144
+ bot = Bas::Bot::FetchFromAPi.new(options, shared_storage)
145
+ bot.execute
103
146
  ```
104
147
 
105
- ## Real case usage
106
- For implementation details, please refer to the examples folder in the repository. You can find an example of how to configure a Lambda function with a bot there.
148
+ The `tag` parameter in the read and write options specifies which record to look at (when reading) and what tag to assign to the record (when writing). This way, each bot can work independently with its own records in the shared storage.
107
149
 
108
150
  ## Development
109
151
 
data/lib/bas/bot/base.rb CHANGED
@@ -2,73 +2,65 @@
2
2
 
3
3
  require_relative "../utils/exceptions/function_not_implemented"
4
4
  require_relative "../utils/exceptions/invalid_process_response"
5
- require_relative "../write/postgres_update"
6
-
7
- module Bot
8
- ##
9
- # The Bot::Base class serves as the foundation for implementing specific bots. Operating
10
- # as an interface, this class defines essential attributes and methods, providing a blueprint
11
- # for creating custom bots formed by a Read, Process, and Write components.
12
- #
13
- class Base
14
- attr_reader :read_options, :process_options, :write_options
15
- attr_accessor :read_response, :process_response, :write_response
16
-
17
- def initialize(config)
18
- @read_options = config[:read_options] || {}
19
- @process_options = config[:process_options] || {}
20
- @write_options = config[:write_options] || {}
21
- end
22
-
23
- def execute
24
- @read_response = read
25
-
26
- write_read_response_in_process
27
5
 
28
- @process_response = process
29
- raise Utils::Exceptions::InvalidProcessResponse unless process_response.is_a?(Hash)
6
+ module Bas
7
+ module Bot
8
+ ##
9
+ # The Bot::Base class serves as the foundation for implementing specific bots. Operating
10
+ # as an interface, this class defines essential attributes and methods, providing a blueprint
11
+ # for creating custom bots formed by a Read, Process, and Write components.
12
+ #
13
+ class Base
14
+ attr_reader :process_options, :shared_storage_reader, :shared_storage_writer
15
+ attr_accessor :read_response, :process_response, :write_response
30
16
 
31
- write_read_response_processed
32
-
33
- @write_response = write
34
- end
17
+ def initialize(options, shared_storage_reader, shared_storage_writer = nil)
18
+ @process_options = options || {}
19
+ @shared_storage_reader = shared_storage_reader
20
+ @shared_storage_writer = shared_storage_writer || shared_storage_reader
21
+ end
35
22
 
36
- protected
23
+ def execute
24
+ @read_response = read
37
25
 
38
- def read
39
- raise Utils::Exceptions::FunctionNotImplemented
40
- end
26
+ @shared_storage_reader.set_in_process
41
27
 
42
- def process
43
- raise Utils::Exceptions::FunctionNotImplemented
44
- end
28
+ @process_response = process
29
+ raise Utils::Exceptions::InvalidProcessResponse unless process_response.is_a?(Hash)
45
30
 
46
- def write
47
- raise Utils::Exceptions::FunctionNotImplemented
48
- end
31
+ @shared_storage_reader.set_processed
49
32
 
50
- def unprocessable_response
51
- read_data = read_response.data
33
+ @write_response = write
34
+ end
52
35
 
53
- read_data.nil? || read_data == {} || read_data.any? { |_key, value| [[], "", nil].include?(value) }
54
- end
36
+ protected
55
37
 
56
- private
38
+ def read
39
+ @shared_storage_reader.read
40
+ end
57
41
 
58
- def write_read_response_in_process
59
- return if read_options[:avoid_process].eql?(true) || read_response.id.nil?
42
+ def process
43
+ raise Utils::Exceptions::FunctionNotImplemented
44
+ end
60
45
 
61
- options = { params: { stage: "in process" }, conditions: "id=#{read_response.id}" }
46
+ def write
47
+ return if @process_options[:avoid_empty_data] && empty_data?
62
48
 
63
- Write::PostgresUpdate.new(read_options.merge(options)).execute
64
- end
49
+ data = unprocessable_response ? { success: {} } : process_response
50
+ @shared_storage_writer.write(data)
51
+ end
65
52
 
66
- def write_read_response_processed
67
- return if read_options[:avoid_process].eql?(true) || read_response.id.nil?
53
+ def empty_data?
54
+ process_response.nil? || process_response == {} || process_response.any? do |_key, value|
55
+ [[], "", nil, {}].include?(value)
56
+ end
57
+ end
68
58
 
69
- options = { params: { stage: "processed" }, conditions: "id=#{read_response.id}" }
59
+ def unprocessable_response
60
+ read_data = read_response.data
70
61
 
71
- Write::PostgresUpdate.new(read_options.merge(options)).execute
62
+ read_data.nil? || read_data == {} || read_data.any? { |_key, value| [[], "", nil].include?(value) }
63
+ end
72
64
  end
73
65
  end
74
66
  end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../utils/exceptions/function_not_implemented"
4
+
5
+ module Bas
6
+ module SharedStorage
7
+ # SharedStorage base interface
8
+ #
9
+ class Base
10
+ attr_reader :read_options, :read_response, :write_response
11
+ attr_accessor :write_options
12
+
13
+ # Initializes the read with essential configuration parameters.
14
+ #
15
+ def initialize(options = {})
16
+ @read_options = options[:read_options] || {}
17
+ @write_options = options[:write_options] || {}
18
+ end
19
+
20
+ def set_in_process; end
21
+
22
+ def set_processed; end
23
+
24
+ protected
25
+
26
+ def read
27
+ raise Utils::Exceptions::FunctionNotImplemented
28
+ end
29
+
30
+ def write
31
+ raise Utils::Exceptions::FunctionNotImplemented
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "base"
4
+ require_relative "types/read"
5
+
6
+ module Bas
7
+ module SharedStorage
8
+ ##
9
+ # The SharedStorage::Default class serves as a shared storage implementation for bots
10
+ # who don't read from a <b>shared storage</b>".
11
+ #
12
+ class Default < Bas::SharedStorage::Base
13
+ def read
14
+ Bas::SharedStorage::Types::Read.new
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,94 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "base"
4
+ require_relative "types/read"
5
+ require_relative "../utils/postgres/request"
6
+ require_relative "../version"
7
+
8
+ require "json"
9
+
10
+ module Bas
11
+ module SharedStorage
12
+ ##
13
+ # The SharedStorage::Postgres class serves as a shared storage implementation to read and write on
14
+ # a shared storage defined as a postgres database
15
+ #
16
+ class Postgres < Bas::SharedStorage::Base
17
+ TABLE_PARAMS = "data, tag, archived, stage, status, error_message, version"
18
+
19
+ def read
20
+ params = { connection: read_options[:connection], query: read_query }
21
+
22
+ first_result = Utils::Postgres::Request.execute(params).first || {}
23
+
24
+ @read_response = Bas::SharedStorage::Types::Read.new(first_result[:id], first_result[:data],
25
+ first_result[:inserted_at])
26
+ end
27
+
28
+ def write(data)
29
+ params = { connection: write_options[:connection], query: write_query(data) }
30
+ @write_response = Utils::Postgres::Request.execute(params)
31
+ end
32
+
33
+ def set_in_process
34
+ return if read_options[:avoid_process].eql?(true) || read_response.id.nil?
35
+
36
+ update_stage(read_response.id, "in process")
37
+ end
38
+
39
+ def set_processed
40
+ return if read_options[:avoid_process].eql?(true) || read_response.id.nil?
41
+
42
+ update_stage(read_response.id, "processed") unless @read_response.nil?
43
+ end
44
+
45
+ private
46
+
47
+ def read_query
48
+ query = "SELECT id, data, inserted_at FROM #{read_options[:db_table]} WHERE status='success' AND #{where}"
49
+
50
+ [query, where_params]
51
+ end
52
+
53
+ def write_query(data)
54
+ query = "INSERT INTO #{write_options[:db_table]} (#{TABLE_PARAMS}) VALUES ($1, $2, $3, $4, $5, $6, $7);"
55
+ params = write_params(data)
56
+
57
+ [query, params]
58
+ end
59
+
60
+ def where
61
+ return read_options[:where] unless read_options[:where].nil?
62
+
63
+ "archived=$1 AND tag=$2 AND stage=$3 ORDER BY inserted_at ASC"
64
+ end
65
+
66
+ def where_params
67
+ return read_options[:params] unless read_options[:params].nil?
68
+
69
+ [false, read_options[:tag], "unprocessed"]
70
+ end
71
+
72
+ def write_params(data)
73
+ if data[:success]
74
+ [data[:success].to_json, write_options[:tag], false, "unprocessed", "success", nil, Bas::VERSION]
75
+ else
76
+ [nil, write_options[:tag], false, "unprocessed", "failed", data[:error].to_json, Bas::VERSION]
77
+ end
78
+ end
79
+
80
+ def update_stage(id, stage)
81
+ params = { connection: read_options[:connection], query: update_query(id, stage) }
82
+
83
+ Utils::Postgres::Request.execute(params)
84
+ end
85
+
86
+ def update_query(id, stage)
87
+ query = "UPDATE #{read_options[:db_table]} SET stage=$1 WHERE id=$2"
88
+ values = [stage, id]
89
+
90
+ [query, values]
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+
5
+ module Bas
6
+ module SharedStorage
7
+ module Types
8
+ ##
9
+ # Represents a response from a read component. It encapsulates the requested data
10
+ # from the <b>shared storage</b> to be processed by a Bot.
11
+ class Read
12
+ attr_reader :id, :data, :inserted_at
13
+
14
+ def initialize(id = nil, response = nil, inserted_at = nil)
15
+ @id = id
16
+ @data = response.nil? ? {} : JSON.parse(response)
17
+ @inserted_at = inserted_at
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "json"
3
4
  require "httparty"
4
5
 
5
6
  module Utils
@@ -24,7 +24,9 @@ module Utils
24
24
  def self.execute(params)
25
25
  pg_connection = PG::Connection.new(params[:connection])
26
26
 
27
- execute_query(pg_connection, params[:query])
27
+ results = execute_query(pg_connection, params[:query])
28
+
29
+ results.map { |result| result.transform_keys(&:to_sym) }
28
30
  end
29
31
 
30
32
  # Execute the Postgres query
data/lib/bas/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bas
4
4
  # Gem version
5
- VERSION = "1.5.3"
5
+ VERSION = "1.6.1"
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.5.3
4
+ version: 1.6.1
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-10-28 00:00:00.000000000 Z
11
+ date: 2024-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gmail_xoauth
@@ -166,7 +166,7 @@ dependencies:
166
166
  version: '1.5'
167
167
  description: A versatile business automation system offering key components for building
168
168
  various use cases. It provides an easy-to-use tool for implementing automation
169
- workflows without excessive complexity. Formerly known as 'bas'.
169
+ workflows without excessive complexity. Formerly known as 'bns'.
170
170
  email:
171
171
  - oss@kommit.co
172
172
  executables: []
@@ -187,40 +187,10 @@ files:
187
187
  - examples/serverless_example.md
188
188
  - lib/bas.rb
189
189
  - lib/bas/bot/base.rb
190
- - lib/bas/bot/compare_wip_limit_count.rb
191
- - lib/bas/bot/create_work_item.rb
192
- - lib/bas/bot/fetch_billing_from_digital_ocean.rb
193
- - lib/bas/bot/fetch_birthdays_from_notion.rb
194
- - lib/bas/bot/fetch_domain_services_from_notion.rb
195
- - lib/bas/bot/fetch_domains_wip_counts_from_notion.rb
196
- - lib/bas/bot/fetch_domains_wip_limit_from_notion.rb
197
- - lib/bas/bot/fetch_emails_from_imap.rb
198
- - lib/bas/bot/fetch_github_issues.rb
199
- - lib/bas/bot/fetch_images_from_discord.rb
200
- - lib/bas/bot/fetch_media_from_notion.rb
201
- - lib/bas/bot/fetch_next_week_birthdays_from_notion.rb
202
- - lib/bas/bot/fetch_next_week_ptos_from_notion.rb
203
- - lib/bas/bot/fetch_ptos_from_notion.rb
204
- - lib/bas/bot/format_birthdays.rb
205
- - lib/bas/bot/format_do_bill_alert.rb
206
- - lib/bas/bot/format_emails.rb
207
- - lib/bas/bot/format_wip_limit_exceeded.rb
208
- - lib/bas/bot/garbage_collector.rb
209
- - lib/bas/bot/humanize_pto.rb
210
- - lib/bas/bot/notify_discord.rb
211
- - lib/bas/bot/notify_do_bill_alert_email.rb
212
- - lib/bas/bot/review_domain_availability.rb
213
- - lib/bas/bot/review_media.rb
214
- - lib/bas/bot/update_review_media_state.rb
215
- - lib/bas/bot/update_work_item.rb
216
- - lib/bas/bot/verify_issue_existance_in_notion.rb
217
- - lib/bas/bot/write_domain_review_requests.rb
218
- - lib/bas/bot/write_media_review_in_discord.rb
219
- - lib/bas/bot/write_media_review_requests.rb
220
- - lib/bas/read/base.rb
221
- - lib/bas/read/default.rb
222
- - lib/bas/read/postgres.rb
223
- - lib/bas/read/types/response.rb
190
+ - lib/bas/shared_storage/base.rb
191
+ - lib/bas/shared_storage/default.rb
192
+ - lib/bas/shared_storage/postgres.rb
193
+ - lib/bas/shared_storage/types/read.rb
224
194
  - lib/bas/utils/digital_ocean/request.rb
225
195
  - lib/bas/utils/discord/integration.rb
226
196
  - lib/bas/utils/discord/request.rb
@@ -238,9 +208,6 @@ files:
238
208
  - lib/bas/utils/openai/run_assistant.rb
239
209
  - lib/bas/utils/postgres/request.rb
240
210
  - lib/bas/version.rb
241
- - lib/bas/write/base.rb
242
- - lib/bas/write/postgres.rb
243
- - lib/bas/write/postgres_update.rb
244
211
  - renovate.json
245
212
  - sig/business_automation_system.rbs
246
213
  homepage: https://github.com/kommitters/bas
@@ -264,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
231
  - !ruby/object:Gem::Version
265
232
  version: '0'
266
233
  requirements: []
267
- rubygems_version: 3.5.16
234
+ rubygems_version: 3.5.22
268
235
  signing_key:
269
236
  specification_version: 4
270
237
  summary: BAS - Business automation system