conversant 1.0.16

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 (64) hide show
  1. checksums.yaml +7 -0
  2. data/.env.example +39 -0
  3. data/.gitignore +52 -0
  4. data/.gitlab-ci.yml +108 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +16 -0
  7. data/.yardopts +7 -0
  8. data/CHANGELOG.md +487 -0
  9. data/Gemfile +12 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +860 -0
  12. data/RELEASE.md +726 -0
  13. data/Rakefile +21 -0
  14. data/conversant.gemspec +49 -0
  15. data/examples/inheritance_integration.rb +348 -0
  16. data/examples/rails_initializer.rb +69 -0
  17. data/lib/conversant/configuration.rb +132 -0
  18. data/lib/conversant/v3/base.rb +47 -0
  19. data/lib/conversant/v3/http_client.rb +456 -0
  20. data/lib/conversant/v3/mixins/authentication.rb +221 -0
  21. data/lib/conversant/v3/services/authorization.rb +194 -0
  22. data/lib/conversant/v3/services/cdn/analytics.rb +483 -0
  23. data/lib/conversant/v3/services/cdn/audit.rb +71 -0
  24. data/lib/conversant/v3/services/cdn/business.rb +122 -0
  25. data/lib/conversant/v3/services/cdn/certificate.rb +180 -0
  26. data/lib/conversant/v3/services/cdn/dashboard.rb +109 -0
  27. data/lib/conversant/v3/services/cdn/domain.rb +223 -0
  28. data/lib/conversant/v3/services/cdn/monitoring.rb +65 -0
  29. data/lib/conversant/v3/services/cdn/partner/analytics.rb +233 -0
  30. data/lib/conversant/v3/services/cdn/partner.rb +60 -0
  31. data/lib/conversant/v3/services/cdn.rb +221 -0
  32. data/lib/conversant/v3/services/lms/dashboard.rb +99 -0
  33. data/lib/conversant/v3/services/lms/domain.rb +108 -0
  34. data/lib/conversant/v3/services/lms/job.rb +211 -0
  35. data/lib/conversant/v3/services/lms/partner/analytics.rb +266 -0
  36. data/lib/conversant/v3/services/lms/partner/business.rb +151 -0
  37. data/lib/conversant/v3/services/lms/partner/report.rb +170 -0
  38. data/lib/conversant/v3/services/lms/partner.rb +58 -0
  39. data/lib/conversant/v3/services/lms/preset.rb +57 -0
  40. data/lib/conversant/v3/services/lms.rb +173 -0
  41. data/lib/conversant/v3/services/oss/partner/analytics.rb +105 -0
  42. data/lib/conversant/v3/services/oss/partner.rb +48 -0
  43. data/lib/conversant/v3/services/oss.rb +128 -0
  44. data/lib/conversant/v3/services/portal/dashboard.rb +114 -0
  45. data/lib/conversant/v3/services/portal.rb +219 -0
  46. data/lib/conversant/v3/services/vms/analytics.rb +114 -0
  47. data/lib/conversant/v3/services/vms/business.rb +190 -0
  48. data/lib/conversant/v3/services/vms/partner/analytics.rb +133 -0
  49. data/lib/conversant/v3/services/vms/partner/business.rb +90 -0
  50. data/lib/conversant/v3/services/vms/partner.rb +57 -0
  51. data/lib/conversant/v3/services/vms/transcoding.rb +184 -0
  52. data/lib/conversant/v3/services/vms.rb +166 -0
  53. data/lib/conversant/v3.rb +36 -0
  54. data/lib/conversant/version.rb +5 -0
  55. data/lib/conversant.rb +108 -0
  56. data/publish.sh +107 -0
  57. data/sig/conversant/v3/services/authorization.rbs +34 -0
  58. data/sig/conversant/v3/services/cdn.rbs +123 -0
  59. data/sig/conversant/v3/services/lms.rbs +80 -0
  60. data/sig/conversant/v3/services/portal.rbs +22 -0
  61. data/sig/conversant/v3/services/vms.rbs +64 -0
  62. data/sig/conversant/v3.rbs +85 -0
  63. data/sig/conversant.rbs +37 -0
  64. metadata +267 -0
data/CHANGELOG.md ADDED
@@ -0,0 +1,487 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.16] - 2025-10-01
9
+
10
+ ### Added
11
+ - **VMS Partner Analytics Enhancement**: Added missing business logic to match original implementation
12
+ - Added `VMS::Partner::Business` class with aggregation methods:
13
+ - `transcoding(**args)` - Aggregates VOD transcoding with codec breakdown (H264/H265, SD/HD/UHD)
14
+ - Returns hash with `:vms_transcoding`, `:vms_transmuxing`, `:vms_transcoding_sd`, `:vms_transcoding_hd`, `:vms_transcoding_uhd`
15
+ - Added `queries(**args)` private helper method for auto-generating parameters:
16
+ - Auto-generates `month` (YYYYMM format, defaults to current month)
17
+ - Auto-generates `customerType` (defaults to parent's type or 2)
18
+ - Auto-generates `timestamp` (milliseconds since epoch)
19
+
20
+ ### Changed
21
+ - **VMS Partner Analytics API**: Improved method signatures and return values for consistency
22
+ - Changed `duration_of_vod(params)` to `duration_of_vod(**args)` with auto-parameter generation
23
+ - Changed return values from `nil` to `[]` (empty array) on errors
24
+ - Added `&.map(&:with_indifferent_access)` to match original implementation behavior
25
+ - Added nil response checks before JSON parsing
26
+ - Methods updated: `duration_of_vod`, `duration`
27
+
28
+ ### Impact
29
+ - VMS partner analytics now fully matches original `@services` implementation
30
+ - More convenient API with auto-parameter generation (defaults to current month)
31
+ - Business aggregation methods provide codec breakdowns for billing and capacity planning
32
+ - Both `duration_of_vod` and `duration` methods available in main Analytics class
33
+ - Backward compatible - existing code continues to work
34
+
35
+ ### Usage Examples
36
+ ```ruby
37
+ vms = Conversant::V3.vms(12345)
38
+
39
+ # Auto-parameter generation (uses current month)
40
+ vms.partner.analytics.duration_of_vod
41
+ vms.partner.analytics.duration_of_vod(startTime: Time.parse('2025-01-01'))
42
+
43
+ # Duration by year
44
+ vms.partner.analytics.duration(year: '2025')
45
+
46
+ # Business aggregation
47
+ business = vms.partner.analytics.business
48
+ metrics = business.transcoding(startTime: Time.now.beginning_of_month)
49
+ # => { vms_transcoding: 1000, vms_transcoding_sd: 300, vms_transcoding_hd: 500, ... }
50
+ ```
51
+
52
+ ## [1.0.15] - 2025-10-01
53
+
54
+ ### Added
55
+ - **LMS Partner Analytics Enhancement**: Added missing business logic and reporting methods to match original implementation
56
+ - Added `LMS::Partner::Report` class with detailed reporting methods:
57
+ - `transcodings(payload)` - Transcoding analytics data
58
+ - `recordings(payload)` - Recording analytics data
59
+ - `jobs(payload)` - Job count analytics
60
+ - `duration_v2_transcoding(payload)` - V2 transcoding endpoint
61
+ - `bussiness_live_usage(payload)` - Business live usage data
62
+ - Added `LMS::Partner::Business` class with aggregation methods:
63
+ - `transcoding(**args)` - Aggregates transcoding with codec breakdown (H264/H265, SD/HD/UHD)
64
+ - `recording(**args)` - Aggregates recording with codec breakdown and totals
65
+ - `stream_jobs(**args)` - Alias for number of live jobs
66
+ - Added `queries(**args)` private helper method for auto-generating parameters:
67
+ - Auto-generates `month` (YYYYMM format, defaults to current month)
68
+ - Auto-generates `customerType` (defaults to parent's type or 2)
69
+ - Auto-generates `timestamp` (milliseconds since epoch)
70
+
71
+ ### Changed
72
+ - **LMS Partner Analytics API**: Improved method signatures and return values for consistency
73
+ - Changed method signatures from `method(params)` to `method(**args)` for keyword arguments
74
+ - Changed return values from `nil` to `[]` (empty array) on errors
75
+ - Added `&.map(&:with_indifferent_access)` to match original implementation behavior
76
+ - Added nil response checks before JSON parsing
77
+ - Methods updated: `duration_of_live`, `duration_of_live_recording`, `no_of_live_jobs`, `durations`
78
+
79
+ ### Impact
80
+ - LMS partner analytics now fully matches original `@services` implementation
81
+ - More convenient API with auto-parameter generation (e.g., defaults to current month)
82
+ - Business aggregation methods provide codec breakdowns for billing and capacity planning
83
+ - Report methods provide detailed analytics for transcoding, recording, and jobs
84
+ - Backward compatible - existing code continues to work
85
+
86
+ ### Usage Examples
87
+ ```ruby
88
+ lms = Conversant::V3.lms(12345)
89
+
90
+ # Auto-parameter generation (uses current month)
91
+ lms.partner.analytics.duration_of_live
92
+ lms.partner.analytics.duration_of_live(startTime: Time.parse('2025-01-01'))
93
+
94
+ # Report methods
95
+ report = lms.partner.analytics.report
96
+ report.transcodings(startTime: '2025-01-01', endTime: '2025-01-31')
97
+
98
+ # Business aggregation
99
+ business = lms.partner.analytics.business
100
+ metrics = business.transcoding(startTime: Time.now.beginning_of_month)
101
+ # => { lms_transcoding: 1000, lms_transcoding_sd: 300, ... }
102
+ ```
103
+
104
+ ## [1.0.14] - 2025-10-01
105
+
106
+ ### Fixed
107
+ - **Portal Service**: Fixed SESSION cookie authorization issue
108
+ - Changed from manual `'Cookie'` header string to `:cookies` hash option
109
+ - Fixed header names to use lowercase symbols (`:authority`, `:referer`, `:user_agent`)
110
+ - Added proper error handling with `RestClient::Unauthorized` and `RestClient::Forbidden` rescue blocks
111
+ - Portal now correctly obtains SESSION cookie when calling `portal.appliances`
112
+
113
+ ### Changed
114
+ - **Logger Pattern**: Refactored all nested service classes to use `#{__method__}` for dynamic method name reflection
115
+ - Updated 40+ methods across 14 files to use dynamic method names in error logs
116
+ - Pattern changed from hardcoded method names (e.g., `METHOD:bandwidth.EXCEPTION`) to dynamic `METHOD:#{__method__}.EXCEPTION`
117
+ - Improved maintainability and reduced risk of copy-paste errors in logging
118
+ - Affected files: CDN (analytics, domain, certificate, business, monitoring, audit, partner/analytics), LMS (domain, dashboard, partner/analytics), VMS (transcoding, analytics, business, partner/analytics), OSS (partner/analytics), Portal (dashboard)
119
+
120
+ ### Impact
121
+ - Portal service now works correctly with proper cookie handling
122
+ - Eliminated "warning: overriding 'Cookie' header with :cookies option" message
123
+ - Logger output now dynamically reflects actual method names for better debugging
124
+ - Consistent logging pattern across all nested service classes
125
+
126
+ ## [1.0.13] - 2025-09-30
127
+
128
+ ### Fixed
129
+ - **OSS Service**: Corrected OSS endpoint configuration and authentication flow
130
+ - Added `PRIVATE_OSS_ENDPOINT` configuration variable
131
+ - Fixed OSS to use its own endpoint instead of CDN endpoint for API calls
132
+ - Corrected authorization URL: `https://oss.swiftfederation.com/?customerId={id}&isHideMenu=f&t={timestamp}`
133
+ - OSS now properly authenticates via its own endpoint before making API calls
134
+
135
+ ### Added
136
+ - **OSS Partner Analytics**: Enhanced analytics methods for better usability
137
+ - Added `current_month_usage(payload)` method to get current month's disk usage
138
+ - Improved `usages(year, params)` to return array of monthly data
139
+ - Better alignment with existing business logic patterns
140
+
141
+ ### Changed
142
+ - **Configuration**: Added `private_oss_endpoint` accessor for OSS API endpoint
143
+ - **OSS Authentication**: Now uses OSS-specific authorization URL with timestamp parameter
144
+ - **Service Endpoint**: OSS `service_endpoint` now correctly returns OSS endpoint (not CDN)
145
+
146
+ ### Impact
147
+ - OSS service now works correctly with proper endpoint separation
148
+ - API calls go to `PRIVATE_OSS_ENDPOINT`, authentication uses same endpoint
149
+ - Current month usage method provides convenient access to billing data
150
+ - Matches original implementation behavior
151
+
152
+ ## [1.0.12] - 2025-09-30
153
+
154
+ ### Added
155
+ - **OSS Service**: Separated OSS as a standalone service at the same level as CDN, LMS, and VMS
156
+ - New factory method: `Conversant::V3.oss(customer_id)`
157
+ - Created `lib/conversant/v3/services/oss.rb` main service class
158
+ - Created `lib/conversant/v3/services/oss/partner.rb` partner wrapper
159
+ - OSS now has its own independent service hierarchy
160
+
161
+ ### Changed
162
+ - **Partner Analytics Refactoring**: Major restructuring of partner analytics architecture
163
+ - Moved partner analytics from `Partner::Analytics::*` to `Service::Partner::Analytics`
164
+ - **CDN**: `Partner::Analytics::CDN` → `CDN::Partner::Analytics`
165
+ - **LMS**: `Partner::Analytics::LMS` → `LMS::Partner::Analytics`
166
+ - **VMS**: `Partner::Analytics::VMS` → `VMS::Partner::Analytics`
167
+ - **OSS**: `Partner::Analytics::OSS` → `OSS::Partner::Analytics`
168
+ - Each service now owns its partner analytics implementation
169
+ - Removed old `lib/conversant/v3/services/partner/analytics/` directory
170
+ - Analytics classes properly nested under their parent services
171
+
172
+ - **Service Structure**: Cleaner and more consistent service hierarchy
173
+ - Partner wrapper classes for all services (CDN, LMS, VMS, OSS)
174
+ - Consistent `service.partner.analytics` pattern across all services
175
+
176
+ ### Deprecated
177
+ - `cdn.partner_oss` - Use `oss = Conversant::V3.oss(customer_id); oss.partner.analytics` instead
178
+ - `cdn.partner.oss` - Use standalone OSS service instead
179
+ - All deprecated methods maintained for backward compatibility
180
+
181
+ ### Breaking Changes
182
+ - **None** - All changes are backward compatible
183
+ - Old methods still work but are marked as deprecated
184
+ - `Partner::Analytics::*` module structure removed (implementation moved to service-specific classes)
185
+
186
+ ### Impact
187
+ - Cleaner service architecture with proper class nesting
188
+ - OSS is now a first-class service alongside CDN, LMS, and VMS
189
+ - Partner analytics better organized under their respective services
190
+ - Improved maintainability and code organization
191
+ - All existing code continues to work with deprecation warnings
192
+
193
+ ### Migration Guide
194
+ **Old Usage (deprecated but still works):**
195
+ ```ruby
196
+ cdn = Conversant::V3.cdn(12345)
197
+ cdn.partner_analytics.bandwidth(payload)
198
+ cdn.partner_oss.usages("2025")
199
+ ```
200
+
201
+ **New Usage:**
202
+ ```ruby
203
+ cdn = Conversant::V3.cdn(12345)
204
+ cdn.partner.analytics.bandwidth(payload)
205
+
206
+ oss = Conversant::V3.oss(12345)
207
+ oss.partner.analytics.usages("2025")
208
+ ```
209
+
210
+ ## [1.0.11] - 2025-09-30
211
+
212
+ ### Fixed
213
+ - **Documentation**: Fixed incorrect usage examples across all service classes
214
+ - Corrected 11 YARD documentation examples showing keyword argument syntax `service(customer_id: 12345)` to use correct positional argument syntax `service(12345)`
215
+ - Fixed main service classes: VMS, LMS, Portal (CDN was already correct)
216
+ - Fixed nested service classes: VMS::Business, VMS::Analytics, VMS::Transcoding, LMS::Job, LMS::Preset, CDN::Analytics, CDN::Dashboard, CDN::Monitoring, CDN::Audit
217
+ - All examples now match the actual method signatures in `lib/conversant/v3.rb`
218
+
219
+ ### Impact
220
+ - Documentation accuracy improved - examples now show correct API usage
221
+ - No code changes - this is a documentation-only release
222
+ - Fixes confusion where documentation showed `Conversant::V3.vms(customer_id: 12345)` but actual usage requires `Conversant::V3.vms(12345)`
223
+
224
+ ## [1.0.10] - 2025-09-30
225
+
226
+ ### Documentation
227
+ - Added "Version Notes" section to README.md highlighting critical authentication fixes in v1.0.9
228
+ - Improved visibility of recent bug fixes for LMS/VMS services
229
+ - Enhanced user awareness of recommended upgrades
230
+
231
+ ### Note
232
+ This is a documentation-only release. No code changes from v1.0.9.
233
+
234
+ ## [1.0.9] - 2025-09-30
235
+
236
+ ### Fixed
237
+ - **Critical Authentication Bug**: Fixed service-specific session cookie authentication for LMS and VMS services
238
+ - Changed `fetch_new_session` from using `RestClient::Request.execute` with `'Cookie'` header to `RestClient.get` with `:cookies` option
239
+ - Fixed `respond_to?(:session_cookie_name)` to check protected methods by adding `true` parameter
240
+ - Corrected method visibility for `session_cookie_name`, `service_endpoint`, and `requires_session?` in LMS service (moved to `protected` section)
241
+ - Fixed Redis cache key generation for JSESSIONID - was incorrectly using `SESSION` instead of `JSESSIONID` for LMS/VMS
242
+ - LMS and VMS services now correctly obtain and cache JSESSIONID cookies from service endpoints
243
+ - Fixed cookie header format to use proper RestClient `:cookies` hash instead of manual `'Cookie'` string header
244
+
245
+ ### Changed
246
+ - Simplified `fetch_sso_session` to always retrieve from `authenticate()` method instead of checking per-customer Redis cache
247
+ - All service `fetch_new_session` methods now use consistent `RestClient.get` with `:cookies` option format
248
+ - Improved error handling in all service `fetch_new_session` methods with specific `RestClient::Unauthorized` and `RestClient::Forbidden` rescue blocks
249
+
250
+ ### Impact
251
+ - LMS API calls (e.g., `lms.job.where()`) now work correctly with proper JSESSIONID authentication
252
+ - VMS API calls now work correctly with proper JSESSIONID authentication
253
+ - CDN API calls continue to work with SESSION cookie (no changes to behavior)
254
+ - Fixes "Missing JSESSIONID for LMS" error that prevented all LMS operations
255
+
256
+ ## [1.0.8] - 2025-09-30
257
+
258
+ ### Added
259
+ - **CDN Analytics**: 13 new analytics methods for comprehensive reporting
260
+ - `request_hit_rate` - Request hit rate metrics
261
+ - `byte_hit_rate` - Byte hit rate metrics
262
+ - `origin_bandwidth` - Origin bandwidth usage
263
+ - `number_of_concurrent_viewers` - Concurrent viewer metrics
264
+ - `origin_http_codes` - Origin HTTP status code distribution
265
+ - `referrer_total_by_domain` - Total referrer statistics by domain
266
+ - `referrer_csv_by_domain` - Referrer data CSV export
267
+ - `popular_content_url_total_by_domain` - Total popular content statistics
268
+ - `popular_content_url_csv_by_domain` - Popular content CSV export
269
+ - `request_visit_number` - Request and visit number metrics
270
+ - `isp` - ISP distribution analytics
271
+ - `user_agent` - User agent analytics
272
+ - `user_agent_csv` - User agent CSV export
273
+ - **CDN Dashboard**: New dashboard service for quick daily metrics
274
+ - `bandwidth` - Daily bandwidth aggregates
275
+ - `volume` - Daily volume aggregates
276
+ - **LMS LiveTranscoding::Preset**: Transcoding preset management
277
+ - `all` - List all available transcoding presets
278
+ - **Portal Dashboard**: Customer metadata and reporting service (4 endpoints)
279
+ - `products` - Product usage reports
280
+ - `countries` - Geographic distribution data
281
+ - `industries` - Industry classification data
282
+ - `tree_view` - Organizational hierarchy view
283
+ - **Partner Analytics CDN**: Partner-level CDN reporting (10 endpoints)
284
+ - `bandwidth`, `volume`, `request_per_second`, `viewers` - Partner-level metrics
285
+ - `domain_traffic_usage` - Traffic usage for billing
286
+ - `usages`, `storage` - Storage usage metrics
287
+ - `domain_volume`, `domain_http_codes`, `domain_rps` - Domain-specific analytics
288
+ - **Partner Analytics LMS**: Partner-level LMS reporting (8 endpoints)
289
+ - `duration_of_live`, `duration_of_live_recording`, `no_of_live_jobs` - Business metrics
290
+ - `durations`, `transcodings`, `recordings`, `jobs` - Detailed reporting
291
+ - `duration_v2_transcoding` - Enhanced transcoding metrics
292
+ - **Partner Analytics VMS**: Partner-level VMS reporting (2 endpoints)
293
+ - `duration_of_vod` - VOD duration metrics
294
+ - `duration` - Transcoding duration analytics
295
+ - **Partner Analytics OSS**: Partner-level OSS storage reporting (1 endpoint)
296
+ - `usages` - Storage usage by year
297
+
298
+ ### Improved
299
+ - API coverage increased from 36% (29/80 endpoints) to **100% (80/80 endpoints)**
300
+ - All endpoints from CONVERSANT_API_USAGE_REPORT.md now implemented
301
+ - Comprehensive YARD documentation for all new classes and methods
302
+ - Consistent error handling across all partner analytics services
303
+ - Partner-level reporting now available across all service types (CDN, LMS, VMS, OSS)
304
+
305
+ ### Documentation
306
+ - Added detailed usage examples for all new analytics methods
307
+ - Documented partner analytics architecture and access patterns
308
+ - Complete @param, @return, @example tags for all new methods
309
+ - Added cross-references between customer and partner analytics
310
+
311
+ ## [1.0.7] - 2025-09-30
312
+
313
+ ### Added
314
+ - Comprehensive YARD documentation for HttpClient module with method descriptions and examples
315
+ - Complete YARD documentation for Portal service with detailed API examples
316
+ - YARD documentation for Authorization module explaining the shared authorization pattern
317
+ - Type annotations for Authentication mixin instance variables (@customer_id, @type)
318
+
319
+ ### Changed
320
+ - **BREAKING IMPROVEMENT**: Refactored Authentication mixin to delegate to service classes instead of duplicating authorization logic
321
+ - All services (Portal, CDN, VMS, LMS) now consistently implement Authorization module pattern
322
+ - Portal service authentication updated to exchange root sessions (consistent with other services)
323
+ - Authentication mixin now properly reuses Authorization module through service delegation
324
+ - Updated README authentication architecture section to reflect consistent Authorization module usage
325
+
326
+ ### Improved
327
+ - Eliminated 170+ lines of duplicate authorization code from Authentication mixin
328
+ - Code maintainability through service delegation pattern
329
+ - All services now validate session cookies before making API calls
330
+ - Consistent session caching behavior across all services
331
+ - Better type safety with complete RBS signatures for Authentication mixin
332
+
333
+ ### Fixed
334
+ - Portal service now correctly exchanges root sessions for customer-specific SESSION cookie
335
+ - LMS service authorization implementation now matches CDN/VMS consistency
336
+ - Missing timeout settings added to Portal and CDN session fetching
337
+ - Session validation bugs in LMS service call method
338
+ - Cookie jar thread-safety documentation and type signatures in HttpClient
339
+
340
+ ### Documentation
341
+ - Added module-level documentation for HttpClient with usage examples
342
+ - Documented all private methods in HttpClient (http_get, http_post, cookie handling)
343
+ - Complete API documentation for Portal.appliances method with examples
344
+ - Updated README to reflect Authorization module as foundation of all services
345
+ - Added session validation documentation explaining automatic cookie checks
346
+
347
+ ## [1.0.6] - 2025-09-30
348
+
349
+ ### Added
350
+ - Shared Authorization module for DRY authorization logic across all services
351
+ - Comprehensive YARD documentation for LMS and VMS services (80.27% coverage, up from 59.18%)
352
+ - Portal service now uses shared Authorization module
353
+ - Complete RBS type signatures for Authorization module
354
+ - Documentation for all service accessor methods
355
+
356
+ ### Changed
357
+ - Refactored authorization logic into shared Authorization module
358
+ - All services (CDN, LMS, VMS, Portal) now use consistent authorization pattern
359
+ - Improved `authorize` method with cleaner separation of concerns
360
+ - Standardized logging format across all service nested classes
361
+ - Updated all RBS type signatures to match refactored code structure
362
+
363
+ ### Improved
364
+ - Code maintainability through centralized authorization logic
365
+ - Reduced code duplication across services (~60% reduction)
366
+ - Consistent error handling and session management
367
+ - Better separation between caching and session fetching logic
368
+ - Documentation coverage increased from 59.18% to 80.27%
369
+
370
+ ### Fixed
371
+ - RuboCop style issues in Authorization module
372
+ - Missing RBS type signatures for new methods
373
+ - Logging format consistency in nested service classes
374
+
375
+ ## [1.0.5] - 2025-09-30
376
+
377
+ ### Fixed
378
+ - Fixed HTTP 500 errors when calling CDN, LMS, and VMS APIs
379
+ - Corrected cookie header format for RestClient compatibility
380
+ - Fixed authentication headers to use proper HTTP header format with Cookie string
381
+ - Resolved issue where cookies were passed as hash instead of formatted header string
382
+
383
+ ### Changed
384
+ - All service authorized_headers methods now return plain HTTP headers hash with Cookie header
385
+ - Updated request method to handle string keys in headers hash
386
+ - Improved error handling in HTTP client to return status code with errors
387
+
388
+ ### Added
389
+ - Complete RBS type signatures for private methods in LMS::Job class
390
+ - Added missing method signatures for VMS::VodTranscoding, Analytics, and Business classes
391
+ - Added extract_month private method signature to VMS::Business
392
+
393
+ ### Removed
394
+ - Removed unimplemented method signatures (hits, status_codes, top_urls) from CDN::Analytics RBS files
395
+
396
+ ## [1.0.4] - 2025-09-30
397
+
398
+ ### Fixed
399
+ - Fixed "uninitialized constant" error for nested service classes (Certificate, Domain, Business, etc.)
400
+ - Resolved loading order issue by requiring nested classes after parent class definition
401
+ - Fixed superclass mismatch error in Rails applications with Zeitwerk
402
+
403
+ ### Changed
404
+ - Moved require statements for nested service classes to end of parent class files (after class definition)
405
+ - All service classes now use absolute namespace inheritance (::Conversant::V3::Base)
406
+ - This allows keeping the original directory structure (cdn/, lms/) while avoiding Zeitwerk conflicts
407
+
408
+ ## [1.0.3] - 2025-09-30
409
+
410
+ ### Fixed
411
+ - Fixed superclass mismatch error when loading in Rails applications
412
+ - Use absolute namespace paths (::Conversant::V3::Base) to prevent conflicts with existing code
413
+ - Resolved namespace collision with Utils::Conversant classes in legacy codebases
414
+ - Fixed Zeitwerk autoloading conflict by renaming service subdirectories (cdn/ → cdn_services/, lms/ → lms_services/)
415
+
416
+ ### Changed
417
+ - All service classes now explicitly inherit from ::Conversant::V3::Base to avoid constant resolution issues
418
+ - Renamed service subdirectories to avoid file/directory naming conflicts in Rails with Zeitwerk
419
+
420
+ ## [1.0.2] - 2025-09-30
421
+
422
+ ### Added
423
+ - Complete CDN domain management functionality (create, find, find_by, all, total_current_disk_usage)
424
+ - CDN certificate management for SSL/TLS certificates and Let's Encrypt auto-certificates
425
+ - CDN business metrics service for billing and 95th percentile bandwidth calculations
426
+ - VMS (Video Management System) service with VOD transcoding, analytics, and business modules
427
+ - OSS (Object Storage Service) placeholder for S3-compatible storage operations
428
+ - LMS domain and dashboard management modules
429
+ - Comprehensive YARD documentation for all CDN service classes
430
+ - RBS type signatures for complete type coverage of CDN services
431
+ - Enhanced authentication mixin with VMS support
432
+ - Support for PRIVATE_VMS_ENDPOINT configuration
433
+
434
+ ### Enhanced
435
+ - CDN service now includes six sub-services: Analytics, Monitoring, Audit, Domain, Business, Certificate
436
+ - Improved README with comprehensive usage examples and API documentation
437
+ - Added troubleshooting section with common issues and solutions
438
+ - Expanded authentication architecture documentation
439
+ - Added performance optimization tips
440
+
441
+ ### Documentation
442
+ - Complete YARD documentation with @example tags for all CDN classes
443
+ - RBS type signatures in sig/ directory for better IDE support
444
+ - Detailed API reference for all services (Portal, CDN, LMS, VMS, OSS)
445
+ - Real-world usage examples for domain management, analytics, certificates, and monitoring
446
+ - Migration guide from existing ConversantHttpClientV3 implementations
447
+
448
+ ## [1.0.1] - 2025-09-29
449
+
450
+ ### Changed
451
+ - Removed all emoji icons from README.md for better compatibility
452
+ - Improved documentation formatting
453
+
454
+ ## [1.0.0] - 2025-09-29
455
+
456
+ ### Added
457
+ - Initial release of Conversant Ruby gem
458
+ - V3 SSO authentication with session management
459
+ - Portal service for appliance management
460
+ - CDN service with analytics, monitoring, and audit capabilities
461
+ - LMS service for streaming job management
462
+ - Zero-configuration support using existing CONVERSANT ENV variables
463
+ - Redis-based session caching with configurable TTL
464
+ - Thread-safe cookie jar implementation
465
+ - Support for inheritance patterns to extend services
466
+ - Authentication mixin for existing code integration
467
+ - Comprehensive error handling with custom exception classes
468
+ - Auto-configuration from environment variables
469
+ - Support for both direct usage and inheritance patterns
470
+ - Drop-in replacement for ConversantHttpClientV3
471
+ - Full documentation and examples
472
+
473
+ ### Features
474
+ - Automatic detection of CONVERSANT environment variables
475
+ - Multi-tier authentication system (Portal, CDN, LMS)
476
+ - Service-specific session management
477
+ - HTML entity decoding for proper form URL handling
478
+ - Configurable debug mode and logging
479
+ - Rails integration support
480
+
481
+ [1.0.6]: https://github.com/yourusername/conversant/releases/tag/v1.0.6
482
+ [1.0.5]: https://github.com/yourusername/conversant/releases/tag/v1.0.5
483
+ [1.0.4]: https://gitlab.vnetwork.dev/gems/conversant/-/releases/v1.0.4
484
+ [1.0.3]: https://gitlab.vnetwork.dev/gems/conversant/-/releases/v1.0.3
485
+ [1.0.2]: https://gitlab.vnetwork.dev/gems/conversant/-/releases/v1.0.2
486
+ [1.0.1]: https://gitlab.vnetwork.dev/gems/conversant/-/releases/v1.0.1
487
+ [1.0.0]: https://gitlab.vnetwork.dev/gems/conversant/-/releases/v1.0.0
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in conversant.gemspec
6
+ gemspec
7
+
8
+ # Additional development dependencies if needed
9
+ group :development, :test do
10
+ gem 'pry-byebug'
11
+ gem 'simplecov', require: false
12
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 [Tho Nguyen]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.