Skip to content

Commit 588a31a

Browse files
committed
Updates
1 parent ce0105f commit 588a31a

21 files changed

+1753
-6
lines changed

.github/workflows/publish-ruby.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# .github/workflows/publish-ruby.yml
2+
name: Publish Ruby Gem
3+
4+
on:
5+
release:
6+
types: [published]
7+
push:
8+
tags:
9+
- "v*"
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Ruby
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: "3.1"
22+
bundler-cache: true
23+
24+
- name: Extract version from tag
25+
id: version
26+
run: |
27+
if [[ $GITHUB_REF == refs/tags/* ]]; then
28+
VERSION=${GITHUB_REF#refs/tags/v}
29+
echo "version=$VERSION" >> $GITHUB_OUTPUT
30+
echo "Publishing version: $VERSION"
31+
else
32+
echo "Not a tag push, skipping"
33+
exit 1
34+
fi
35+
36+
- name: Verify version matches gemspec
37+
run: |
38+
GEMSPEC_VERSION=$(ruby -e "spec = eval(File.read(Dir.glob('*.gemspec').first)); puts spec.version")
39+
TAG_VERSION="${{ steps.version.outputs.version }}"
40+
41+
if [ "$GEMSPEC_VERSION" != "$TAG_VERSION" ]; then
42+
echo "Version mismatch: gemspec=$GEMSPEC_VERSION, tag=$TAG_VERSION"
43+
echo "Your Python script should have already updated the gemspec version"
44+
exit 1
45+
fi
46+
47+
echo "Version verified: $GEMSPEC_VERSION"
48+
49+
- name: Run tests (if they exist)
50+
run: |
51+
if [ -f "spec/spec_helper.rb" ] || [ -f "test/test_helper.rb" ]; then
52+
bundle exec rake test || bundle exec rspec || echo "Tests not configured, skipping"
53+
else
54+
echo "No tests found, skipping"
55+
fi
56+
57+
- name: Build gem
58+
run: |
59+
gem build *.gemspec
60+
echo "Built gem files:"
61+
ls -la *.gem
62+
63+
- name: Configure RubyGems credentials
64+
run: |
65+
mkdir -p ~/.gem
66+
echo ":rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials
67+
chmod 600 ~/.gem/credentials
68+
69+
- name: Publish to RubyGems
70+
run: |
71+
GEM_FILE=$(ls *.gem | head -1)
72+
echo "Publishing $GEM_FILE to RubyGems..."
73+
gem push "$GEM_FILE"
74+
echo "✓ Successfully published to RubyGems.org"
75+
76+
- name: Clean up credentials
77+
if: always()
78+
run: rm -f ~/.gem/credentials

.openapi-generator/FILES

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ Rakefile
99
docs/ClientProfileResource.md
1010
docs/ClientProfileResourceComputer.md
1111
docs/ComputerResource.md
12+
docs/ComputerResourceHardware.md
13+
docs/ComputerResourceHardwareAnyOf.md
14+
docs/ComputerResourceHardwareAnyOf1.md
15+
docs/ComputerResourceHardwareAnyOfPeripherals.md
16+
docs/ComputerResourceHardwareAnyOfSystem.md
1217
docs/ComputerResourceTotals.md
1318
docs/ComputersApi.md
1419
docs/DetailedSubteamResource.md
@@ -78,6 +83,11 @@ lib/whatpulse-sdk/configuration.rb
7883
lib/whatpulse-sdk/models/client_profile_resource.rb
7984
lib/whatpulse-sdk/models/client_profile_resource_computer.rb
8085
lib/whatpulse-sdk/models/computer_resource.rb
86+
lib/whatpulse-sdk/models/computer_resource_hardware.rb
87+
lib/whatpulse-sdk/models/computer_resource_hardware_any_of.rb
88+
lib/whatpulse-sdk/models/computer_resource_hardware_any_of1.rb
89+
lib/whatpulse-sdk/models/computer_resource_hardware_any_of_peripherals.rb
90+
lib/whatpulse-sdk/models/computer_resource_hardware_any_of_system.rb
8191
lib/whatpulse-sdk/models/computer_resource_totals.rb
8292
lib/whatpulse-sdk/models/detailed_subteam_resource.rb
8393
lib/whatpulse-sdk/models/detailed_subteam_resource_links.rb
@@ -122,5 +132,10 @@ lib/whatpulse-sdk/models/v1_users_show200_response_any_of.rb
122132
lib/whatpulse-sdk/models/v1_users_time_series200_response.rb
123133
lib/whatpulse-sdk/models/v1_users_time_series200_response_filters.rb
124134
lib/whatpulse-sdk/version.rb
135+
spec/models/computer_resource_hardware_any_of1_spec.rb
136+
spec/models/computer_resource_hardware_any_of_peripherals_spec.rb
137+
spec/models/computer_resource_hardware_any_of_spec.rb
138+
spec/models/computer_resource_hardware_any_of_system_spec.rb
139+
spec/models/computer_resource_hardware_spec.rb
125140
spec/spec_helper.rb
126141
whatpulse-sdk.gemspec

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ Class | Method | HTTP request | Description
109109
- [WhatpulseSdk::ClientProfileResource](docs/ClientProfileResource.md)
110110
- [WhatpulseSdk::ClientProfileResourceComputer](docs/ClientProfileResourceComputer.md)
111111
- [WhatpulseSdk::ComputerResource](docs/ComputerResource.md)
112+
- [WhatpulseSdk::ComputerResourceHardware](docs/ComputerResourceHardware.md)
113+
- [WhatpulseSdk::ComputerResourceHardwareAnyOf](docs/ComputerResourceHardwareAnyOf.md)
114+
- [WhatpulseSdk::ComputerResourceHardwareAnyOf1](docs/ComputerResourceHardwareAnyOf1.md)
115+
- [WhatpulseSdk::ComputerResourceHardwareAnyOfPeripherals](docs/ComputerResourceHardwareAnyOfPeripherals.md)
116+
- [WhatpulseSdk::ComputerResourceHardwareAnyOfSystem](docs/ComputerResourceHardwareAnyOfSystem.md)
112117
- [WhatpulseSdk::ComputerResourceTotals](docs/ComputerResourceTotals.md)
113118
- [WhatpulseSdk::DetailedSubteamResource](docs/DetailedSubteamResource.md)
114119
- [WhatpulseSdk::DetailedSubteamResourceLinks](docs/DetailedSubteamResourceLinks.md)

docs/ComputerResource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
| **totals** | [**ComputerResourceTotals**](ComputerResourceTotals.md) | | |
1313
| **pulses** | **Integer** | The total number of pulses recorded for this computer. | |
1414
| **last_pulse_date** | **String** | The date and time of the last pulse recorded for this computer. | |
15-
| **hardware** | **Hash<String, Object>** | Hardware specifications and peripherals, if available. | |
15+
| **hardware** | [**ComputerResourceHardware**](ComputerResourceHardware.md) | | |
1616

1717
## Example
1818

docs/ComputerResourceHardware.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# WhatpulseSdk::ComputerResourceHardware
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ---- | ---- | ----------- | ----- |
7+
| **available** | **Boolean** | | |
8+
| **last_updated** | **String** | The date and time when the hardware information was last updated. | |
9+
| **system** | [**ComputerResourceHardwareAnyOfSystem**](ComputerResourceHardwareAnyOfSystem.md) | | |
10+
| **peripherals** | [**ComputerResourceHardwareAnyOfPeripherals**](ComputerResourceHardwareAnyOfPeripherals.md) | | |
11+
12+
## Example
13+
14+
```ruby
15+
require 'whatpulse-sdk'
16+
17+
instance = WhatpulseSdk::ComputerResourceHardware.new(
18+
available: null,
19+
last_updated: null,
20+
system: null,
21+
peripherals: null
22+
)
23+
```
24+

docs/ComputerResourceHardwareAnyOf.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# WhatpulseSdk::ComputerResourceHardwareAnyOf
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ---- | ---- | ----------- | ----- |
7+
| **available** | **Boolean** | Whether the hardware information is available. | |
8+
| **last_updated** | **String** | The date and time when the hardware information was last updated. | |
9+
| **system** | [**ComputerResourceHardwareAnyOfSystem**](ComputerResourceHardwareAnyOfSystem.md) | | |
10+
| **peripherals** | [**ComputerResourceHardwareAnyOfPeripherals**](ComputerResourceHardwareAnyOfPeripherals.md) | | |
11+
12+
## Example
13+
14+
```ruby
15+
require 'whatpulse-sdk'
16+
17+
instance = WhatpulseSdk::ComputerResourceHardwareAnyOf.new(
18+
available: null,
19+
last_updated: null,
20+
system: null,
21+
peripherals: null
22+
)
23+
```
24+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# WhatpulseSdk::ComputerResourceHardwareAnyOf1
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ---- | ---- | ----------- | ----- |
7+
| **available** | **Boolean** | | |
8+
9+
## Example
10+
11+
```ruby
12+
require 'whatpulse-sdk'
13+
14+
instance = WhatpulseSdk::ComputerResourceHardwareAnyOf1.new(
15+
available: null
16+
)
17+
```
18+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# WhatpulseSdk::ComputerResourceHardwareAnyOfPeripherals
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ---- | ---- | ----------- | ----- |
7+
| **monitors** | **Array<Object>** | The list of monitors connected to the computer. | |
8+
| **keyboard** | **Array<Object>** | The list of keyboards connected to the computer. | |
9+
| **mouse** | **Array<Object>** | The list of mice connected to the computer. | |
10+
| **trackpad** | **Array<Object>** | The trackpad information, if available. | |
11+
| **controllers** | **Array<Object>** | The list of game controller devices connected to the computer. | |
12+
13+
## Example
14+
15+
```ruby
16+
require 'whatpulse-sdk'
17+
18+
instance = WhatpulseSdk::ComputerResourceHardwareAnyOfPeripherals.new(
19+
monitors: null,
20+
keyboard: null,
21+
mouse: null,
22+
trackpad: null,
23+
controllers: null
24+
)
25+
```
26+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# WhatpulseSdk::ComputerResourceHardwareAnyOfSystem
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ---- | ---- | ----------- | ----- |
7+
| **model** | **String** | The model of the computer. | |
8+
| **platform** | **String** | The platform of the computer. I.e., x86, x64, ARM, etc. | |
9+
| **os** | **String** | The operating system of the computer. Long version name, e.g., \"Windows 10 Pro\", \"macOS Monterey\". | |
10+
| **cpu** | **String** | The CPU information of the computer. | |
11+
| **memory_mb** | **Integer** | The amount of memory in megabytes. | |
12+
| **video** | **String** | The video processor information of the computer. | |
13+
14+
## Example
15+
16+
```ruby
17+
require 'whatpulse-sdk'
18+
19+
instance = WhatpulseSdk::ComputerResourceHardwareAnyOfSystem.new(
20+
model: null,
21+
platform: null,
22+
os: null,
23+
cpu: null,
24+
memory_mb: null,
25+
video: null
26+
)
27+
```
28+

lib/whatpulse-sdk.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
require 'whatpulse-sdk/models/client_profile_resource'
2121
require 'whatpulse-sdk/models/client_profile_resource_computer'
2222
require 'whatpulse-sdk/models/computer_resource'
23+
require 'whatpulse-sdk/models/computer_resource_hardware'
24+
require 'whatpulse-sdk/models/computer_resource_hardware_any_of'
25+
require 'whatpulse-sdk/models/computer_resource_hardware_any_of1'
26+
require 'whatpulse-sdk/models/computer_resource_hardware_any_of_peripherals'
27+
require 'whatpulse-sdk/models/computer_resource_hardware_any_of_system'
2328
require 'whatpulse-sdk/models/computer_resource_totals'
2429
require 'whatpulse-sdk/models/detailed_subteam_resource'
2530
require 'whatpulse-sdk/models/detailed_subteam_resource_links'

0 commit comments

Comments
 (0)