push_type_core 0.11.2 → 0.12.0.beta.1

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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/push_type/asset.rb +1 -1
  3. data/app/models/push_type/node.rb +3 -3
  4. data/lib/push_type/testing/factories.rb +2 -2
  5. data/lib/push_type/version.rb +1 -1
  6. data/test/controllers/front_end_controller_test.rb +4 -4
  7. data/test/dummy/app/controllers/application_controller.rb +0 -1
  8. data/test/dummy/app/views/layouts/application.html.erb +1 -0
  9. data/test/dummy/bin/bundle +1 -1
  10. data/test/dummy/bin/setup +1 -3
  11. data/test/dummy/bin/update +4 -2
  12. data/test/dummy/bin/yarn +3 -3
  13. data/test/dummy/config/cable.yml +1 -1
  14. data/test/dummy/config/credentials.yml.enc +1 -0
  15. data/test/dummy/config/environments/development.rb +9 -2
  16. data/test/dummy/config/environments/production.rb +7 -4
  17. data/test/dummy/config/environments/test.rb +5 -1
  18. data/test/dummy/config/initializers/content_security_policy.rb +25 -0
  19. data/test/dummy/config/initializers/push_type.rb +1 -1
  20. data/test/dummy/config/master.key +1 -0
  21. data/test/dummy/config/puma.rb +1 -23
  22. data/test/dummy/config/spring.rb +2 -2
  23. data/test/dummy/config/storage.yml +34 -0
  24. data/test/dummy/db/migrate/20180416190556_create_active_storage_tables.active_storage.rb +26 -0
  25. data/test/dummy/db/migrate/{20170922151246_create_push_type_users.push_type.rb → 20180416190557_create_push_type_users.push_type.rb} +0 -0
  26. data/test/dummy/db/migrate/{20170922151247_create_push_type_nodes.push_type.rb → 20180416190558_create_push_type_nodes.push_type.rb} +0 -0
  27. data/test/dummy/db/migrate/{20170922151248_create_push_type_node_hierarchies.push_type.rb → 20180416190559_create_push_type_node_hierarchies.push_type.rb} +0 -0
  28. data/test/dummy/db/migrate/{20170922151249_create_push_type_assets.push_type.rb → 20180416190560_create_push_type_assets.push_type.rb} +0 -0
  29. data/test/dummy/db/migrate/{20170922151250_add_field_store_default_values.push_type.rb → 20180416190561_add_field_store_default_values.push_type.rb} +0 -0
  30. data/test/dummy/db/migrate/{20170922151251_drop_legacy_push_type_taxonomies.push_type.rb → 20180416190562_drop_legacy_push_type_taxonomies.push_type.rb} +0 -0
  31. data/test/dummy/db/schema.rb +22 -1
  32. data/test/dummy/log/test.log +7358 -7349
  33. data/test/dummy/tmp/cache/assets/sprockets/v3.0/{oS/oSny1jPtVV4CQzpNvnBrSEXbrDcFotXREGTeFhIX2w8.cache → 6C/6C2JbMFhTmFheksOeqr5CxG7FdJaTtdjhGlXeXF6CY0.cache} +2 -2
  34. data/test/dummy/tmp/cache/assets/sprockets/v3.0/7H/7HiGdGTR97GmdYojFWv4_p3igsfx4Dtp6wakxe6DhP8.cache +1 -0
  35. data/test/dummy/tmp/cache/assets/sprockets/v3.0/{ZG/ZGtjrYSWfhQw5WTxwvZlujjhnZa1pWl_6d3TqAsv890.cache → 7L/7LVQvtc1iMZeAO68sDJYR2hCgSPnodE_9eLtd1Ulqn4.cache} +0 -0
  36. data/test/dummy/tmp/cache/assets/sprockets/v3.0/E9/E91cQ4ShXSylrleKbStS2KX6gNUGpKTaGgiX79Qg4hc.cache +1 -0
  37. data/test/dummy/tmp/cache/assets/sprockets/v3.0/{2p/2pLTxhc3AEw1ij6BSaHCTOzCdmHls3b6X2BJOgGJlvo.cache → Gb/Gb7a_LyQ5axipgxr32c24vxnBVc-_Ifogrfb94rFst0.cache} +0 -0
  38. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Jc/JcugcCYqHRu0vpHnC82vaPBddonD4xjcKCXrBzBBRWc.cache +1 -0
  39. data/test/dummy/tmp/cache/assets/sprockets/v3.0/{K3/K3gXaXdE70Os0tFZWdN0RhxLYyK4Tkqxkvs_UlXMnLo.cache → P4/P4-KmUIugrRsv4S7s_1OpQ80ftRLH6SwHnN04O3bvRE.cache} +0 -0
  40. data/test/dummy/tmp/cache/assets/sprockets/v3.0/{ix/ixZDew6Xyg3UcRDRkOpY__EPHBugt_obye596pklZzo.cache → Qp/Qpesf09ShFU1VXLof0RhGNbfW4kmnXSxWoSZjBHxbzk.cache} +0 -0
  41. data/test/dummy/tmp/cache/assets/sprockets/v3.0/{Xa/Xa0rMz8rH8k9hoOlTOYy0cDr5lV4-OoV05Pti43Wxw0.cache → Ry/RyjwdOuzstNmdUbKO2lY8TdwUAqQEXC2kuaw3Ddn5f0.cache} +0 -0
  42. data/test/dummy/tmp/cache/assets/sprockets/v3.0/{ww/wwPGypMVefgCJRhWzOLsWvYdTNOIj8waOZhaTzHioh0.cache → Wl/Wl19Wzw2lW_-k2MBxQ8EbFLVH767C8erklxU1EQgEX8.cache} +2 -2
  43. data/test/dummy/tmp/cache/assets/sprockets/v3.0/XR/XRrfYUs4AQslvAiJmgJms-4P3jStQr3rzQtvBThYCs8.cache +1 -0
  44. data/test/dummy/tmp/cache/assets/sprockets/v3.0/pn/pnUfa3lDaIS9XJhFDXf1mYGDN8ctf4qw3EZzJHS8qiM.cache +1 -0
  45. data/test/dummy/tmp/generators/config/initializers/push_type.rb +50 -0
  46. data/test/dummy/tmp/generators/config/routes.rb +15 -0
  47. data/test/fields/push_type/asset_field_test.rb +2 -2
  48. data/test/fields/push_type/boolean_field_test.rb +1 -1
  49. data/test/fields/push_type/date_field_test.rb +1 -1
  50. data/test/fields/push_type/markdown_field_test.rb +1 -1
  51. data/test/fields/push_type/matrix_field_test.rb +1 -1
  52. data/test/fields/push_type/number_field_test.rb +1 -1
  53. data/test/fields/push_type/relation_field_test.rb +3 -3
  54. data/test/fields/push_type/repeater_field_test.rb +1 -1
  55. data/test/fields/push_type/select_field_test.rb +1 -1
  56. data/test/fields/push_type/string_field_test.rb +1 -1
  57. data/test/fields/push_type/structure_field_test.rb +1 -1
  58. data/test/fields/push_type/tag_list_field_test.rb +6 -6
  59. data/test/fields/push_type/text_field_test.rb +1 -1
  60. data/test/fields/push_type/time_field_test.rb +1 -1
  61. data/test/fields/push_type/wysiwyg_field_test.rb +1 -1
  62. data/test/helpers/push_type/media_url_helper_test.rb +1 -1
  63. data/test/helpers/push_type/node_url_helper_test.rb +1 -1
  64. data/test/lib/push_type/field_type_test.rb +1 -1
  65. data/test/lib/push_type/presenter_test.rb +1 -1
  66. data/test/models/concerns/push_type/presentable_test.rb +1 -1
  67. data/test/models/concerns/push_type/publishable_test.rb +8 -8
  68. data/test/models/concerns/push_type/trashable_test.rb +2 -2
  69. data/test/models/concerns/push_type/unexposable_test.rb +1 -1
  70. data/test/models/push_type/asset_test.rb +11 -11
  71. data/test/models/push_type/node_test.rb +8 -8
  72. data/test/models/push_type/user_test.rb +1 -1
  73. metadata +56 -46
  74. data/test/dummy/config/secrets.yml +0 -32
  75. data/test/dummy/tmp/cache/assets/sprockets/v3.0/-z/-zTAG_AZ6DwXX0Cr9lRJjmTq5QtmE90nli2sNQARB4Y.cache +0 -1
  76. data/test/dummy/tmp/cache/assets/sprockets/v3.0/JH/JHIrmQ-QKOegrk3C-nT6krwBmtgfHZ3p9hMARO3wGeA.cache +0 -1
  77. data/test/dummy/tmp/cache/assets/sprockets/v3.0/lJ/lJeW8Y8UwqRfy5ZGuy415jyJl-6N8cwI5d_oTFjgoAw.cache +0 -1
  78. data/test/dummy/tmp/cache/assets/sprockets/v3.0/n1/n1WEJwG2Q3wVIHSGTSH9qkD0O5iRyZAm4b-EgSp9AsI.cache +0 -1
  79. data/test/dummy/tmp/cache/assets/sprockets/v3.0/xd/xdD7MvvFCQ0fSLaxSSdb6pvGs-2uE71UOI2xH2bj7bQ.cache +0 -1
  80. data/test/dummy/tmp/generators/app/presenters/page_presenter.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 266136ffff739338d025c28f06228fe29b75ff52
4
- data.tar.gz: 8eed56614d25ebddd83b0c05d94e23f9fe32c3c4
3
+ metadata.gz: 5f45fd96cfa75c1c087546410f1aa5c16ecdb73c
4
+ data.tar.gz: c57ec9da9bcdb0285c3aba0d6ba3f5587f68d12a
5
5
  SHA512:
6
- metadata.gz: 831b4a68f1164a06dab38fbaa372b1f99cd724d35dcf2c16d17134cfcbee506b48f7f118ddd77298a1a6e42466feb786ca2161841ada0408b6679743b3f0a990
7
- data.tar.gz: 8f1a6e6205853607e56ed4c3d0a9b5f1beecd9595292aa0d3cb186424ff7e49aef01af49cd10e9eafef75a666414cd7a430708199ab1a687125e647fb7bec6cb
6
+ metadata.gz: bd806dc892c1b959bb2dbc00d217aeb49366187a91f429e88544c52e054783dd930b8cf185280e526c34c77801a54425321b200dfd7253e560d5becd6541aabe
7
+ data.tar.gz: c3d86ada0da033814513c7ef152ff4b43cfda5b9ac9e6c2af654af652ccb9c3cb40e9882294e2e572a3af058f375c890c5b694beb90bdefe7275349135ce8132
@@ -5,7 +5,7 @@ module PushType
5
5
 
6
6
  dragonfly_accessor :file
7
7
 
8
- belongs_to :uploader, class_name: 'PushType::User'
8
+ belongs_to :uploader, class_name: 'PushType::User', optional: true
9
9
 
10
10
  validates :file, presence: true
11
11
 
@@ -9,10 +9,10 @@ module PushType
9
9
  include PushType::Trashable
10
10
  include PushType::Presentable
11
11
 
12
- belongs_to :creator, class_name: 'PushType::User'
13
- belongs_to :updater, class_name: 'PushType::User'
12
+ belongs_to :creator, class_name: 'PushType::User', optional: true
13
+ belongs_to :updater, class_name: 'PushType::User', optional: true
14
14
 
15
- acts_as_tree name_column: 'slug', order: 'sort_order', dependent: :destroy
15
+ has_closure_tree name_column: 'slug', order: 'sort_order', dependent: :destroy
16
16
 
17
17
  validates :title, presence: true
18
18
  validates :slug, presence: true, uniqueness: { scope: :parent_id }
@@ -1,6 +1,6 @@
1
- require 'factory_girl_rails'
1
+ require 'factory_bot_rails'
2
2
 
3
- FactoryGirl.define do
3
+ FactoryBot.define do
4
4
 
5
5
  sequence :title do |n|
6
6
  "Foo Bar #{n}"
@@ -1,3 +1,3 @@
1
1
  module PushType
2
- VERSION = '0.11.2'
2
+ VERSION = '0.12.0.beta.1'
3
3
  end
@@ -14,11 +14,11 @@ class FrontEndControllerTest < ActionController::TestCase
14
14
  it { proc { action! }.must_raise ActiveRecord::RecordNotFound }
15
15
  end
16
16
  describe 'when node not published' do
17
- let(:attributes) { FactoryGirl.attributes_for :node, type: 'Page' }
17
+ let(:attributes) { FactoryBot.attributes_for :node, type: 'Page' }
18
18
  it { proc { action! }.must_raise ActiveRecord::RecordNotFound }
19
19
  end
20
20
  describe 'when node is published' do
21
- let(:attributes) { FactoryGirl.attributes_for :published_node, type: 'Page' }
21
+ let(:attributes) { FactoryBot.attributes_for :published_node, type: 'Page' }
22
22
  before { action! }
23
23
  it { response.must_render_template 'nodes/page' }
24
24
  it { assigns[:node].must_equal page }
@@ -28,7 +28,7 @@ class FrontEndControllerTest < ActionController::TestCase
28
28
  end
29
29
 
30
30
  describe 'GET #preview' do
31
- let(:page) { Page.create FactoryGirl.attributes_for(:node, type: 'Page') }
31
+ let(:page) { Page.create FactoryBot.attributes_for(:node, type: 'Page') }
32
32
  let(:id) { page.base64_id }
33
33
  let(:action!) { get :preview, params: { id: id } }
34
34
 
@@ -65,7 +65,7 @@ class FrontEndControllerTest < ActionController::TestCase
65
65
  end
66
66
  end
67
67
 
68
- let(:page) { FactoryGirl.create :published_node, type: 'Page' }
68
+ let(:page) { FactoryBot.create :published_node, type: 'Page' }
69
69
  before { get :show, params: { permalink: page.permalink } }
70
70
  it { assigns[:foo].must_be_instance_of Hash }
71
71
  it { assigns[:foo][:node_action].must_equal true }
@@ -1,3 +1,2 @@
1
1
  class ApplicationController < ActionController::Base
2
- protect_from_forgery with: :exception
3
2
  end
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <title>Dummy</title>
5
5
  <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
6
7
 
7
8
  <%= stylesheet_link_tag 'application', media: 'all' %>
8
9
  </head>
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3
3
  load Gem.bin_path('bundler', 'bundle')
data/test/dummy/bin/setup CHANGED
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
- require 'pathname'
3
2
  require 'fileutils'
4
3
  include FileUtils
5
4
 
6
5
  # path to your application root.
7
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+ APP_ROOT = File.expand_path('..', __dir__)
8
7
 
9
8
  def system!(*args)
10
9
  system(*args) || abort("\n== Command #{args} failed ==")
@@ -21,7 +20,6 @@ chdir APP_ROOT do
21
20
  # Install JavaScript dependencies if using Yarn
22
21
  # system('bin/yarn')
23
22
 
24
-
25
23
  # puts "\n== Copying sample files =="
26
24
  # unless File.exist?('config/database.yml')
27
25
  # cp 'config/database.yml.sample', 'config/database.yml'
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
- require 'pathname'
3
2
  require 'fileutils'
4
3
  include FileUtils
5
4
 
6
5
  # path to your application root.
7
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+ APP_ROOT = File.expand_path('..', __dir__)
8
7
 
9
8
  def system!(*args)
10
9
  system(*args) || abort("\n== Command #{args} failed ==")
@@ -18,6 +17,9 @@ chdir APP_ROOT do
18
17
  system! 'gem install bundler --conservative'
19
18
  system('bundle check') || system!('bundle install')
20
19
 
20
+ # Install JavaScript dependencies if using Yarn
21
+ # system('bin/yarn')
22
+
21
23
  puts "\n== Updating database =="
22
24
  system! 'bin/rails db:migrate'
23
25
 
data/test/dummy/bin/yarn CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
- VENDOR_PATH = File.expand_path('..', __dir__)
3
- Dir.chdir(VENDOR_PATH) do
2
+ APP_ROOT = File.expand_path('..', __dir__)
3
+ Dir.chdir(APP_ROOT) do
4
4
  begin
5
- exec "yarnpkg #{ARGV.join(" ")}"
5
+ exec "yarnpkg", *ARGV
6
6
  rescue Errno::ENOENT
7
7
  $stderr.puts "Yarn executable was not detected in the system."
8
8
  $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
@@ -6,5 +6,5 @@ test:
6
6
 
7
7
  production:
8
8
  adapter: redis
9
- url: redis://localhost:6379/1
9
+ url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10
10
  channel_prefix: dummy_production
@@ -0,0 +1 @@
1
+ 2zHFgqvAMtSro5pNrJGghwaREGJ5SS2zErBIcktd7/2zNYNb5rTIL08/YMXLFOybM9YyVhkZGadrVkCrKYTDHjN0gPkfwc/8zYIitp8dTtvMSB4clisosvhndkipZnlep8K41OSNMJ8PYMXIeysDVGs/aJw5zA58Nu3DxU3LerEEofUhlh7kOQ647H2kGM/8URzOZPhe+B3E+0aGze1x26bM/7SwdD7ePQ2UFPDDeOkHB/IUROo9GkLvi72g0YfFdiP9VSLL5VFEB5cTwe/pOhVBCIQ3/vDVYbTFh+LgsbqnNrU9zPNJ0M2ijIuDSX2WH7Oi0tsoq3xtZoTFhAFEvgE/hDUdWgOFybOgiGqQLV/nrI0S2AKNOk/kY4ImFit5ddkjGXTJToXiPSSngD9M/8ICnTFgsMQ48SSv--olDEWrKdV2mX0Z0F--3ZQlIuTz+1vi46//o+BaDw==
@@ -13,12 +13,13 @@ Rails.application.configure do
13
13
  config.consider_all_requests_local = true
14
14
 
15
15
  # Enable/disable caching. By default caching is disabled.
16
- if Rails.root.join('tmp/caching-dev.txt').exist?
16
+ # Run rails dev:cache to toggle caching.
17
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
17
18
  config.action_controller.perform_caching = true
18
19
 
19
20
  config.cache_store = :memory_store
20
21
  config.public_file_server.headers = {
21
- 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
22
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
22
23
  }
23
24
  else
24
25
  config.action_controller.perform_caching = false
@@ -26,6 +27,9 @@ Rails.application.configure do
26
27
  config.cache_store = :null_store
27
28
  end
28
29
 
30
+ # Store uploaded files on the local file system (see config/storage.yml for options)
31
+ config.active_storage.service = :local
32
+
29
33
  # Don't care if the mailer can't send.
30
34
  config.action_mailer.raise_delivery_errors = false
31
35
 
@@ -37,6 +41,9 @@ Rails.application.configure do
37
41
  # Raise an error on page load if there are pending migrations.
38
42
  config.active_record.migration_error = :page_load
39
43
 
44
+ # Highlight code that triggered database queries in logs.
45
+ config.active_record.verbose_query_logs = true
46
+
40
47
  # Debug mode disables concatenation and preprocessing of assets.
41
48
  # This option may cause significant delays in view rendering with a large
42
49
  # number of complex assets.
@@ -14,10 +14,9 @@ Rails.application.configure do
14
14
  config.consider_all_requests_local = false
15
15
  config.action_controller.perform_caching = true
16
16
 
17
- # Attempt to read encrypted secrets from `config/secrets.yml.enc`.
18
- # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
19
- # `config/secrets.yml.key`.
20
- config.read_encrypted_secrets = true
17
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
18
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
19
+ # config.require_master_key = true
21
20
 
22
21
  # Disable serving static files from the `/public` folder by default since
23
22
  # Apache or NGINX already handles this.
@@ -38,6 +37,9 @@ Rails.application.configure do
38
37
  # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
39
38
  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
40
39
 
40
+ # Store uploaded files on the local file system (see config/storage.yml for options)
41
+ config.active_storage.service = :local
42
+
41
43
  # Mount Action Cable outside main process or domain
42
44
  # config.action_cable.mount_path = nil
43
45
  # config.action_cable.url = 'wss://example.com/cable'
@@ -59,6 +61,7 @@ Rails.application.configure do
59
61
  # Use a real queuing backend for Active Job (and separate queues per environment)
60
62
  # config.active_job.queue_adapter = :resque
61
63
  # config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
64
+
62
65
  config.action_mailer.perform_caching = false
63
66
 
64
67
  # Ignore bad email addresses and do not raise email delivery errors.
@@ -15,7 +15,7 @@ Rails.application.configure do
15
15
  # Configure public file server for tests with Cache-Control for performance.
16
16
  config.public_file_server.enabled = true
17
17
  config.public_file_server.headers = {
18
- 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
18
+ 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
19
19
  }
20
20
 
21
21
  # Show full error reports and disable caching.
@@ -27,6 +27,10 @@ Rails.application.configure do
27
27
 
28
28
  # Disable request forgery protection in test environment.
29
29
  config.action_controller.allow_forgery_protection = false
30
+
31
+ # Store uploaded files on the local file system in a temporary directory
32
+ config.active_storage.service = :test
33
+
30
34
  config.action_mailer.perform_caching = false
31
35
 
32
36
  # Tell Action Mailer not to deliver emails to the real world.
@@ -0,0 +1,25 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Define an application-wide content security policy
4
+ # For further information see the following documentation
5
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6
+
7
+ # Rails.application.config.content_security_policy do |policy|
8
+ # policy.default_src :self, :https
9
+ # policy.font_src :self, :https, :data
10
+ # policy.img_src :self, :https, :data
11
+ # policy.object_src :none
12
+ # policy.script_src :self, :https
13
+ # policy.style_src :self, :https
14
+
15
+ # # Specify URI for violation reports
16
+ # # policy.report_uri "/csp-violation-report-endpoint"
17
+ # end
18
+
19
+ # If you are using UJS then enable automatic nonce generation
20
+ # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
21
+
22
+ # Report CSP violations to a specified URI
23
+ # For further information see the following documentation:
24
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
25
+ # Rails.application.config.content_security_policy_report_only = true
@@ -45,6 +45,6 @@ PushType.setup do |config|
45
45
  # secret_access_key: ENV['SECRET_ACCESS_KEY_ID']
46
46
  # }
47
47
 
48
- # config.dragonfly_secret = '8573634d97f4ce5c3315ea0572674dc37e19aba3823b90e6648962ffa7362a3e'
48
+ # config.dragonfly_secret = '65a99de0376f60bf231986c9a782afbe931d448d2816e43f728258d7b1f14ab3'
49
49
 
50
50
  end
@@ -0,0 +1 @@
1
+ 06001c4a787d81ddf2fe2c14497d2944
@@ -26,31 +26,9 @@ environment ENV.fetch("RAILS_ENV") { "development" }
26
26
  # Use the `preload_app!` method when specifying a `workers` number.
27
27
  # This directive tells Puma to first boot the application and load code
28
28
  # before forking the application. This takes advantage of Copy On Write
29
- # process behavior so workers use less memory. If you use this option
30
- # you need to make sure to reconnect any threads in the `on_worker_boot`
31
- # block.
29
+ # process behavior so workers use less memory.
32
30
  #
33
31
  # preload_app!
34
32
 
35
- # If you are preloading your application and using Active Record, it's
36
- # recommended that you close any connections to the database before workers
37
- # are forked to prevent connection leakage.
38
- #
39
- # before_fork do
40
- # ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
41
- # end
42
-
43
- # The code in the `on_worker_boot` will be called if you are using
44
- # clustered mode by specifying a number of `workers`. After each worker
45
- # process is booted, this block will be run. If you are using the `preload_app!`
46
- # option, you will want to use this block to reconnect to any threads
47
- # or connections that may have been created at application boot, as Ruby
48
- # cannot share connections between processes.
49
- #
50
- # on_worker_boot do
51
- # ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
52
- # end
53
- #
54
-
55
33
  # Allow puma to be restarted by `rails restart` command.
56
34
  plugin :tmp_restart
@@ -1,6 +1,6 @@
1
- %w(
1
+ %w[
2
2
  .ruby-version
3
3
  .rbenv-vars
4
4
  tmp/restart.txt
5
5
  tmp/caching-dev.txt
6
- ).each { |path| Spring.watch(path) }
6
+ ].each { |path| Spring.watch(path) }
@@ -0,0 +1,34 @@
1
+ test:
2
+ service: Disk
3
+ root: <%= Rails.root.join("tmp/storage") %>
4
+
5
+ local:
6
+ service: Disk
7
+ root: <%= Rails.root.join("storage") %>
8
+
9
+ # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10
+ # amazon:
11
+ # service: S3
12
+ # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13
+ # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14
+ # region: us-east-1
15
+ # bucket: your_own_bucket
16
+
17
+ # Remember not to checkin your GCS keyfile to a repository
18
+ # google:
19
+ # service: GCS
20
+ # project: your_project
21
+ # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22
+ # bucket: your_own_bucket
23
+
24
+ # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25
+ # microsoft:
26
+ # service: AzureStorage
27
+ # storage_account_name: your_account_name
28
+ # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29
+ # container: your_container_name
30
+
31
+ # mirror:
32
+ # service: Mirror
33
+ # primary: local
34
+ # mirrors: [ amazon, google, microsoft ]
@@ -0,0 +1,26 @@
1
+ # This migration comes from active_storage (originally 20170806125915)
2
+ class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
3
+ def change
4
+ create_table :active_storage_blobs do |t|
5
+ t.string :key, null: false
6
+ t.string :filename, null: false
7
+ t.string :content_type
8
+ t.text :metadata
9
+ t.bigint :byte_size, null: false
10
+ t.string :checksum, null: false
11
+ t.datetime :created_at, null: false
12
+
13
+ t.index [ :key ], unique: true
14
+ end
15
+
16
+ create_table :active_storage_attachments do |t|
17
+ t.string :name, null: false
18
+ t.references :record, null: false, polymorphic: true, index: false
19
+ t.references :blob, null: false
20
+
21
+ t.datetime :created_at, null: false
22
+
23
+ t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
24
+ end
25
+ end
26
+ end
@@ -10,12 +10,33 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 20170922151251) do
13
+ ActiveRecord::Schema.define(version: 2018_04_16_190562) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
17
17
  enable_extension "uuid-ossp"
18
18
 
19
+ create_table "active_storage_attachments", force: :cascade do |t|
20
+ t.string "name", null: false
21
+ t.string "record_type", null: false
22
+ t.bigint "record_id", null: false
23
+ t.bigint "blob_id", null: false
24
+ t.datetime "created_at", null: false
25
+ t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
26
+ t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
27
+ end
28
+
29
+ create_table "active_storage_blobs", force: :cascade do |t|
30
+ t.string "key", null: false
31
+ t.string "filename", null: false
32
+ t.string "content_type"
33
+ t.text "metadata"
34
+ t.bigint "byte_size", null: false
35
+ t.string "checksum", null: false
36
+ t.datetime "created_at", null: false
37
+ t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
38
+ end
39
+
19
40
  create_table "push_type_assets", id: :uuid, default: -> { "uuid_generate_v4()" }, force: :cascade do |t|
20
41
  t.string "file_uid"
21
42
  t.string "file_name"