solidus_subscriptions 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +41 -0
  3. data/.gem_release.yml +5 -0
  4. data/.github/stale.yml +17 -0
  5. data/.github_changelog_generator +2 -0
  6. data/.gitignore +20 -0
  7. data/.rspec +2 -0
  8. data/.rubocop.yml +12 -0
  9. data/.rubocop_todo.yml +86 -0
  10. data/CHANGELOG.md +191 -0
  11. data/Gemfile +33 -0
  12. data/LICENSE +26 -0
  13. data/README.md +221 -0
  14. data/Rakefile +6 -0
  15. data/app/assets/javascripts/spree/backend/solidus_subscriptions.js +1 -0
  16. data/app/assets/javascripts/spree/backend/solidus_subscriptions/edit_subscription_payment.js +32 -0
  17. data/app/controllers/solidus_subscriptions/api/v1/base_controller.rb +13 -0
  18. data/app/controllers/solidus_subscriptions/api/v1/line_items_controller.rb +48 -0
  19. data/app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb +100 -0
  20. data/app/controllers/spree/admin/installments_controller.rb +25 -0
  21. data/app/controllers/spree/admin/subscription_events_controller.rb +37 -0
  22. data/app/controllers/spree/admin/subscription_orders_controller.rb +35 -0
  23. data/app/controllers/spree/admin/subscriptions_controller.rb +100 -0
  24. data/app/controllers/spree/admin/users/subscriptions_controller.rb +17 -0
  25. data/app/decorators/controllers/solidus_subscriptions/spree/api/line_items_controller/create_subscription_line_items.rb +36 -0
  26. data/app/decorators/controllers/solidus_subscriptions/spree/orders_controller/create_subscription_line_items.rb +35 -0
  27. data/app/decorators/models/solidus_subscriptions/spree/line_item/subscription_line_items_association.rb +26 -0
  28. data/app/decorators/models/solidus_subscriptions/spree/order/after_create.rb +19 -0
  29. data/app/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions.rb +23 -0
  30. data/app/decorators/models/solidus_subscriptions/spree/order/installment_details_association.rb +15 -0
  31. data/app/decorators/models/solidus_subscriptions/spree/order/subscription_association.rb +15 -0
  32. data/app/decorators/models/solidus_subscriptions/spree/order/subscription_line_items_association.rb +19 -0
  33. data/app/decorators/models/solidus_subscriptions/spree/product/delegate_subscribable.rb +17 -0
  34. data/app/decorators/models/solidus_subscriptions/spree/user/have_many_subscriptions.rb +30 -0
  35. data/app/decorators/models/solidus_subscriptions/spree/variant/auto_delete_from_subscriptions.rb +20 -0
  36. data/app/decorators/models/solidus_subscriptions/spree/variant/variant_pretty_name.rb +17 -0
  37. data/app/decorators/models/solidus_subscriptions/spree/wallet_payment_source/report_default_change_to_subscriptions.rb +28 -0
  38. data/app/jobs/solidus_subscriptions/process_installment_job.rb +13 -0
  39. data/app/jobs/solidus_subscriptions/process_subscription_job.rb +31 -0
  40. data/app/models/solidus_subscriptions/installment.rb +135 -0
  41. data/app/models/solidus_subscriptions/installment_detail.rb +28 -0
  42. data/app/models/solidus_subscriptions/interval.rb +26 -0
  43. data/app/models/solidus_subscriptions/line_item.rb +42 -0
  44. data/app/models/solidus_subscriptions/promotion/rules/subscription_creation_order.rb +44 -0
  45. data/app/models/solidus_subscriptions/promotion/rules/subscription_installment_order.rb +31 -0
  46. data/app/models/solidus_subscriptions/subscription.rb +392 -0
  47. data/app/models/solidus_subscriptions/subscription_event.rb +11 -0
  48. data/app/overrides/views/admin_subscribable_product_checkbox.rb +8 -0
  49. data/app/overrides/views/admin_subscribable_variant_checkbox.rb +8 -0
  50. data/app/overrides/views/admin_subscriptions_menu_link.rb +10 -0
  51. data/app/overrides/views/admin_users_subscriptions_tab.rb +8 -0
  52. data/app/overrides/views/subscription_line_item_fields.rb +8 -0
  53. data/app/subscribers/solidus_subscriptions/churn_buster_subscriber.rb +39 -0
  54. data/app/subscribers/solidus_subscriptions/event_storage_subscriber.rb +64 -0
  55. data/app/views/spree/admin/installments/_state_pill.html.erb +8 -0
  56. data/app/views/spree/admin/installments/index.html.erb +42 -0
  57. data/app/views/spree/admin/products/_subscribable_checkbox.html.erb +8 -0
  58. data/app/views/spree/admin/promotions/rules/_subscription_creation_order.html.erb +0 -0
  59. data/app/views/spree/admin/promotions/rules/_subscription_installment_order.html.erb +0 -0
  60. data/app/views/spree/admin/shared/_subscription_actions.html.erb +35 -0
  61. data/app/views/spree/admin/shared/_subscription_breadcrumbs.html.erb +4 -0
  62. data/app/views/spree/admin/shared/_subscription_sidebar.html.erb +18 -0
  63. data/app/views/spree/admin/shared/_subscription_tab.html.erb +3 -0
  64. data/app/views/spree/admin/shared/_subscription_tabs.html.erb +18 -0
  65. data/app/views/spree/admin/subscription_events/_state_pill.html.erb +8 -0
  66. data/app/views/spree/admin/subscription_events/index.html.erb +42 -0
  67. data/app/views/spree/admin/subscription_orders/index.html.erb +93 -0
  68. data/app/views/spree/admin/subscriptions/_form.html.erb +150 -0
  69. data/app/views/spree/admin/subscriptions/_processing_state_pill.html.erb +9 -0
  70. data/app/views/spree/admin/subscriptions/_state_pill.html.erb +10 -0
  71. data/app/views/spree/admin/subscriptions/edit.html.erb +10 -0
  72. data/app/views/spree/admin/subscriptions/index.html.erb +176 -0
  73. data/app/views/spree/admin/subscriptions/new.html.erb +5 -0
  74. data/app/views/spree/admin/users/_subscription_tab.html.erb +5 -0
  75. data/app/views/spree/admin/users/subscriptions/index.html.erb +44 -0
  76. data/app/views/spree/admin/variants/_subscribable_checkbox.html.erb +6 -0
  77. data/app/views/spree/frontend/products/_subscription_line_item_fields.html.erb +30 -0
  78. data/bin/console +17 -0
  79. data/bin/rails +7 -0
  80. data/bin/rails-engine +13 -0
  81. data/bin/rails-sandbox +16 -0
  82. data/bin/rake +7 -0
  83. data/bin/sandbox +86 -0
  84. data/bin/setup +8 -0
  85. data/config/initializers/permission_sets.rb +11 -0
  86. data/config/initializers/subscribers.rb +9 -0
  87. data/config/locales/en.yml +129 -0
  88. data/config/routes.rb +34 -0
  89. data/db/migrate/20160825164850_create_solidus_subscriptions_subscriptions.rb +11 -0
  90. data/db/migrate/20160825173548_create_solidus_subscriptions_line_items.rb +17 -0
  91. data/db/migrate/20160825202248_create_solidus_subscriptions_installments.rb +23 -0
  92. data/db/migrate/20160825211202_create_solidus_subscriptions_installment_details.rb +22 -0
  93. data/db/migrate/20160825214240_add_subscribable_to_spree_variants.rb +5 -0
  94. data/db/migrate/20160829201653_change_subscription_line_items_installments_to_max_installments.rb +5 -0
  95. data/db/migrate/20160902220242_remove_state_from_solidus_susbscriptions_installment_details.rb +5 -0
  96. data/db/migrate/20160902220604_add_successful_to_solidus_subscriptions_installment_details.rb +5 -0
  97. data/db/migrate/20160902221218_add_message_to_solidus_subscriptions_installment_details.rb +5 -0
  98. data/db/migrate/20160922164101_add_interval_length_and_units_to_subscription_line_items.rb +8 -0
  99. data/db/migrate/20161006191003_add_skip_count_to_solidus_subscriptions_subscriptions.rb +5 -0
  100. data/db/migrate/20161006191127_add_successive_skip_count_to_solidus_subscriptions_subscriptions.rb +5 -0
  101. data/db/migrate/20161014212649_allow_spree_line_item_id_to_be_null.rb +5 -0
  102. data/db/migrate/20161017155749_add_order_id_to_solidus_subscriptions_installment_details.rb +6 -0
  103. data/db/migrate/20161017175509_remove_order_id_from_solidus_subscriptions_installments.rb +5 -0
  104. data/db/migrate/20161017201944_add_subscription_order_to_spree_orders.rb +5 -0
  105. data/db/migrate/20161221155142_add_store_to_solidus_subscriptions_subscriptions.rb +6 -0
  106. data/db/migrate/20161223152905_add_address_id_to_solidus_subscriptions_subscriptions.rb +7 -0
  107. data/db/migrate/20170106224713_change_line_item_max_installments_to_end_date.rb +6 -0
  108. data/db/migrate/20170111224458_change_subscription_actionable_date_to_datetime.rb +5 -0
  109. data/db/migrate/20170111232801_change_inteval_actionable_date_to_datetime.rb +5 -0
  110. data/db/migrate/20170112012407_add_config_options_to_subscriptions.rb +7 -0
  111. data/db/migrate/20200617102749_add_billing_address_to_subscriptions.rb +11 -0
  112. data/db/migrate/20200617155042_add_payment_source_to_subscriptions.rb +6 -0
  113. data/db/migrate/20200618092951_add_payment_method_to_subscriptions.rb +11 -0
  114. data/db/migrate/20200730101242_create_solidus_subscriptions_subscription_events.rb +22 -0
  115. data/db/migrate/20200917072152_add_subscription_reference_to_orders.rb +11 -0
  116. data/db/migrate/20201007140032_add_guest_token_to_subscriptions.rb +6 -0
  117. data/db/migrate/20201123171026_change_actionable_date_to_date.rb +15 -0
  118. data/db/migrate/20210205140422_add_currency_to_subscription.rb +5 -0
  119. data/db/migrate/20210323165714_update_promotion_rule_names.rb +22 -0
  120. data/lib/generators/solidus_subscriptions/install/install_generator.rb +32 -0
  121. data/lib/generators/solidus_subscriptions/install/templates/initializer.rb +99 -0
  122. data/lib/solidus_subscriptions.rb +49 -0
  123. data/lib/solidus_subscriptions/checkout.rb +74 -0
  124. data/lib/solidus_subscriptions/churn_buster/client.rb +48 -0
  125. data/lib/solidus_subscriptions/churn_buster/order_serializer.rb +19 -0
  126. data/lib/solidus_subscriptions/churn_buster/serializer.rb +23 -0
  127. data/lib/solidus_subscriptions/churn_buster/subscription_customer_serializer.rb +28 -0
  128. data/lib/solidus_subscriptions/churn_buster/subscription_payment_method_serializer.rb +37 -0
  129. data/lib/solidus_subscriptions/churn_buster/subscription_serializer.rb +17 -0
  130. data/lib/solidus_subscriptions/configuration.rb +84 -0
  131. data/lib/solidus_subscriptions/dispatcher/base.rb +18 -0
  132. data/lib/solidus_subscriptions/dispatcher/failure_dispatcher.rb +13 -0
  133. data/lib/solidus_subscriptions/dispatcher/out_of_stock_dispatcher.rb +11 -0
  134. data/lib/solidus_subscriptions/dispatcher/payment_failed_dispatcher.rb +19 -0
  135. data/lib/solidus_subscriptions/dispatcher/success_dispatcher.rb +17 -0
  136. data/lib/solidus_subscriptions/engine.rb +56 -0
  137. data/lib/solidus_subscriptions/permission_sets/default_customer.rb +19 -0
  138. data/lib/solidus_subscriptions/permission_sets/subscription_management.rb +12 -0
  139. data/lib/solidus_subscriptions/permitted_attributes.rb +20 -0
  140. data/lib/solidus_subscriptions/processor.rb +17 -0
  141. data/lib/solidus_subscriptions/subscription_generator.rb +77 -0
  142. data/lib/solidus_subscriptions/subscription_line_item_builder.rb +23 -0
  143. data/lib/solidus_subscriptions/testing_support/factories/installment_detail_factory.rb +11 -0
  144. data/lib/solidus_subscriptions/testing_support/factories/installment_factory.rb +29 -0
  145. data/lib/solidus_subscriptions/testing_support/factories/line_item_factory.rb +20 -0
  146. data/lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb +17 -0
  147. data/lib/solidus_subscriptions/testing_support/factories/spree/order_factory.rb +17 -0
  148. data/lib/solidus_subscriptions/testing_support/factories/spree_modification_factory.rb +10 -0
  149. data/lib/solidus_subscriptions/testing_support/factories/subscription_event_factory.rb +8 -0
  150. data/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb +56 -0
  151. data/lib/solidus_subscriptions/version.rb +5 -0
  152. data/lib/tasks/process_subscriptions.rake +8 -0
  153. data/reference/solidus_subscriptions.v1.yaml +290 -0
  154. data/solidus_subscriptions.gemspec +47 -0
  155. data/spec/controllers/spree/admin/subscriptions_controller_spec.rb +202 -0
  156. data/spec/controllers/spree/api/line_items_controller_spec.rb +103 -0
  157. data/spec/controllers/spree/api/orders_controller_spec.rb +57 -0
  158. data/spec/controllers/spree/api/users_controller_spec.rb +48 -0
  159. data/spec/decorators/controllers/solidus_subscriptions/spree/orders_controller/create_subscription_line_items_spec.rb +80 -0
  160. data/spec/decorators/models/solidus_subscriptions/spree/line_item/subscription_line_items_association_spec.rb +10 -0
  161. data/spec/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions_spec.rb +32 -0
  162. data/spec/decorators/models/solidus_subscriptions/spree/order/installment_details_association_spec.rb +9 -0
  163. data/spec/decorators/models/solidus_subscriptions/spree/order/subscription_line_items_association_spec.rb +9 -0
  164. data/spec/decorators/models/solidus_subscriptions/spree/user/have_many_subscriptions_spec.rb +22 -0
  165. data/spec/decorators/models/solidus_subscriptions/spree/variant/auto_delete_from_subscriptions_spec.rb +25 -0
  166. data/spec/features/admin/subscription_orders_spec.rb +35 -0
  167. data/spec/features/admin/subscriptions_spec.rb +63 -0
  168. data/spec/features/admin_users_subscription_tabs_spec.rb +61 -0
  169. data/spec/fixtures/cassettes/churn_buster.yml +229 -0
  170. data/spec/jobs/solidus_subscriptions/process_installment_job_spec.rb +38 -0
  171. data/spec/jobs/solidus_subscriptions/process_subscription_job_spec.rb +83 -0
  172. data/spec/lib/solidus_subscriptions/checkout_spec.rb +125 -0
  173. data/spec/lib/solidus_subscriptions/churn_buster/client_spec.rb +59 -0
  174. data/spec/lib/solidus_subscriptions/dispatcher/failure_dispatcher_spec.rb +29 -0
  175. data/spec/lib/solidus_subscriptions/dispatcher/out_of_stock_dispatcher_spec.rb +15 -0
  176. data/spec/lib/solidus_subscriptions/dispatcher/payment_failed_dispatcher_spec.rb +44 -0
  177. data/spec/lib/solidus_subscriptions/dispatcher/success_dispatcher_spec.rb +30 -0
  178. data/spec/lib/solidus_subscriptions/permission_sets/default_customer_spec.rb +95 -0
  179. data/spec/lib/solidus_subscriptions/permission_sets/subscription_management_spec.rb +26 -0
  180. data/spec/lib/solidus_subscriptions/processor_spec.rb +34 -0
  181. data/spec/lib/solidus_subscriptions/promotion/rules/subscription_creation_order_spec.rb +57 -0
  182. data/spec/lib/solidus_subscriptions/promotion/rules/subscription_installment_order_spec.rb +39 -0
  183. data/spec/lib/solidus_subscriptions/subscription_generator_spec.rb +83 -0
  184. data/spec/lib/solidus_subscriptions_spec.rb +30 -0
  185. data/spec/models/solidus_subscriptions/installment_detail_spec.rb +23 -0
  186. data/spec/models/solidus_subscriptions/installment_spec.rb +201 -0
  187. data/spec/models/solidus_subscriptions/line_item_spec.rb +29 -0
  188. data/spec/models/solidus_subscriptions/subscription_spec.rb +814 -0
  189. data/spec/models/spree/variant_spec.rb +16 -0
  190. data/spec/models/spree/wallet_payment_source_spec.rb +20 -0
  191. data/spec/requests/api/v1/line_items_spec.rb +116 -0
  192. data/spec/requests/api/v1/subscriptions_spec.rb +255 -0
  193. data/spec/spec_helper.rb +30 -0
  194. data/spec/subscribers/solidus_subscriptions/churn_buster_subscriber_spec.rb +76 -0
  195. data/spec/support/active_model_mocks.rb +1 -0
  196. data/spec/support/cancancan.rb +1 -0
  197. data/spec/support/factories.rb +1 -0
  198. data/spec/support/helpers/checkout_infrastructure.rb +18 -0
  199. data/spec/support/helpers/config.rb +13 -0
  200. data/spec/support/shoulda.rb +7 -0
  201. data/spec/support/timecop.rb +1 -0
  202. data/spec/support/vcr.rb +10 -0
  203. data/spec/support/version_cake.rb +8 -0
  204. metadata +498 -0
@@ -0,0 +1 @@
1
+ require 'rspec/active_model/mocks'
@@ -0,0 +1 @@
1
+ require 'cancan/matchers'
@@ -0,0 +1 @@
1
+ FactoryBot.use_parent_strategy = false
@@ -0,0 +1,18 @@
1
+ # Extend your spec with this module if you want your spec to be able to move
2
+ # an order through the checkout process
3
+ module CheckoutInfrastructure
4
+ def self.extended(base)
5
+ base.before(:all) do
6
+ create :country
7
+ create :shipping_method
8
+ end
9
+
10
+ base.after(:all) do
11
+ DatabaseCleaner.clean_with(:truncation)
12
+ end
13
+ end
14
+ end
15
+
16
+ RSpec.configure do |config|
17
+ config.extend CheckoutInfrastructure, :checkout
18
+ end
@@ -0,0 +1,13 @@
1
+ module SolidusSubscriptions
2
+ module TestingSupport
3
+ module ConfigHelper
4
+ def stub_config(options)
5
+ allow(SolidusSubscriptions.configuration).to receive_messages(options)
6
+ end
7
+ end
8
+ end
9
+ end
10
+
11
+ RSpec.configure do |config|
12
+ config.include SolidusSubscriptions::TestingSupport::ConfigHelper
13
+ end
@@ -0,0 +1,7 @@
1
+ require 'shoulda-matchers'
2
+ Shoulda::Matchers.configure do |config|
3
+ config.integrate do |with|
4
+ with.test_framework :rspec
5
+ with.library :rails
6
+ end
7
+ end
@@ -0,0 +1 @@
1
+ require 'timecop'
@@ -0,0 +1,10 @@
1
+ require 'webmock/rspec'
2
+ require 'vcr'
3
+
4
+ WebMock.disable_net_connect!
5
+
6
+ VCR.configure do |config|
7
+ config.cassette_library_dir = "spec/fixtures/cassettes"
8
+ config.hook_into :webmock
9
+ config.configure_rspec_metadata!
10
+ end
@@ -0,0 +1,8 @@
1
+ RSpec.configure do |config|
2
+ if defined?(VersionCake::TestHelpers)
3
+ config.include VersionCake::TestHelpers, type: :controller
4
+ config.before(:each, type: :controller) do
5
+ set_request_version('', 1)
6
+ end
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,498 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: solidus_subscriptions
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.rc1
5
+ platform: ruby
6
+ authors:
7
+ - Solidus Team
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-04-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: deface
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: httparty
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.18'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.18'
41
+ - !ruby/object:Gem::Dependency
42
+ name: i18n
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: solidus_core
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 2.0.0
62
+ - - "<"
63
+ - !ruby/object:Gem::Version
64
+ version: '3'
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 2.0.0
72
+ - - "<"
73
+ - !ruby/object:Gem::Version
74
+ version: '3'
75
+ - !ruby/object:Gem::Dependency
76
+ name: solidus_support
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '0.7'
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '0.7'
89
+ - !ruby/object:Gem::Dependency
90
+ name: state_machines
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :runtime
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: rspec-activemodel-mocks
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: shoulda-matchers
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '4.4'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: '4.4'
131
+ - !ruby/object:Gem::Dependency
132
+ name: solidus_dev_support
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '2.0'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '2.0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: timecop
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: vcr
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
173
+ - !ruby/object:Gem::Dependency
174
+ name: versioncake
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ type: :development
181
+ prerelease: false
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ - !ruby/object:Gem::Dependency
188
+ name: webmock
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ version: '0'
194
+ type: :development
195
+ prerelease: false
196
+ version_requirements: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - ">="
199
+ - !ruby/object:Gem::Version
200
+ version: '0'
201
+ - !ruby/object:Gem::Dependency
202
+ name: yard
203
+ requirement: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
208
+ type: :development
209
+ prerelease: false
210
+ version_requirements: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - ">="
213
+ - !ruby/object:Gem::Version
214
+ version: '0'
215
+ description: Add subscription support to Solidus
216
+ email: contact@solidus.io
217
+ executables: []
218
+ extensions: []
219
+ extra_rdoc_files: []
220
+ files:
221
+ - ".circleci/config.yml"
222
+ - ".gem_release.yml"
223
+ - ".github/stale.yml"
224
+ - ".github_changelog_generator"
225
+ - ".gitignore"
226
+ - ".rspec"
227
+ - ".rubocop.yml"
228
+ - ".rubocop_todo.yml"
229
+ - CHANGELOG.md
230
+ - Gemfile
231
+ - LICENSE
232
+ - README.md
233
+ - Rakefile
234
+ - app/assets/javascripts/spree/backend/solidus_subscriptions.js
235
+ - app/assets/javascripts/spree/backend/solidus_subscriptions/edit_subscription_payment.js
236
+ - app/controllers/solidus_subscriptions/api/v1/base_controller.rb
237
+ - app/controllers/solidus_subscriptions/api/v1/line_items_controller.rb
238
+ - app/controllers/solidus_subscriptions/api/v1/subscriptions_controller.rb
239
+ - app/controllers/spree/admin/installments_controller.rb
240
+ - app/controllers/spree/admin/subscription_events_controller.rb
241
+ - app/controllers/spree/admin/subscription_orders_controller.rb
242
+ - app/controllers/spree/admin/subscriptions_controller.rb
243
+ - app/controllers/spree/admin/users/subscriptions_controller.rb
244
+ - app/decorators/controllers/solidus_subscriptions/spree/api/line_items_controller/create_subscription_line_items.rb
245
+ - app/decorators/controllers/solidus_subscriptions/spree/orders_controller/create_subscription_line_items.rb
246
+ - app/decorators/models/solidus_subscriptions/spree/line_item/subscription_line_items_association.rb
247
+ - app/decorators/models/solidus_subscriptions/spree/order/after_create.rb
248
+ - app/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions.rb
249
+ - app/decorators/models/solidus_subscriptions/spree/order/installment_details_association.rb
250
+ - app/decorators/models/solidus_subscriptions/spree/order/subscription_association.rb
251
+ - app/decorators/models/solidus_subscriptions/spree/order/subscription_line_items_association.rb
252
+ - app/decorators/models/solidus_subscriptions/spree/product/delegate_subscribable.rb
253
+ - app/decorators/models/solidus_subscriptions/spree/user/have_many_subscriptions.rb
254
+ - app/decorators/models/solidus_subscriptions/spree/variant/auto_delete_from_subscriptions.rb
255
+ - app/decorators/models/solidus_subscriptions/spree/variant/variant_pretty_name.rb
256
+ - app/decorators/models/solidus_subscriptions/spree/wallet_payment_source/report_default_change_to_subscriptions.rb
257
+ - app/jobs/solidus_subscriptions/process_installment_job.rb
258
+ - app/jobs/solidus_subscriptions/process_subscription_job.rb
259
+ - app/models/solidus_subscriptions/installment.rb
260
+ - app/models/solidus_subscriptions/installment_detail.rb
261
+ - app/models/solidus_subscriptions/interval.rb
262
+ - app/models/solidus_subscriptions/line_item.rb
263
+ - app/models/solidus_subscriptions/promotion/rules/subscription_creation_order.rb
264
+ - app/models/solidus_subscriptions/promotion/rules/subscription_installment_order.rb
265
+ - app/models/solidus_subscriptions/subscription.rb
266
+ - app/models/solidus_subscriptions/subscription_event.rb
267
+ - app/overrides/views/admin_subscribable_product_checkbox.rb
268
+ - app/overrides/views/admin_subscribable_variant_checkbox.rb
269
+ - app/overrides/views/admin_subscriptions_menu_link.rb
270
+ - app/overrides/views/admin_users_subscriptions_tab.rb
271
+ - app/overrides/views/subscription_line_item_fields.rb
272
+ - app/subscribers/solidus_subscriptions/churn_buster_subscriber.rb
273
+ - app/subscribers/solidus_subscriptions/event_storage_subscriber.rb
274
+ - app/views/spree/admin/installments/_state_pill.html.erb
275
+ - app/views/spree/admin/installments/index.html.erb
276
+ - app/views/spree/admin/products/_subscribable_checkbox.html.erb
277
+ - app/views/spree/admin/promotions/rules/_subscription_creation_order.html.erb
278
+ - app/views/spree/admin/promotions/rules/_subscription_installment_order.html.erb
279
+ - app/views/spree/admin/shared/_subscription_actions.html.erb
280
+ - app/views/spree/admin/shared/_subscription_breadcrumbs.html.erb
281
+ - app/views/spree/admin/shared/_subscription_sidebar.html.erb
282
+ - app/views/spree/admin/shared/_subscription_tab.html.erb
283
+ - app/views/spree/admin/shared/_subscription_tabs.html.erb
284
+ - app/views/spree/admin/subscription_events/_state_pill.html.erb
285
+ - app/views/spree/admin/subscription_events/index.html.erb
286
+ - app/views/spree/admin/subscription_orders/index.html.erb
287
+ - app/views/spree/admin/subscriptions/_form.html.erb
288
+ - app/views/spree/admin/subscriptions/_processing_state_pill.html.erb
289
+ - app/views/spree/admin/subscriptions/_state_pill.html.erb
290
+ - app/views/spree/admin/subscriptions/edit.html.erb
291
+ - app/views/spree/admin/subscriptions/index.html.erb
292
+ - app/views/spree/admin/subscriptions/new.html.erb
293
+ - app/views/spree/admin/users/_subscription_tab.html.erb
294
+ - app/views/spree/admin/users/subscriptions/index.html.erb
295
+ - app/views/spree/admin/variants/_subscribable_checkbox.html.erb
296
+ - app/views/spree/frontend/products/_subscription_line_item_fields.html.erb
297
+ - bin/console
298
+ - bin/rails
299
+ - bin/rails-engine
300
+ - bin/rails-sandbox
301
+ - bin/rake
302
+ - bin/sandbox
303
+ - bin/setup
304
+ - config/initializers/permission_sets.rb
305
+ - config/initializers/subscribers.rb
306
+ - config/locales/en.yml
307
+ - config/routes.rb
308
+ - db/migrate/20160825164850_create_solidus_subscriptions_subscriptions.rb
309
+ - db/migrate/20160825173548_create_solidus_subscriptions_line_items.rb
310
+ - db/migrate/20160825202248_create_solidus_subscriptions_installments.rb
311
+ - db/migrate/20160825211202_create_solidus_subscriptions_installment_details.rb
312
+ - db/migrate/20160825214240_add_subscribable_to_spree_variants.rb
313
+ - db/migrate/20160829201653_change_subscription_line_items_installments_to_max_installments.rb
314
+ - db/migrate/20160902220242_remove_state_from_solidus_susbscriptions_installment_details.rb
315
+ - db/migrate/20160902220604_add_successful_to_solidus_subscriptions_installment_details.rb
316
+ - db/migrate/20160902221218_add_message_to_solidus_subscriptions_installment_details.rb
317
+ - db/migrate/20160922164101_add_interval_length_and_units_to_subscription_line_items.rb
318
+ - db/migrate/20161006191003_add_skip_count_to_solidus_subscriptions_subscriptions.rb
319
+ - db/migrate/20161006191127_add_successive_skip_count_to_solidus_subscriptions_subscriptions.rb
320
+ - db/migrate/20161014212649_allow_spree_line_item_id_to_be_null.rb
321
+ - db/migrate/20161017155749_add_order_id_to_solidus_subscriptions_installment_details.rb
322
+ - db/migrate/20161017175509_remove_order_id_from_solidus_subscriptions_installments.rb
323
+ - db/migrate/20161017201944_add_subscription_order_to_spree_orders.rb
324
+ - db/migrate/20161221155142_add_store_to_solidus_subscriptions_subscriptions.rb
325
+ - db/migrate/20161223152905_add_address_id_to_solidus_subscriptions_subscriptions.rb
326
+ - db/migrate/20170106224713_change_line_item_max_installments_to_end_date.rb
327
+ - db/migrate/20170111224458_change_subscription_actionable_date_to_datetime.rb
328
+ - db/migrate/20170111232801_change_inteval_actionable_date_to_datetime.rb
329
+ - db/migrate/20170112012407_add_config_options_to_subscriptions.rb
330
+ - db/migrate/20200617102749_add_billing_address_to_subscriptions.rb
331
+ - db/migrate/20200617155042_add_payment_source_to_subscriptions.rb
332
+ - db/migrate/20200618092951_add_payment_method_to_subscriptions.rb
333
+ - db/migrate/20200730101242_create_solidus_subscriptions_subscription_events.rb
334
+ - db/migrate/20200917072152_add_subscription_reference_to_orders.rb
335
+ - db/migrate/20201007140032_add_guest_token_to_subscriptions.rb
336
+ - db/migrate/20201123171026_change_actionable_date_to_date.rb
337
+ - db/migrate/20210205140422_add_currency_to_subscription.rb
338
+ - db/migrate/20210323165714_update_promotion_rule_names.rb
339
+ - lib/generators/solidus_subscriptions/install/install_generator.rb
340
+ - lib/generators/solidus_subscriptions/install/templates/initializer.rb
341
+ - lib/solidus_subscriptions.rb
342
+ - lib/solidus_subscriptions/checkout.rb
343
+ - lib/solidus_subscriptions/churn_buster/client.rb
344
+ - lib/solidus_subscriptions/churn_buster/order_serializer.rb
345
+ - lib/solidus_subscriptions/churn_buster/serializer.rb
346
+ - lib/solidus_subscriptions/churn_buster/subscription_customer_serializer.rb
347
+ - lib/solidus_subscriptions/churn_buster/subscription_payment_method_serializer.rb
348
+ - lib/solidus_subscriptions/churn_buster/subscription_serializer.rb
349
+ - lib/solidus_subscriptions/configuration.rb
350
+ - lib/solidus_subscriptions/dispatcher/base.rb
351
+ - lib/solidus_subscriptions/dispatcher/failure_dispatcher.rb
352
+ - lib/solidus_subscriptions/dispatcher/out_of_stock_dispatcher.rb
353
+ - lib/solidus_subscriptions/dispatcher/payment_failed_dispatcher.rb
354
+ - lib/solidus_subscriptions/dispatcher/success_dispatcher.rb
355
+ - lib/solidus_subscriptions/engine.rb
356
+ - lib/solidus_subscriptions/permission_sets/default_customer.rb
357
+ - lib/solidus_subscriptions/permission_sets/subscription_management.rb
358
+ - lib/solidus_subscriptions/permitted_attributes.rb
359
+ - lib/solidus_subscriptions/processor.rb
360
+ - lib/solidus_subscriptions/subscription_generator.rb
361
+ - lib/solidus_subscriptions/subscription_line_item_builder.rb
362
+ - lib/solidus_subscriptions/testing_support/factories/installment_detail_factory.rb
363
+ - lib/solidus_subscriptions/testing_support/factories/installment_factory.rb
364
+ - lib/solidus_subscriptions/testing_support/factories/line_item_factory.rb
365
+ - lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb
366
+ - lib/solidus_subscriptions/testing_support/factories/spree/order_factory.rb
367
+ - lib/solidus_subscriptions/testing_support/factories/spree_modification_factory.rb
368
+ - lib/solidus_subscriptions/testing_support/factories/subscription_event_factory.rb
369
+ - lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb
370
+ - lib/solidus_subscriptions/version.rb
371
+ - lib/tasks/process_subscriptions.rake
372
+ - reference/solidus_subscriptions.v1.yaml
373
+ - solidus_subscriptions.gemspec
374
+ - spec/controllers/spree/admin/subscriptions_controller_spec.rb
375
+ - spec/controllers/spree/api/line_items_controller_spec.rb
376
+ - spec/controllers/spree/api/orders_controller_spec.rb
377
+ - spec/controllers/spree/api/users_controller_spec.rb
378
+ - spec/decorators/controllers/solidus_subscriptions/spree/orders_controller/create_subscription_line_items_spec.rb
379
+ - spec/decorators/models/solidus_subscriptions/spree/line_item/subscription_line_items_association_spec.rb
380
+ - spec/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions_spec.rb
381
+ - spec/decorators/models/solidus_subscriptions/spree/order/installment_details_association_spec.rb
382
+ - spec/decorators/models/solidus_subscriptions/spree/order/subscription_line_items_association_spec.rb
383
+ - spec/decorators/models/solidus_subscriptions/spree/user/have_many_subscriptions_spec.rb
384
+ - spec/decorators/models/solidus_subscriptions/spree/variant/auto_delete_from_subscriptions_spec.rb
385
+ - spec/features/admin/subscription_orders_spec.rb
386
+ - spec/features/admin/subscriptions_spec.rb
387
+ - spec/features/admin_users_subscription_tabs_spec.rb
388
+ - spec/fixtures/cassettes/churn_buster.yml
389
+ - spec/jobs/solidus_subscriptions/process_installment_job_spec.rb
390
+ - spec/jobs/solidus_subscriptions/process_subscription_job_spec.rb
391
+ - spec/lib/solidus_subscriptions/checkout_spec.rb
392
+ - spec/lib/solidus_subscriptions/churn_buster/client_spec.rb
393
+ - spec/lib/solidus_subscriptions/dispatcher/failure_dispatcher_spec.rb
394
+ - spec/lib/solidus_subscriptions/dispatcher/out_of_stock_dispatcher_spec.rb
395
+ - spec/lib/solidus_subscriptions/dispatcher/payment_failed_dispatcher_spec.rb
396
+ - spec/lib/solidus_subscriptions/dispatcher/success_dispatcher_spec.rb
397
+ - spec/lib/solidus_subscriptions/permission_sets/default_customer_spec.rb
398
+ - spec/lib/solidus_subscriptions/permission_sets/subscription_management_spec.rb
399
+ - spec/lib/solidus_subscriptions/processor_spec.rb
400
+ - spec/lib/solidus_subscriptions/promotion/rules/subscription_creation_order_spec.rb
401
+ - spec/lib/solidus_subscriptions/promotion/rules/subscription_installment_order_spec.rb
402
+ - spec/lib/solidus_subscriptions/subscription_generator_spec.rb
403
+ - spec/lib/solidus_subscriptions_spec.rb
404
+ - spec/models/solidus_subscriptions/installment_detail_spec.rb
405
+ - spec/models/solidus_subscriptions/installment_spec.rb
406
+ - spec/models/solidus_subscriptions/line_item_spec.rb
407
+ - spec/models/solidus_subscriptions/subscription_spec.rb
408
+ - spec/models/spree/variant_spec.rb
409
+ - spec/models/spree/wallet_payment_source_spec.rb
410
+ - spec/requests/api/v1/line_items_spec.rb
411
+ - spec/requests/api/v1/subscriptions_spec.rb
412
+ - spec/spec_helper.rb
413
+ - spec/subscribers/solidus_subscriptions/churn_buster_subscriber_spec.rb
414
+ - spec/support/active_model_mocks.rb
415
+ - spec/support/cancancan.rb
416
+ - spec/support/factories.rb
417
+ - spec/support/helpers/checkout_infrastructure.rb
418
+ - spec/support/helpers/config.rb
419
+ - spec/support/shoulda.rb
420
+ - spec/support/timecop.rb
421
+ - spec/support/vcr.rb
422
+ - spec/support/version_cake.rb
423
+ homepage: https://github.com/solidusio-contrib/solidus_subscriptions
424
+ licenses:
425
+ - BSD-3-Clause
426
+ metadata:
427
+ homepage_uri: https://github.com/solidusio-contrib/solidus_subscriptions
428
+ source_code_uri: https://github.com/solidusio-contrib/solidus_subscriptions
429
+ changelog_uri: https://github.com/solidusio-contrib/solidus_subscriptions/blob/master/CHANGELOG.md
430
+ post_install_message:
431
+ rdoc_options: []
432
+ require_paths:
433
+ - lib
434
+ required_ruby_version: !ruby/object:Gem::Requirement
435
+ requirements:
436
+ - - "~>"
437
+ - !ruby/object:Gem::Version
438
+ version: '2.5'
439
+ required_rubygems_version: !ruby/object:Gem::Requirement
440
+ requirements:
441
+ - - ">"
442
+ - !ruby/object:Gem::Version
443
+ version: 1.3.1
444
+ requirements: []
445
+ rubygems_version: 3.0.3
446
+ signing_key:
447
+ specification_version: 4
448
+ summary: Add subscription support to Solidus
449
+ test_files:
450
+ - spec/controllers/spree/admin/subscriptions_controller_spec.rb
451
+ - spec/controllers/spree/api/line_items_controller_spec.rb
452
+ - spec/controllers/spree/api/orders_controller_spec.rb
453
+ - spec/controllers/spree/api/users_controller_spec.rb
454
+ - spec/decorators/controllers/solidus_subscriptions/spree/orders_controller/create_subscription_line_items_spec.rb
455
+ - spec/decorators/models/solidus_subscriptions/spree/line_item/subscription_line_items_association_spec.rb
456
+ - spec/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions_spec.rb
457
+ - spec/decorators/models/solidus_subscriptions/spree/order/installment_details_association_spec.rb
458
+ - spec/decorators/models/solidus_subscriptions/spree/order/subscription_line_items_association_spec.rb
459
+ - spec/decorators/models/solidus_subscriptions/spree/user/have_many_subscriptions_spec.rb
460
+ - spec/decorators/models/solidus_subscriptions/spree/variant/auto_delete_from_subscriptions_spec.rb
461
+ - spec/features/admin/subscription_orders_spec.rb
462
+ - spec/features/admin/subscriptions_spec.rb
463
+ - spec/features/admin_users_subscription_tabs_spec.rb
464
+ - spec/fixtures/cassettes/churn_buster.yml
465
+ - spec/jobs/solidus_subscriptions/process_installment_job_spec.rb
466
+ - spec/jobs/solidus_subscriptions/process_subscription_job_spec.rb
467
+ - spec/lib/solidus_subscriptions/checkout_spec.rb
468
+ - spec/lib/solidus_subscriptions/churn_buster/client_spec.rb
469
+ - spec/lib/solidus_subscriptions/dispatcher/failure_dispatcher_spec.rb
470
+ - spec/lib/solidus_subscriptions/dispatcher/out_of_stock_dispatcher_spec.rb
471
+ - spec/lib/solidus_subscriptions/dispatcher/payment_failed_dispatcher_spec.rb
472
+ - spec/lib/solidus_subscriptions/dispatcher/success_dispatcher_spec.rb
473
+ - spec/lib/solidus_subscriptions/permission_sets/default_customer_spec.rb
474
+ - spec/lib/solidus_subscriptions/permission_sets/subscription_management_spec.rb
475
+ - spec/lib/solidus_subscriptions/processor_spec.rb
476
+ - spec/lib/solidus_subscriptions/promotion/rules/subscription_creation_order_spec.rb
477
+ - spec/lib/solidus_subscriptions/promotion/rules/subscription_installment_order_spec.rb
478
+ - spec/lib/solidus_subscriptions/subscription_generator_spec.rb
479
+ - spec/lib/solidus_subscriptions_spec.rb
480
+ - spec/models/solidus_subscriptions/installment_detail_spec.rb
481
+ - spec/models/solidus_subscriptions/installment_spec.rb
482
+ - spec/models/solidus_subscriptions/line_item_spec.rb
483
+ - spec/models/solidus_subscriptions/subscription_spec.rb
484
+ - spec/models/spree/variant_spec.rb
485
+ - spec/models/spree/wallet_payment_source_spec.rb
486
+ - spec/requests/api/v1/line_items_spec.rb
487
+ - spec/requests/api/v1/subscriptions_spec.rb
488
+ - spec/spec_helper.rb
489
+ - spec/subscribers/solidus_subscriptions/churn_buster_subscriber_spec.rb
490
+ - spec/support/active_model_mocks.rb
491
+ - spec/support/cancancan.rb
492
+ - spec/support/factories.rb
493
+ - spec/support/helpers/checkout_infrastructure.rb
494
+ - spec/support/helpers/config.rb
495
+ - spec/support/shoulda.rb
496
+ - spec/support/timecop.rb
497
+ - spec/support/vcr.rb
498
+ - spec/support/version_cake.rb