bnb_blazer 0.4.0 → 0.5.0

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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bnb_blazer/version.rb +1 -1
  3. metadata +1 -75
  4. data/.docker-development-vars +0 -1
  5. data/.gitignore +0 -34
  6. data/.rspec +0 -3
  7. data/.ruby-version +0 -1
  8. data/.travis.yml +0 -6
  9. data/Gemfile +0 -54
  10. data/Gemfile.lock +0 -233
  11. data/LICENSE.txt +0 -21
  12. data/README.md +0 -35
  13. data/app/assets/config/manifest.js +0 -3
  14. data/app/assets/images/.keep +0 -0
  15. data/app/assets/images/bnb_intel_logo.png +0 -0
  16. data/app/assets/stylesheets/application.css +0 -83
  17. data/app/channels/application_cable/channel.rb +0 -4
  18. data/app/channels/application_cable/connection.rb +0 -4
  19. data/app/controllers/application_controller.rb +0 -2
  20. data/app/controllers/concerns/.keep +0 -0
  21. data/app/helpers/application_helper.rb +0 -2
  22. data/app/jobs/application_job.rb +0 -2
  23. data/app/mailers/application_mailer.rb +0 -4
  24. data/app/models/application_record.rb +0 -3
  25. data/app/models/concerns/.keep +0 -0
  26. data/app/models/user.rb +0 -2
  27. data/bin/bundle +0 -3
  28. data/bin/console +0 -14
  29. data/bin/rails +0 -9
  30. data/bin/rake +0 -9
  31. data/bin/setup +0 -36
  32. data/bin/spring +0 -17
  33. data/bin/update +0 -31
  34. data/bin/yarn +0 -11
  35. data/bnb_blazer.gemspec +0 -28
  36. data/config.ru +0 -5
  37. data/config/application.rb +0 -19
  38. data/config/blazer.yml +0 -79
  39. data/config/boot.rb +0 -4
  40. data/config/cable.yml +0 -10
  41. data/config/credentials.yml.enc +0 -1
  42. data/config/database.yml +0 -19
  43. data/config/environment.rb +0 -5
  44. data/config/environments/development.rb +0 -61
  45. data/config/environments/production.rb +0 -94
  46. data/config/environments/test.rb +0 -46
  47. data/config/initializers/application_controller_renderer.rb +0 -8
  48. data/config/initializers/assets.rb +0 -14
  49. data/config/initializers/backtrace_silencers.rb +0 -7
  50. data/config/initializers/content_security_policy.rb +0 -25
  51. data/config/initializers/cookies_serializer.rb +0 -5
  52. data/config/initializers/filter_parameter_logging.rb +0 -4
  53. data/config/initializers/inflections.rb +0 -16
  54. data/config/initializers/mime_types.rb +0 -4
  55. data/config/initializers/wrap_parameters.rb +0 -14
  56. data/config/locales/en.yml +0 -33
  57. data/config/puma.rb +0 -37
  58. data/config/routes.rb +0 -3
  59. data/config/spring.rb +0 -6
  60. data/config/storage.yml +0 -34
  61. data/db/migrate/20210309231658_install_blazer.rb +0 -47
  62. data/db/migrate/20210309231908_create_users.rb +0 -13
  63. data/db/schema.rb +0 -85
  64. data/db/seeds.rb +0 -45
  65. data/docker-compose.yml +0 -22
  66. data/lib/tasks/.keep +0 -0
  67. data/log/.keep +0 -0
  68. data/package.json +0 -5
  69. data/public/404.html +0 -67
  70. data/public/422.html +0 -67
  71. data/public/500.html +0 -66
  72. data/public/apple-touch-icon-precomposed.png +0 -0
  73. data/public/apple-touch-icon.png +0 -0
  74. data/public/favicon.ico +0 -0
  75. data/public/robots.txt +0 -1
  76. data/tmp/.keep +0 -0
  77. data/vendor/.keep +0 -0
data/config/spring.rb DELETED
@@ -1,6 +0,0 @@
1
- %w[
2
- .ruby-version
3
- .rbenv-vars
4
- tmp/restart.txt
5
- tmp/caching-dev.txt
6
- ].each { |path| Spring.watch(path) }
data/config/storage.yml DELETED
@@ -1,34 +0,0 @@
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 ]
@@ -1,47 +0,0 @@
1
- class InstallBlazer < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :blazer_queries do |t|
4
- t.references :creator
5
- t.string :name
6
- t.text :description
7
- t.text :statement
8
- t.string :data_source
9
- t.string :status
10
- t.timestamps null: false
11
- end
12
-
13
- create_table :blazer_audits do |t|
14
- t.references :user
15
- t.references :query
16
- t.text :statement
17
- t.string :data_source
18
- t.datetime :created_at
19
- end
20
-
21
- create_table :blazer_dashboards do |t|
22
- t.references :creator
23
- t.string :name
24
- t.timestamps null: false
25
- end
26
-
27
- create_table :blazer_dashboard_queries do |t|
28
- t.references :dashboard
29
- t.references :query
30
- t.integer :position
31
- t.timestamps null: false
32
- end
33
-
34
- create_table :blazer_checks do |t|
35
- t.references :creator
36
- t.references :query
37
- t.string :state
38
- t.string :schedule
39
- t.text :emails
40
- t.text :slack_channels
41
- t.string :check_type
42
- t.text :message
43
- t.datetime :last_run_at
44
- t.timestamps null: false
45
- end
46
- end
47
- end
@@ -1,13 +0,0 @@
1
- class CreateUsers < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :users do |t|
4
- t.string :first_name
5
- t.string :last_name
6
- t.boolean :subscriber
7
- t.date :birthday
8
- t.integer :credit_score
9
- t.string :favorite_color
10
- t.timestamps
11
- end
12
- end
13
- end
data/db/schema.rb DELETED
@@ -1,85 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # Note that this schema.rb definition is the authoritative source for your
6
- # database schema. If you need to create the application database on another
7
- # system, you should be using db:schema:load, not running all the migrations
8
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
- # you'll amass, the slower it'll run and the greater likelihood for issues).
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 2021_03_09_231908) do
14
-
15
- # These are extensions that must be enabled in order to support this database
16
- enable_extension "plpgsql"
17
-
18
- create_table "blazer_audits", force: :cascade do |t|
19
- t.bigint "user_id"
20
- t.bigint "query_id"
21
- t.text "statement"
22
- t.string "data_source"
23
- t.datetime "created_at"
24
- t.index ["query_id"], name: "index_blazer_audits_on_query_id"
25
- t.index ["user_id"], name: "index_blazer_audits_on_user_id"
26
- end
27
-
28
- create_table "blazer_checks", force: :cascade do |t|
29
- t.bigint "creator_id"
30
- t.bigint "query_id"
31
- t.string "state"
32
- t.string "schedule"
33
- t.text "emails"
34
- t.text "slack_channels"
35
- t.string "check_type"
36
- t.text "message"
37
- t.datetime "last_run_at"
38
- t.datetime "created_at", null: false
39
- t.datetime "updated_at", null: false
40
- t.index ["creator_id"], name: "index_blazer_checks_on_creator_id"
41
- t.index ["query_id"], name: "index_blazer_checks_on_query_id"
42
- end
43
-
44
- create_table "blazer_dashboard_queries", force: :cascade do |t|
45
- t.bigint "dashboard_id"
46
- t.bigint "query_id"
47
- t.integer "position"
48
- t.datetime "created_at", null: false
49
- t.datetime "updated_at", null: false
50
- t.index ["dashboard_id"], name: "index_blazer_dashboard_queries_on_dashboard_id"
51
- t.index ["query_id"], name: "index_blazer_dashboard_queries_on_query_id"
52
- end
53
-
54
- create_table "blazer_dashboards", force: :cascade do |t|
55
- t.bigint "creator_id"
56
- t.string "name"
57
- t.datetime "created_at", null: false
58
- t.datetime "updated_at", null: false
59
- t.index ["creator_id"], name: "index_blazer_dashboards_on_creator_id"
60
- end
61
-
62
- create_table "blazer_queries", force: :cascade do |t|
63
- t.bigint "creator_id"
64
- t.string "name"
65
- t.text "description"
66
- t.text "statement"
67
- t.string "data_source"
68
- t.string "status"
69
- t.datetime "created_at", null: false
70
- t.datetime "updated_at", null: false
71
- t.index ["creator_id"], name: "index_blazer_queries_on_creator_id"
72
- end
73
-
74
- create_table "users", force: :cascade do |t|
75
- t.string "first_name"
76
- t.string "last_name"
77
- t.boolean "subscriber"
78
- t.date "birthday"
79
- t.integer "credit_score"
80
- t.string "favorite_color"
81
- t.datetime "created_at", null: false
82
- t.datetime "updated_at", null: false
83
- end
84
-
85
- end
data/db/seeds.rb DELETED
@@ -1,45 +0,0 @@
1
- # Small selection of colors so we can make a nice bar chart in Blazer
2
- user_favorite_colors = ["red", "green", "blue", "purple"]
3
-
4
- (1000 - User.count).times do
5
- User.create!(
6
- first_name: Faker::Name.first_name,
7
- last_name: Faker::Name.last_name,
8
- favorite_color: user_favorite_colors.sample,
9
- credit_score: rand(300..850),
10
- subscriber: [true, false].sample,
11
- birthday: Faker::Date.between(from: 30.years.ago, to: 20.years.ago)
12
- )
13
- end
14
-
15
- [
16
- {
17
- name: "Credit Score Scatter Plot",
18
- statement: "SELECT credit_score, COUNT(*) FROM users GROUP BY 1",
19
- status: "active"
20
- },
21
- {
22
- name: "Favorite Color Pie Chart",
23
- statement: "SELECT favorite_color, COUNT(*) AS pie FROM users GROUP BY 1",
24
- status: "active"
25
- },
26
- {
27
- name: "Subscriber Status Bar Chart",
28
- statement: "SELECT subscriber, COUNT(*) FROM users GROUP BY 1",
29
- status: "active"
30
- },
31
- ].each_with_index do |query_params, i|
32
- q = Blazer::Query.find_or_initialize_by(name: query_params[:name])
33
- q.assign_attributes(query_params)
34
- q.data_source = "main"
35
- q.save(validate: false)
36
- end
37
-
38
- dashboard = Blazer::Dashboard.find_or_create_by(name: "Dashboard Demo")
39
- [
40
- "Credit Score Scatter Plot",
41
- "Favorite Color Pie Chart",
42
- "Subscriber Status Bar Chart",
43
- ].each_with_index do |query_name, i|
44
- dashboard.dashboard_queries.create!(query_id: Blazer::Query.find_by(name: query_name).id, position: i)
45
- end
data/docker-compose.yml DELETED
@@ -1,22 +0,0 @@
1
- version: "3"
2
- services:
3
- app:
4
- image: brandnewbox/bnb-ruby:2.6-postgresql
5
- command: bundle exec puma -C config/puma.rb
6
- env_file: .docker-development-vars
7
- volumes:
8
- - .:/app:cached
9
- - bundle_cache:/usr/local/bundle
10
- ports:
11
- - "3000:3000"
12
- postgresql:
13
- image: postgres:11-alpine
14
- volumes:
15
- - my_dbdata:/var/lib/postgresql/data
16
- environment:
17
- - POSTGRES_HOST_AUTH_METHOD=trust
18
- ports:
19
- - "5432:5432"
20
- volumes:
21
- bundle_cache:
22
- my_dbdata:
data/lib/tasks/.keep DELETED
File without changes
data/log/.keep DELETED
File without changes
data/package.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "name": "bnb_blazer",
3
- "private": true,
4
- "dependencies": {}
5
- }
data/public/404.html DELETED
@@ -1,67 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <style>
7
- .rails-default-error-page {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- .rails-default-error-page div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- .rails-default-error-page div.dialog > div {
22
- border: 1px solid #CCC;
23
- border-right-color: #999;
24
- border-left-color: #999;
25
- border-bottom-color: #BBB;
26
- border-top: #B00100 solid 4px;
27
- border-top-left-radius: 9px;
28
- border-top-right-radius: 9px;
29
- background-color: white;
30
- padding: 7px 12% 0;
31
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
- }
33
-
34
- .rails-default-error-page h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- .rails-default-error-page div.dialog > p {
41
- margin: 0 0 1em;
42
- padding: 1em;
43
- background-color: #F7F7F7;
44
- border: 1px solid #CCC;
45
- border-right-color: #999;
46
- border-left-color: #999;
47
- border-bottom-color: #999;
48
- border-bottom-left-radius: 4px;
49
- border-bottom-right-radius: 4px;
50
- border-top-color: #DADADA;
51
- color: #666;
52
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
- }
54
- </style>
55
- </head>
56
-
57
- <body class="rails-default-error-page">
58
- <!-- This file lives in public/404.html -->
59
- <div class="dialog">
60
- <div>
61
- <h1>The page you were looking for doesn't exist.</h1>
62
- <p>You may have mistyped the address or the page may have moved.</p>
63
- </div>
64
- <p>If you are the application owner check the logs for more information.</p>
65
- </div>
66
- </body>
67
- </html>
data/public/422.html DELETED
@@ -1,67 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <style>
7
- .rails-default-error-page {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- .rails-default-error-page div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- .rails-default-error-page div.dialog > div {
22
- border: 1px solid #CCC;
23
- border-right-color: #999;
24
- border-left-color: #999;
25
- border-bottom-color: #BBB;
26
- border-top: #B00100 solid 4px;
27
- border-top-left-radius: 9px;
28
- border-top-right-radius: 9px;
29
- background-color: white;
30
- padding: 7px 12% 0;
31
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
- }
33
-
34
- .rails-default-error-page h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- .rails-default-error-page div.dialog > p {
41
- margin: 0 0 1em;
42
- padding: 1em;
43
- background-color: #F7F7F7;
44
- border: 1px solid #CCC;
45
- border-right-color: #999;
46
- border-left-color: #999;
47
- border-bottom-color: #999;
48
- border-bottom-left-radius: 4px;
49
- border-bottom-right-radius: 4px;
50
- border-top-color: #DADADA;
51
- color: #666;
52
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
- }
54
- </style>
55
- </head>
56
-
57
- <body class="rails-default-error-page">
58
- <!-- This file lives in public/422.html -->
59
- <div class="dialog">
60
- <div>
61
- <h1>The change you wanted was rejected.</h1>
62
- <p>Maybe you tried to change something you didn't have access to.</p>
63
- </div>
64
- <p>If you are the application owner check the logs for more information.</p>
65
- </div>
66
- </body>
67
- </html>
data/public/500.html DELETED
@@ -1,66 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <style>
7
- .rails-default-error-page {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- .rails-default-error-page div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- .rails-default-error-page div.dialog > div {
22
- border: 1px solid #CCC;
23
- border-right-color: #999;
24
- border-left-color: #999;
25
- border-bottom-color: #BBB;
26
- border-top: #B00100 solid 4px;
27
- border-top-left-radius: 9px;
28
- border-top-right-radius: 9px;
29
- background-color: white;
30
- padding: 7px 12% 0;
31
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
- }
33
-
34
- .rails-default-error-page h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- .rails-default-error-page div.dialog > p {
41
- margin: 0 0 1em;
42
- padding: 1em;
43
- background-color: #F7F7F7;
44
- border: 1px solid #CCC;
45
- border-right-color: #999;
46
- border-left-color: #999;
47
- border-bottom-color: #999;
48
- border-bottom-left-radius: 4px;
49
- border-bottom-right-radius: 4px;
50
- border-top-color: #DADADA;
51
- color: #666;
52
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
- }
54
- </style>
55
- </head>
56
-
57
- <body class="rails-default-error-page">
58
- <!-- This file lives in public/500.html -->
59
- <div class="dialog">
60
- <div>
61
- <h1>We're sorry, but something went wrong.</h1>
62
- </div>
63
- <p>If you are the application owner check the logs for more information.</p>
64
- </div>
65
- </body>
66
- </html>