fl 0.3.8 → 0.3.9

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
  SHA1:
3
- metadata.gz: 6df4009a629d9db83169fb3d47784e071783970a
4
- data.tar.gz: 86340fdd4b5d44f5425f8d58362c13f030d4ce85
3
+ metadata.gz: 8ae5c44263b4e75e9d1e436402dabda5af828e20
4
+ data.tar.gz: 782964b24d98bab2104e05ff6a7849180d7ad08b
5
5
  SHA512:
6
- metadata.gz: f3db9a11352a6114a673bf6b813b4ea9f112d3f21a0dad614072141af8f5f99ac4dd72c21c1409f7af37cf9e0f4ed5b0efdaacf0b0f6be948bbb2aa02f88cb4e
7
- data.tar.gz: 2fd72d1ba84d1e006cc60fad2f384c9411299218976c3d24a2ef3db18ac8c53f0b61b195b75a484b9843f32cc5d6b3662ed8882c30b5e27e8e887528cde4677f
6
+ metadata.gz: 91f844e94458168ff5f87fd7729f7873a00a0ebd354c15684be52ea686b843d2ff49e052d3ff57324e4d05c41c0245149a5a705ed6c87ca1038c0554f7e56a1f
7
+ data.tar.gz: 8ff4f548e3858f017e47fcc80504bcb0966a6f5d16d0464abfa6ce0e53813622c256ed6b75f3816f37c7da1a948e120c19e5d3ee42f4957d53e63088b88dd977
@@ -14,7 +14,7 @@ class ApplicationController < ActionController::Base
14
14
  protect_from_forgery with: :exception
15
15
 
16
16
  # => Layout
17
- layout Proc.new { |c| Rails.application.secrets[:app][:layout] unless c.request.xhr? }
17
+ layout Proc.new { |c| 'base' unless c.request.xhr? }
18
18
 
19
19
  # => Maintenance
20
20
  before_action Proc.new { @maintenance = Node.find_by(ref: "maintenance").try(:val) }, only: :show
@@ -11,14 +11,22 @@ module ActiveRecord
11
11
  ENV["DATABASE_ADAPTER"]
12
12
  end
13
13
 
14
+ #########################################
15
+ #########################################
16
+
14
17
  # Down
15
18
  def down
16
19
  drop_table table, if_exists: true
17
20
  end
18
21
 
19
22
  # UUID
20
- def uuid(key=:id)
21
- adapter == "sqlite3" ? {} : { key => :uuid }
23
+ def options(key=:id)
24
+ case adapter
25
+ when "mysql2"
26
+ { options: 'DEFAULT CHARSET=utf8' }
27
+ else
28
+ {}
29
+ end
22
30
  end
23
31
 
24
32
  # Table
@@ -5,12 +5,8 @@ class CreateNodes < ActiveRecord::Migration::Current
5
5
  #########################################
6
6
 
7
7
  # => Up
8
- # => enable_extension for Ruby 2.4.0 on Heroku
9
8
  def up
10
- enable_extension 'uuid-ossp' if adapter == "postgresql" # => http://theworkaround.com/2015/06/12/using-uuids-in-rails.html#postgresql
11
-
12
- # => Table
13
- create_table table, uuid do |t| # => users stored through "associations"
9
+ create_table table, options do |t| # => users stored through "associations"
14
10
  t.references :user
15
11
  t.string :type
16
12
  t.string :slug
@@ -6,7 +6,7 @@ class CreateUsers < ActiveRecord::Migration::Current
6
6
 
7
7
  # Up
8
8
  def up
9
- create_table table do |t|
9
+ create_table table, options do |t|
10
10
 
11
11
  ## Database authenticatable
12
12
  t.string :email, null: false, default: ""
@@ -14,7 +14,7 @@ class CreateSlugs < ActiveRecord::Migration::Current
14
14
 
15
15
  # Up
16
16
  def up
17
- create_table table do |t|
17
+ create_table table, options do |t|
18
18
  t.string :slug, :null => false
19
19
  t.integer :sluggable_id, :null => false
20
20
  t.string :sluggable_type, :limit => 50
@@ -6,10 +6,9 @@ class CreateAssociations < ActiveRecord::Migration::Current
6
6
 
7
7
  # Up
8
8
  def up
9
- setup_uuid
10
- create_table table, uuid do |t|
11
- t.references :associatiable, { polymorphic: true }.merge!(uuid(:type)) # => http://stackoverflow.com/a/29257570/1143732
12
- t.references :associated, { polymorphic: true }.merge!(uuid(:type)) # => http://stackoverflow.com/a/29257570/1143732
9
+ create_table table, options do |t|
10
+ t.references :associatiable, { polymorphic: true } # => http://stackoverflow.com/a/29257570/1143732
11
+ t.references :associated, { polymorphic: true } # => http://stackoverflow.com/a/29257570/1143732
13
12
  t.timestamps
14
13
  end
15
14
  end
@@ -3,11 +3,10 @@ class CreateProfiles < ActiveRecord::Migration::Current
3
3
 
4
4
  # Up
5
5
  def up
6
- setup_uuid
7
- create_table table, uuid do |t|
6
+ create_table table, options do |t|
8
7
 
9
8
  # => General
10
- t.references :user, { references: :user }.merge!(uuid(:type)) # => Should be used to create custom references but always adds "_id" to name
9
+ t.references :user, { references: :user } # => Should be used to create custom references but always adds "_id" to name
11
10
  t.string :slug
12
11
  t.string :name
13
12
  t.integer :role, default: 0
@@ -6,7 +6,7 @@ class CreateAssets < ActiveRecord::Migration::Current
6
6
 
7
7
  # => Up
8
8
  def up
9
- create_table table do |t|
9
+ create_table table, options do |t|
10
10
  t.references :assetable, polymorphic: true
11
11
  t.string :data_file_name, null: false
12
12
  t.integer :data_file_size
@@ -6,7 +6,7 @@ class CreateActiveAdminComments < ActiveRecord::Migration::Current
6
6
 
7
7
  # => Up
8
8
  def up
9
- create_table table do |t|
9
+ create_table table, options do |t|
10
10
  t.references :resource, polymorphic: true
11
11
  t.references :author, polymorphic: true
12
12
  t.string :namespace
@@ -42,7 +42,7 @@ module FL
42
42
  module VERSION
43
43
  MAJOR = 0
44
44
  MINOR = 3
45
- TINY = 8
45
+ TINY = 9
46
46
  PRE = nil
47
47
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
48
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - R.Peck