tramway-page 1.3 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +3 -5
- data/app/controllers/tramway/page/application_controller.rb +2 -0
- data/app/controllers/tramway/page/pages_controller.rb +2 -0
- data/app/decorators/tramway/page/page_decorator.rb +3 -1
- data/app/forms/tramway/page/page_form.rb +5 -3
- data/app/helpers/tramway/page/application_helper.rb +2 -0
- data/app/jobs/tramway/page/application_job.rb +2 -0
- data/app/mailers/tramway/page/application_mailer.rb +2 -0
- data/app/models/tramway/page/page.rb +2 -0
- data/app/views/tramway/page/pages/views/_article.html.haml +5 -0
- data/config/initializers/tramway.rb +2 -0
- data/config/routes.rb +2 -0
- data/lib/tasks/tramway/page_tasks.rake +2 -0
- data/lib/tramway/page/engine.rb +2 -0
- data/lib/tramway/page/generators/install_generator.rb +7 -6
- data/lib/tramway/page/generators/templates/add_view_to_tramway_page_pages.rb +2 -0
- data/lib/tramway/page/generators/templates/create_tramway_page_pages.rb +2 -0
- data/lib/tramway/page/version.rb +3 -1
- data/lib/tramway/page.rb +3 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb1ed06a4cf485671e9082163dcd40170f4355d4a341d2a5398f590c45e42e5f
|
4
|
+
data.tar.gz: 40635e0a287cdad418de79eb0bbf8b2c248e8c1c88ab58bda053f2e511c591e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fe0be21f9c8d6c5e2a3e82027bb01852f913c5a73d2e1b1deda29ad0990a94b75b600be985b7071f61fe3080cb1f2a4887382a39b5a792d948f34a182eed090
|
7
|
+
data.tar.gz: 4010e1e8eb7decd715f583f7e85a5a6f418ea1c5ef6d455a12a5d2d03b1aabc0d9390bdd05459da729bd1bd5ccc96c9431b85cbb7ce994cfdabfeed6e7a3263d
|
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(
|
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,12 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class Tramway::Page::PageForm < ::Tramway::Core::ApplicationForm
|
2
4
|
properties :title, :body, :slug, :view
|
3
5
|
|
4
6
|
def initialize(object)
|
5
7
|
super(object).tap do
|
6
8
|
form_properties title: :string,
|
7
|
-
|
8
|
-
|
9
|
-
|
9
|
+
body: :ckeditor,
|
10
|
+
slug: :string,
|
11
|
+
view: :string
|
10
12
|
end
|
11
13
|
end
|
12
14
|
end
|
data/config/routes.rb
CHANGED
data/lib/tramway/page/engine.rb
CHANGED
@@ -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::Page::Generators
|
5
7
|
class InstallGenerator < ::Tramway::Core::Generators::InstallGenerator
|
6
8
|
include Rails::Generators::Migration
|
7
|
-
source_root File.expand_path('
|
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::Page::Generators
|
|
15
16
|
end
|
16
17
|
|
17
18
|
def copy_migrations
|
18
|
-
migrations = [
|
19
|
-
|
20
|
-
|
19
|
+
migrations = %i[
|
20
|
+
create_tramway_page_pages
|
21
|
+
add_view_to_tramway_page_pages
|
21
22
|
]
|
22
23
|
migrations.each do |migration|
|
23
24
|
migration_template "#{migration}.rb", "db/migrate/#{migration}.rb"
|
data/lib/tramway/page/version.rb
CHANGED
data/lib/tramway/page.rb
CHANGED
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:
|
4
|
+
version: 1.3.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: 2019-
|
11
|
+
date: 2019-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Description of Tramway::Page.
|
14
14
|
email:
|
@@ -32,6 +32,7 @@ files:
|
|
32
32
|
- app/mailers/tramway/page/application_mailer.rb
|
33
33
|
- app/models/tramway/page/page.rb
|
34
34
|
- app/views/tramway/page/pages/show.html.haml
|
35
|
+
- app/views/tramway/page/pages/views/_article.html.haml
|
35
36
|
- config/initializers/tramway.rb
|
36
37
|
- config/locales/models.yml
|
37
38
|
- config/routes.rb
|