Skip to content
Closed
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## v3.0.0

* Allow for OmniAuth 2.0 series. (#16)

## v2.5.1

* Add dependency constraint for omniauth 1.x (#16)

## v2.5.0

* Added Slack v2 API support (oauth flow, scopes, tokens).
Expand Down
2 changes: 1 addition & 1 deletion lib/omniauth-slack/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module OmniAuth
module Slack
VERSION = "2.5.0"
VERSION = "3.0.0"
end
end
2 changes: 1 addition & 1 deletion lib/omniauth/strategies/slack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def client
# some errors in call to /api/oauth.[v2.]access.
#
def callback_url
options.redirect_uri || full_host + script_name + callback_path
options.redirect_uri || full_host + callback_path
end

### Possibly obsolete
Expand Down
3 changes: 2 additions & 1 deletion omniauth-slack.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.add_runtime_dependency 'omniauth-oauth2', '>= 1.4.0'
spec.add_runtime_dependency 'omniauth', '~> 2.0'
spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.7.1'

spec.add_development_dependency 'bundler', '>= 1.11.2'
spec.add_development_dependency 'rake'
Expand Down
7 changes: 7 additions & 0 deletions test/strategy_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ class CallbackUrlTest < StrategyTestCase
strategy.stubs(:script_name).returns("") # as not to depend on Rack env
assert_equal "#{url_base}/auth/slack/done", strategy.callback_url
end

test "returns callback_url when setting script_name" do
url_base = "http://auth.request.com"
@request.stubs(:url).returns("#{url_base}/page/path")
strategy.stubs(:script_name).returns("/foo") # as not to depend on Rack env
assert_equal "#{url_base}/foo/auth/slack/callback", strategy.callback_url
end
end

class UidTest < StrategyTestCase
Expand Down