buoys 2.0.1 → 2.0.2

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 (66) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -0
  3. data/lib/buoys/buoy.rb +2 -2
  4. data/lib/buoys/version.rb +1 -1
  5. data/test/buoys_buoy_test.rb +12 -0
  6. data/test/dummy/Rakefile +1 -1
  7. data/test/dummy/app/assets/config/manifest.js +3 -1
  8. data/test/dummy/app/assets/javascripts/application.js +3 -1
  9. data/test/dummy/app/assets/javascripts/cable.js +13 -0
  10. data/test/dummy/app/assets/stylesheets/application.css +3 -3
  11. data/test/dummy/app/channels/application_cable/channel.rb +4 -0
  12. data/test/dummy/app/channels/application_cable/connection.rb +4 -0
  13. data/test/dummy/app/controllers/application_controller.rb +0 -5
  14. data/test/dummy/app/helpers/application_helper.rb +0 -2
  15. data/test/dummy/app/jobs/application_job.rb +2 -0
  16. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  17. data/test/dummy/app/models/application_record.rb +3 -0
  18. data/test/dummy/app/models/item.rb +1 -1
  19. data/test/dummy/app/models/user.rb +1 -1
  20. data/test/dummy/app/views/layouts/application.html.erb +10 -9
  21. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  22. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  23. data/test/dummy/bin/bundle +1 -1
  24. data/test/dummy/bin/rails +1 -1
  25. data/test/dummy/bin/setup +20 -13
  26. data/test/dummy/bin/update +31 -0
  27. data/test/dummy/bin/yarn +11 -0
  28. data/test/dummy/config/application.rb +9 -21
  29. data/test/dummy/config/boot.rb +2 -4
  30. data/test/dummy/config/cable.yml +10 -0
  31. data/test/dummy/config/database.yml +1 -1
  32. data/test/dummy/config/environment.rb +1 -3
  33. data/test/dummy/config/environments/development.rb +31 -13
  34. data/test/dummy/config/environments/production.rb +31 -18
  35. data/test/dummy/config/environments/test.rb +10 -13
  36. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  37. data/test/dummy/config/initializers/assets.rb +6 -5
  38. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -2
  39. data/test/dummy/config/initializers/content_security_policy.rb +25 -0
  40. data/test/dummy/config/initializers/cookies_serializer.rb +2 -2
  41. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -2
  42. data/test/dummy/config/initializers/inflections.rb +0 -2
  43. data/test/dummy/config/initializers/mime_types.rb +0 -2
  44. data/test/dummy/config/initializers/wrap_parameters.rb +2 -4
  45. data/test/dummy/config/locales/en.yml +10 -0
  46. data/test/dummy/config/puma.rb +37 -0
  47. data/test/dummy/config/routes.rb +2 -2
  48. data/test/dummy/config/spring.rb +6 -0
  49. data/test/dummy/config/storage.yml +34 -0
  50. data/test/dummy/config.ru +2 -1
  51. data/test/dummy/db/development.sqlite3 +0 -0
  52. data/test/dummy/db/test.sqlite3 +0 -0
  53. data/test/dummy/log/development.log +105 -0
  54. data/test/dummy/log/test.log +396 -267
  55. data/test/dummy/package.json +5 -0
  56. data/test/dummy/public/404.html +6 -6
  57. data/test/dummy/public/422.html +6 -6
  58. data/test/dummy/public/500.html +6 -6
  59. data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
  60. data/test/dummy/public/apple-touch-icon.png +0 -0
  61. data/test/dummy/tmp/development_secret.txt +1 -0
  62. data/test/test_helper.rb +4 -5
  63. metadata +88 -49
  64. data/test/dummy/README.rdoc +0 -28
  65. data/test/dummy/config/initializers/session_store.rb +0 -5
  66. data/test/dummy/config/secrets.yml +0 -22
@@ -1,13 +1,14 @@
1
- # frozen_string_literal: true
2
-
3
1
  # Be sure to restart your server when you modify this file.
4
2
 
5
3
  # Version of your assets, change this if you want to expire all your assets.
6
4
  Rails.application.config.assets.version = '1.0'
7
5
 
8
- # Add additional assets to the asset load path
6
+ # Add additional assets to the asset load path.
9
7
  # Rails.application.config.assets.paths << Emoji.images_path
8
+ # Add Yarn node_modules folder to the asset load path.
9
+ Rails.application.config.assets.paths << Rails.root.join('node_modules')
10
10
 
11
11
  # Precompile additional assets.
12
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
13
- # Rails.application.config.assets.precompile += %w( search.js )
12
+ # application.js, application.css, and all non-JS/CSS in the app/assets
13
+ # folder are already added.
14
+ # Rails.application.config.assets.precompile += %w( admin.js admin.css )
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  # Be sure to restart your server when you modify this file.
4
2
 
5
3
  # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
@@ -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
@@ -1,5 +1,5 @@
1
- # frozen_string_literal: true
2
-
3
1
  # Be sure to restart your server when you modify this file.
4
2
 
3
+ # Specify a serializer for the signed and encrypted cookie jars.
4
+ # Valid options are :json, :marshal, and :hybrid.
5
5
  Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  # Be sure to restart your server when you modify this file.
4
2
 
5
3
  # Configure sensitive parameters which will be filtered from the log file.
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  # Be sure to restart your server when you modify this file.
4
2
 
5
3
  # Add new inflection rules using the following format. Inflections
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  # Be sure to restart your server when you modify this file.
4
2
 
5
3
  # Add new mime types for use in respond_to blocks:
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  # Be sure to restart your server when you modify this file.
4
2
 
5
3
  # This file contains settings for ActionController::ParamsWrapper which
@@ -7,10 +5,10 @@
7
5
 
8
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
9
7
  ActiveSupport.on_load(:action_controller) do
10
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
8
+ wrap_parameters format: [:json]
11
9
  end
12
10
 
13
11
  # To enable root element in JSON for ActiveRecord objects.
14
12
  # ActiveSupport.on_load(:active_record) do
15
- # self.include_root_in_json = true
13
+ # self.include_root_in_json = true
16
14
  # end
@@ -16,6 +16,16 @@
16
16
  #
17
17
  # This would use the information in config/locales/es.yml.
18
18
  #
19
+ # The following keys must be escaped otherwise they will not be retrieved by
20
+ # the default I18n backend:
21
+ #
22
+ # true, false, on, off, yes, no
23
+ #
24
+ # Instead, surround them with single quotes.
25
+ #
26
+ # en:
27
+ # 'true': 'foo'
28
+ #
19
29
  # To learn more, please read the Rails Internationalization guide
20
30
  # available at http://guides.rubyonrails.org/i18n.html.
21
31
 
@@ -0,0 +1,37 @@
1
+ # Puma can serve each request in a thread from an internal thread pool.
2
+ # The `threads` method setting takes two numbers: a minimum and maximum.
3
+ # Any libraries that use thread pools should be configured to match
4
+ # the maximum value specified for Puma. Default is set to 5 threads for minimum
5
+ # and maximum; this matches the default thread size of Active Record.
6
+ #
7
+ threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
8
+ threads threads_count, threads_count
9
+
10
+ # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
11
+ #
12
+ port ENV.fetch("PORT") { 3000 }
13
+
14
+ # Specifies the `environment` that Puma will run in.
15
+ #
16
+ environment ENV.fetch("RAILS_ENV") { "development" }
17
+
18
+ # Specifies the `pidfile` that Puma will use.
19
+ pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
20
+
21
+ # Specifies the number of `workers` to boot in clustered mode.
22
+ # Workers are forked webserver processes. If using threads and workers together
23
+ # the concurrency of the application would be max `threads` * `workers`.
24
+ # Workers do not work on JRuby or Windows (both of which do not support
25
+ # processes).
26
+ #
27
+ # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
28
+
29
+ # Use the `preload_app!` method when specifying a `workers` number.
30
+ # This directive tells Puma to first boot the application and load code
31
+ # before forking the application. This takes advantage of Copy On Write
32
+ # process behavior so workers use less memory.
33
+ #
34
+ # preload_app!
35
+
36
+ # Allow puma to be restarted by `rails restart` command.
37
+ plugin :tmp_restart
@@ -1,6 +1,6 @@
1
- # frozen_string_literal: true
2
-
3
1
  Rails.application.routes.draw do
2
+ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
3
+
4
4
  get 'about' => 'dummy#dummy', as: :about
5
5
  get 'about/history' => 'dummy#dummy', as: :history
6
6
 
@@ -0,0 +1,6 @@
1
+ %w[
2
+ .ruby-version
3
+ .rbenv-vars
4
+ tmp/restart.txt
5
+ tmp/caching-dev.txt
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 ]
data/test/dummy/config.ru CHANGED
@@ -1,4 +1,5 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require ::File.expand_path('../config/environment', __FILE__)
3
+ require_relative 'config/environment'
4
+
4
5
  run Rails.application
File without changes
Binary file
@@ -0,0 +1,105 @@
1
+ DEPRECATION WARNING: Leaving `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer`
2
+ set to false is deprecated. SQLite databases have used 't' and 'f' to serialize
3
+ boolean values and must have old data converted to 1 and 0 (its native boolean
4
+ serialization) before setting this flag to true. Conversion can be accomplished
5
+ by setting up a rake task which runs
6
+
7
+ ExampleModel.where("boolean_column = 't'").update_all(boolean_column: 1)
8
+ ExampleModel.where("boolean_column = 'f'").update_all(boolean_column: 0)
9
+
10
+ for all models and all boolean columns, after which the flag must be set to
11
+ true by adding the following to your application.rb file:
12
+
13
+ Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
14
+ (called from <main> at bin/rake:4)
15
+  (0.0ms) DROP TABLE IF EXISTS "items"
16
+  (0.0ms) SELECT sqlite_version(*)
17
+  (21.7ms) CREATE TABLE "items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
18
+  (0.1ms) DROP TABLE IF EXISTS "users"
19
+  (22.0ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
20
+  (4.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
21
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
22
+  (3.2ms) INSERT INTO "schema_migrations" (version) VALUES (20160602144324)
23
+  (3.0ms) INSERT INTO "schema_migrations" (version) VALUES
24
+ (20160602144150);
25
+
26
+ 
27
+  (3.5ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
28
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
29
+  (0.0ms) begin transaction
30
+ ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2021-01-16 06:42:28.980182"], ["updated_at", "2021-01-16 06:42:28.980182"]]
31
+  (3.1ms) commit transaction
32
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
33
+  (0.0ms) begin transaction
34
+ ActiveRecord::InternalMetadata Update (0.1ms) UPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ? [["value", "test"], ["updated_at", "2021-01-16 06:42:28.985152"], ["key", "environment"]]
35
+  (3.1ms) commit transaction
36
+ DEPRECATION WARNING: Leaving `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer`
37
+ set to false is deprecated. SQLite databases have used 't' and 'f' to serialize
38
+ boolean values and must have old data converted to 1 and 0 (its native boolean
39
+ serialization) before setting this flag to true. Conversion can be accomplished
40
+ by setting up a rake task which runs
41
+
42
+ ExampleModel.where("boolean_column = 't'").update_all(boolean_column: 1)
43
+ ExampleModel.where("boolean_column = 'f'").update_all(boolean_column: 0)
44
+
45
+ for all models and all boolean columns, after which the flag must be set to
46
+ true by adding the following to your application.rb file:
47
+
48
+ Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
49
+ (called from <main> at bin/rake:4)
50
+  (0.0ms) DROP TABLE IF EXISTS "items"
51
+  (0.0ms) SELECT sqlite_version(*)
52
+  (21.6ms) CREATE TABLE "items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
53
+  (0.0ms) DROP TABLE IF EXISTS "users"
54
+  (22.3ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
55
+  (3.4ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
56
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
57
+  (2.9ms) INSERT INTO "schema_migrations" (version) VALUES (20160602144324)
58
+  (2.8ms) INSERT INTO "schema_migrations" (version) VALUES
59
+ (20160602144150);
60
+
61
+ 
62
+  (3.4ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
63
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
64
+  (0.1ms) begin transaction
65
+ ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2021-01-16 06:43:45.010142"], ["updated_at", "2021-01-16 06:43:45.010142"]]
66
+  (3.1ms) commit transaction
67
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
68
+  (0.0ms) begin transaction
69
+ ActiveRecord::InternalMetadata Update (0.1ms) UPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ? [["value", "test"], ["updated_at", "2021-01-16 06:43:45.015286"], ["key", "environment"]]
70
+  (3.1ms) commit transaction
71
+ DEPRECATION WARNING: Leaving `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer`
72
+ set to false is deprecated. SQLite databases have used 't' and 'f' to serialize
73
+ boolean values and must have old data converted to 1 and 0 (its native boolean
74
+ serialization) before setting this flag to true. Conversion can be accomplished
75
+ by setting up a rake task which runs
76
+
77
+ ExampleModel.where("boolean_column = 't'").update_all(boolean_column: 1)
78
+ ExampleModel.where("boolean_column = 'f'").update_all(boolean_column: 0)
79
+
80
+ for all models and all boolean columns, after which the flag must be set to
81
+ true by adding the following to your application.rb file:
82
+
83
+ Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
84
+ (called from <main> at bin/rake:4)
85
+  (0.0ms) DROP TABLE IF EXISTS "items"
86
+  (0.0ms) SELECT sqlite_version(*)
87
+  (4.6ms) CREATE TABLE "items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
88
+  (0.0ms) DROP TABLE IF EXISTS "users"
89
+  (3.5ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
90
+  (3.4ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
91
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
92
+  (2.8ms) INSERT INTO "schema_migrations" (version) VALUES (20160602144324)
93
+  (3.4ms) INSERT INTO "schema_migrations" (version) VALUES
94
+ (20160602144150);
95
+
96
+ 
97
+  (3.9ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
98
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
99
+  (0.0ms) begin transaction
100
+ ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2021-01-16 06:49:23.447793"], ["updated_at", "2021-01-16 06:49:23.447793"]]
101
+  (2.7ms) commit transaction
102
+ ActiveRecord::InternalMetadata Load (0.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
103
+  (0.0ms) begin transaction
104
+ ActiveRecord::InternalMetadata Update (0.1ms) UPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ? [["value", "test"], ["updated_at", "2021-01-16 06:49:23.451712"], ["key", "environment"]]
105
+  (2.7ms) commit transaction