bullet_train-super_scaffolding 1.3.15 ā 1.3.17
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b51f689c3d377552ebbd17d7e7626ae0034449399ecbf5dc31044adde23c0ca6
|
4
|
+
data.tar.gz: ae2816df1520e5bd1a1c404f680cfbc2c25c70aa29b497870a5664090df587fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d31115a67ba4fdfd309cab57da2c25443a4c3ccc59801eda118c6c85bd4ed39576f0fe0a5e5cc72f4acf91e9ab013108181f09d140e70f94667983e562bd033a
|
7
|
+
data.tar.gz: dde9a28e2ccb7207378454b0a1fe96805c765527144e489f24ee15b21a14420e7ca7c2e13841f8ab2c1ced158a2a58b12e82e8197c3dea872e9b1ef990ccc26a
|
@@ -7,10 +7,6 @@ module BulletTrain
|
|
7
7
|
puts ""
|
8
8
|
puts "š
usage: bin/super-scaffold oauth-provider <omniauth_gem> <gems_provider_name> <our_provider_name> <PROVIDER_API_KEY_ENV_VAR_NAME> <PROVIDER_API_SECRET_ENV_VAR_NAME> [options]"
|
9
9
|
puts ""
|
10
|
-
puts "E.g. what we'd do to start Stripe off (if we didn't already do it):"
|
11
|
-
puts " bin/super-scaffold oauth-provider omniauth-stripe-connect stripe_connect Oauth::StripeAccount STRIPE_CLIENT_ID STRIPE_SECRET_KEY --icon=ti-money"
|
12
|
-
puts " (Please note here that the STRIPE_CLIENT_ID and STRIPE_SECRET_KEY strings are not the actual values, just the names we give to the environment variables.)"
|
13
|
-
puts ""
|
14
10
|
puts "E.g. what we actually did to start Shopify off:"
|
15
11
|
puts " bin/super-scaffold oauth-provider omniauth-shopify-oauth2 shopify Oauth::ShopifyAccount SHOPIFY_API_KEY SHOPIFY_API_SECRET_KEY --icon=ti-shopping-cart"
|
16
12
|
puts " (Please note here that the SHOPIFY_API_KEY and SHOPIFY_API_SECRET_KEY strings are not the actual values, just the names we give to the environment variables.)"
|
@@ -26,6 +22,13 @@ module BulletTrain
|
|
26
22
|
|
27
23
|
_, omniauth_gem, gems_provider_name, our_provider_name, api_key, api_secret = *ARGV
|
28
24
|
|
25
|
+
if omniauth_gem == "omniauth-stripe-connect"
|
26
|
+
puts "Stripe is already available for use and does not need any scaffolding to be done.".green
|
27
|
+
puts "Just add your `STRIPE_CLIENT_ID` and `STRIPE_SECRET_KEY` values to application.yml"
|
28
|
+
puts "and you should be able to use Stripe as an OAuth provider out of the box."
|
29
|
+
exit
|
30
|
+
end
|
31
|
+
|
29
32
|
unless (match = our_provider_name.match(/Oauth::(.*)Account/))
|
30
33
|
puts "\nšØ Your provider name must match the pattern of `Oauth::{Name}Account`, e.g. `Oauth::StripeAccount`\n".red
|
31
34
|
return
|
@@ -36,7 +36,7 @@ module Scaffolding::FileManipulator
|
|
36
36
|
# For example, to add content to admin.models pass in [:admin, :models]
|
37
37
|
def self.add_line_to_yml_file(file, content, location_array)
|
38
38
|
# First check that the given location array actually exists in the yml file:
|
39
|
-
yml = YAML.
|
39
|
+
yml = YAML.safe_load_file(file)
|
40
40
|
location_array.map!(&:to_s)
|
41
41
|
|
42
42
|
# TODO: Raise an error if we're returning nil.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-super_scaffolding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|