tramway-landing 3.3.0.6 → 3.3.0.8

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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -6
  3. data/app/assets/javascripts/tramway/landing/application.js +1 -1
  4. data/app/assets/stylesheets/tramway/landing/application.sass +1 -1
  5. data/app/controllers/tramway/landing/application_controller.rb +2 -2
  6. data/app/decorators/tramway/landing/block_decorator.rb +1 -1
  7. data/app/decorators/tramway/landing/block_types/cards_decorator.rb +1 -1
  8. data/app/decorators/tramway/landing/block_types/features_decorator.rb +1 -1
  9. data/app/decorators/tramway/landing/block_types/page_with_button_decorator.rb +1 -1
  10. data/app/decorators/tramway/landing/form_decorator.rb +1 -1
  11. data/app/decorators/tramway/landing/navbar/link_decorator.rb +1 -1
  12. data/app/decorators/tramway/landing/navbar_decorator.rb +1 -1
  13. data/app/decorators/tramway/landing/tool_decorator.rb +1 -1
  14. data/app/forms/admin/tramway/landing/block_form.rb +1 -1
  15. data/app/forms/admin/tramway/landing/form_form.rb +1 -1
  16. data/app/forms/admin/tramway/landing/tool_form.rb +1 -1
  17. data/app/helpers/tramway/landing/application_helper.rb +1 -1
  18. data/app/models/tramway/landing/application_record.rb +1 -1
  19. data/app/models/tramway/landing/block.rb +5 -1
  20. data/app/models/tramway/landing/tool.rb +1 -1
  21. data/app/views/tramway/landing/blocks/block_types/_header_with_form.html.haml +1 -1
  22. data/app/views/tramway/landing/blocks/block_types/contacts/_with_map.html.haml +1 -1
  23. data/app/views/tramway/landing/blocks/block_types/contacts/_without_map.html.haml +2 -2
  24. data/config/initializers/tramway.rb +3 -1
  25. data/lib/tramway/landing/generates/install_generator.rb +2 -2
  26. data/lib/tramway/landing/version.rb +1 -1
  27. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca3d58fd243219a91f5d911e478fbe72472b992603db8305e220c7071e2d484c
4
- data.tar.gz: 7c8363d0ab002d40d05a7ac6850c67c39339f385ef66a322b50a7849936f56d5
3
+ metadata.gz: 34f2185899baf27445a519bb7fa32f77338526892d0959f0eb1a03f30766eb4f
4
+ data.tar.gz: 6742876e89fa349697fa76194c0ebbc695d75685287186c8db8164dc93fd32b1
5
5
  SHA512:
6
- metadata.gz: 7c2554a06476684f2fce75c3e48732e173aa82f2c88586bbbbd133a8b1debf341baec3f1988badd614989de6cfb2ffddeff0950f43bf5318a6f1cc5ba834b252
7
- data.tar.gz: dfdbec98a7ae2228767665c98039b210f74015788c578f125b5bc6e3a56692c2a7808bd45f7981d877279b633716d382eab061cf50c3e0e1e4cb59e56286f4be
6
+ metadata.gz: 12e89e03f13a6144f9aba19d3a2137d168fb3440ba7b0bf718f58d4a7968fe92a7f1fd52833d271612834e21d6fad77dacf590967de5a250ea3a5010ca7a2898
7
+ data.tar.gz: 82ca79395ec2aa9a29d982e69b1ff7bd3ac233ffc535b80fb74e08f9ee6edf4902358905c81ba184749f10c45b36ced84c1c71b75d2e753120df0ff5339d1712
data/README.md CHANGED
@@ -45,8 +45,8 @@ rails db:migrate
45
45
 
46
46
  *config/initializers/tramway.rb*
47
47
  ```ruby
48
- Tramway::Admin.set_available_models ::Tramway::Landing::Block, project: #{project_name_which_you_use_in_the_application}
49
- Tramway::Admin.navbar_structure ::Tramway::Landing::Block
48
+ Tramway.set_available_models ::Tramway::Landing::Block, project: #{project_name_which_you_use_in_the_application}
49
+ Tramway.navbar_structure ::Tramway::Landing::Block
50
50
  ```
51
51
 
52
52
  #### 4. Add `PhotoVersions` to middleware (will be removed soon)
@@ -103,7 +103,7 @@ class Web::WelcomeController < ApplicationController
103
103
  private
104
104
 
105
105
  def application
106
- @application = ::Tramway::Core.application_object
106
+ @application = ::Tramway.application_object
107
107
  end
108
108
  end
109
109
  ```
@@ -240,13 +240,13 @@ How create blocks you can find here
240
240
 
241
241
  *config/initializers/tramway.rb*
242
242
  ```ruby
243
- Tramway::Admin.set_available_models(
243
+ Tramway.set_available_models(
244
244
  ::Tramway::Landing::Block,
245
245
  ::Tramway::Landing::Tool,
246
246
  project: #{project_name_which_you_use_in_the_application}
247
247
  )
248
248
 
249
- Tramway::Admin.navbar_structure(
249
+ Tramway.navbar_structure(
250
250
  ::Tramway::Landing::Block,
251
251
  ::Tramway::Landing::Tool
252
252
  )
@@ -271,7 +271,7 @@ class Web::WelcomeController < ApplicationController
271
271
  private
272
272
 
273
273
  def application
274
- @application = ::Tramway::Core.application_object
274
+ @application = ::Tramway.application_object
275
275
  end
276
276
  end
277
277
  ```
@@ -1,4 +1,4 @@
1
- //= require tramway/core/application
1
+ //= require tramway/application
2
2
  //= require_tree .
3
3
 
4
4
  $(document).ready(function() {
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  @import 'bootstrap'
7
- @import "tramway/core/application"
7
+ @import "tramway/application"
8
8
  @import "tramway/landing/collage"
9
9
  @import "tramway/landing/justified"
10
10
 
@@ -7,8 +7,8 @@ module Tramway
7
7
  before_action :application
8
8
 
9
9
  def application
10
- if ::Tramway::Core.application
11
- @application = Tramway::Core.application&.model_class&.first || Tramway::Core.application
10
+ if ::Tramway.application
11
+ @application = Tramway.application&.model_class&.first || Tramway.application
12
12
  end
13
13
  end
14
14
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Landing::BlockDecorator < ::Tramway::Core::ApplicationDecorator
3
+ class Tramway::Landing::BlockDecorator < ::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::Landing::BlockTypes::CardsDecorator < ::Tramway::Core::ApplicationDecorator
3
+ class Tramway::Landing::BlockTypes::CardsDecorator < ::Tramway::ApplicationDecorator
4
4
  def image; end
5
5
 
6
6
  def title; end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Landing::BlockTypes::FeaturesDecorator < ::Tramway::Core::ApplicationDecorator
3
+ class Tramway::Landing::BlockTypes::FeaturesDecorator < ::Tramway::ApplicationDecorator
4
4
  def icon; end
5
5
 
6
6
  def image; end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Landing::PageWithButtonDecorator < ::Tramway::Core::ApplicationDecorator
3
+ class Tramway::Landing::PageWithButtonDecorator < ::Tramway::ApplicationDecorator
4
4
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Landing::FormDecorator < ::Tramway::Core::ApplicationDecorator
3
+ class Tramway::Landing::FormDecorator < ::Tramway::ApplicationDecorator
4
4
  delegate_attributes :title, :form_name, :url
5
5
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Landing::Navbar::LinkDecorator < Tramway::Core::ApplicationDecorator
3
+ class Tramway::Landing::Navbar::LinkDecorator < Tramway::ApplicationDecorator
4
4
  def title
5
5
  object[:title]
6
6
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Landing::NavbarDecorator < ::Tramway::Core::ApplicationDecoratedCollection
3
+ class Tramway::Landing::NavbarDecorator < ::Tramway::ApplicationDecoratedCollection
4
4
  def initialize(array)
5
5
  original = if array.any? { |obj| obj.is_a? Hash }
6
6
  get_original_array array
@@ -1,3 +1,3 @@
1
- class Tramway::Landing::ToolDecorator < Tramway::Core::ApplicationDecorator
1
+ class Tramway::Landing::ToolDecorator < Tramway::ApplicationDecorator
2
2
  delegate_attributes :title, :account_id
3
3
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Admin::Tramway::Landing::BlockForm < ::Tramway::Core::ExtendedApplicationForm
3
+ class Admin::Tramway::Landing::BlockForm < ::Tramway::ExtendedApplicationForm
4
4
  association :page
5
5
 
6
6
  properties :title, :background, :view_state_event, :block_type, :position, :navbar_link, :anchor, :description,
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Admin::Tramway::Landing::FormForm < Tramway::Core::ApplicationForm
3
+ class Admin::Tramway::Landing::FormForm < Tramway::ApplicationForm
4
4
  association :block
5
5
 
6
6
  properties :title, :url, :form_name, :position
@@ -1,4 +1,4 @@
1
- class Admin::Tramway::Landing::ToolForm < Tramway::Core::ApplicationForm
1
+ class Admin::Tramway::Landing::ToolForm < Tramway::ApplicationForm
2
2
  properties :title, :account_id
3
3
 
4
4
  def initialize(object)
@@ -3,7 +3,7 @@
3
3
  module Tramway
4
4
  module Landing
5
5
  module ApplicationHelper
6
- include Tramway::Admin::RussianCasesHelper
6
+ include Tramway::RussianCasesHelper
7
7
  include Tramway::Profiles::LinksHelper if defined?(::Tramway::Profiles)
8
8
  include ::FontAwesome5::Rails::IconHelper
9
9
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Tramway
4
4
  module Landing
5
- class ApplicationRecord < ::Tramway::Core::ApplicationRecord
5
+ class ApplicationRecord < ::Tramway::ApplicationRecord
6
6
  self.abstract_class = true
7
7
  end
8
8
  end
@@ -10,7 +10,7 @@ class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord
10
10
 
11
11
  uploader :background, :photo, extensions: %i[jpg jpeg gif png]
12
12
 
13
- aasm :view_state do
13
+ aasm :view_state, column: :view_state do
14
14
  state :published, initial: true
15
15
  state :hidden
16
16
 
@@ -23,6 +23,10 @@ class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord
23
23
  end
24
24
  end
25
25
 
26
+ aasm do
27
+ state :hack
28
+ end
29
+
26
30
  store_accessor :button, :button_link
27
31
  store_accessor :button, :button_title
28
32
 
@@ -1,4 +1,4 @@
1
- class Tramway::Landing::Tool < Tramway::Core::ApplicationRecord
1
+ class Tramway::Landing::Tool < Tramway::ApplicationRecord
2
2
  enumerize :title, in: [ :google_tag_manager, :google_analytics, :yandex_direct ]
3
3
 
4
4
  def with_body_fragment?
@@ -47,7 +47,7 @@
47
47
  = hidden_field_tag :success_redirect, request.path
48
48
  = hidden_field_tag :error_redirect, request.path
49
49
  - current_form.properties.each do |property|
50
- = render 'tramway/core/shared/input', property: property[0], object: :user, type: property[1], form: f, destination: :landing, record: current_form, value: (params[:record].present? ? params[:record][property[0]] : '')
50
+ = render 'tramway/shared/input', property: property[0], object: :user, type: property[1], form: f, destination: :landing, record: current_form, value: (params[:record].present? ? params[:record][property[0]] : '')
51
51
  = f.button :submit, current_form.submit_message
52
52
  :javascript
53
53
  $(document).ready(function() {
@@ -21,7 +21,7 @@
21
21
  .row
22
22
  - if defined?(::Tramway::Profiles)
23
23
  .col-lg-5.col-md-12
24
- - social_networks = (@application.social_networks.active if @application.respond_to?(:social_networks)) unless social_networks
24
+ - social_networks = (@application.social_networks if @application.respond_to?(:social_networks)) unless social_networks
25
25
  - social_networks&.each do |profile|
26
26
  %ul.list-group
27
27
  %li.list-group-item
@@ -1,6 +1,6 @@
1
1
  - records_in_the_row = 4
2
2
  - if defined?(::Tramway::Profiles)
3
- - social_networks = (@application.social_networks.active if @application.respond_to?(:social_networks)) unless social_networks
3
+ - social_networks = (@application.social_networks if @application.respond_to?(:social_networks)) unless social_networks
4
4
  - social_networks&.each do |profile|
5
5
  %ul.list-group
6
6
  %li.list-group-item
@@ -14,4 +14,4 @@
14
14
  %i.fas.fa-2x.mb-1.fa-phone.indigo-text{ aria: { hidden: 'true' } }
15
15
  .col-10.mb-2.pl-3
16
16
  %h5.feature-title.font-bold.mb-1
17
- = yield(:phone)
17
+ = yield(:phone)
@@ -1,3 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ::Tramway::Admin.set_available_models(::Tramway::Landing::Block, project: :landing)
3
+ Rails.application.config.after_initialize do
4
+ Tramway.set_available_models(Tramway::Landing::Block, project: :landing)
5
+ end
@@ -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::Landing::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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Landing
5
- VERSION = '3.3.0.6'
5
+ VERSION = '3.3.0.8'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-landing
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0.6
4
+ version: 3.3.0.8
5
5
  platform: ruby
6
6
  authors:
7
- - moshinaan
7
+ - kalashnikovisme
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-07 00:00:00.000000000 Z
11
+ date: 2023-01-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Landing Engine for your Rails projects
14
14
  email:
15
- - moshinaan@gmail.com
15
+ - kalashnikovisme@gmail.com
16
16
  executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubygems_version: 3.0.3.1
123
+ rubygems_version: 3.1.6
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: Landing Engine for your Rails projects