core_merchant 0.3.0 → 0.5.1
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: 465238229ff4e985efc17153d4d8efc1cca941745ded4a1e5dbe3a189499e6d0
|
4
|
+
data.tar.gz: 07ee307e66cbf913b89abbb41ec1eaa92a5ed5e981a577148cba3e8be0c02e95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e85d2853136062219964072612ec3d82a8fa2296b3cf71f3400e1f68b01ff19c9ce7da09ef0acdcc9b681aecb487ae5680e9342df5428f7281d12569cad860c
|
7
|
+
data.tar.gz: 851db004b49a0ac7e0c737c6a53741b5d8747acfa052dedba8e78ac959ff532b02ff556a5a8a6a59cfe65b5aa0aec7cdb92d7500161904b37afdbd3ca1457607
|
data/Gemfile.lock
CHANGED
@@ -10,8 +10,12 @@ module CoreMerchant
|
|
10
10
|
|
11
11
|
source_root File.expand_path("templates", __dir__)
|
12
12
|
|
13
|
+
class_option :customer_class, type: :string, required: true,
|
14
|
+
desc: "Name of your existing customer class, e.g. User"
|
15
|
+
|
13
16
|
def copy_initializer
|
14
|
-
|
17
|
+
@customer_class = options[:customer_class].classify
|
18
|
+
template "core_merchant.erb", "config/initializers/core_merchant.rb"
|
15
19
|
end
|
16
20
|
|
17
21
|
def copy_locales
|
@@ -26,6 +30,23 @@ module CoreMerchant
|
|
26
30
|
migration_template "create_core_merchant_subscription_plans.erb",
|
27
31
|
"db/migrate/create_core_merchant_subscription_plans.rb"
|
28
32
|
end
|
33
|
+
|
34
|
+
def show_post_install
|
35
|
+
say "CoreMerchant has been successfully installed.", :green
|
36
|
+
say "Customer class: #{@customer_class}"
|
37
|
+
say "Please run `rails db:migrate` to create the subscription plans table."
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.banner
|
41
|
+
"rails generate core_merchant:install --customer_class=User"
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.description
|
45
|
+
<<~DESC
|
46
|
+
Installs CoreMerchant into your application with the specified customer class.
|
47
|
+
This could be User, Customer, or any other existing model in your application that represents a customer."
|
48
|
+
DESC
|
49
|
+
end
|
29
50
|
end
|
30
51
|
end
|
31
52
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: core_merchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seyithan Teymur
|
@@ -135,7 +135,7 @@ files:
|
|
135
135
|
- lib/core_merchant/version.rb
|
136
136
|
- lib/generators/core_merchant/install_generator.rb
|
137
137
|
- lib/generators/core_merchant/templates/core_merchant.en.yml
|
138
|
-
- lib/generators/core_merchant/templates/core_merchant.
|
138
|
+
- lib/generators/core_merchant/templates/core_merchant.erb
|
139
139
|
- lib/generators/core_merchant/templates/create_core_merchant_subscription_plans.erb
|
140
140
|
- sig/core_merchant.rbs
|
141
141
|
homepage: https://github.com/theseyithan/core_merchant
|