bullet_train-super_scaffolding 1.3.16 ā†’ 1.3.18

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: a883328750c34138c72b373ca193801cbce5e17224edb9d75c006584ae1f9910
4
- data.tar.gz: f48f518139250e31f0f5e1f8e9c3994a1e9f0a0f6bb0ead2ba168c307accf28e
3
+ metadata.gz: 21ae4ff04c56684516cb270eb4e2cc75f644767c9a3c69be9e30648934f5f023
4
+ data.tar.gz: 1dbcca1c181e01436649fa49d2b65795a5b5c09f411f051d9f41343fef2a745d
5
5
  SHA512:
6
- metadata.gz: 73fb6541df9c906c5fb61953e7cfe84c8a6ae2fe15e9ed83a2b2aee1127a6debe46cd59cff5d75f63b4f3f6f039787544c505e73effe01b81f42b8778def8ec3
7
- data.tar.gz: 93f1967a129286c87667efea78f721313221b286868da5db75a048c7c9135f08f8fb4af8fe0f48340f08cd3048c9b093790bf05298e6937baef9b44a490d46af
6
+ metadata.gz: 58e3b6ea5d318e41d338ea525706e79da023a6b154e8117099bba37da1d2cc04621c96612de1e5d8da21c4ec0579315be23151052a9c2d2e6a7ffa4852a3c630
7
+ data.tar.gz: 88d0365e99bf40882984135be34703905889eccc5a906547cb877d32a2f1cfe5f08e2da034ec6af4346008dbbd3f9da5cddec80c52f24b7126a7c86344690e08
@@ -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
@@ -147,7 +150,7 @@ module BulletTrain
147
150
 
148
151
  migration_file_name = `grep "create_table #{oauth_transform_string(":webhooks_incoming_oauth_stripe_account_webhooks", options)}" db/migrate/*`.split(":").first
149
152
  empty_transformer.replace_in_file(migration_file_name, "null: false", "null: true")
150
- empty_transformer.replace_in_file(migration_file_name, "foreign_key: true", oauth_transform_string('foreign_key: true, index: {name: "index_stripe_webhooks_on_oauth_stripe_account_id"}'))
153
+ empty_transformer.replace_in_file(migration_file_name, "foreign_key: true", oauth_transform_string('foreign_key: true, index: {name: "index_stripe_webhooks_on_oauth_stripe_account_id"}', options))
151
154
 
152
155
  puts ""
153
156
  puts "šŸŽ‰"
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.3.16"
3
+ VERSION = "1.3.18"
4
4
  end
5
5
  end
@@ -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.safe_load(File.read(file))
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.16
4
+ version: 1.3.18
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-24 00:00:00.000000000 Z
11
+ date: 2023-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard