omniauth-smartsheet 0.0.1 → 0.0.2

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6be6949f8fee6c5a3db5a4f7e9a810430052afd8
4
+ data.tar.gz: f6106a22b3996e89664550f6a9900e027af07b34
5
+ SHA512:
6
+ metadata.gz: b0c01b932c18b155e91966d1dacf2c840d543ca10650bab69ab2c83e264e7c1fb71ffaa915f551bf8431c62101c843e92da6b648cfd5f3963dbb3ffd9afa3f09
7
+ data.tar.gz: e0db845627b932d8025a2a1ed9e8e5936bfcbf0bd9d4c90156d951e3c101daa9ba42113f224337553f66678d7601700fa0b2edf0edde3910707f1b46609c1c85
data/README.md CHANGED
@@ -18,7 +18,14 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ Create `config/initializers/omniauth.rb`:
22
+
23
+ Rails.application.config.middleware.use OmniAuth::Builder do
24
+ provider :smartsheet, 'APP_CLIENT_ID', nil, :smartsheet_secret => 'APP_SECRET', :scope => 'READ_SHEETS'
25
+ end
26
+
27
+ You may need to customize the scope for your app. See the [Smartsheet API
28
+ documentation](http://smartsheet.com/developers) for details.
22
29
 
23
30
  ## Contributing
24
31
 
@@ -27,3 +34,5 @@ TODO: Write usage instructions here
27
34
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
35
  4. Push to the branch (`git push origin my-new-feature`)
29
36
  5. Create new Pull Request
37
+
38
+ [![githalytics.com alpha](https://cruel-carlota.pagodabox.com/7930547437b683706b9cccc465807b52 "githalytics.com")](http://githalytics.com/smartsheet-platform/omniauth-smartsheet)
@@ -10,9 +10,9 @@ module OmniAuth
10
10
  # This is where you pass the options you would pass when
11
11
  # initializing your consumer from the OAuth gem.
12
12
  option :client_options, {
13
- :site => "https://api.smartsheet.com/1.1",
13
+ :site => "https://api.smartsheet.com/2.0",
14
14
  :authorize_url => "https://www.smartsheet.com/b/authorize",
15
- :token_url => "https://api.smartsheet.com/1.1/token"
15
+ :token_url => "https://api.smartsheet.com/2.0/token"
16
16
  }
17
17
 
18
18
  # These are called after authentication has succeeded. If
@@ -37,7 +37,7 @@ module OmniAuth
37
37
  end
38
38
 
39
39
  def raw_info
40
- @raw_info ||= access_token.get('user/me').parsed
40
+ @raw_info ||= access_token.get('users/me').parsed
41
41
  end
42
42
 
43
43
  def build_access_token
@@ -46,7 +46,7 @@ module OmniAuth
46
46
  # - instead, compute SHA-256 on secret + '|' + access_code
47
47
  smartsheet_hash = Digest::SHA256.new
48
48
  smartsheet_hash.update(
49
- options.smartsheet_secret + '|' + request.params['code']
49
+ options.smartsheet_secret + '|' + request.params['code']
50
50
  )
51
51
  options.token_params.merge!(:hash => smartsheet_hash.hexdigest)
52
52
  super
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Smartsheet
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -18,4 +18,5 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ["lib"]
19
19
 
20
20
  gem.add_dependency 'omniauth', '~> 1.0'
21
+ gem.add_dependency 'omniauth-oauth2', '~> 1.1'
21
22
  end
metadata CHANGED
@@ -1,32 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-smartsheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Alex Vorobiev
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-11 00:00:00.000000000 Z
11
+ date: 2016-04-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: omniauth
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: omniauth-oauth2
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.1'
30
41
  description: OmniAuth strategy for Smartsheet
31
42
  email:
32
43
  - alex.vorobiev@smartsheet.com
@@ -34,7 +45,7 @@ executables: []
34
45
  extensions: []
35
46
  extra_rdoc_files: []
36
47
  files:
37
- - .gitignore
48
+ - ".gitignore"
38
49
  - Gemfile
39
50
  - LICENSE.txt
40
51
  - README.md
@@ -44,26 +55,25 @@ files:
44
55
  - omniauth-smartsheet.gemspec
45
56
  homepage: https://github.com/smartsheet-platform/omniauth-smartsheet
46
57
  licenses: []
58
+ metadata: {}
47
59
  post_install_message:
48
60
  rdoc_options: []
49
61
  require_paths:
50
62
  - lib
51
63
  required_ruby_version: !ruby/object:Gem::Requirement
52
- none: false
53
64
  requirements:
54
- - - ! '>='
65
+ - - ">="
55
66
  - !ruby/object:Gem::Version
56
67
  version: '0'
57
68
  required_rubygems_version: !ruby/object:Gem::Requirement
58
- none: false
59
69
  requirements:
60
- - - ! '>='
70
+ - - ">="
61
71
  - !ruby/object:Gem::Version
62
72
  version: '0'
63
73
  requirements: []
64
74
  rubyforge_project:
65
- rubygems_version: 1.8.23
75
+ rubygems_version: 2.0.14.1
66
76
  signing_key:
67
- specification_version: 3
77
+ specification_version: 4
68
78
  summary: OmniAuth strategy for Smartsheet
69
79
  test_files: []