phcpresspro 12.2.0 → 12.2.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c7e453915724f970298844d352f6a1cf009ebe7
|
4
|
+
data.tar.gz: d328331e735c32e1147b6cbe28ab7b45bb5ac311
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c21286333ab56fa6a786c7a9d97cb77b91efb404c77ff2700b929ff9a16f683a16250a43d3c214497a904d423dc688575b0e673cdccc39df8d725cecd63e61f5
|
7
|
+
data.tar.gz: 828618cd4298b096e00d8ee22f7310561c9e2dc10b82fc04bb229d63313fca1470cd17215d6ec23e0d395dc360c3871b348f2bc26f5f4bcf15b7ada5947b9013
|
data/lib/phcpresspro/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcpresspro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.2.
|
4
|
+
version: 12.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -684,7 +684,6 @@ files:
|
|
684
684
|
- app/views/phcpresspro/modules/connections/show.html.erb
|
685
685
|
- config/routes.rb
|
686
686
|
- config/tinymce.yml
|
687
|
-
- db/migrate/20160714193304_create_phcpresspro_versions.rb
|
688
687
|
- db/migrate/20160716182936_create_phcpresspro_modules_categories.rb
|
689
688
|
- db/migrate/20160718204718_create_phcpresspro_articles_posts.rb
|
690
689
|
- db/migrate/20160719221205_create_phcpresspro_modules_connections.rb
|
@@ -1,80 +0,0 @@
|
|
1
|
-
# This migration creates the `versions` table, the only schema PT requires.
|
2
|
-
# All other migrations PT provides are optional.
|
3
|
-
class CreatePhcpressproVersions < ActiveRecord::Migration[5.1]
|
4
|
-
# Class names of MySQL adapters.
|
5
|
-
# - `MysqlAdapter` - Used by gems: `mysql`, `activerecord-jdbcmysql-adapter`.
|
6
|
-
# - `Mysql2Adapter` - Used by `mysql2` gem.
|
7
|
-
MYSQL_ADAPTERS = [
|
8
|
-
"ActiveRecord::ConnectionAdapters::MysqlAdapter",
|
9
|
-
"ActiveRecord::ConnectionAdapters::Mysql2Adapter"
|
10
|
-
].freeze
|
11
|
-
|
12
|
-
# The largest text column available in all supported RDBMS is
|
13
|
-
# 1024^3 - 1 bytes, roughly one gibibyte. We specify a size
|
14
|
-
# so that MySQL will use `longtext` instead of `text`. Otherwise,
|
15
|
-
# when serializing very large objects, `text` might not be big enough.
|
16
|
-
TEXT_BYTES = 1_073_741_823
|
17
|
-
|
18
|
-
def change
|
19
|
-
create_table :versions, versions_table_options do |t|
|
20
|
-
t.string :item_type, item_type_options
|
21
|
-
t.integer :item_id, null: false
|
22
|
-
t.string :event, null: false
|
23
|
-
t.string :whodunnit
|
24
|
-
t.text :object, limit: TEXT_BYTES
|
25
|
-
|
26
|
-
# Known issue in MySQL: fractional second precision
|
27
|
-
# -------------------------------------------------
|
28
|
-
#
|
29
|
-
# MySQL timestamp columns do not support fractional seconds unless
|
30
|
-
# defined with "fractional seconds precision". MySQL users should manually
|
31
|
-
# add fractional seconds precision to this migration, specifically, to
|
32
|
-
# the `created_at` column.
|
33
|
-
# (https://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html)
|
34
|
-
#
|
35
|
-
# MySQL users should also upgrade to rails 4.2, which is the first
|
36
|
-
# version of ActiveRecord with support for fractional seconds in MySQL.
|
37
|
-
# (https://github.com/rails/rails/pull/14359)
|
38
|
-
#
|
39
|
-
t.datetime :created_at
|
40
|
-
end
|
41
|
-
add_index :versions, [:item_type, :item_id]
|
42
|
-
end
|
43
|
-
|
44
|
-
private
|
45
|
-
|
46
|
-
# MySQL 5.6 utf8mb4 limit is 191 chars for keys used in indexes.
|
47
|
-
# See https://github.com/airblade/paper_trail/issues/651
|
48
|
-
def item_type_options
|
49
|
-
opt = { null: false }
|
50
|
-
opt[:limit] = 191 if mysql?
|
51
|
-
opt
|
52
|
-
end
|
53
|
-
|
54
|
-
def mysql?
|
55
|
-
MYSQL_ADAPTERS.include?(connection.class.name)
|
56
|
-
end
|
57
|
-
|
58
|
-
# Even modern versions of MySQL still use `latin1` as the default character
|
59
|
-
# encoding. Many users are not aware of this, and run into trouble when they
|
60
|
-
# try to use PaperTrail in apps that otherwise tend to use UTF-8. Postgres, by
|
61
|
-
# comparison, uses UTF-8 except in the unusual case where the OS is configured
|
62
|
-
# with a custom locale.
|
63
|
-
#
|
64
|
-
# - https://dev.mysql.com/doc/refman/5.7/en/charset-applications.html
|
65
|
-
# - http://www.postgresql.org/docs/9.4/static/multibyte.html
|
66
|
-
#
|
67
|
-
# Furthermore, MySQL's original implementation of UTF-8 was flawed, and had
|
68
|
-
# to be fixed later by introducing a new charset, `utf8mb4`.
|
69
|
-
#
|
70
|
-
# - https://mathiasbynens.be/notes/mysql-utf8mb4
|
71
|
-
# - https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
|
72
|
-
#
|
73
|
-
def versions_table_options
|
74
|
-
if mysql?
|
75
|
-
{ options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci" }
|
76
|
-
else
|
77
|
-
{}
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|