oauth_im 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cbef449e4e7e3cb7c22930c0a5a7688d00bd137a955d8ff548542d4f2875572
4
- data.tar.gz: 528c74b6cd08deb54536029b2e883d4949ac99c1abe2c56b421bbe76a70aa22a
3
+ metadata.gz: b70eeabdc9f6da4c58f0bf9dd7f1eae8be61ce49a7d2d000967e99a91c2e62cd
4
+ data.tar.gz: cb8331b086b26d0a134f5560e4f9ceb94f7f529b6a4beaa154bc411a8743b1d1
5
5
  SHA512:
6
- metadata.gz: 63bfab0ceb921a9b129277030914e1dfe1bef673b79b2b27fe9042f0d6fb369059dd4a4221862a73dbb18be7ac1d423802bcb8d6ba6e7aaeac20be284261fea6
7
- data.tar.gz: 98b94db5ac85de15989d3faa7512e63f80535c22dd8562439f439fa143f81dd462cb9e32999f1ea227c8d8b4fc58b7b04436ef48fe6a32ef63442b4c920a35af
6
+ metadata.gz: 482b2622fe4341c8f74d7eb7278086f876c390ee017396d5f26bd097dafcf3d888190e1bcfbddccc6d2e8e0948a37e0d27590446bbc5d8b1649b84f04084d967
7
+ data.tar.gz: 53e759edf05fea4c84f0d9d043f7dc1d9bdb41b4ef19336c537e4dac5c185587760c105bfef2f21d1f1be527dc5904378b5967e2e4c164d9395e9771d7dac355
data/README.md CHANGED
@@ -79,11 +79,20 @@ some other appropriate location, e.g.:
79
79
  class ApplicationController < ActionController::Base
80
80
  include OauthIm::Authenticable
81
81
 
82
- # etc. etc. etc.
82
+ # etc.
83
83
  end
84
-
85
84
  ```
86
85
 
86
+ ### Initializer
87
+ * The gem provides a single initializer, `AppContext`.
88
+ * This module is **not** name-spaced.
89
+ * It provides a single method, `provide_authentication?`, which by
90
+ default is `true`.
91
+ * Client apps can override this initializer method.
92
+ * For example, `iiab` overrides this initializer so that the
93
+ `provide_authentication?` method returns `false` unless the app is
94
+ `kh_iiab` (not `demo_im`).
95
+
87
96
  ## Gem Maintenance
88
97
  After many false starts, this repo includes two (seemingly functional) github workflows.
89
98
 
@@ -113,3 +122,10 @@ After many false starts, this repo includes two (seemingly functional) github wo
113
122
  this reason, you shouldn't try to force-push updates to gem version
114
123
  numbers. Instead, let the automatic process manage versioning for
115
124
  you.
125
+
126
+ ## Version History
127
+
128
+ ### 0.6.0
129
+ * Remove coupling between gem and `iiab` app via the `AppContext`
130
+ module. Added default `AppContext` settings to be overridden in
131
+ client app (in this case, `iiab`).
@@ -12,7 +12,7 @@ module OauthIm
12
12
  private
13
13
 
14
14
  def authenticated?
15
- AppContext.kh_iiab? && logged_in?
15
+ AppContext.provide_authentication? && logged_in?
16
16
  end
17
17
 
18
18
  def email
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AppContext
4
+ def self.provide_authentication?
5
+ true
6
+ end
7
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OauthIm
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth_im
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Connally
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-14 00:00:00.000000000 Z
11
+ date: 2022-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -127,6 +127,7 @@ files:
127
127
  - app/helpers/oauth_im/application_helper.rb
128
128
  - app/services/oauth_im/token_decoder.rb
129
129
  - app/views/layouts/oauth_im/application.html.erb
130
+ - config/initializers/app_context.rb
130
131
  - config/routes.rb
131
132
  - lib/oauth_im.rb
132
133
  - lib/oauth_im/configuration.rb