tramway-partner 1.0.4 → 1.0.4.1

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: cae4fe7f8f73470a959bab93e595de2bd590c77421d4b271a8a23c61712f6d49
4
- data.tar.gz: 8239f5ef84fd1990e1140a664ae93c1f6850c5a3876f1cfa9bd712e17962bbcc
3
+ metadata.gz: 184ffe8c985f322e57a32fa3cd3990dd8450bb8f0ba9bfdc53bb1d9c2a961fb3
4
+ data.tar.gz: 748ccc9ec13698f4fbc23772fd93e2ad82ccec7bdbdb5b11034c65b3ea6ea966
5
5
  SHA512:
6
- metadata.gz: a8675bb2d1ee70fb5a7844e038368243de8d10e9a468863e320b4b51677ea66e22117e5695df8cebd188ce86139d6783e345fd283e62287ef7c4dbfd729d1844
7
- data.tar.gz: 7e8450d4d53bf69a0fbf86be51a7df3c843025266d12f2873c8ee701c94b478782c67e8273aff2d5b009f5d08a2a57ea36ef26ca2f33ed5700855a255cd67dc7
6
+ metadata.gz: b89953167084952df1862a4e1d03a90e9d29e7bcc75e42b68414d6e5badcd902bcf41cbd126eed86c65f4fec6e4f3ba5aef12300e4a448e8048a029a09ad0ad1
7
+ data.tar.gz: 3725476e61a762a7e929a10f7dab8812b02d05abcd45f30b4066af123f24067262d3cf5951b3f1eb23e50d26657d634545ea17bafa6f0642863a8d0d73671090
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Partner::OrganizationDecorator < ::Tramway::Core::ApplicationDecorator
3
+ class Tramway::Partner::OrganizationDecorator < ::Tramway::ApplicationDecorator
4
4
  class << self
5
5
  def collections
6
6
  [:all]
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Partner::PartnershipDecorator < ::Tramway::Core::ApplicationDecorator
3
+ class Tramway::Partner::PartnershipDecorator < ::Tramway::ApplicationDecorator
4
4
  class << self
5
5
  def collections
6
6
  [:all]
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Admin::Tramway::Partner::OrganizationForm < ::Tramway::Core::ApplicationForm
3
+ class Admin::Tramway::Partner::OrganizationForm < ::Tramway::ApplicationForm
4
4
  properties :title, :logo, :url
5
5
 
6
6
  def initialize(object)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Admin::Tramway::Partner::PartnershipForm < ::Tramway::Core::ApplicationForm
3
+ class Admin::Tramway::Partner::PartnershipForm < ::Tramway::ApplicationForm
4
4
  properties :partner_id, :organization_id, :partnership_type, :partner_type
5
5
 
6
6
  associations :partner, :organization
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Tramway
4
4
  module Partner
5
- class ApplicationRecord < ::Tramway::Core::ApplicationRecord
5
+ class ApplicationRecord < ::Tramway::ApplicationRecord
6
6
  self.abstract_class = true
7
7
  end
8
8
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Partner::Partnership < ::Tramway::Core::ApplicationRecord
3
+ class Tramway::Partner::Partnership < ::Tramway::ApplicationRecord
4
4
  belongs_to :organization, class_name: 'Tramway::Partner::Organization'
5
5
  belongs_to :partner, polymorphic: true
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ::Tramway::Admin.set_available_models(
3
+ ::Tramway.set_available_models(
4
4
  ::Tramway::Partner::Organization,
5
5
  ::Tramway::Partner::Partnership,
6
6
  project: :partner
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rails/generators'
4
- require 'tramway/core/generators/install_generator'
4
+ require 'tramway/generators/install_generator'
5
5
 
6
6
  module Tramway::Partner::Generators
7
- class InstallGenerator < ::Tramway::Core::Generators::InstallGenerator
7
+ class InstallGenerator < ::Tramway::Generators::InstallGenerator
8
8
  include Rails::Generators::Migration
9
9
  source_root File.expand_path('templates', __dir__)
10
10
 
@@ -4,12 +4,11 @@ module Tramway::Partner::Scopes
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  included do
7
- ::Tramway::Partner::Partnership.partnership_type.values.each do |partnership_type|
7
+ Tramway::Partner::Partnership.partnership_type.values.each do |partnership_type|
8
8
  define_method partnership_type.pluralize.to_sym do
9
9
  query = <<-SQL
10
10
  tramway_partner_partnerships.partnership_type = '#{partnership_type}'
11
11
  AND tramway_partner_partnerships.partner_id = '#{id}'
12
- AND tramway_partner_partnerships.state = 'active'
13
12
  AND tramway_partner_partnerships.partner_type = '#{self.class.name}'
14
13
  SQL
15
14
  Tramway::Partner::Organization.joins(:partnerships).where(query)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Partner
5
- VERSION = '1.0.4'
5
+ VERSION = '1.0.4.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-partner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-30 00:00:00.000000000 Z
11
+ date: 2023-01-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails engine for partners
14
14
  email:
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
- rubygems_version: 3.1.2
69
+ rubygems_version: 3.4.1
70
70
  signing_key:
71
71
  specification_version: 4
72
72
  summary: Rails engine for partners