solidus_subscriptions-alpha 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: f0d10eb4c148ba35b53a03253ce3ee04e8a0e4ee
4
- data.tar.gz: 1aaf99dda496e4de2eb61f8ab4df96d9bc663947
3
+ metadata.gz: 7457d91d94e22078989fce66d5e8b2ac924643fd
4
+ data.tar.gz: 87516652b49784f6d2581f0f075c37f2d96ec338
5
5
  SHA512:
6
- metadata.gz: f055e7676ddb8241132a8e7a0189622a9a115e88b0d9e92b274d5d795fea4a69922074c2da45e251875a1e56ac8d17f18051b72680d3a66ab048f6de9e969cb0
7
- data.tar.gz: b50200bee8ed2f9e36536bad5196ba265fa98479dc12b4c0f8d0575ea962cb4d98c4446e70ecc9030906bea64dc7b08ac85d89f2a3c2df4df7d37c83127102a7
6
+ metadata.gz: 57806d34ad1210f79ab1c115780b93377fdcb9347e8baac7718a2de7bfd8678a2b9ae4398742c05e9620a1f7eef1d16b691b2545252df0a80359bb6d1302ec25
7
+ data.tar.gz: a73e2853cf52025b46cfe6036abddb50aaf82d78120651029963eef6c50c9dac3b70fb92e2769d05d96a8dde5912df9c75a313c53234f75f953de356b7f6d870
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ This is currently a fork of https://github.com/solidusio-contrib/solidus_subscriptions. It supports the alpha version of the gem on rubygems until such a time that an official gem is released.
2
+
1
3
  # SolidusSubscriptions
2
4
 
3
5
  A Solidus extension for subscriptions. **Important note**: this is
@@ -11,7 +13,7 @@ Sponsored by [Goby](https://www.goby.co) - Electrify your routine!
11
13
  Add solidus_subscriptions to your Gemfile:
12
14
 
13
15
  ```ruby
14
- gem 'solidus_subscriptions', github: 'solidusio-contrib/solidus_subscriptions'
16
+ gem 'solidus_subscriptions-alpha', '~> 0.0.1', require: 'solidus_subscriptions'
15
17
  ```
16
18
 
17
19
  Bundle your dependencies and run the installation generator:
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ module Products
3
+ module Subscribable
4
+ def self.prepended(klass)
5
+ klass.delegate :"subscribable", :"subscribable=", to: :find_or_build_master
6
+ end
7
+ end
8
+ end
9
+ end
10
+
11
+ Spree::Product.prepend Spree::Products::Subscribable
@@ -114,7 +114,7 @@ module SolidusSubscriptions
114
114
  end
115
115
 
116
116
  def active_card
117
- user.credit_cards.default.last
117
+ user.wallet.default_wallet_payment_source
118
118
  end
119
119
 
120
120
  def create_payment
@@ -4,3 +4,10 @@ Deface::Override.new(
4
4
  insert_after: "[data-hook='track_inventory']",
5
5
  partial: "spree/admin/variants/subscribable_checkbox"
6
6
  )
7
+
8
+ Deface::Override.new(
9
+ virtual_path: "spree/admin/products/_form",
10
+ name: "solidus_subscriptions_product_subscribable_checkbox",
11
+ insert_after: "[data-hook='admin_product_form_meta']",
12
+ partial: "spree/admin/products/subscribable_checkbox"
13
+ )
@@ -0,0 +1,8 @@
1
+ <% if !@product.has_variants? then %>
2
+ <div class="field four columns checkbox" data-hook="subscribable">
3
+ <%= f.label :subscribable do %>
4
+ <%= f.check_box :subscribable %>
5
+ <%= Spree::Product.human_attribute_name(:subscribable) %>
6
+ <% end %>
7
+ </div>
8
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module SolidusSubscriptions
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_subscriptions-alpha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brendan Deere
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-08 00:00:00.000000000 Z
11
+ date: 2017-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus
@@ -354,6 +354,7 @@ files:
354
354
  - app/decorators/spree/orders/after_create.rb
355
355
  - app/decorators/spree/orders/finalize_creates_subscriptions.rb
356
356
  - app/decorators/spree/orders/subscription_line_items_association.rb
357
+ - app/decorators/spree/products/subscribable_decorator.rb
357
358
  - app/decorators/spree/users/have_many_subscriptions.rb
358
359
  - app/decorators/spree/variant_pretty_name.rb
359
360
  - app/jobs/solidus_subscriptions/process_installments_job.rb
@@ -379,6 +380,7 @@ files:
379
380
  - app/overrides/views/admin_subscribable_checkbox.rb
380
381
  - app/overrides/views/admin_subscriptions_menu_link.rb
381
382
  - app/overrides/views/subscription_line_item_fields.rb
383
+ - app/views/spree/admin/products/_subscribable_checkbox.html.erb
382
384
  - app/views/spree/admin/promotions/rules/_subscription_order_promotion_rule.html.erb
383
385
  - app/views/spree/admin/promotions/rules/_subscription_promotion_rule.html.erb
384
386
  - app/views/spree/admin/shared/_no_objects_found.html.erb