Skip to content

Commit

Permalink
v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kmrshntr committed Feb 21, 2014
1 parent 6cac6ba commit 1449406
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 13 deletions.
2 changes: 2 additions & 0 deletions lib/omniauth-slack.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'omniauth-slack/version'
require 'omniauth/strategies/slack'
File renamed without changes.
7 changes: 0 additions & 7 deletions lib/omniauth/slack.rb

This file was deleted.

27 changes: 27 additions & 0 deletions lib/omniauth/strategies/slack.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
require 'omniauth/strategies/oauth2'

module OmniAuth
module Strategies
class Slack < OmniAuth::Strategies::OAuth2

option :name, "slack"

option :client_options, {
site: "https://slack.com",
token_url: "/api/oauth.access"
}

option :auth_token_params, {
mode: :query,
param_name: 'token'
}

extra do
{
'members' => access_token.get('/api/users.list').parsed['members']
}
end

end
end
end
12 changes: 6 additions & 6 deletions omniauth-slack.gemspec
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'omniauth/slack/version'
require File.expand_path('../lib/omniauth-slack/version', __FILE__)

Gem::Specification.new do |spec|
spec.name = "omniauth-slack"
spec.version = Omniauth::Slack::VERSION
spec.authors = ["kimura"]
spec.email = ["[email protected]"]
spec.description = %q{TODO: Write a gem description}
spec.summary = %q{TODO: Write a gem summary}
spec.homepage = ""
spec.description = %q{OmniAuth strategy for Slack}
spec.summary = %q{OmniAuth strategy for Slack}
spec.homepage = "https://github.com/kmrshntr/omniauth-slack.git"
spec.license = "MIT"

spec.files = `git ls-files`.split($/)
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_runtime_dependency 'omniauth-oauth2' "~> 1.1.2"

spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
end

0 comments on commit 1449406

Please sign in to comment.