Skip to content

Commit

Permalink
cp
Browse files Browse the repository at this point in the history
  • Loading branch information
rromanchuk committed Dec 31, 2023
1 parent 8c93096 commit 62c9bd3
Show file tree
Hide file tree
Showing 9 changed files with 210 additions and 199 deletions.
69 changes: 33 additions & 36 deletions personal/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ GIT
GEM
remote: https://rubygems.org/
specs:
action_policy (0.6.5)
action_policy (0.6.7)
ruby-next-core (>= 0.14.0)
actioncable (7.1.2)
actionpack (= 7.1.2)
Expand Down Expand Up @@ -112,27 +112,27 @@ GEM
auto_strip_attributes (2.6.0)
activerecord (>= 4.0)
awesome_print (1.9.2)
aws-eventstream (1.2.0)
aws-partitions (1.771.0)
aws-sdk-cognitoidentityprovider (1.73.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-eventstream (1.3.0)
aws-partitions (1.876.0)
aws-sdk-cognitoidentityprovider (1.85.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sdk-core (3.173.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-sdk-core (3.190.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.64.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (1.75.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.122.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-s3 (1.142.0)
aws-sdk-core (~> 3, >= 3.189.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sdk-textract (1.45.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.8)
aws-sdk-textract (1.55.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.5.2)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
backport (1.2.0)
base64 (0.2.0)
Expand All @@ -158,15 +158,14 @@ GEM
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
crass (1.0.6)
cssbundling-rails (1.1.2)
cssbundling-rails (1.3.3)
railties (>= 6.0.0)
date (3.3.4)
debug (1.9.1)
irb (~> 1.10)
reline (>= 0.3.8)
diff-lcs (1.5.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
domain_name (0.6.20231109)
down (5.4.1)
addressable (~> 2.8)
drb (2.2.0)
Expand All @@ -175,13 +174,14 @@ GEM
erubi (1.12.0)
et-orbi (1.2.7)
tzinfo
faraday (2.7.5)
faraday (2.8.1)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-net_http (3.0.2)
ffi (1.15.5)
ffi (1.16.3)
friendly_id (5.5.1)
activerecord (>= 4.0.0)
fugit (1.9.0)
Expand Down Expand Up @@ -220,7 +220,7 @@ GEM
activesupport (>= 5.0.0)
jmespath (1.6.2)
json (2.7.1)
json-jwt (1.16.3)
json-jwt (1.16.4)
activesupport (>= 4.2)
aes_key_wrap
bindata
Expand Down Expand Up @@ -251,14 +251,14 @@ GEM
activerecord (>= 5.2)
matrix (0.4.2)
method_source (1.0.0)
mime-types (3.4.1)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mime-types-data (3.2023.1205)
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.20.0)
mocha (2.0.2)
mocha (2.1.0)
ruby2_keywords (>= 0.0.5)
msgpack (1.7.2)
multi_xml (0.6.0)
Expand Down Expand Up @@ -355,8 +355,8 @@ GEM
rbs (2.8.4)
rdoc (6.6.2)
psych (>= 4.0.0)
redis (5.0.6)
redis-client (>= 0.9.0)
redis (5.0.8)
redis-client (>= 0.17.0)
redis-client (0.19.1)
connection_pool
regexp_parser (2.8.3)
Expand All @@ -372,7 +372,7 @@ GEM
reverse_markdown (2.1.1)
nokogiri
rexml (3.2.6)
rgeo (3.0.0)
rgeo (3.0.1)
rgeo-activerecord (7.0.1)
activerecord (>= 5.0)
rgeo (>= 1.0.0)
Expand All @@ -394,9 +394,9 @@ GEM
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-next-core (0.15.3)
ruby-next-core (1.0.0)
ruby-progressbar (1.13.0)
ruby-vips (2.1.4)
ruby-vips (2.2.0)
ffi (~> 1.12)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
Expand Down Expand Up @@ -459,17 +459,14 @@ GEM
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.5.0)
uniform_notifier (1.16.0)
version_gem (1.1.2)
view_component (3.0.0)
version_gem (1.1.3)
view_component (3.8.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
web-console (4.2.0)
web-console (4.2.1)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
Expand Down
14 changes: 8 additions & 6 deletions personal/app/controllers/tds/pireps_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class PirepsController < ApplicationController
let(:dr_pagy)
let(:pirep) { Pirep.find(params[:id]) }
let(:pireps) do
relation = apply_filter.recent(:observation_time)
relation = apply_filter
@dr_pagy, records = pagy_countless(relation, items: 50)
records
end
Expand Down Expand Up @@ -51,7 +51,8 @@ def destroy

private

def apply_filter(relation = Pirep.all)
def apply_filter
relation = Pirep.recent(:observation_time)
#relation = relation.near(params[:location], 100) if params[:location].present?
#relation = relation.search(params[:q]) if params[:q].present?

Expand All @@ -63,14 +64,15 @@ def apply_filter(relation = Pirep.all)
case params[:filter]
when 'uua'
add_breadcrumb('Urgent')
relation.uua
relation = relation.uua
when 'ua'
add_breadcrumb('Routine')
relation.ua
relation = relation.ua
else
add_breadcrumb('All')
relation
end.includes(:batch)
end

relation.includes(:batch)
end

# Only allow a list of trusted parameters through.
Expand Down
1 change: 0 additions & 1 deletion personal/app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<meta name="color-scheme" content="dark light" />
<meta name="apple-itunes-app" content="app-id=1109640290, app-argument=https://getspar.com/pid/personal">
<meta content="ua0bOK-G5Ddcx6e_Dz-Sl6J3lym5fRFPd3m5Z1ljLGU" name="google-site-verification" />


Expand Down
2 changes: 1 addition & 1 deletion personal/app/views/tds/pireps/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>
<%= turbo_frame_tag :pireps do %>
<div class="card-body">
<%= render partial: 'tds/pireps/pirep', collection: pireps, cached: true %>
<%= render pireps %>
</div>
<div class="card-footer text-muted">
<%== pagy_bootstrap_nav(dr_pagy, link_extra: "data-turbo-action='advance'") %>
Expand Down
52 changes: 26 additions & 26 deletions personal/config/anycable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,33 @@
#
# Read more about AnyCable configuration here: https://docs.anycable.io/ruby/configuration
#
default: &default
# Turn on/off access logs ("Started..." and "Finished...")
access_logs_disabled: false
# Persist "dirty" session between RPC calls (might be required for apps using stimulus_reflex <3.0)
# persistent_session_enabled: true
# This is the host and the port to run AnyCable RPC server on.
# You must configure your WebSocket server to connect to it, e.g.:
# $ anycable-go --rpc-host="<rpc hostname>:50051"
rpc_host: "127.0.0.1:50051"
# Whether to enable gRPC level logging or not
log_grpc: false
# Use Redis to broadcast messages to AnyCable server
broadcast_adapter: redis
# Use the same channel name for WebSocket server, e.g.:
# $ anycable-go --redis_channel="__anycable__"
redis_channel: "__anycable__"
# You can use REDIS_URL env var to configure Redis URL.
# Localhost is used by default.
# redis_url: "redis://localhost:6379/1"
jwt_id_key: "<%= Credentials[:jwt_id_key] %>"
# default: &default
# # Turn on/off access logs ("Started..." and "Finished...")
# access_logs_disabled: false
# # Persist "dirty" session between RPC calls (might be required for apps using stimulus_reflex <3.0)
# # persistent_session_enabled: true
# # This is the host and the port to run AnyCable RPC server on.
# # You must configure your WebSocket server to connect to it, e.g.:
# # $ anycable-go --rpc-host="<rpc hostname>:50051"
# rpc_host: "127.0.0.1:50051"
# # Whether to enable gRPC level logging or not
# log_grpc: false
# # Use Redis to broadcast messages to AnyCable server
# broadcast_adapter: redis
# # Use the same channel name for WebSocket server, e.g.:
# # $ anycable-go --redis_channel="__anycable__"
# redis_channel: "__anycable__"
# # You can use REDIS_URL env var to configure Redis URL.
# # Localhost is used by default.
# # redis_url: "redis://localhost:6379/1"
# jwt_id_key: "<%= Credentials[:jwt_id_key] %>"


development:
<<: *default
# development:
# <<: *default

test:
<<: *default
# test:
# <<: *default

production:
<<: *default
# production:
# <<: *default
12 changes: 6 additions & 6 deletions personal/config/cable.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Make it possible to switch adapters by passing the ACTION_CABLE_ADAPTER env variable.
# For example, you can use it fallback to the standard Action Cable in staging/review
# environments (by setting `ACTION_CABLE_ADAPTER=redis`).
development:
adapter: <%= ENV.fetch("ACTION_CABLE_ADAPTER", "any_cable") %>
# development:
# adapter: <%= ENV.fetch("ACTION_CABLE_ADAPTER", "any_cable") %>

test:
adapter: test
# test:
# adapter: test

production:
adapter: <%= ENV.fetch("ACTION_CABLE_ADAPTER", "any_cable") %>
# production:
# adapter: <%= ENV.fetch("ACTION_CABLE_ADAPTER", "any_cable") %>
2 changes: 1 addition & 1 deletion personal/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
config.hosts << 'www.personal.test'
config.hosts << 'romanchukopen.test'
config.hosts << 'www.romanchukopen.test'
config.action_cable.allowed_request_origins = /(\.test$)|^localhost$/
# config.action_cable.allowed_request_origins = /(\.test$)|^localhost$/
# In the development environment your application's code is reloaded any time
# it changes. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
Expand Down
10 changes: 5 additions & 5 deletions personal/config/importmap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
pin_all_from 'app/javascript/initialize', under: 'initialize'
pin_all_from 'app/javascript/aws', under: 'aws'

pin 'firebase/app', to: 'https://www.gstatic.com/firebasejs/9.21.0/firebase-app.js', preload: true
pin 'firebase/installations', to: 'https://www.gstatic.com/firebasejs/9.21.0/firebase-installations.js'
pin 'firebase/messaging', to: 'https://www.gstatic.com/firebasejs/9.21.0/firebase-messaging.js'
pin 'firebase/app', to: 'https://www.gstatic.com/firebasejs/10.6.0/firebase-app.js', preload: true
pin 'firebase/installations', to: 'https://www.gstatic.com/firebasejs/10.6.0/firebase-installations.js'
pin 'firebase/messaging', to: 'https://www.gstatic.com/firebasejs/10.6.0/firebase-messaging.js'
# pin "firebase/auth", to: "https://www.gstatic.com/firebasejs/9.9.3/firebase-auth.js"
pin 'firebase/analytics', to: 'https://www.gstatic.com/firebasejs/9.21.0/firebase-analytics.js'
pin 'firebase/messaging/sw', to: 'https://www.gstatic.com/firebasejs/9.21.0/firebase-messaging-sw.js'
pin 'firebase/analytics', to: 'https://www.gstatic.com/firebasejs/10.6.0/firebase-analytics.js'
pin 'firebase/messaging/sw', to: 'https://www.gstatic.com/firebasejs/10.6.0/firebase-messaging-sw.js'

pin '@fortawesome/free-brands-svg-icons', to: '@fortawesome--free-brands-svg-icons.js', preload: true # @6.1.2
pin '@fortawesome/fontawesome-svg-core', to: '@fortawesome--fontawesome-svg-core.js', preload: true # @6.1.2
Expand Down
Loading

0 comments on commit 62c9bd3

Please sign in to comment.