omniauth-trello 0.0.2 → 0.0.3

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
@@ -29,16 +29,22 @@ Place this into `config/initializers/omniauth.rb`:
29
29
  ```ruby
30
30
  Rails.application.config.middleware.use OmniAuth::Builder do
31
31
  provider :trello, ENV['TRELLO_KEY'], ENV['TRELLO_SECRET'],
32
- app_name: "APP_NAME"
32
+ app_name: "APP_NAME", scope: 'read,write', expiration: '1day'
33
33
  end
34
34
  ```
35
35
 
36
+ `scope` if omitted, it defaults to "read". Or it can have the value "read,write"
37
+
38
+ `expiration` if omitted, it defaults to 30 days (Trello default). Or it can have the values: "never", "1day", "30days"
39
+
40
+ More info in [the Trello docs](https://trello.com/docs/gettingstarted/index.html#getting-a-token-from-a-user)
41
+
36
42
  ## Known Issues
37
43
 
38
44
  Any help with these would be appreciated:
39
45
 
40
- * For some user authentications, the raw info returned from Trello has a null value for email
41
- * The `app_name` authorization is correctly showing up at the Trello authorization page as the `name` parameter per the documentation, however Trello still displays "An Unknown Application"
46
+ * [#1](https://github.com/joshrowley/omniauth-trello/issues/1): For some user authentications, the raw info returned from Trello has a null value for email
47
+ * [#2](https://github.com/joshrowley/omniauth-trello/issues/2): The `app_name` authorization is correctly showing up at the Trello authorization page as the `name` parameter per the documentation, however Trello still displays "An Unknown Application"
42
48
 
43
49
  ## Contributing
44
50
 
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Trello
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -34,8 +34,10 @@ module OmniAuth
34
34
 
35
35
  def request_phase
36
36
  options[:authorize_params] = {
37
- :name => options['app_name']
37
+ :name => options['app_name'],
38
+ :scope => options['scope'] || 'read'
38
39
  }
40
+ options[:authorize_params].merge!(:expiration => options['expiration']) if options['expiration']
39
41
  super
40
42
  end
41
43
 
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.add_runtime_dependency 'omniauth', '~> 1.0'
16
16
  gem.add_runtime_dependency 'omniauth-oauth', '~> 1.0'
17
17
  gem.add_runtime_dependency 'oauth', '~> 0.4'
18
- gem.add_dependency 'multi-json', '~> 1.5'
18
+ gem.add_dependency 'multi_json', '~> 1.5'
19
19
  gem.add_development_dependency 'simplecov', '~> 0.7'
20
20
  gem.add_development_dependency 'rspec', '~> 2.12'
21
21
  gem.add_development_dependency 'rack-test'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-trello
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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-01-09 00:00:00.000000000 Z
12
+ date: 2013-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth
@@ -60,7 +60,7 @@ dependencies:
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0.4'
62
62
  - !ruby/object:Gem::Dependency
63
- name: multi-json
63
+ name: multi_json
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  version: '0'
194
194
  requirements: []
195
195
  rubyforge_project:
196
- rubygems_version: 1.8.24
196
+ rubygems_version: 1.8.23
197
197
  signing_key:
198
198
  specification_version: 3
199
199
  summary: An OAuth 1.0 Strategy for Trello that abstracts the OAuth flow using the