tramway-page 1.6 → 1.6.0.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: 69c0b46625403a5637e0845bab960d97e7ba812e421589448b8c7b60ad182029
4
- data.tar.gz: 58e8d2cf3937bc7f7b663795f443c57c1a777afd425fc215ab3cf5b86a413e04
3
+ metadata.gz: 560785fb5fc0c480f22070c8622226a486a2b6e7b8fe5238947d3248fe5ceb12
4
+ data.tar.gz: 7665c4dce254ab680b6ee41a1fabf9c1256091b91e1001847290cf359b5a3b9e
5
5
  SHA512:
6
- metadata.gz: 060a17f1e341a7f9465a4752660de4f8a86afac717872c85023e270c01db82cbdbc4a39ef0aed8e4199c3fb6b00698f32b8f01ae733dbf19416c9fc333b9447f
7
- data.tar.gz: b6c5f5645240c2e645baf913bf048e3793b94b4bbebccae59201103cea70f85b0b934bca8102a012039056226fca99ad3e51a6771c0db2e41b3d4b613c280570
6
+ metadata.gz: ddc4351b7ed1ca8c661a35957ebd162520acd1be2f4890394e413485415a73bc4159eb4ad203112b97f5778facb20ecaf9397e9f46d8478e990dc3faff668e4e
7
+ data.tar.gz: d8cb692285761b84db5d4cf525da5af37f542579750943e7c2c0e4d0873a3ac0d60ff0ed06dd7767ec85b7ceafae69e059f198910a658b50b2e19192000a0fba
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Page::ApplicationController < Tramway::Core::ApplicationController
3
+ class Tramway::Page::ApplicationController < ActionController::Base
4
4
  protect_from_forgery with: :exception
5
5
  end
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class ::Tramway::Page::PagesController < ::Tramway::Page::ApplicationController
3
+ class Tramway::Page::PagesController < Tramway::Page::ApplicationController
4
4
  layout 'tramway/landing/application'
5
5
 
6
6
  def show
7
- @page = ::Tramway::Page::Page.published.find_by slug: params[:slug]
7
+ @page = Tramway::Page::Page.published.find_by slug: params[:slug]
8
8
  @blocks = @page.blocks.published.map do |block|
9
9
  if block.block_type.header_with_form? && block.form_url.present?
10
10
  # FIXME: in future
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Page::PageDecorator < ::Tramway::Core::ApplicationDecorator
3
+ class Tramway::Page::PageDecorator < ::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::Page::PageForm < ::Tramway::Core::ApplicationForm
3
+ class Admin::Tramway::Page::PageForm < ::Tramway::ApplicationForm
4
4
  properties :title, :body, :slug, :view, :page_type, :view_state_event
5
5
 
6
6
  def initialize(object)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Page::Page < ::Tramway::Core::ApplicationRecord
3
+ class Tramway::Page::Page < Tramway::ApplicationRecord
4
4
  has_many :blocks, -> { order(position: :asc) }, class_name: 'Tramway::Landing::Block'
5
5
 
6
6
  enumerize :page_type, in: %i[main other without_layout], default: :other
@@ -20,4 +20,8 @@ class Tramway::Page::Page < ::Tramway::Core::ApplicationRecord
20
20
  transitions from: :published, to: :unpublished
21
21
  end
22
22
  end
23
+
24
+ aasm do
25
+ state :hack
26
+ end
23
27
  end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ::Tramway::Admin.set_available_models(::Tramway::Page::Page, project: :page)
3
+ ::Tramway.set_available_models(::Tramway::Page::Page, project: :page)
@@ -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::Page::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 Page
5
- VERSION = '1.6'
5
+ VERSION = '1.6.0.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-page
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.6'
4
+ version: 1.6.0.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: 2022-06-19 00:00:00.000000000 Z
11
+ date: 2023-01-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Description of Tramway::Page.
14
14
  email:
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  requirements: []
71
- rubygems_version: 3.1.6
71
+ rubygems_version: 3.4.1
72
72
  signing_key:
73
73
  specification_version: 4
74
74
  summary: Summary of Tramway::Page.