Skip to content

Commit ee169ee

Browse files
committed
Rename strategy to githubdr throughout and bump version
1 parent 2c36551 commit ee169ee

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
omniauth-github-data-residency (0.0.1)
4+
omniauth-github-data-residency (0.0.2)
55
omniauth-github (~> 2.0, >= 2.0.1)
66

77
GEM

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This is useful if you need to pull the subdomain from a request.
4646
### Basic Rails Usage with Devise
4747

4848
```ruby
49-
config.omniauth :githubdr, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_CLIENT_SECRET'], scope: "user:email,read:user", enterprise_options: {enterprise_subdomain: "my-domain"}
49+
config.omniauth :githubdr, ENV['GITHUB_ENTERPRISE_CLIENT_ID'], ENV['GITHUB_ENTERPRISE_CLIENT_SECRET'], scope: "user:email,read:user", setup: SETUP_PROC
5050
```
5151

5252
### Side-by-side Usage in Rails with Devise
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
require "omniauth-github-data-residency/version"
2-
require "omniauth/strategies/github_data_residency"
2+
require "omniauth/strategies/githubdr"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module OmniAuth
2-
module GithubDataResidency
3-
VERSION = "0.0.1"
2+
module Githubdr
3+
VERSION = "0.0.2"
44
end
55
end

lib/omniauth/strategies/github_data_residency.rb renamed to lib/omniauth/strategies/githubdr.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module OmniAuth
44
module Strategies
5-
class GithubDataResidency < OmniAuth::Strategies::GitHub
5+
class Githubdr < OmniAuth::Strategies::GitHub
66
# The enterprise subdomain is used to build the client_options urls for the GitHub Enterprise with Data Residency OAuth API
77
# The enterprise_subdomain is required to be set in the request params for the GitHubDR strategy to work
88
option :enterprise_options, {
@@ -59,4 +59,4 @@ def invalid_enterprise_subdomain?
5959
end
6060
end
6161

62-
OmniAuth.config.add_camelization "github_data_residency", "GithubDataResidency"
62+
OmniAuth.config.add_camelization "githubdr", "Githubdr"

omniauth-github-data-residency.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require_relative "lib/omniauth-github-data-residency/version"
44

55
Gem::Specification.new do |spec|
66
spec.name = "omniauth-github-data-residency"
7-
spec.version = OmniAuth::GithubDataResidency::VERSION
7+
spec.version = OmniAuth::Githubdr::VERSION
88
spec.authors = ["Packfiles"]
99
spec.email = ["hello@packfiles.io"]
1010

spec/omniauth/strategies/github_data_residency_spec.rb renamed to spec/omniauth/strategies/githubdr_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
require "omniauth/strategies/github_data_residency"
1+
require "omniauth/strategies/githubdr"
22

3-
RSpec.describe OmniAuth::Strategies::GithubDataResidency do
3+
RSpec.describe OmniAuth::Strategies::Githubdr do
44
let(:access_token) { instance_double("AccessToken", :options => {}, :[] => "user") }
55
let(:app) { lambda { |_env| [200, {}, ["Hello."]] } }
66
let(:enterprise_subdomain) { "example-corp" }
@@ -60,7 +60,7 @@
6060

6161
it "ensures client options are updated before proceeding" do
6262
# Create a custom test implementation of request_phase that simply returns an observable result
63-
test_implementation = Class.new(OmniAuth::Strategies::GithubDataResidency) do
63+
test_implementation = Class.new(OmniAuth::Strategies::Githubdr) do
6464
def custom_request_phase_test
6565
# Call the original request_phase
6666
request_phase
@@ -93,7 +93,7 @@ def custom_request_phase_test
9393

9494
it "ensures client options are updated before proceeding" do
9595
# Create a custom test implementation of callback_phase that simply returns an observable result
96-
test_implementation = Class.new(OmniAuth::Strategies::GithubDataResidency) do
96+
test_implementation = Class.new(OmniAuth::Strategies::Githubdr) do
9797
def custom_callback_phase_test
9898
# Call the original callback_phase
9999
callback_phase

0 commit comments

Comments
 (0)