fino 1.0.0 → 1.0.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: 923a928e308816fef20053f1f35fff93f8fbc43e48dcc80e7ef83eab6a69a3bd
4
- data.tar.gz: ff5af3d11e4184cb45fa06039514722596b2237be3c42e00be1b87fee3c401d1
3
+ metadata.gz: 0ea92e4e21cba886bae18fabe82c582e65a506ee44f653d467635520ffacdc15
4
+ data.tar.gz: d3379c18421c4ec140abcf624261ec87f984657dbf02e86b06aabeccd36a52d8
5
5
  SHA512:
6
- metadata.gz: 02ebcf4c01d917a775909b9d9bfcca9f7840aa0941a9339f885b491fa91337e9367f3692de7cc0f6ba75a27ce9cfebed221014aa50fd1079eb1cdbe97508353d
7
- data.tar.gz: 308a664811806d793796208a7d0dfe736c1d20f8e4ba3bda8d2bebb65e420872669127cd05c214e877026df855cba6c0d9d7189b317f70b3b9599d7996054cc8
6
+ metadata.gz: 27b6ebe4a3be8162db96951a9261d9299f75afdf9881db8d47c21eeff7e586cb13f3a2601a1c15ab2ccc2bc1527e0612cbea8eba95b25f6da9123539b668bb3e
7
+ data.tar.gz: c99f75e5a0a7f9c53b84c00fc37a8db131ad40cda3ea3e34627c4e51cb1ebb8cd48ebca5e996fabc5c4164a21d9921edb382923652a2447ed862c389fcfdb646
data/README.md CHANGED
@@ -1,11 +1,83 @@
1
1
  # Fino
2
2
 
3
+ ⚠️ Fino is under active development. API changes are possible ⚠️
4
+
5
+ Fino is a dynamic settings engine for Ruby and Rails
6
+
7
+ ## Usage
8
+
9
+ ### Define settings via DSL
10
+
3
11
  ```ruby
4
- Fino.value(:retries_amount)
5
- Fino.value(:http_read_timeout, :service_a)
12
+ require "fino-redis"
13
+
14
+ Fino.configure do
15
+ adapter do
16
+ Fino::Redis::Adapter.new(
17
+ Redis.new(**Rails.application.config_for(:redis))
18
+ )
19
+ end
20
+
21
+ cache { Fino::Cache::Memory.new(expires_in: 3.seconds) }
22
+
23
+ settings do
24
+ setting :maintenance_mode, :boolean, default: false
25
+
26
+ section :openai, label: "OpenAI" do
27
+ setting :model,
28
+ :string,
29
+ default: "gpt-4o",
30
+ description: "OpenAI model"
31
+
32
+ setting :temperature,
33
+ :float,
34
+ default: 0.7,
35
+ description: "Model temperature"
36
+ end
37
+
38
+ section :feature_toggles, label: "Feature Toggles" do
39
+ setting :new_ui, :boolean, default: true
40
+ setting :beta_functionality, :boolean, default: false
41
+ end
42
+
43
+ section :my_micro_service, label: "My Micro Service" do
44
+ setting :http_read_timeout, :integer, default: 200 # in ms
45
+ setting :http_open_timeout, :integer, default: 100 # in ms
46
+ end
47
+ end
48
+ end
6
49
  ```
7
50
 
51
+ ### Work with settings
52
+
53
+ ```ruby
54
+ Fino.value(:model, :openai) #=> "gpt-4o"
55
+ Fino.value(:temperature, :openai) #=> 0.7
56
+
57
+ Fino.set("gpt-5", :model, :openai)
58
+ Fino.value(:model, :openai) #=> "gpt-5"
59
+ ```
60
+
61
+ ### Manage settings via UI
62
+
63
+ ```ruby
64
+ gem "fino-ui"
65
+ ```
66
+
67
+ Mount Fino UI in your `config/routes.rb`:
68
+
69
+ ```ruby
70
+ Rails.application.routes.draw do
71
+ mount Fino::UI::Engine, at: "/fino"
72
+ end
73
+ ```
74
+
75
+ <img width="1229" height="641" alt="Screenshot 2025-09-04 at 16 01 51" src="https://github.com/user-attachments/assets/646df84c-c25b-4890-9637-c481e18c9bd4" />
76
+
8
77
  ## TODO
9
78
 
79
+ - Preloading settings to be able to fetch all of them in one adapter call
80
+ - Request scoped memoization when integrating with Rails
81
+ - Nicer UI
10
82
  - Basic validations (presence, range, numericality)
11
83
  - Enum setting type
data/lib/fino/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fino
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fino
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Egor Iskrenkov
@@ -34,7 +34,6 @@ files:
34
34
  - lib/fino-ui.rb
35
35
  - lib/fino.rb
36
36
  - lib/fino/adapter.rb
37
- - lib/fino/adapter/memory.rb
38
37
  - lib/fino/cache.rb
39
38
  - lib/fino/cache/memory.rb
40
39
  - lib/fino/cache/null.rb
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Fino::Adapters::Memory
4
- include Fino::Adapter
5
- end