coach_zed 0.5.5 → 0.5.6
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/coach_zed/feed_writer.rb +4 -3
- data/lib/coach_zed/version.rb +1 -1
- data/lib/coach_zed.rb +8 -3
- data/sig/coach_zed.rbs +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89d7e5c63ebae19ab549546064ed308a2c532790f1d73f1fe552d9cb2e72b6aa
|
|
4
|
+
data.tar.gz: 77f69adb4ffe3a286bf8b293d4ba88522d193db5d82b3d98f77d9017ba79e212
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5abcc3b5683b0518e0c5696b66f435470040c3113ae4feb5b87a316db61ccf391729a8175b8256de477f2f15536911ac7c19010525fb8120eabde025849a47e3
|
|
7
|
+
data.tar.gz: c7b654bf8944632353cd9e83eea5495902d251e429aac9f816c0d1ca999b4859702595fb3230ec69ba216f657a8b9884334e220251c63b1f3049dc14acd09dbb
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [](https://github.com/rossta/coach_zed/compare/v0.5.5...v) (2026-06-17)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* allow configured feed titles ([f9e6066](https://github.com/rossta/coach_zed/commit/f9e606623c58308fc4c5eb112c81e7212a538ce4))
|
|
1
6
|
## [](https://github.com/rossta/coach_zed/compare/v0.5.4...v) (2026-06-17)
|
|
2
7
|
|
|
3
8
|
### Bug Fixes
|
|
@@ -5,10 +5,11 @@ require "time"
|
|
|
5
5
|
|
|
6
6
|
class CoachZed
|
|
7
7
|
class FeedWriter
|
|
8
|
-
def initialize(schedule:, start_date:, existing_feed_content: nil)
|
|
8
|
+
def initialize(schedule:, start_date:, existing_feed_content: nil, calendar_name: nil)
|
|
9
9
|
@schedule = schedule
|
|
10
10
|
@start_date = start_date
|
|
11
11
|
@existing_feed_content = existing_feed_content
|
|
12
|
+
@calendar_name = calendar_name
|
|
12
13
|
end
|
|
13
14
|
|
|
14
15
|
def build
|
|
@@ -21,7 +22,7 @@ class CoachZed
|
|
|
21
22
|
|
|
22
23
|
private
|
|
23
24
|
|
|
24
|
-
attr_reader :schedule, :start_date, :existing_feed_content
|
|
25
|
+
attr_reader :schedule, :start_date, :existing_feed_content, :calendar_name
|
|
25
26
|
|
|
26
27
|
def fresh_feed
|
|
27
28
|
lines = header_lines
|
|
@@ -64,7 +65,7 @@ class CoachZed
|
|
|
64
65
|
end
|
|
65
66
|
|
|
66
67
|
def schedule_name
|
|
67
|
-
schedule["program_name"] || "Training Schedule"
|
|
68
|
+
calendar_name || schedule["program_name"] || "Training Schedule"
|
|
68
69
|
end
|
|
69
70
|
|
|
70
71
|
def generated_timestamp
|
data/lib/coach_zed/version.rb
CHANGED
data/lib/coach_zed.rb
CHANGED
|
@@ -19,19 +19,21 @@ class CoachZed
|
|
|
19
19
|
Result = Data.define(:schedule_path, :ics_path, :webcal_path, :schedule)
|
|
20
20
|
|
|
21
21
|
class Config
|
|
22
|
-
attr_accessor :workout_catalog_dir, :model, :output_dir, :feed_output_basename, :existing_feed_path
|
|
22
|
+
attr_accessor :workout_catalog_dir, :model, :output_dir, :feed_output_basename, :feed_title, :existing_feed_path
|
|
23
23
|
|
|
24
24
|
def initialize(
|
|
25
25
|
workout_catalog_dir: nil,
|
|
26
26
|
model: nil,
|
|
27
27
|
output_dir: nil,
|
|
28
28
|
feed_output_basename: nil,
|
|
29
|
+
feed_title: nil,
|
|
29
30
|
existing_feed_path: nil
|
|
30
31
|
)
|
|
31
32
|
@workout_catalog_dir = workout_catalog_dir
|
|
32
33
|
@model = model
|
|
33
34
|
@output_dir = output_dir
|
|
34
35
|
@feed_output_basename = feed_output_basename
|
|
36
|
+
@feed_title = feed_title
|
|
35
37
|
@existing_feed_path = existing_feed_path
|
|
36
38
|
end
|
|
37
39
|
|
|
@@ -97,6 +99,7 @@ class CoachZed
|
|
|
97
99
|
model: nil,
|
|
98
100
|
output_dir: nil,
|
|
99
101
|
feed_output_basename: nil,
|
|
102
|
+
feed_title: nil,
|
|
100
103
|
existing_feed_path: nil
|
|
101
104
|
)
|
|
102
105
|
config = self.class.config
|
|
@@ -108,6 +111,7 @@ class CoachZed
|
|
|
108
111
|
@schedule_output_dir = @output_dir.join("schedules")
|
|
109
112
|
@feed_output_dir = @output_dir.join("feeds")
|
|
110
113
|
@feed_output_basename = feed_output_basename.nil? ? config.feed_output_basename : feed_output_basename
|
|
114
|
+
@feed_title = feed_title.nil? ? config.feed_title : feed_title
|
|
111
115
|
resolved_existing_feed_path = existing_feed_path.nil? ? config.existing_feed_path : existing_feed_path
|
|
112
116
|
@existing_feed_path = resolved_existing_feed_path && Pathname(resolved_existing_feed_path)
|
|
113
117
|
end
|
|
@@ -146,7 +150,7 @@ class CoachZed
|
|
|
146
150
|
|
|
147
151
|
private
|
|
148
152
|
|
|
149
|
-
attr_reader :workout_catalog_dir, :ai_client, :output_dir, :schedule_output_dir, :feed_output_dir, :feed_output_basename, :existing_feed_path
|
|
153
|
+
attr_reader :workout_catalog_dir, :ai_client, :output_dir, :schedule_output_dir, :feed_output_dir, :feed_output_basename, :feed_title, :existing_feed_path
|
|
150
154
|
|
|
151
155
|
def wrap_client(client, model:)
|
|
152
156
|
return client if client.is_a?(Clients::RubyOpenAI)
|
|
@@ -277,7 +281,8 @@ class CoachZed
|
|
|
277
281
|
feed = FeedWriter.new(
|
|
278
282
|
schedule:,
|
|
279
283
|
start_date:,
|
|
280
|
-
existing_feed_content: existing_feed&.feed_content
|
|
284
|
+
existing_feed_content: existing_feed&.feed_content,
|
|
285
|
+
calendar_name: feed_title
|
|
281
286
|
).build
|
|
282
287
|
ics_path = base_path.sub_ext(".ics")
|
|
283
288
|
webcal_path = base_path.sub_ext(".webcal")
|
data/sig/coach_zed.rbs
CHANGED
|
@@ -25,6 +25,7 @@ class CoachZed
|
|
|
25
25
|
attr_accessor model: String?
|
|
26
26
|
attr_accessor output_dir: String?
|
|
27
27
|
attr_accessor feed_output_basename: String?
|
|
28
|
+
attr_accessor feed_title: String?
|
|
28
29
|
attr_accessor existing_feed_path: String?
|
|
29
30
|
|
|
30
31
|
def initialize: (
|
|
@@ -32,6 +33,7 @@ class CoachZed
|
|
|
32
33
|
?model: String?,
|
|
33
34
|
?output_dir: String?,
|
|
34
35
|
?feed_output_basename: String?,
|
|
36
|
+
?feed_title: String?,
|
|
35
37
|
?existing_feed_path: String?
|
|
36
38
|
) -> void
|
|
37
39
|
|
|
@@ -51,6 +53,7 @@ class CoachZed
|
|
|
51
53
|
attr_reader schedule_output_dir: Pathname
|
|
52
54
|
attr_reader feed_output_dir: Pathname
|
|
53
55
|
attr_reader feed_output_basename: String?
|
|
56
|
+
attr_reader feed_title: String?
|
|
54
57
|
attr_reader existing_feed_path: Pathname?
|
|
55
58
|
|
|
56
59
|
def initialize: (
|
|
@@ -59,6 +62,7 @@ class CoachZed
|
|
|
59
62
|
?model: String?,
|
|
60
63
|
?output_dir: String?,
|
|
61
64
|
?feed_output_basename: String?,
|
|
65
|
+
?feed_title: String?,
|
|
62
66
|
?existing_feed_path: String?
|
|
63
67
|
) -> void
|
|
64
68
|
|
|
@@ -192,11 +196,13 @@ class CoachZed
|
|
|
192
196
|
attr_reader schedule: Hash[String, untyped]
|
|
193
197
|
attr_reader start_date: Date
|
|
194
198
|
attr_reader existing_feed_content: String?
|
|
199
|
+
attr_reader calendar_name: String?
|
|
195
200
|
|
|
196
201
|
def initialize: (
|
|
197
202
|
schedule: Hash[String, untyped],
|
|
198
203
|
start_date: Date,
|
|
199
|
-
?existing_feed_content: String
|
|
204
|
+
?existing_feed_content: String?,
|
|
205
|
+
?calendar_name: String?
|
|
200
206
|
) -> void
|
|
201
207
|
|
|
202
208
|
def build: -> String
|