tramway-partner 1.0.3.1 → 1.0.3.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
  SHA256:
3
- metadata.gz: 5e968048d487957000c04e92387f070f93576c092857906e9c67a89b077ac40c
4
- data.tar.gz: aa1b93024d6291bd052a16668e9ee8bc8748172d14519dd1be9d86c831afe2ea
3
+ metadata.gz: ac64c2bc4abff6fac9869d06caf159e48ca61c480be5b951b52695ed1fe59394
4
+ data.tar.gz: 5aefa2fdca2d80874eaa06990fe00131c9bbbed347a38f3444836a286b12de1d
5
5
  SHA512:
6
- metadata.gz: e32249f821cfa7da9ef3d43a323d635bd2609902c6dae29a6d71dca713242a975533fd41f1b9446736aba7ad20f8f5ff74bc622bad81e040ad4751e07c28790d
7
- data.tar.gz: 12c857804391090db7e4484b46fd1007ec1dfd8bfe906cf761715220abbc7b9decabe50557f69243d67cb6bfdf4e4ef2f296d0732bfcfe418cfa522295ff3246
6
+ metadata.gz: 19803cbbc831c6f2bbf388fe27021affe442847c40ee0926cd828060b1aa5ee3d1e693c76f9a1ecc10f54736a9f396affcb907a74276aba009271ecb6acfa1b7
7
+ data.tar.gz: 754e429d0081a2ab7c2bb3c9d7411d7d64aff8f04cdc73187932c26d2a298341f583331f949c4a8e515feb06221125a4fb15f216edb6a993f3ad41bbe441c9ea
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  begin
2
4
  require 'bundler/setup'
3
5
  rescue LoadError
@@ -14,14 +16,11 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
16
  rdoc.rdoc_files.include('lib/**/*.rb')
15
17
  end
16
18
 
17
- APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
19
+ APP_RAKEFILE = File.expand_path('test/dummy/Rakefile', __dir__)
18
20
  load 'rails/tasks/engine.rake'
19
21
 
20
-
21
22
  load 'rails/tasks/statistics.rake'
22
23
 
23
-
24
-
25
24
  require 'bundler/gem_tasks'
26
25
 
27
26
  require 'rake/testtask'
@@ -32,5 +31,4 @@ Rake::TestTask.new(:test) do |t|
32
31
  t.verbose = false
33
32
  end
34
33
 
35
-
36
34
  task default: :test
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module Partner
3
5
  class ApplicationController < ActionController::Base
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Tramway::Partner::OrganizationDecorator < ::Tramway::Core::ApplicationDecorator
2
4
  class << self
3
5
  def collections
4
- [ :all ]
6
+ [:all]
5
7
  end
6
8
  end
7
9
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Tramway::Partner::OrganizationFeatureDecorator < ::Tramway::Landing::BlockTypes::FeaturesDecorator
2
4
  def image
3
5
  object.logo.mini.url
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Tramway::Partner::PartnershipDecorator < ::Tramway::Core::ApplicationDecorator
2
4
  class << self
3
5
  def collections
4
- [ :all ]
6
+ [:all]
5
7
  end
6
8
  end
7
-
9
+
8
10
  def title
9
11
  "#{object.organization.title} #{I18n.t("enumerize.tramway/partner/partnership.partnership_type.#{object.partnership_type}")} #{object.partner.title}"
10
12
  end
@@ -1,4 +1,6 @@
1
- class Tramway::Partner::OrganizationForm < ::Tramway::Core::ApplicationForm
1
+ # frozen_string_literal: true
2
+
3
+ class Admin::Tramway::Partner::OrganizationForm < ::Tramway::Core::ApplicationForm
2
4
  properties :title, :logo, :url
3
5
 
4
6
  def initialize(object)
@@ -1,4 +1,6 @@
1
- class Tramway::Partner::PartnershipForm < ::Tramway::Core::ApplicationForm
1
+ # frozen_string_literal: true
2
+
3
+ class Admin::Tramway::Partner::PartnershipForm < ::Tramway::Core::ApplicationForm
2
4
  properties :partner_id, :organization_id, :partnership_type, :partner_type
3
5
 
4
6
  associations :partner, :organization
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module Partner
3
5
  module ApplicationHelper
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module Partner
3
5
  class ApplicationJob < ActiveJob::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module Partner
3
5
  class ApplicationMailer < ActionMailer::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module Partner
3
5
  class ApplicationRecord < ::Tramway::Core::ApplicationRecord
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module Partner
3
5
  class Organization < ::Tramway::Partner::ApplicationRecord
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Tramway::Partner::Partnership < ::Tramway::Core::ApplicationRecord
2
4
  belongs_to :organization, class_name: 'Tramway::Partner::Organization'
3
5
  belongs_to :partner, polymorphic: true
4
6
 
5
- enumerize :partnership_type, in: [ :organizator, :program, :support, :info ], default: :organizator
6
- enumerize :partner_type, in: [ 'Tramway::Event::Event', 'Tramway::Conference::Unity' ]
7
+ enumerize :partnership_type, in: %i[organizator program support info], default: :organizator
8
+ enumerize :partner_type, in: ['Tramway::Event::Event', 'Tramway::Conference::Unity']
7
9
  end
@@ -1,4 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ::Tramway::Admin.set_available_models(
2
4
  ::Tramway::Partner::Organization,
3
5
  ::Tramway::Partner::Partnership,
4
- project: :partner)
6
+ project: :partner
7
+ )
data/config/routes.rb CHANGED
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Tramway::Partner::Engine.routes.draw do
2
4
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # desc "Explaining what the task does"
2
4
  # task :tramway_partner do
3
5
  # # Task goes here
@@ -1,4 +1,6 @@
1
- require "tramway/partner/engine"
1
+ # frozen_string_literal: true
2
+
3
+ require 'tramway/partner/engine'
2
4
  require 'tramway/partner/generators/install_generator'
3
5
  require 'tramway/partner/scopes'
4
6
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module Partner
3
5
  class Engine < ::Rails::Engine
@@ -1,13 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rails/generators'
2
4
  require 'tramway/core/generators/install_generator'
3
5
 
4
6
  module Tramway::Partner::Generators
5
7
  class InstallGenerator < ::Tramway::Core::Generators::InstallGenerator
6
8
  include Rails::Generators::Migration
7
- source_root File.expand_path('../templates', __FILE__)
9
+ source_root File.expand_path('templates', __dir__)
8
10
 
9
- def run_other_generators
10
- end
11
+ def run_other_generators; end
11
12
 
12
13
  def self.next_migration_number(path)
13
14
  next_migration_number = current_migration_number(path) + 1
@@ -15,9 +16,9 @@ module Tramway::Partner::Generators
15
16
  end
16
17
 
17
18
  def copy_migrations
18
- migrations = [
19
- :create_tramway_partner_organizations,
20
- :create_tramway_partner_partnerships
19
+ migrations = %i[
20
+ create_tramway_partner_organizations
21
+ create_tramway_partner_partnerships
21
22
  ]
22
23
  migrations.each do |migration|
23
24
  migration_template "#{migration}.rb", "db/migrate/#{migration}.rb"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class CreateTramwayPartnerOrganizations < ActiveRecord::Migration[5.1]
2
4
  def change
3
5
  create_table :tramway_partner_organizations do |t|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class CreateTramwayPartnerPartnerships < ActiveRecord::Migration[5.1]
2
4
  def change
3
5
  create_table :tramway_partner_partnerships do |t|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway::Partner::Scopes
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module Partner
3
- VERSION = '1.0.3.1'
5
+ VERSION = '1.0.3.2'
4
6
  end
5
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.3.1
4
+ version: 1.0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-07 00:00:00.000000000 Z
11
+ date: 2020-02-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails engine for partners
14
14
  email:
@@ -27,8 +27,8 @@ files:
27
27
  - app/decorators/tramway/partner/organization_decorator.rb
28
28
  - app/decorators/tramway/partner/organization_feature_decorator.rb
29
29
  - app/decorators/tramway/partner/partnership_decorator.rb
30
- - app/forms/tramway/partner/organization_form.rb
31
- - app/forms/tramway/partner/partnership_form.rb
30
+ - app/forms/admin/tramway/partner/organization_form.rb
31
+ - app/forms/admin/tramway/partner/partnership_form.rb
32
32
  - app/helpers/tramway/partner/application_helper.rb
33
33
  - app/jobs/tramway/partner/application_job.rb
34
34
  - app/mailers/tramway/partner/application_mailer.rb