Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,14 @@ jobs:
bundler-cache: true
- name: Run Tests
run: RACK_ENV=test bundle exec rake spec
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
bundler-cache: true
- name: Run Integration Tests
run: RACK_ENV=test bundle exec rake spec:integration
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
* [#100](https://github.com/dblock/strava-ruby-client/pull/100): Adds comprehensive rdoc documentation - [@dblock](https://github.com/dblock).
* [#103](https://github.com/dblock/strava-ruby-client/pull/103): Migrate Danger to use the `danger-pr-comment` reusable workflow - [@dblock](https://github.com/dblock), [@Copilot](https://github.com/apps/copilot-swe-agent).
* [#104](https://github.com/dblock/strava-ruby-client/pull/104): Fixes `Danger Comment` workflow failing with a `contents: none` permissions error - [@dblock](https://github.com/dblock).
* [#102](https://github.com/dblock/strava-ruby-client/pull/102): Changes default API base URL to `https://www.api-v3.strava.com` and adds `revoke`, deprecating `deauthorize`, per Strava's June 2026/2027 developer program changes - [@dblock](https://github.com/dblock).
* [#102](https://github.com/dblock/strava-ruby-client/pull/102): Adds `revoke`, deprecating `deauthorize`, per Strava's June 2026/2027 developer program changes - [@dblock](https://github.com/dblock).
* [#105](https://github.com/dblock/strava-ruby-client/pull/105): Adds `total_elevation_gain`, `total_elevation_loss` and formatted helpers to `Strava::Models::Stream`, computed from altitude stream data - [@dblock](https://github.com/dblock).
* [#106](https://github.com/dblock/strava-ruby-client/pull/106): Adds test coverage reporting with [coveralls.io](https://coveralls.io) - [@dblock](https://github.com/dblock).
* [#108](https://github.com/dblock/strava-ruby-client/pull/108): Adds an integration test that verifies the real Strava API endpoint is reachable, run in CI on every push and pull request via `rake spec:integration` - [@dblock](https://github.com/dblock).
* Your contribution here.

### 3.0.0 (2025/10/24)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ The following settings are supported.
| setting | description |
| ------------ | --------------------------------------------------- |
| access_token | Access token to pass in the `Authorization` header. |
| endpoint | Defaults to `https://www.api-v3.strava.com`. |
| endpoint | Defaults to `https://www.strava.com/api/v3`. |

### OAuth Client Options

Expand Down Expand Up @@ -1147,7 +1147,7 @@ The following settings are supported.
| ------------- | -------------------------------------------- |
| client_id | Application client ID. |
| client_secret | Application client secret. |
| endpoint | Defaults to `https://www.api-v3.strava.com`. |
| endpoint | Defaults to `https://www.strava.com/api/v3`. |

## Errors

Expand Down
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ require 'rspec/core'
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
spec.pattern = FileList['spec/**/*_spec.rb'].exclude('spec/integration/**/*_spec.rb')
end

RSpec::Core::RakeTask.new(:'spec:integration') do |spec|
spec.pattern = FileList['spec/integration/**/*_spec.rb']
end

require 'rubocop/rake_task'
Expand Down
2 changes: 1 addition & 1 deletion lib/strava/api/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Client < Strava::Web::Client
#
# @param [Hash] options Configuration options for the client
# @option options [String] :access_token OAuth access token for API authentication (required)
# @option options [String] :endpoint API endpoint URL (defaults to https://www.api-v3.strava.com)
# @option options [String] :endpoint API endpoint URL (defaults to https://www.strava.com/api/v3)
# @option options [String] :user_agent User agent string for HTTP requests
# @option options [Logger] :logger Logger instance for request/response logging
# @option options [Integer] :timeout HTTP request timeout in seconds
Expand Down
4 changes: 2 additions & 2 deletions lib/strava/api/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Api
#
# @example Access current configuration
# Strava::Api.config.endpoint
# # => 'https://www.api-v3.strava.com'
# # => 'https://www.strava.com/api/v3'
#
module Config
extend self
Expand All @@ -37,7 +37,7 @@ module Config
# @return [void]
#
def reset
self.endpoint = 'https://www.api-v3.strava.com'
self.endpoint = 'https://www.strava.com/api/v3'
self.access_token = nil
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/strava/web/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class << self
#
# @example Configure the client
# Strava::Web::Client.configure do |config|
# config.endpoint = 'https://www.api-v3.strava.com'
# config.endpoint = 'https://www.strava.com/api/v3'
# end
#
def configure
Expand Down
2 changes: 1 addition & 1 deletion lib/strava/webhooks/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Client < Strava::Web::Client
# @param [Hash] options Configuration options
# @option options [String] :client_id Strava application client ID (required)
# @option options [String] :client_secret Strava application client secret (required)
# @option options [String] :endpoint API endpoint URL (defaults to https://www.api-v3.strava.com)
# @option options [String] :endpoint API endpoint URL (defaults to https://www.strava.com/api/v3)
#
def initialize(options = {})
Strava::Webhooks::Config::ATTRIBUTES.each do |key|
Expand Down
2 changes: 1 addition & 1 deletion lib/strava/webhooks/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module Config
# @return [void]
#
def reset
self.endpoint = 'https://www.api-v3.strava.com'
self.endpoint = 'https://www.strava.com/api/v3'
self.client_id = nil
self.client_secret = nil
end
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity_comments.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity_comments_by_10.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity_comments_by_2.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity_comments_by_3.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity_kudos.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity_laps.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity_photos.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity_ride.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity_streams.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity_with_fake_id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
uri: https://www.api-v3.strava.com/activities/194641753419464175341946417534
uri: https://www.strava.com/api/v3/activities/194641753419464175341946417534
body:
encoding: US-ASCII
string: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
uri: https://www.api-v3.strava.com/activities/1946417534
uri: https://www.strava.com/api/v3/activities/1946417534
body:
encoding: US-ASCII
string: ''
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/activity_zones.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions spec/fixtures/strava/client/all_activity_comments_by_1.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spec/fixtures/strava/client/all_activity_comments_by_2.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spec/fixtures/strava/client/all_activity_comments_by_3.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/strava/client/all_activity_comments_by_5.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading