effective_pages 3.7.11 → 3.8.0

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: c23db8c7bacd7f56f5e1bbdfa908393bbda289587597ab128f447605f35de2c6
4
- data.tar.gz: f472c6b3d18df67e02011f9b882ca58a8e36f4e5a040863f0f4185e1bbff17ad
3
+ metadata.gz: 4930be0c9a5c1cff7e270b54737b65da53b6d5170dfb3b3ee352dc0832c6df7d
4
+ data.tar.gz: 15bc6e9fccc72c3d44bf05dbbc761318d6c913543fafffcd1048786e14fa838e
5
5
  SHA512:
6
- metadata.gz: 17554b9ba419a6a94da55ca8514e680097f0d3917e216b228cf8b7b985fee1c46c12b6cae3381ec16a462293983c1072d5da583f5fdfcee87b75a2cbc20d7f2e
7
- data.tar.gz: 2e64ec4e242f0d95d802127bc399c1973568d12cd3e55a31dc86e389cf0b0bd9b6810038e9a8b8be8c077b4e990fcc86546b51773450172ba13df57c4e7945fa
6
+ metadata.gz: 5827cc6dda4be17a4634b7f1e4d7816893ff1260eb1297318d0c36da98b5a291167439c6201bf7422e849a87ff2fa0b89a4724277ff99844f7ac117676d0e5fa
7
+ data.tar.gz: 54c35160656ea7a1f5a949b170fa2c77e042572336a022e5d61402593734e410718c198b875e0689bdb47ea959ba14b452b1dddc2ad118cfc51679f248080724
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2021 Code and Effect Inc.
1
+ Copyright 2023 Code and Effect Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -3,6 +3,8 @@
3
3
  # The carousel items belong to a carousel through the string field
4
4
  module Effective
5
5
  class CarouselItem < ActiveRecord::Base
6
+ self.table_name = (EffectivePages.carousel_items_table_name || :carousel_items).to_s
7
+
6
8
  attr_accessor :current_user
7
9
 
8
10
  # For the body
@@ -1,5 +1,7 @@
1
1
  module Effective
2
2
  class Page < ActiveRecord::Base
3
+ self.table_name = (EffectivePages.pages_table_name || :pages).to_s
4
+
3
5
  if defined?(PgSearch)
4
6
  include PgSearch::Model
5
7
 
@@ -25,8 +27,6 @@ module Effective
25
27
 
26
28
  log_changes if respond_to?(:log_changes)
27
29
 
28
- self.table_name = EffectivePages.pages_table_name.to_s
29
-
30
30
  effective_resource do
31
31
  title :string
32
32
  meta_description :string
@@ -1,6 +1,8 @@
1
1
  # Banners can be
2
2
  module Effective
3
3
  class PageBanner < ActiveRecord::Base
4
+ self.table_name = (EffectivePages.page_banners_table_name || :page_banners).to_s
5
+
4
6
  attr_accessor :current_user
5
7
 
6
8
  # Not used
@@ -14,7 +16,6 @@ module Effective
14
16
 
15
17
  log_changes if respond_to?(:log_changes)
16
18
 
17
- self.table_name = EffectivePages.page_banners_table_name.to_s
18
19
 
19
20
  effective_resource do
20
21
  name :string # Unique name of this page banner. Just used for reference.
@@ -3,6 +3,8 @@
3
3
  # The admin user can only edit/update content
4
4
  module Effective
5
5
  class PageSection < ActiveRecord::Base
6
+ self.table_name = (EffectivePages.page_sections_table_name || :page_sections).to_s
7
+
6
8
  attr_accessor :current_user
7
9
 
8
10
  has_many_rich_texts
@@ -10,7 +12,6 @@ module Effective
10
12
 
11
13
  log_changes if respond_to?(:log_changes)
12
14
 
13
- self.table_name = EffectivePages.page_sections_table_name.to_s
14
15
 
15
16
  effective_resource do
16
17
  name :string # Set by developer. The unique name of this page section
@@ -1,13 +1,13 @@
1
1
  module Effective
2
2
  class Permalink < ApplicationRecord
3
+ self.table_name = (EffectivePages.permalinks_table_name || :permalinks).to_s
4
+
3
5
  if defined?(PgSearch)
4
6
  include PgSearch::Model
5
7
 
6
8
  multisearchable against: [:title, :summary]
7
9
  end
8
10
 
9
- self.table_name = (EffectivePages.permalinks_table_name || :permalinks).to_s
10
-
11
11
  has_one_attached :attachment
12
12
  has_one_purgable :attachment
13
13
 
@@ -1,13 +1,4 @@
1
1
  EffectivePages.setup do |config|
2
- config.pages_table_name = :pages
3
- config.page_sections_table_name = :page_sections
4
- config.page_banners_table_name = :page_banners
5
- config.carousel_items_table_name = :carousel_items
6
- config.alerts_table_name = :alerts
7
- config.permalinks_table_name = :permalinks
8
- config.tags_table_name = :tags
9
- config.taggings_table_name = :taggings
10
-
11
2
  # The menu names a page can belong to
12
3
  config.menus = [:main, :footer]
13
4
 
@@ -1,6 +1,6 @@
1
- class CreateEffectivePages < ActiveRecord::Migration[4.2]
2
- def self.up
3
- create_table <%= @pages_table_name %> do |t|
1
+ class CreateEffectivePages < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :pages do |t|
4
4
  t.integer :page_banner_id
5
5
 
6
6
  t.string :title
@@ -34,18 +34,18 @@ class CreateEffectivePages < ActiveRecord::Migration[4.2]
34
34
  t.datetime :created_at
35
35
  end
36
36
 
37
- add_index <%= @pages_table_name %>, :slug, :unique => true
37
+ add_index :pages, :slug, :unique => true
38
38
 
39
- create_table <%= @page_banners_table_name %> do |t|
39
+ create_table :page_banners do |t|
40
40
  t.string :name
41
41
  t.string :caption
42
42
 
43
43
  t.timestamps
44
44
  end
45
45
 
46
- add_index <%= @page_banners_table_name %>, :name, :unique => true
46
+ add_index :page_banners, :name, :unique => true
47
47
 
48
- create_table <%= @page_sections_table_name %> do |t|
48
+ create_table :page_sections do |t|
49
49
  t.string :name
50
50
  t.text :hint
51
51
 
@@ -59,9 +59,9 @@ class CreateEffectivePages < ActiveRecord::Migration[4.2]
59
59
  t.datetime :created_at
60
60
  end
61
61
 
62
- add_index <%= @page_sections_table_name %>, :name, :unique => true
62
+ add_index :page_sections, :name, :unique => true
63
63
 
64
- create_table <%= @carousel_items_table_name %> do |t|
64
+ create_table :carousel_items do |t|
65
65
  t.string :carousel
66
66
 
67
67
  t.string :title
@@ -75,13 +75,13 @@ class CreateEffectivePages < ActiveRecord::Migration[4.2]
75
75
  t.timestamps
76
76
  end
77
77
 
78
- create_table <%= @alerts_table_name %>, if_not_exists: true do |t|
78
+ create_table :alerts, if_not_exists: true do |t|
79
79
  t.boolean :enabled
80
80
 
81
81
  t.timestamps
82
82
  end
83
83
 
84
- create_table <%= @permalinks_table_name %>, if_not_exists: true do |t|
84
+ create_table :permalinks, if_not_exists: true do |t|
85
85
  t.string :title
86
86
  t.string :slug
87
87
  t.string :url
@@ -90,31 +90,19 @@ class CreateEffectivePages < ActiveRecord::Migration[4.2]
90
90
  t.timestamps
91
91
  end
92
92
 
93
- create_table <%= @tags_table_name %>, if_not_exists: true do |t|
93
+ create_table :tags, if_not_exists: true do |t|
94
94
  t.string :name
95
95
 
96
96
  t.timestamps
97
97
  end
98
98
 
99
- create_table <%= @taggings_table_name %>, if_not_exists: true do |t|
99
+ create_table :taggings, if_not_exists: true do |t|
100
100
  t.integer :tag_id
101
101
  t.integer :taggable_id
102
102
  t.string :taggable_type
103
103
 
104
104
  t.timestamps
105
105
  end
106
-
107
- end
108
-
109
- def self.down
110
- drop_table <%= @pages_table_name %>
111
- drop_table <%= @page_banners_table_name %>
112
- drop_table <%= @page_sections_table_name %>
113
- drop_table <%= @carousel_items_table_name %>
114
- drop_table <%= @alerts_table_name %>
115
- drop_table <%= @permalinks_table_name %>
116
- drop_table <%= @tags_table_name %>
117
- drop_table <%= @taggings_table_name %>
118
106
  end
119
107
 
120
108
  end
@@ -1,3 +1,3 @@
1
1
  module EffectivePages
2
- VERSION = '3.7.11'.freeze
2
+ VERSION = '3.8.0'.freeze
3
3
  end
@@ -20,14 +20,7 @@ module EffectivePages
20
20
  end
21
21
 
22
22
  def create_migration_file
23
- @pages_table_name = ':' + EffectivePages.pages_table_name.to_s
24
- @page_sections_table_name = ':' + EffectivePages.page_sections_table_name.to_s
25
- @page_banners_table_name = ':' + EffectivePages.page_banners_table_name.to_s
26
- @carousel_items_table_name = ':' + EffectivePages.carousel_items_table_name.to_s
27
- @alerts_table_name = ':' + EffectivePages.alerts_table_name.to_s
28
- @permalinks_table_name = ':' + EffectivePages.permalinks_table_name.to_s
29
-
30
- migration_template ('../' * 3) + 'db/migrate/01_create_effective_pages.rb.erb', 'db/migrate/create_effective_pages.rb'
23
+ migration_template ('../' * 3) + 'db/migrate/101_create_effective_pages.rb', 'db/migrate/create_effective_pages.rb'
31
24
  end
32
25
 
33
26
  def copy_example_page
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.11
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-18 00:00:00.000000000 Z
11
+ date: 2023-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '6'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '6'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: effective_datatables
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +66,90 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sqlite3
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: devise
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry-byebug
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: effective_test_bot
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: effective_developer
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: psych
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "<"
144
+ - !ruby/object:Gem::Version
145
+ version: '4'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "<"
151
+ - !ruby/object:Gem::Version
152
+ version: '4'
69
153
  description: Content pages for your rails app
70
154
  email:
71
155
  - info@codeandeffect.com
@@ -147,7 +231,7 @@ files:
147
231
  - config/effective_pages.rb
148
232
  - config/locales/effective_pages.en.yml
149
233
  - config/routes.rb
150
- - db/migrate/01_create_effective_pages.rb.erb
234
+ - db/migrate/101_create_effective_pages.rb
151
235
  - lib/effective_pages.rb
152
236
  - lib/effective_pages/engine.rb
153
237
  - lib/effective_pages/version.rb
@@ -173,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
257
  - !ruby/object:Gem::Version
174
258
  version: '0'
175
259
  requirements: []
176
- rubygems_version: 3.4.10
260
+ rubygems_version: 3.3.7
177
261
  signing_key:
178
262
  specification_version: 4
179
263
  summary: Content pages for your rails app