eyeloupe 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +21 -0
- data/app/models/eyeloupe/application_record.rb +4 -0
- data/lib/eyeloupe/configuration.rb +4 -1
- data/lib/eyeloupe/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: fdc0f9276e2c518c9b396f1acbc856460fb3eabdf926cbd8940bc6f33a9ec19c
|
4
|
+
data.tar.gz: c3fa4ae7197c7de0bcbb3790bf0b4b1eb2bd93a6bee3ecca5030b4960b5c74ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7bf1df1813f5b9791ef17c39149179b7450ba7009d61950edd1bde80edad27be1fb1ea043516dd1c51637040874e05a096c5e9a5fbe5f22379c801e9a1c8943
|
7
|
+
data.tar.gz: e2e24fd0d42f2e430eea07f8395e4a3a2aa6ea0ffd02a44e290339ccc1feaf92fab07af6e2e175ac7cae4a0b95ba13c2c992ecef0d9d4f55cae96085c6cca995
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 0.3.1
|
2
|
+
|
3
|
+
- Add optional database config (thanks to @kiskoza).
|
4
|
+
|
1
5
|
## 0.3.0
|
2
6
|
|
3
7
|
- Add exceptions: Framework + ActiveJob + Sidekiq Worker exceptions.
|
@@ -10,4 +14,4 @@
|
|
10
14
|
|
11
15
|
## 0.1.0
|
12
16
|
|
13
|
-
- Initial release including incoming and outgoing requests.
|
17
|
+
- Initial release including incoming and outgoing requests.
|
data/README.md
CHANGED
@@ -64,6 +64,7 @@ Eyeloupe.configure do |config|
|
|
64
64
|
config.capture = Rails.env.development?
|
65
65
|
config.openai_access_key = "your-openai-access-key"
|
66
66
|
config.openai_model = "gpt-4"
|
67
|
+
config.database = 'eyeloupe'
|
67
68
|
end
|
68
69
|
```
|
69
70
|
|
@@ -71,6 +72,26 @@ end
|
|
71
72
|
- `capture` is a boolean to enable/disable Eyeloupe capture. By default, it's set to `true`.
|
72
73
|
- `openai_access_key` is the access key to use the OpenAI API. You can get one [here](https://platform.openai.com/).
|
73
74
|
- `openai_model` is the model to use for the OpenAI API. You can find the list of available models [here](https://platform.openai.com/docs/models).
|
75
|
+
- `database` is an optional database config Eyeloupe will use ([Database](#database)).
|
76
|
+
|
77
|
+
|
78
|
+
### Database
|
79
|
+
|
80
|
+
By default, Eyeloupe uses the same database as your application. If you want to use a different database to keep your production environment clean, you can add a new database config in your `config/database.yml` file:
|
81
|
+
|
82
|
+
```yml
|
83
|
+
development:
|
84
|
+
primary:
|
85
|
+
<<: *default
|
86
|
+
database: db/development.sqlite3
|
87
|
+
eyeloupe:
|
88
|
+
<<: *default
|
89
|
+
database: db/eyeloupe.sqlite3
|
90
|
+
migrations_paths: <%= Gem.loaded_specs['eyeloupe'].full_gem_path + '/db/migrate' %>
|
91
|
+
schema_dump: false
|
92
|
+
```
|
93
|
+
|
94
|
+
Using this you can skip the `eyeloupe:install:migrations` step, but do not forget to run `rails db:migrate RAILS_ENV=eyeloupe` to setup the database.
|
74
95
|
|
75
96
|
### Exception handling
|
76
97
|
|
@@ -1,5 +1,9 @@
|
|
1
1
|
module Eyeloupe
|
2
2
|
class ApplicationRecord < ActiveRecord::Base
|
3
3
|
self.abstract_class = true
|
4
|
+
|
5
|
+
if Eyeloupe.configuration.database
|
6
|
+
connects_to database: { writing: Eyeloupe.configuration.database.to_sym, reading: Eyeloupe.configuration.database.to_sym }
|
7
|
+
end
|
4
8
|
end
|
5
9
|
end
|
data/lib/eyeloupe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eyeloupe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Lion
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets-rails
|