Skip to content

Commit 94fc1d3

Browse files
committed
remove database
1 parent 2605b50 commit 94fc1d3

File tree

52 files changed

+9
-668
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+9
-668
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
/log/*
1212
/tmp/*
1313

14-
db/*.sqlite3
15-
db/*.sqlite3-wal
16-
db/*.sqlite3-shm
17-
1814
.byebug_history
1915
.DS_Store
2016
/public/packs

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ gem "puma"
88
gem "puma-rufus-scheduler"
99
gem "rails", "~> 8"
1010
gem "rufus-scheduler"
11-
gem "sqlite3"
1211
gem "tenkit", git: "https://github.com/joelhawksley/tenkit", branch: "add-alerts"
1312
gem "time_difference"
1413

Gemfile.lock

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,6 @@ GEM
240240
simplecov_json_formatter (~> 0.1)
241241
simplecov-html (0.13.1)
242242
simplecov_json_formatter (0.1.4)
243-
solid_queue (1.1.0)
244-
activejob (>= 7.1)
245-
activerecord (>= 7.1)
246-
concurrent-ruby (>= 1.3.1)
247-
fugit (~> 1.11.0)
248-
railties (>= 7.1)
249-
thor (~> 1.3.1)
250-
sqlite3 (2.4.1)
251-
mini_portile2 (~> 2.8.0)
252243
standard (1.43.0)
253244
language_server-protocol (~> 3.17.0.2)
254245
lint_roller (~> 1.0)
@@ -297,8 +288,6 @@ DEPENDENCIES
297288
rails (~> 8)
298289
rufus-scheduler
299290
simplecov
300-
solid_queue (~> 1.1)
301-
sqlite3
302291
standard
303292
tenkit!
304293
time_difference

app/apis/weather_kit_api.rb

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class WeatherKitApi < Api
22
def fetch
3+
# :nocov:
34
client = Tenkit::Client.new
45
local_config = Timeframe::Application.config.local
56
hash = client.weather(
@@ -14,18 +15,11 @@ def fetch
1415
]
1516
).raw
1617

17-
# :nocov:
1818
# Do not update unless response is well formed
1919
return unless hash.key?("currentWeather")
2020

2121
save_response(hash)
2222
# :nocov:
23-
rescue => e
24-
Log.create(
25-
globalid: "WeatherKit",
26-
event: "call_error",
27-
message: e.message + e.backtrace.join("\n")
28-
)
2923
end
3024

3125
def current_temperature
@@ -155,11 +149,7 @@ def icon_for(condition_code)
155149
if icon_mappings[condition_code]
156150
icon_mappings[condition_code]
157151
else
158-
Log.create(
159-
globalid: "WeatherKit",
160-
event: "icon_for could not find mapping",
161-
message: "condition code: #{condition_code}"
162-
)
152+
Rails.logger.info("Unknown condition code: #{condition_code}")
163153

164154
"question"
165155
end

app/models/application_record.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/models/log.rb

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/views/home/index.html.erb

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1 @@
1-
<style>td { padding: 0 .5rem; }</style>
2-
<table style="width: 100%; border-collapse:collapse;" border="1">
3-
<thead>
4-
<th>id</th>
5-
<th>timestamp</th>
6-
<th>source</th>
7-
<th>event</th>
8-
<th>message</th>
9-
</thead>
10-
<tbody>
11-
<% Log.all.order(created_at: :desc).first(500).each do |log| %>
12-
<tr>
13-
<td><%= log.id %></td>
14-
<td style="white-space: nowrap;"><%= log.created_at.in_time_zone(Timeframe::Application.config.local["timezone"]).strftime('%a %b %e %I:%M:%S %p') %></td>
15-
<td><%= log.globalid %></td>
16-
<td style="white-space: nowrap;"><%= log.event %></td>
17-
<td>
18-
<details>
19-
<summary><%= log.message.lines.first %></summary>
20-
<%= log.message.lines[1..-1].join.html_safe %>
21-
</details>
22-
</td>
23-
</tr>
24-
<% end %>
25-
</tbody>
26-
</table>
1+
<h1>This is timeframe</h1>

bin/jobs

Lines changed: 0 additions & 6 deletions
This file was deleted.

config/application.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
require "rails"
66
require "active_model/railtie"
77
require "active_job/railtie"
8-
require "active_record/railtie"
98
require "action_controller/railtie"
109
require "action_view/railtie"
1110

config/database.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

config/environments/development.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,9 @@
1414
# Show full error reports.
1515
config.consider_all_requests_local = true
1616

17-
config.active_job.queue_adapter = :solid_queue
18-
1917
# Print deprecation notices to the Rails logger.
2018
config.active_support.deprecation = :log
2119

22-
# Raise an error on page load if there are pending migrations.
23-
config.active_record.migration_error = :page_load
24-
2520
# Use an evented file watcher to asynchronously detect changes in source code,
2621
# routes, locales, etc. This feature depends on the listen gem.
2722
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker

config/environments/production.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
# Prepend all log lines with the following tags.
4040
config.log_tags = [:request_id]
4141

42-
config.active_job.queue_adapter = :solid_queue
43-
4442
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
4543
# the I18n.default_locale when a translation cannot be found).
4644
config.i18n.fallbacks = true
@@ -60,7 +58,4 @@
6058
logger.formatter = config.log_formatter
6159
config.logger = ActiveSupport::TaggedLogging.new(logger)
6260
end
63-
64-
# Do not dump schema after migrations.
65-
config.active_record.dump_schema_after_migration = false
6661
end

config/puma.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@
1919

2020
# Allow puma to be restarted by `rails restart` command.
2121
plugin :tmp_restart
22-
plugin :solid_queue
2322
plugin :"rufus-scheduler"

db/migrate/20170722021936_devise_create_users.rb

Lines changed: 0 additions & 30 deletions
This file was deleted.

db/migrate/20170722024840_add_location_to_users.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

db/migrate/20170722030544_add_weather_to_users.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

db/migrate/20170728004846_add_google_authorization_to_users.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

db/migrate/20170728005423_add_calendar_events_to_user.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

db/migrate/20170924150316_add_token_to_user.rb

Lines changed: 0 additions & 8 deletions
This file was deleted.

db/migrate/20171220202726_create_devices.rb

Lines changed: 0 additions & 14 deletions
This file was deleted.

db/migrate/20180110030946_add_errors_to_user.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

db/migrate/20180326150105_add_status_to_devices.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

db/migrate/20180819223231_add_air_to_users.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

db/migrate/20181030010817_add_ski_report_to_users.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

db/migrate/20190113225115_drop_ski_reports.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

db/migrate/20190121222623_add_lat_long_to_users.rb

Lines changed: 0 additions & 8 deletions
This file was deleted.

db/migrate/20201127211425_create_google_accounts.rb

Lines changed: 0 additions & 12 deletions
This file was deleted.

db/migrate/20201127215303_create_google_calendars.rb

Lines changed: 0 additions & 12 deletions
This file was deleted.

db/migrate/20201130001259_token_refresh_token.rb

Lines changed: 0 additions & 9 deletions
This file was deleted.

db/migrate/20201130003353_remove_google_authorization.rb

Lines changed: 0 additions & 8 deletions
This file was deleted.

db/migrate/20201203135158_add_letter_to_google_calendars.rb

Lines changed: 0 additions & 8 deletions
This file was deleted.

db/migrate/20210509142303_updates.rb

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)