activerecord-shipworks 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f51aaea31a510ac343f3d13d7078f3785d3de17041d8175eecd7b9c795120bea
4
- data.tar.gz: d2f99b786f96e0810ac1ab8af958c07bcecc2a1caa6b54559cdf2d9e44b95968
3
+ metadata.gz: 532db6f8480f5e9e2df810f93d075db45457d4131f7c950318ef9a7330072cc7
4
+ data.tar.gz: 9a0df08645f7e8c8ddaebe5922bb338a78bd4aa491c5f118368d0c6eda2f9a5c
5
5
  SHA512:
6
- metadata.gz: d8400cdec489aa9a8ed91eda611b373f34679644ab16e3242be235d1af246970a32dc8017f925d8f4ad76258b69a28ebb98b682cbbcf7b31ea578b47f0be8709
7
- data.tar.gz: 60777236584a793fcf5f8f8a3fd8891f182eb546f007dbe917f00c51caa76049b39a83506e9142b0df171385fd85f3217205e8f45b2c6f8e4f18fc798509e17d
6
+ metadata.gz: 5cf7b128880e34d040bc17c06f7d35774a9818c92b0b348e74c0bf8ba999e44e284408eda4632385735b1d2fa02d351cb2eadd10f5ddcdd4709908287f24814c
7
+ data.tar.gz: 555d1e22e4f49a23f8681789caefcc5c8e9ec47ac4ba765d30f9dd8629112a3ed9284ea4b6edfb2cdc41ebabb3b659ce92de8300b482555e05d28f7a65127f07
@@ -1,5 +1,5 @@
1
1
  module Shipworks
2
- class Note < ApplicationRecord
2
+ class Note < ShipworksRecord
3
3
  belongs_to :user, foreign_key: 'UserID'
4
4
  belongs_to :order, foreign_key: 'ObjectID'
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module Shipworks
2
- class Order < ApplicationRecord
2
+ class Order < ShipworksRecord
3
3
  belongs_to :store, foreign_key: 'StoreID'
4
4
  has_many :notes, foreign_key: 'ObjectID'
5
5
  has_many :shipments, foreign_key: 'OrderID'
@@ -1,5 +1,5 @@
1
1
  module Shipworks
2
- class OrderCharge < ApplicationRecord
2
+ class OrderCharge < Shipworks::ApplicationRecord
3
3
  belongs_to :order, foreign_key: 'OrderID'
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module Shipworks
2
- class OrderItem < ApplicationRecord
2
+ class OrderItem < ShipworksRecord
3
3
  belongs_to :order, foreign_key: 'OrderID'
4
4
  has_many :order_item_attributes, foreign_key: 'OrderItemID'
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module Shipworks
2
- class OrderItemAttribute < ApplicationRecord
2
+ class OrderItemAttribute < ShipworksRecord
3
3
  belongs_to :order_item, foreign_key: 'OrderItemID'
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module Shipworks
2
- class Shipment < ApplicationRecord
2
+ class Shipment < ShipworksRecord
3
3
  belongs_to :order, foreign_key: 'OrderID'
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module Shipworks
2
- class ApplicationRecord < ActiveRecord::Base
2
+ class ShipworksRecord < ActiveRecord::Base
3
3
  self.abstract_class = true
4
4
  establish_connection SHIPWORKS_DB if defined? SHIPWORKS_DB
5
5
 
@@ -1,5 +1,5 @@
1
1
  module Shipworks
2
- class Store < ApplicationRecord
2
+ class Store < ShipworksRecord
3
3
  has_many :orders, foreign_key: 'StoreID'
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module Shipworks
2
- class User < ApplicationRecord
2
+ class User < ShipworksRecord
3
3
  has_many :notes, foreign_key: 'UserID'
4
4
  end
5
5
  end
@@ -1,3 +1,3 @@
1
1
  module Shipworks
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-shipworks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Wu
@@ -48,13 +48,13 @@ files:
48
48
  - MIT-LICENSE
49
49
  - README.md
50
50
  - Rakefile
51
- - app/models/shipworks/application_record.rb
52
51
  - app/models/shipworks/note.rb
53
52
  - app/models/shipworks/order.rb
54
53
  - app/models/shipworks/order_charge.rb
55
54
  - app/models/shipworks/order_item.rb
56
55
  - app/models/shipworks/order_item_attribute.rb
57
56
  - app/models/shipworks/shipment.rb
57
+ - app/models/shipworks/shipworks_record.rb
58
58
  - app/models/shipworks/store.rb
59
59
  - app/models/shipworks/user.rb
60
60
  - lib/activerecord-shipworks.rb