clerk-sdk-ruby 4.0.0.beta5 → 4.0.0.beta7

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
  SHA256:
3
- metadata.gz: 67c1fab205f71527a160495706ec916605f7c86c16d8e7d071effc1c24e5428f
4
- data.tar.gz: 4c7eb1de1b212a276dd1a43c81ad5db81cf675afc9160f7226c14d84847c5bb1
3
+ metadata.gz: c318cbd623e281c13132b3b38a564a55e65682f7da27263a00cea06da4875376
4
+ data.tar.gz: 587db6569b3e2bc081932489188c52253cf32c41a216151b65ed7093af8bbef0
5
5
  SHA512:
6
- metadata.gz: e9158158fd8926b24179855a3ee6ed49fd8913e00b1a67a0de6b3364265af0e66fe894f04fcb0aa8f98363f4ac2aad9a2761201cb0e4788a06d6106fd141b343
7
- data.tar.gz: 12d99225f089afdb1276c6589b58145497ccbdb489370e0665a2b69c8292dc55efcfdcc5631dee5e00730f1a74c645a8d0f301fa439df366d0c6683a35229a0a
6
+ metadata.gz: 9eb5642696af3cca39094180ebdddd6541651af90f4695dce28fc878613adb8c1d0c45ed121060600f70b98d641b5baa196db7b45167085eeca2abce6ba9eb35
7
+ data.tar.gz: c2a5fbb5e9cba2ae8640c56fcdab4da64e9500528f08d5a8199926ca92566148763e88adea9257b641cf67733054d2df90b426487d18828a8b1d521e079d7e46
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clerk-sdk-ruby (4.0.0.beta4)
5
- clerk-http-client (= 2.0.0.beta5)
4
+ clerk-sdk-ruby (4.0.0.beta7)
5
+ clerk-http-client (= 2.0.0.beta6)
6
6
  concurrent-ruby (~> 1.1)
7
7
  faraday (>= 1.4.1, < 3.0)
8
8
  jwt (~> 2.5)
@@ -45,7 +45,7 @@ GEM
45
45
  bigdecimal (3.1.9)
46
46
  builder (3.3.0)
47
47
  byebug (11.1.3)
48
- clerk-http-client (2.0.0.beta5)
48
+ clerk-http-client (2.0.0.beta6)
49
49
  faraday (>= 1.0.1, < 3.0)
50
50
  faraday-multipart
51
51
  marcel
data/README.md CHANGED
@@ -166,10 +166,19 @@ end
166
166
 
167
167
  This gives your controller and views access to the following methods and more:
168
168
 
169
+ - `clerk.sdk.*`
169
170
  - `clerk.session`
170
171
  - `clerk.user`
171
172
  - `clerk.user?`
172
173
 
174
+ ### Skipping the Railtie
175
+
176
+ There are cases where you might not want to use the Railtie, for example, only using the SDK in a Rails application. To accomplish this, you can set the `CLERK_SKIP_RAILTIE` environment variable to `true`.
177
+
178
+ This will prevent the Railtie from being loaded and the Rack middleware from being added to the middleware stack.
179
+
180
+ You can still configure the SDK as normal, but you will need to call the SDK using `Clerk::SDK.new` instead of the `clerk.sdk` helper.
181
+
173
182
  ## Sinatra integration
174
183
 
175
184
  The SDK enables the use of Extensions to add Clerk support to your Sinatra application.
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- clerk-sdk-ruby (4.0.0.beta4)
5
- clerk-http-client (~> 0.0.1)
4
+ clerk-sdk-ruby (4.0.0.beta6)
5
+ clerk-http-client (= 2.0.0.beta5)
6
6
  concurrent-ruby (~> 1.1)
7
7
  faraday (>= 1.4.1, < 3.0)
8
8
  jwt (~> 2.5)
@@ -93,7 +93,7 @@ GEM
93
93
  brakeman (7.0.0)
94
94
  racc
95
95
  builder (3.3.0)
96
- clerk-http-client (0.0.1)
96
+ clerk-http-client (2.0.0.beta5)
97
97
  faraday (>= 1.0.1, < 3.0)
98
98
  faraday-multipart
99
99
  marcel
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- clerk-sdk-ruby (4.0.0.beta4)
5
- clerk-http-client (~> 0.0.1)
4
+ clerk-sdk-ruby (4.0.0.beta6)
5
+ clerk-http-client (= 2.0.0.beta5)
6
6
  concurrent-ruby (~> 1.1)
7
7
  faraday (>= 1.4.1, < 3.0)
8
8
  jwt (~> 2.5)
@@ -105,7 +105,7 @@ GEM
105
105
  rack-test (>= 0.6.3)
106
106
  regexp_parser (>= 1.5, < 3.0)
107
107
  xpath (~> 3.2)
108
- clerk-http-client (0.0.1)
108
+ clerk-http-client (2.0.0.beta5)
109
109
  faraday (>= 1.0.1, < 3.0)
110
110
  faraday-multipart
111
111
  marcel
data/bin/release ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ set -eo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ # Get the version number from the generated version file
6
+ VERSION=$(ruby -e "require './lib/clerk/version.rb'; puts Clerk::VERSION")
7
+
8
+ echo "Building and releasing version ${VERSION}"
9
+
10
+ # Remove any existing gem files
11
+ rm clerk-sdk-ruby-*.gem || true
12
+
13
+ # Build the gem
14
+ gem build clerk-sdk-ruby.gemspec
15
+
16
+ # Publish to RubyGems
17
+ gem push "clerk-sdk-ruby-${VERSION}.gem"
18
+
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
 
30
30
  spec.add_dependency "faraday", ">= 1.4.1", "< 3.0"
31
31
  spec.add_dependency "jwt", '~> 2.5'
32
- spec.add_dependency "clerk-http-client", "2.0.0.beta5"
32
+ spec.add_dependency "clerk-http-client", "2.0.0.beta6"
33
33
  spec.add_dependency "concurrent-ruby", "~> 1.1"
34
34
 
35
35
  spec.add_development_dependency "byebug", "~> 11.1"
data/lib/clerk/rails.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  require "clerk"
2
2
  require "clerk/authenticatable"
3
- require "clerk/railtie"
3
+ require "clerk/railtie" if defined?(Rails::Railtie)
data/lib/clerk/railtie.rb CHANGED
@@ -6,7 +6,9 @@ module Clerk
6
6
  module Rails
7
7
  class Railtie < ::Rails::Railtie
8
8
  initializer "clerk.configure_rails_initialization" do |app|
9
- app.middleware.use Clerk::Rack::Middleware
9
+ unless ENV["CLERK_SKIP_RAILTIE"]
10
+ app.middleware.use Clerk::Rack::Middleware
11
+ end
10
12
  end
11
13
  end
12
14
  end
data/lib/clerk/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Clerk
4
- VERSION = "4.0.0.beta5"
4
+ VERSION = "4.0.0.beta7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clerk-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.beta5
4
+ version: 4.0.0.beta7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clerk
@@ -49,14 +49,14 @@ dependencies:
49
49
  requirements:
50
50
  - - '='
51
51
  - !ruby/object:Gem::Version
52
- version: 2.0.0.beta5
52
+ version: 2.0.0.beta6
53
53
  type: :runtime
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - '='
58
58
  - !ruby/object:Gem::Version
59
- version: 2.0.0.beta5
59
+ version: 2.0.0.beta6
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: concurrent-ruby
62
62
  requirement: !ruby/object:Gem::Requirement
@@ -277,6 +277,7 @@ files:
277
277
  - apps/sinatra/config.ru
278
278
  - apps/sinatra/views/index.erb
279
279
  - bin/console
280
+ - bin/release
280
281
  - bin/setup
281
282
  - clerk-sdk-ruby.gemspec
282
283
  - docs/clerk-logo-dark.png