effective_products 0.2.0 → 0.3.0

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: e74238b949c2002ffd532f7b4a941f8d8cee5e95c32c7195baa81239ed103dc8
4
- data.tar.gz: ae82acec74f21a38bdcfd1e7da9225c79b2b3871f0977b22832d6b84490b4ce4
3
+ metadata.gz: 4ae26ed6aea0b9a45d6318b110271ff03997aabb754ba030e37c4df9c190dae0
4
+ data.tar.gz: 193d7af0f641d2881354340f8a695db2c0d41f3f2031ec7942e35578aea06451
5
5
  SHA512:
6
- metadata.gz: bb9987e2605b3c1f81ba771ea785eca19f4eb169024cf7a22645ddc0cf53e30eeb11ef1d66199f9ff6313efe2b5289f1b04cd4b3a2d43a908f703e30ed6ad364
7
- data.tar.gz: '072629bc4c54d07109f5be7c76746d655e2a189e0fbb4f9dbb91622fe8f38e8053cd499cecee167c4cf024e50a359b062e3d4975a1edbc1cad3dc708174b6ced'
6
+ metadata.gz: d4a2055581a7e463a189a46232165290c81becaf45b7f729f548ac9cac0e90a14f57a57d7578cf2ae2aa6c59bc018f1be875e672547d578a537f8bd48e3a0937
7
+ data.tar.gz: 06ff27e57393210020af6bb53c6f3c550c0dc6f3428115eeb62abeee0993b1a7fec8e936de11c2d86c0f18dd673bec9a9a3e99e29262d0b7bafd5631fb2589a2
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2022 Code and Effect Inc.
1
+ Copyright 2023 Code and Effect Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Effective
4
4
  class Ring < ActiveRecord::Base
5
+ self.table_name = (EffectiveProducts.rings_table_name || :rings).to_s
6
+
5
7
  SIZES = [3, 4, 5, 6, 7, 8]
6
8
  TITANIUM_SIZES = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
7
9
  METALS = ['14k Yellow Gold', 'Sterling Silver', 'Titanium']
@@ -1,6 +1,6 @@
1
1
  module Effective
2
2
  class RingWizard < ActiveRecord::Base
3
- self.table_name = EffectiveProducts.ring_wizards_table_name.to_s
3
+ self.table_name = (EffectiveProducts.ring_wizards_table_name || :ring_wizards).to_s
4
4
 
5
5
  effective_products_ring_wizard
6
6
  end
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Effective
4
4
  class Stamp < ActiveRecord::Base
5
+ self.table_name = (EffectiveProducts.stamps_table_name || :stamps).to_s
6
+
5
7
  acts_as_purchasable
6
8
  acts_as_addressable :shipping
7
9
 
@@ -1,6 +1,6 @@
1
1
  module Effective
2
2
  class StampWizard < ActiveRecord::Base
3
- self.table_name = EffectiveProducts.stamp_wizards_table_name.to_s
3
+ self.table_name = (EffectiveProducts.stamp_wizards_table_name || :stamp_wizards).to_s
4
4
 
5
5
  effective_products_stamp_wizard
6
6
  end
@@ -2,7 +2,7 @@
2
2
  = render 'effective/stamp_wizards/content', resource: resource
3
3
 
4
4
  - raise('expected a submitted resource') unless resource.was_submitted?
5
- - raise('expected a purchased resource submit_order') unless resource.submit_order&.purchased?
5
+ - raise('expected a purchased resource submit_order') unless resource.submit_order&.was_purchased?
6
6
 
7
7
  .alert.alert-success.mb-4
8
8
  Successfully submitted on #{resource.submit_order.purchased_at.strftime('%F')}.
@@ -1,9 +1,4 @@
1
1
  EffectiveProducts.setup do |config|
2
- config.rings_table_name = :rings
3
- config.ring_wizards_table_name = :ring_wizards
4
- config.stamps_table_name = :stamps
5
- config.stamp_wizards_table_name = :stamp_wizards
6
-
7
2
  # Layout Settings
8
3
  # Configure the Layout per controller, or all at once
9
4
  # config.layout = { application: 'application', admin: 'admin' }
@@ -1,4 +1,4 @@
1
- class CreateEffectiveProducts < ActiveRecord::Migration[6.1]
1
+ class CreateEffectiveProducts < ActiveRecord::Migration[6.0]
2
2
  def change
3
3
  create_table :rings do |t|
4
4
  t.integer :owner_id
@@ -1,3 +1,3 @@
1
1
  module EffectiveProducts
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
@@ -20,9 +20,7 @@ module EffectiveMemberships
20
20
  end
21
21
 
22
22
  def create_migration_file
23
- @products_table_name = ':' + EffectiveProducts.products_table_name.to_s
24
-
25
- migration_template ('../' * 3) + 'db/migrate/01_create_effective_products.rb.erb', 'db/migrate/create_effective_products.rb'
23
+ migration_template ('../' * 3) + 'db/migrate/101_create_effective_products.rb', 'db/migrate/create_effective_products.rb'
26
24
  end
27
25
 
28
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_products
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-20 00:00:00.000000000 Z
11
+ date: 2023-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -137,7 +137,7 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
- name: haml-rails
140
+ name: haml
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
@@ -271,7 +271,7 @@ files:
271
271
  - config/effective_products.rb
272
272
  - config/locales/effective_products.en.yml
273
273
  - config/routes.rb
274
- - db/migrate/01_create_effective_products.rb.erb
274
+ - db/migrate/101_create_effective_products.rb
275
275
  - db/seeds.rb
276
276
  - lib/effective_products.rb
277
277
  - lib/effective_products/engine.rb
@@ -298,7 +298,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
298
298
  - !ruby/object:Gem::Version
299
299
  version: '0'
300
300
  requirements: []
301
- rubygems_version: 3.1.2
301
+ rubygems_version: 3.3.7
302
302
  signing_key:
303
303
  specification_version: 4
304
304
  summary: Highly customized product sales for member associations