girb-gemini 0.1.0 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e951ec329dbfe7deddbd367e410abb158f1638af5f78a231d6570669bdc8fc5d
4
- data.tar.gz: 34ec3ad651b0fbe76373c17919a6b00a0959c4a9f1faf3c8fd981228f9e49a3a
3
+ metadata.gz: 7181aaaf0ef47945d34fbf816fac795156073eba874678e0ff206a73867946d1
4
+ data.tar.gz: c27aae4cd27cdfe4aa0bfa0ea9351fc096bfece04167fe8d1553ab58c65945ae
5
5
  SHA512:
6
- metadata.gz: b176f9abe0e37080db7989804e7ba1e936e43eefea1ea6bd6fa1d95e0d3e85d67b7c9eb8d5c2158ec1e2aba55dbb6fba10fda68816a103ebc67445e2760aa616
7
- data.tar.gz: 4f75ced680fadba2c1671362956b017afc256f657361520ccd8f0c574dbf941c5c3ae4dbd1891b7d9bcfa54d19068cd9d01df6ba9394a75c22c6f764ef018c62
6
+ metadata.gz: 772fb412059de24c75cb39d166d81b68e0047fc5c90488e3d69448516dd5f3aa3a795e287e3a78365006e43a56d349bfa7639c81eb84404df6e8565dc37626ed
7
+ data.tar.gz: e15f65f649f5a0f8ee16ac2b622ad1f7bcaec2dad90854ca6215e0b45486c7b54a163dcee55e7d1a817f18f7c9db76b1f870137b4514f42effe9c9445249f2bb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.1] - 2026-02-03
4
+
5
+ ### Added
6
+
7
+ - GIRB_MODEL environment variable support
8
+
9
+ ### Changed
10
+
11
+ - Recommend ~/.irbrc configuration instead of environment variables
12
+
3
13
  ## [0.1.0] - 2025-02-02
4
14
 
5
15
  ### Added
data/README.md CHANGED
@@ -21,42 +21,33 @@ gem install girb girb-gemini
21
21
 
22
22
  ## Setup
23
23
 
24
- Set your API key and provider:
25
-
26
- ```bash
27
- export GEMINI_API_KEY=your-api-key
28
- export GIRB_PROVIDER=girb-gemini
29
- ```
30
-
31
- Then start girb:
32
-
33
- ```bash
34
- girb
35
- ```
36
-
37
- ### Using with regular irb
24
+ ### Option 1: Configure in ~/.irbrc (Recommended)
38
25
 
39
26
  Add to your `~/.irbrc`:
40
27
 
41
- ```ruby
42
- require 'girb-gemini'
43
- ```
44
-
45
- Then use regular `irb` command.
46
-
47
- ## Manual Configuration
48
-
49
28
  ```ruby
50
29
  require 'girb-gemini'
51
30
 
52
31
  Girb.configure do |c|
53
32
  c.provider = Girb::Providers::Gemini.new(
54
- api_key: ENV['GEMINI_API_KEY'],
55
- model: 'gemini-2.5-flash' # default
33
+ api_key: 'your-api-key',
34
+ model: 'gemini-2.5-flash'
56
35
  )
57
36
  end
58
37
  ```
59
38
 
39
+ Then use regular `irb` command.
40
+
41
+ ### Option 2: Configure via environment variables
42
+
43
+ ```bash
44
+ export GIRB_PROVIDER=girb-gemini
45
+ export GIRB_MODEL=gemini-2.5-flash # optional, defaults to gemini-2.5-flash
46
+ export GEMINI_API_KEY=your-api-key
47
+ ```
48
+
49
+ Then start with `girb` command.
50
+
60
51
  ## Available Models
61
52
 
62
53
  - `gemini-2.5-flash` (default) - Fast and efficient
data/README_ja.md CHANGED
@@ -19,42 +19,33 @@ gem install girb girb-gemini
19
19
 
20
20
  ## セットアップ
21
21
 
22
- APIキーとプロバイダーを設定:
23
-
24
- ```bash
25
- export GEMINI_API_KEY=your-api-key
26
- export GIRB_PROVIDER=girb-gemini
27
- ```
28
-
29
- girbを起動:
30
-
31
- ```bash
32
- girb
33
- ```
34
-
35
- ### 通常のirbで使用する場合
22
+ ### 方法1: ~/.irbrcで設定(推奨)
36
23
 
37
24
  `~/.irbrc` に追加:
38
25
 
39
- ```ruby
40
- require 'girb-gemini'
41
- ```
42
-
43
- 通常の `irb` コマンドで使用できます。
44
-
45
- ## 手動設定
46
-
47
26
  ```ruby
48
27
  require 'girb-gemini'
49
28
 
50
29
  Girb.configure do |c|
51
30
  c.provider = Girb::Providers::Gemini.new(
52
- api_key: ENV['GEMINI_API_KEY'],
53
- model: 'gemini-2.5-flash' # デフォルト
31
+ api_key: 'your-api-key',
32
+ model: 'gemini-2.5-flash'
54
33
  )
55
34
  end
56
35
  ```
57
36
 
37
+ 通常の `irb` コマンドで使用できます。
38
+
39
+ ### 方法2: 環境変数で設定
40
+
41
+ ```bash
42
+ export GIRB_PROVIDER=girb-gemini
43
+ export GIRB_MODEL=gemini-2.5-flash # オプション、デフォルトは gemini-2.5-flash
44
+ export GEMINI_API_KEY=your-api-key
45
+ ```
46
+
47
+ `girb` コマンドで起動します。
48
+
58
49
  ## 利用可能なモデル
59
50
 
60
51
  - `gemini-2.5-flash` (デフォルト) - 高速で効率的
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GirbGemini
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
data/lib/girb-gemini.rb CHANGED
@@ -3,14 +3,16 @@
3
3
  require "girb"
4
4
  require_relative "girb/providers/gemini"
5
5
 
6
+ DEFAULT_MODEL = "gemini-2.5-flash"
7
+
6
8
  # Auto-configure Gemini provider if API key is available
7
9
  if ENV["GEMINI_API_KEY"]
10
+ model = ENV["GIRB_MODEL"] || DEFAULT_MODEL
11
+
8
12
  Girb.configure do |c|
9
- unless c.provider
10
- c.provider = Girb::Providers::Gemini.new(
11
- api_key: ENV["GEMINI_API_KEY"],
12
- model: c.model || "gemini-2.5-flash"
13
- )
14
- end
13
+ c.provider ||= Girb::Providers::Gemini.new(
14
+ api_key: ENV["GEMINI_API_KEY"],
15
+ model: model
16
+ )
15
17
  end
16
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: girb-gemini
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - rira100000000