omniauth-gitlab 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -20,9 +20,11 @@ Or install it yourself as:
20
20
  ## Basic Usage
21
21
 
22
22
  use OmniAuth::Builder do
23
- provider :gitlab, :site => 'https://your.git.lab.com/'
23
+ provider :gitlab, :site => 'https://your.git.lab.com/', :v => 'v3'
24
24
  end
25
25
 
26
+ Default value for :v parameter is 'v3'.
27
+
26
28
  ## Contributing
27
29
 
28
30
  1. Fork it
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Gitlab
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -5,6 +5,7 @@ module OmniAuth
5
5
 
6
6
  option :fields, [:email]
7
7
  option :site, nil
8
+ option :v, 'v3'
8
9
  option :uid_field, :email
9
10
  option :on_login, nil
10
11
  option :on_registration, nil
@@ -49,7 +50,7 @@ module OmniAuth
49
50
  @identity ||= begin
50
51
  conn = Faraday.new(:url => options[:site])
51
52
  resp = conn.post do |req|
52
- req.url '/api/v3/session'
53
+ req.url "/api/#{options[:v]}/session"
53
54
  req.headers['Content-Type'] = 'application/json'
54
55
  req.params = { :email => request['email'], :password => request['password'] }
55
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-gitlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-06 00:00:00.000000000 Z
12
+ date: 2013-03-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth