omniauth-intercom 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80b33a33b61c60c5da62eb29350270005fac5975
4
- data.tar.gz: 4d8913f1431251fea2c9305e48f79d984bf863c9
3
+ metadata.gz: 132f2adc6b43824c8f91c7f7d83dde1493bc656c
4
+ data.tar.gz: 9aa2fa40896c11ba4c0c12c456cf0e89fc80f1a3
5
5
  SHA512:
6
- metadata.gz: 286f9e2350f4cab06bdb34e442a5b972b460fa51ced7d1098e583b43fc637b09245dc03d0c475c169d629b450eaeadf5975bf05968f4f8b78343de95c93c6819
7
- data.tar.gz: a9f3bad9a71ce812937cba09f590ab6cd364efe0430255a36ae3b89b3d33ab16e77d4f046952aac2ce0853b8c6d1a8dd3c52e2c5e3f70bb67d3e619792d7d1a6
6
+ metadata.gz: d92ad4cfde8da1448aa301b9372c87d3b1b3ac0ac9db5adc418e44b415c5f89df6d5eac6d2741c8ca4dceeac8b0f1af8c4ef505b58a2ee3680895a714bff8571
7
+ data.tar.gz: 197f11c4e19a312a55702a21939269108ee850b2020322c87ab47916df26ffd76003a6dde156b128d944af871936150218987c1f7342e057c139b6f6c594a36f
data/.gitignore CHANGED
@@ -8,3 +8,5 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  omniauth-intercom-*.gem
11
+ .idea
12
+ *.iml
data/CHANGELOG.md CHANGED
@@ -24,6 +24,15 @@ Features:
24
24
 
25
25
  ## 0.1.4 (2016-11-21)
26
26
 
27
- Features:
27
+ Features:
28
+
29
+ - update to Gemspec to prevent omniauth-oauth2 version clash. If you relied on the omniauth-oauth2 gemspec dependency version to be 1.2.x for other parts of your app you can add:
30
+
31
+ gem 'omniauth-oauth2', '~> 1.2'
28
32
 
29
- - update to Gemspec to prevent omniauth-oauth2 version clash (@travega)
33
+ to your Gemfile to set the version back to 1.2.x (@travega)
34
+
35
+ ## 0.1.5 (2017-01-16)
36
+
37
+ Features:
38
+ - add email_verified check
data/README.md CHANGED
@@ -9,7 +9,7 @@ Supports the OAuth 2.0 server-side and client-side flows. Read the [Intercom OAu
9
9
  Add to your `Gemfile`:
10
10
 
11
11
  ```ruby
12
- gem 'omniauth-intercom', '~> 0.1.4'
12
+ gem 'omniauth-intercom', '~> 0.1.5'
13
13
  ```
14
14
 
15
15
  Then `bundle install`.
@@ -56,9 +56,9 @@ Here's an example *Auth Hash* available in `request.env['omniauth.auth']`:
56
56
  :app => {
57
57
  :id_code => 'abc123', # Company app_id
58
58
  :type => 'app',
59
- :secure => true # Secure mode enabled for this app
60
- :timezone => "Dublin",
61
- :name => "ProjectMap"
59
+ :secure => true, # Secure mode enabled for this app
60
+ :timezone => "Dublin",
61
+ :name => "ProjectMap"
62
62
  },
63
63
  :avatar => {
64
64
  :image_url => "https://static.intercomassets.com/avatars/343616/square_128/me.jpg?1454165491"
@@ -117,3 +117,9 @@ Create a `views/home/intercom_callback.html.erb` file ( if your callback route i
117
117
  ### Example application
118
118
 
119
119
  [testapp-intercom-omniauth](https://github.com/Skaelv/testapp-intercom-omniauth) is a simple application implementing the authentication process with Intercom with a popup display.
120
+
121
+ ## Troubleshooting
122
+
123
+ #### omniauth-oauth2 dependency in v0.1.4
124
+
125
+ From v0.1.4 we have defined our `omniauth-oauth2` dependency to allow any version from 1.2 on. If you relied on our Gemspec version config for `omniauth-oauth2` you can simply add `gem 'omniauth-oauth2', '~> 1.2'` to your Gemfile. This will ensure your `omniauth-oauth2` version is `1.2.x` again.
data/RELEASING.md ADDED
@@ -0,0 +1,51 @@
1
+ To release a new version of the omniauth-intercom gem :
2
+
3
+ + Checkout from master branch
4
+
5
+ ```shell
6
+ git checkout master`
7
+ ```
8
+
9
+ + Pull from origin master branch
10
+
11
+ ```shell
12
+ git pull origin master
13
+ ```
14
+
15
+ + Update the version number in `omniauth-intercom/lib/intercom-ruby-app.rb`
16
+
17
+ + Update the version number in `Readme.rb`
18
+
19
+ + Add a CHANGELOG entry
20
+
21
+ + Commit to master with an explicit message : "Bump to vX.Y.Z"
22
+
23
+ + Tag the new release :
24
+
25
+ ```shell
26
+ git tag -a vx.y.z -m 'Tag message'
27
+ ```
28
+
29
+ + Push the new release :
30
+
31
+ ```shell
32
+ git push origin master
33
+ ```
34
+
35
+ + Push the new tag :
36
+
37
+ ```shell
38
+ git push --tags
39
+ ```
40
+
41
+ + Build the new gem :
42
+
43
+ ```shell
44
+ gem build omniauth-intercom.gemspec
45
+ ```
46
+
47
+ + Push the new gem :
48
+
49
+ ```shell
50
+ gem push omniauth-intercom-X.Y.Z.gem
51
+ ```
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Intercom
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
@@ -34,7 +34,13 @@ module OmniAuth
34
34
  def raw_info
35
35
  accept_headers
36
36
  access_token.options[:mode] = :body
37
- @raw_info ||= access_token.get('/me').parsed
37
+ @raw_info ||= begin
38
+ parsed = access_token.get('/me').parsed
39
+ if parsed['email_verified'] != true
40
+ return {}
41
+ end
42
+ parsed
43
+ end
38
44
  end
39
45
 
40
46
  def request_phase
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-intercom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Antoine
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-21 00:00:00.000000000 Z
11
+ date: 2017-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.12'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.12'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rack
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.6'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.6'
83
83
  description:
@@ -87,13 +87,14 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - ".gitignore"
91
- - ".rspec"
92
- - ".travis.yml"
90
+ - .gitignore
91
+ - .rspec
92
+ - .travis.yml
93
93
  - CHANGELOG.md
94
94
  - Gemfile
95
95
  - LICENSE.txt
96
96
  - README.md
97
+ - RELEASING.md
97
98
  - Rakefile
98
99
  - bin/console
99
100
  - bin/setup
@@ -112,17 +113,17 @@ require_paths:
112
113
  - lib
113
114
  required_ruby_version: !ruby/object:Gem::Requirement
114
115
  requirements:
115
- - - ">="
116
+ - - '>='
116
117
  - !ruby/object:Gem::Version
117
118
  version: '0'
118
119
  required_rubygems_version: !ruby/object:Gem::Requirement
119
120
  requirements:
120
- - - ">="
121
+ - - '>='
121
122
  - !ruby/object:Gem::Version
122
123
  version: '0'
123
124
  requirements: []
124
125
  rubyforge_project:
125
- rubygems_version: 2.5.1
126
+ rubygems_version: 2.0.14.1
126
127
  signing_key:
127
128
  specification_version: 4
128
129
  summary: Intercom OAuth2 Strategy for OmniAuth