File tree 9 files changed +13
-13
lines changed
9 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def api_modules
19
19
events
20
20
files
21
21
marketing
22
- o_auth
22
+ oauth
23
23
settings
24
24
webhooks
25
25
] . freeze
Original file line number Diff line number Diff line change @@ -13,10 +13,6 @@ def api_classes
13
13
tokens
14
14
] . freeze
15
15
end
16
-
17
- def discovery_module_path
18
- super . gsub ( 'o_auth' , 'oauth' )
19
- end
20
16
end
21
17
end
22
18
end
Original file line number Diff line number Diff line change @@ -2,7 +2,11 @@ module Hubspot
2
2
module Helpers
3
3
class CamelCase
4
4
def format ( string )
5
- string . split ( '_' ) . collect ( &:capitalize ) . join
5
+ if string == 'oauth'
6
+ 'OAuth'
7
+ else
8
+ string . split ( '_' ) . collect ( &:capitalize ) . join
9
+ end
6
10
end
7
11
end
8
12
end
Original file line number Diff line number Diff line change @@ -8,12 +8,11 @@ def format(module_name)
8
8
end
9
9
10
10
def require_with_mapping ( path )
11
- require path . gsub ( 'o_auth' , 'oauth' )
11
+ require path
12
12
end
13
13
14
14
def require_with_codegen_mapping ( path )
15
15
require path
16
- . gsub ( 'o_auth' , 'oauth' )
17
16
. gsub ( 'audit_logs/' , 'audit-logs/' )
18
17
. gsub ( 'blog_posts/' , 'blog-posts/' )
19
18
. gsub ( 'site_search' , 'site-search' )
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ module Hubspot
2
2
module Helpers
3
3
class SnakeCase
4
4
def format ( string )
5
- string . gsub ( /::/ , '/' ) .
5
+ string . gsub ( 'OAuth' , 'Oauth' ) .
6
+ gsub ( /::/ , '/' ) .
6
7
gsub ( /([A-Z]+)([A-Z][a-z])/ , '\1_\2' ) .
7
8
gsub ( /([a-z\d ])([A-Z])/ , '\1_\2' ) .
8
9
tr ( "-" , "_" ) .
Original file line number Diff line number Diff line change 11
11
it { is_expected . to respond_to ( :events ) }
12
12
it { is_expected . to respond_to ( :files ) }
13
13
it { is_expected . to respond_to ( :marketing ) }
14
- it { is_expected . to respond_to ( :o_auth ) }
14
+ it { is_expected . to respond_to ( :oauth ) }
15
15
it { is_expected . to respond_to ( :webhooks ) }
16
16
end
Original file line number Diff line number Diff line change 1
1
require 'spec_helper'
2
2
3
3
describe 'Hubspot::Discovery::OAuth::AccessTokensApi' do
4
- subject ( :api ) { Hubspot ::Client . new ( access_token : 'test' ) . o_auth . access_tokens_api }
4
+ subject ( :api ) { Hubspot ::Client . new ( access_token : 'test' ) . oauth . access_tokens_api }
5
5
6
6
it { is_expected . to respond_to ( :get ) }
7
7
end
Original file line number Diff line number Diff line change 1
1
require 'spec_helper'
2
2
3
3
describe 'Hubspot::Discovery::OAuth::RefreshTokensApi' do
4
- subject ( :api ) { Hubspot ::Client . new ( access_token : 'test' ) . o_auth . refresh_tokens_api }
4
+ subject ( :api ) { Hubspot ::Client . new ( access_token : 'test' ) . oauth . refresh_tokens_api }
5
5
6
6
it { is_expected . to respond_to ( :archive ) }
7
7
it { is_expected . to respond_to ( :get ) }
Original file line number Diff line number Diff line change 1
1
require 'spec_helper'
2
2
3
3
describe 'Hubspot::Discovery::OAuth::TokensApi' do
4
- subject ( :api ) { Hubspot ::Client . new ( access_token : 'test' ) . o_auth . tokens_api }
4
+ subject ( :api ) { Hubspot ::Client . new ( access_token : 'test' ) . oauth . tokens_api }
5
5
6
6
it { is_expected . to respond_to ( :create ) }
7
7
end
You can’t perform that action at this time.
0 commit comments