mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Update gems and ruby version
This commit is contained in:
parent
d72430b5be
commit
0038f72155
16 changed files with 170 additions and 133 deletions
|
|
@ -1 +1 @@
|
||||||
3.2.3
|
3.3.5
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
## [0.13.0] — 2024-09-03
|
## [0.13.0] — 2024-09-03
|
||||||
|
|
||||||
|
The GPX and GeoJSON export release
|
||||||
|
|
||||||
⚠️ BREAKING CHANGES: ⚠️
|
⚠️ BREAKING CHANGES: ⚠️
|
||||||
|
|
||||||
Default exporting format is now GeoJSON instead of Owntracks-like JSON. This will allow you to use the exported data in other applications that support GeoJSON format. It's also important to highlight, that GeoJSON format does not describe a way to store any time-related data. Dawarich relies on the `timestamp` field in the GeoJSON format to determine the time of the point. The value of the `timestamp` field should be a Unix timestamp in seconds. If you import GeoJSON data that does not have a `timestamp` field, the point will not be imported.
|
Default exporting format is now GeoJSON instead of Owntracks-like JSON. This will allow you to use the exported data in other applications that support GeoJSON format. It's also important to highlight, that GeoJSON format does not describe a way to store any time-related data. Dawarich relies on the `timestamp` field in the GeoJSON format to determine the time of the point. The value of the `timestamp` field should be a Unix timestamp in seconds. If you import GeoJSON data that does not have a `timestamp` field, the point will not be imported.
|
||||||
|
|
|
||||||
4
Gemfile
4
Gemfile
|
|
@ -3,7 +3,8 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
||||||
|
|
||||||
ruby '3.2.3'
|
ruby File.read('.ruby-version').strip
|
||||||
|
|
||||||
gem 'bootsnap', require: false
|
gem 'bootsnap', require: false
|
||||||
gem 'chartkick'
|
gem 'chartkick'
|
||||||
gem 'data_migrate'
|
gem 'data_migrate'
|
||||||
|
|
@ -46,6 +47,7 @@ group :test do
|
||||||
gem 'shoulda-matchers'
|
gem 'shoulda-matchers'
|
||||||
gem 'simplecov', require: false
|
gem 'simplecov', require: false
|
||||||
gem 'super_diff'
|
gem 'super_diff'
|
||||||
|
gem 'timecop'
|
||||||
gem 'webmock'
|
gem 'webmock'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
192
Gemfile.lock
192
Gemfile.lock
|
|
@ -1,80 +1,76 @@
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (7.1.3.4)
|
actioncable (7.2.1)
|
||||||
actionpack (= 7.1.3.4)
|
actionpack (= 7.2.1)
|
||||||
activesupport (= 7.1.3.4)
|
activesupport (= 7.2.1)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
actionmailbox (7.1.3.4)
|
actionmailbox (7.2.1)
|
||||||
actionpack (= 7.1.3.4)
|
actionpack (= 7.2.1)
|
||||||
activejob (= 7.1.3.4)
|
activejob (= 7.2.1)
|
||||||
activerecord (= 7.1.3.4)
|
activerecord (= 7.2.1)
|
||||||
activestorage (= 7.1.3.4)
|
activestorage (= 7.2.1)
|
||||||
activesupport (= 7.1.3.4)
|
activesupport (= 7.2.1)
|
||||||
mail (>= 2.7.1)
|
mail (>= 2.8.0)
|
||||||
net-imap
|
actionmailer (7.2.1)
|
||||||
net-pop
|
actionpack (= 7.2.1)
|
||||||
net-smtp
|
actionview (= 7.2.1)
|
||||||
actionmailer (7.1.3.4)
|
activejob (= 7.2.1)
|
||||||
actionpack (= 7.1.3.4)
|
activesupport (= 7.2.1)
|
||||||
actionview (= 7.1.3.4)
|
mail (>= 2.8.0)
|
||||||
activejob (= 7.1.3.4)
|
|
||||||
activesupport (= 7.1.3.4)
|
|
||||||
mail (~> 2.5, >= 2.5.4)
|
|
||||||
net-imap
|
|
||||||
net-pop
|
|
||||||
net-smtp
|
|
||||||
rails-dom-testing (~> 2.2)
|
rails-dom-testing (~> 2.2)
|
||||||
actionpack (7.1.3.4)
|
actionpack (7.2.1)
|
||||||
actionview (= 7.1.3.4)
|
actionview (= 7.2.1)
|
||||||
activesupport (= 7.1.3.4)
|
activesupport (= 7.2.1)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
racc
|
racc
|
||||||
rack (>= 2.2.4)
|
rack (>= 2.2.4, < 3.2)
|
||||||
rack-session (>= 1.0.1)
|
rack-session (>= 1.0.1)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.2)
|
rails-dom-testing (~> 2.2)
|
||||||
rails-html-sanitizer (~> 1.6)
|
rails-html-sanitizer (~> 1.6)
|
||||||
actiontext (7.1.3.4)
|
useragent (~> 0.16)
|
||||||
actionpack (= 7.1.3.4)
|
actiontext (7.2.1)
|
||||||
activerecord (= 7.1.3.4)
|
actionpack (= 7.2.1)
|
||||||
activestorage (= 7.1.3.4)
|
activerecord (= 7.2.1)
|
||||||
activesupport (= 7.1.3.4)
|
activestorage (= 7.2.1)
|
||||||
|
activesupport (= 7.2.1)
|
||||||
globalid (>= 0.6.0)
|
globalid (>= 0.6.0)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (7.1.3.4)
|
actionview (7.2.1)
|
||||||
activesupport (= 7.1.3.4)
|
activesupport (= 7.2.1)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.11)
|
erubi (~> 1.11)
|
||||||
rails-dom-testing (~> 2.2)
|
rails-dom-testing (~> 2.2)
|
||||||
rails-html-sanitizer (~> 1.6)
|
rails-html-sanitizer (~> 1.6)
|
||||||
activejob (7.1.3.4)
|
activejob (7.2.1)
|
||||||
activesupport (= 7.1.3.4)
|
activesupport (= 7.2.1)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (7.1.3.4)
|
activemodel (7.2.1)
|
||||||
activesupport (= 7.1.3.4)
|
activesupport (= 7.2.1)
|
||||||
activerecord (7.1.3.4)
|
activerecord (7.2.1)
|
||||||
activemodel (= 7.1.3.4)
|
activemodel (= 7.2.1)
|
||||||
activesupport (= 7.1.3.4)
|
activesupport (= 7.2.1)
|
||||||
timeout (>= 0.4.0)
|
timeout (>= 0.4.0)
|
||||||
activestorage (7.1.3.4)
|
activestorage (7.2.1)
|
||||||
actionpack (= 7.1.3.4)
|
actionpack (= 7.2.1)
|
||||||
activejob (= 7.1.3.4)
|
activejob (= 7.2.1)
|
||||||
activerecord (= 7.1.3.4)
|
activerecord (= 7.2.1)
|
||||||
activesupport (= 7.1.3.4)
|
activesupport (= 7.2.1)
|
||||||
marcel (~> 1.0)
|
marcel (~> 1.0)
|
||||||
activesupport (7.1.3.4)
|
activesupport (7.2.1)
|
||||||
base64
|
base64
|
||||||
bigdecimal
|
bigdecimal
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
||||||
connection_pool (>= 2.2.5)
|
connection_pool (>= 2.2.5)
|
||||||
drb
|
drb
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
|
logger (>= 1.4.2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
mutex_m
|
securerandom (>= 0.3)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0, >= 2.0.5)
|
||||||
addressable (2.8.7)
|
addressable (2.8.7)
|
||||||
public_suffix (>= 2.0.2, < 7.0)
|
public_suffix (>= 2.0.2, < 7.0)
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
|
|
@ -96,7 +92,7 @@ GEM
|
||||||
rexml
|
rexml
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
csv (3.3.0)
|
csv (3.3.0)
|
||||||
data_migrate (9.4.2)
|
data_migrate (11.0.0)
|
||||||
activerecord (>= 6.1)
|
activerecord (>= 6.1)
|
||||||
railties (>= 6.1)
|
railties (>= 6.1)
|
||||||
date (3.3.4)
|
date (3.3.4)
|
||||||
|
|
@ -110,7 +106,7 @@ GEM
|
||||||
responders
|
responders
|
||||||
warden (~> 1.2.3)
|
warden (~> 1.2.3)
|
||||||
diff-lcs (1.5.1)
|
diff-lcs (1.5.1)
|
||||||
docile (1.4.0)
|
docile (1.4.1)
|
||||||
dotenv (3.1.2)
|
dotenv (3.1.2)
|
||||||
dotenv-rails (3.1.2)
|
dotenv-rails (3.1.2)
|
||||||
dotenv (= 3.1.2)
|
dotenv (= 3.1.2)
|
||||||
|
|
@ -129,18 +125,18 @@ GEM
|
||||||
fakeredis (0.1.4)
|
fakeredis (0.1.4)
|
||||||
ffaker (2.23.0)
|
ffaker (2.23.0)
|
||||||
foreman (0.88.1)
|
foreman (0.88.1)
|
||||||
fugit (1.10.1)
|
fugit (1.11.1)
|
||||||
et-orbi (~> 1, >= 1.2.7)
|
et-orbi (~> 1, >= 1.2.11)
|
||||||
raabro (~> 1.4)
|
raabro (~> 1.4)
|
||||||
geocoder (1.8.3)
|
geocoder (1.8.3)
|
||||||
base64 (>= 0.1.0)
|
base64 (>= 0.1.0)
|
||||||
csv (>= 3.0.0)
|
csv (>= 3.0.0)
|
||||||
globalid (1.2.1)
|
globalid (1.2.1)
|
||||||
activesupport (>= 6.1)
|
activesupport (>= 6.1)
|
||||||
gpx (1.1.1)
|
gpx (1.2.0)
|
||||||
nokogiri (~> 1.7)
|
nokogiri (~> 1.7)
|
||||||
rake
|
rake
|
||||||
hashdiff (1.1.0)
|
hashdiff (1.1.1)
|
||||||
httparty (0.22.0)
|
httparty (0.22.0)
|
||||||
csv
|
csv
|
||||||
mini_mime (>= 1.0.0)
|
mini_mime (>= 1.0.0)
|
||||||
|
|
@ -171,7 +167,7 @@ GEM
|
||||||
kaminari-core (= 1.2.2)
|
kaminari-core (= 1.2.2)
|
||||||
kaminari-core (1.2.2)
|
kaminari-core (1.2.2)
|
||||||
language_server-protocol (3.17.0.3)
|
language_server-protocol (3.17.0.3)
|
||||||
logger (1.6.0)
|
logger (1.6.1)
|
||||||
lograge (0.14.0)
|
lograge (0.14.0)
|
||||||
actionpack (>= 4)
|
actionpack (>= 4)
|
||||||
activesupport (>= 4)
|
activesupport (>= 4)
|
||||||
|
|
@ -192,8 +188,7 @@ GEM
|
||||||
msgpack (1.7.2)
|
msgpack (1.7.2)
|
||||||
multi_xml (0.7.1)
|
multi_xml (0.7.1)
|
||||||
bigdecimal (~> 3.1)
|
bigdecimal (~> 3.1)
|
||||||
mutex_m (0.2.0)
|
net-imap (0.4.16)
|
||||||
net-imap (0.4.12)
|
|
||||||
date
|
date
|
||||||
net-protocol
|
net-protocol
|
||||||
net-pop (0.1.2)
|
net-pop (0.1.2)
|
||||||
|
|
@ -221,8 +216,8 @@ GEM
|
||||||
optimist (3.1.0)
|
optimist (3.1.0)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
ostruct (0.6.0)
|
ostruct (0.6.0)
|
||||||
parallel (1.25.1)
|
parallel (1.26.3)
|
||||||
parser (3.3.3.0)
|
parser (3.3.5.0)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
racc
|
racc
|
||||||
patience_diff (1.2.0)
|
patience_diff (1.2.0)
|
||||||
|
|
@ -253,20 +248,20 @@ GEM
|
||||||
rackup (2.1.0)
|
rackup (2.1.0)
|
||||||
rack (>= 3)
|
rack (>= 3)
|
||||||
webrick (~> 1.8)
|
webrick (~> 1.8)
|
||||||
rails (7.1.3.4)
|
rails (7.2.1)
|
||||||
actioncable (= 7.1.3.4)
|
actioncable (= 7.2.1)
|
||||||
actionmailbox (= 7.1.3.4)
|
actionmailbox (= 7.2.1)
|
||||||
actionmailer (= 7.1.3.4)
|
actionmailer (= 7.2.1)
|
||||||
actionpack (= 7.1.3.4)
|
actionpack (= 7.2.1)
|
||||||
actiontext (= 7.1.3.4)
|
actiontext (= 7.2.1)
|
||||||
actionview (= 7.1.3.4)
|
actionview (= 7.2.1)
|
||||||
activejob (= 7.1.3.4)
|
activejob (= 7.2.1)
|
||||||
activemodel (= 7.1.3.4)
|
activemodel (= 7.2.1)
|
||||||
activerecord (= 7.1.3.4)
|
activerecord (= 7.2.1)
|
||||||
activestorage (= 7.1.3.4)
|
activestorage (= 7.2.1)
|
||||||
activesupport (= 7.1.3.4)
|
activesupport (= 7.2.1)
|
||||||
bundler (>= 1.15.0)
|
bundler (>= 1.15.0)
|
||||||
railties (= 7.1.3.4)
|
railties (= 7.2.1)
|
||||||
rails-dom-testing (2.2.0)
|
rails-dom-testing (2.2.0)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
minitest
|
minitest
|
||||||
|
|
@ -274,10 +269,10 @@ GEM
|
||||||
rails-html-sanitizer (1.6.0)
|
rails-html-sanitizer (1.6.0)
|
||||||
loofah (~> 2.21)
|
loofah (~> 2.21)
|
||||||
nokogiri (~> 1.14)
|
nokogiri (~> 1.14)
|
||||||
railties (7.1.3.4)
|
railties (7.2.1)
|
||||||
actionpack (= 7.1.3.4)
|
actionpack (= 7.2.1)
|
||||||
activesupport (= 7.1.3.4)
|
activesupport (= 7.2.1)
|
||||||
irb
|
irb (~> 1.13)
|
||||||
rackup (>= 1.0.0)
|
rackup (>= 1.0.0)
|
||||||
rake (>= 12.2)
|
rake (>= 12.2)
|
||||||
thor (~> 1.0, >= 1.2.2)
|
thor (~> 1.0, >= 1.2.2)
|
||||||
|
|
@ -286,32 +281,31 @@ GEM
|
||||||
rake (13.2.1)
|
rake (13.2.1)
|
||||||
rdoc (6.7.0)
|
rdoc (6.7.0)
|
||||||
psych (>= 4.0.0)
|
psych (>= 4.0.0)
|
||||||
redis (5.2.0)
|
redis (5.3.0)
|
||||||
redis-client (>= 0.22.0)
|
redis-client (>= 0.22.0)
|
||||||
redis-client (0.22.2)
|
redis-client (0.22.2)
|
||||||
connection_pool
|
connection_pool
|
||||||
regexp_parser (2.9.2)
|
regexp_parser (2.9.2)
|
||||||
reline (0.5.9)
|
reline (0.5.10)
|
||||||
io-console (~> 0.5)
|
io-console (~> 0.5)
|
||||||
request_store (1.7.0)
|
request_store (1.7.0)
|
||||||
rack (>= 1.4)
|
rack (>= 1.4)
|
||||||
responders (3.1.1)
|
responders (3.1.1)
|
||||||
actionpack (>= 5.2)
|
actionpack (>= 5.2)
|
||||||
railties (>= 5.2)
|
railties (>= 5.2)
|
||||||
rexml (3.3.1)
|
rexml (3.3.7)
|
||||||
strscan
|
rspec-core (3.13.1)
|
||||||
rspec-core (3.13.0)
|
|
||||||
rspec-support (~> 3.13.0)
|
rspec-support (~> 3.13.0)
|
||||||
rspec-expectations (3.13.1)
|
rspec-expectations (3.13.2)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.13.0)
|
rspec-support (~> 3.13.0)
|
||||||
rspec-mocks (3.13.1)
|
rspec-mocks (3.13.1)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.13.0)
|
rspec-support (~> 3.13.0)
|
||||||
rspec-rails (6.1.4)
|
rspec-rails (7.0.1)
|
||||||
actionpack (>= 6.1)
|
actionpack (>= 7.0)
|
||||||
activesupport (>= 6.1)
|
activesupport (>= 7.0)
|
||||||
railties (>= 6.1)
|
railties (>= 7.0)
|
||||||
rspec-core (~> 3.13)
|
rspec-core (~> 3.13)
|
||||||
rspec-expectations (~> 3.13)
|
rspec-expectations (~> 3.13)
|
||||||
rspec-mocks (~> 3.13)
|
rspec-mocks (~> 3.13)
|
||||||
|
|
@ -328,31 +322,31 @@ GEM
|
||||||
rswag-ui (2.14.0)
|
rswag-ui (2.14.0)
|
||||||
actionpack (>= 5.2, < 8.0)
|
actionpack (>= 5.2, < 8.0)
|
||||||
railties (>= 5.2, < 8.0)
|
railties (>= 5.2, < 8.0)
|
||||||
rubocop (1.64.1)
|
rubocop (1.66.1)
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
language_server-protocol (>= 3.17.0)
|
language_server-protocol (>= 3.17.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.3.0.2)
|
parser (>= 3.3.0.2)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 2.4, < 3.0)
|
||||||
rexml (>= 3.2.5, < 4.0)
|
rubocop-ast (>= 1.32.2, < 2.0)
|
||||||
rubocop-ast (>= 1.31.1, < 2.0)
|
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 2.4.0, < 3.0)
|
unicode-display_width (>= 2.4.0, < 3.0)
|
||||||
rubocop-ast (1.31.3)
|
rubocop-ast (1.32.3)
|
||||||
parser (>= 3.3.1.0)
|
parser (>= 3.3.1.0)
|
||||||
rubocop-rails (2.25.1)
|
rubocop-rails (2.26.0)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rubocop (>= 1.33.0, < 2.0)
|
rubocop (>= 1.52.0, < 2.0)
|
||||||
rubocop-ast (>= 1.31.1, < 2.0)
|
rubocop-ast (>= 1.31.1, < 2.0)
|
||||||
ruby-progressbar (1.13.0)
|
ruby-progressbar (1.13.0)
|
||||||
shoulda-matchers (6.3.0)
|
securerandom (0.3.1)
|
||||||
|
shoulda-matchers (6.4.0)
|
||||||
activesupport (>= 5.2.0)
|
activesupport (>= 5.2.0)
|
||||||
shrine (3.6.0)
|
shrine (3.6.0)
|
||||||
content_disposition (~> 1.0)
|
content_disposition (~> 1.0)
|
||||||
down (~> 5.1)
|
down (~> 5.1)
|
||||||
sidekiq (7.3.1)
|
sidekiq (7.3.2)
|
||||||
concurrent-ruby (< 2)
|
concurrent-ruby (< 2)
|
||||||
connection_pool (>= 2.3.0)
|
connection_pool (>= 2.3.0)
|
||||||
logger
|
logger
|
||||||
|
|
@ -378,7 +372,6 @@ GEM
|
||||||
stimulus-rails (1.3.4)
|
stimulus-rails (1.3.4)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
stringio (3.1.1)
|
stringio (3.1.1)
|
||||||
strscan (3.1.0)
|
|
||||||
super_diff (0.12.1)
|
super_diff (0.12.1)
|
||||||
attr_extras (>= 6.2.4)
|
attr_extras (>= 6.2.4)
|
||||||
diff-lcs
|
diff-lcs
|
||||||
|
|
@ -396,6 +389,7 @@ GEM
|
||||||
tailwindcss-rails (2.7.3-x86_64-linux)
|
tailwindcss-rails (2.7.3-x86_64-linux)
|
||||||
railties (>= 7.0.0)
|
railties (>= 7.0.0)
|
||||||
thor (1.3.2)
|
thor (1.3.2)
|
||||||
|
timecop (0.9.10)
|
||||||
timeout (0.4.1)
|
timeout (0.4.1)
|
||||||
turbo-rails (2.0.6)
|
turbo-rails (2.0.6)
|
||||||
actionpack (>= 6.0.0)
|
actionpack (>= 6.0.0)
|
||||||
|
|
@ -404,6 +398,7 @@ GEM
|
||||||
tzinfo (2.0.6)
|
tzinfo (2.0.6)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
unicode-display_width (2.5.0)
|
unicode-display_width (2.5.0)
|
||||||
|
useragent (0.16.10)
|
||||||
warden (1.2.9)
|
warden (1.2.9)
|
||||||
rack (>= 2.0.9)
|
rack (>= 2.0.9)
|
||||||
webmock (3.23.1)
|
webmock (3.23.1)
|
||||||
|
|
@ -463,12 +458,13 @@ DEPENDENCIES
|
||||||
stimulus-rails
|
stimulus-rails
|
||||||
super_diff
|
super_diff
|
||||||
tailwindcss-rails
|
tailwindcss-rails
|
||||||
|
timecop
|
||||||
turbo-rails
|
turbo-rails
|
||||||
tzinfo-data
|
tzinfo-data
|
||||||
webmock
|
webmock
|
||||||
|
|
||||||
RUBY VERSION
|
RUBY VERSION
|
||||||
ruby 3.2.3p157
|
ruby 3.3.5p100
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.5.9
|
2.5.9
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -2,12 +2,13 @@ import { Controller } from "@hotwired/stimulus"
|
||||||
import L, { latLng } from "leaflet";
|
import L, { latLng } from "leaflet";
|
||||||
import { osmMapLayer } from "../maps/layers";
|
import { osmMapLayer } from "../maps/layers";
|
||||||
|
|
||||||
// Connects to data-controller="visit-modal-map"
|
// This controller is used to display a map of all coordinates for a visit
|
||||||
|
// on the "Map" modal of a visit on the Visits page
|
||||||
|
|
||||||
export default class extends Controller {
|
export default class extends Controller {
|
||||||
static targets = ["container"];
|
static targets = ["container"];
|
||||||
|
|
||||||
connect() {
|
connect() {
|
||||||
console.log("Visits maps controller connected");
|
|
||||||
this.coordinates = JSON.parse(this.element.dataset.coordinates);
|
this.coordinates = JSON.parse(this.element.dataset.coordinates);
|
||||||
this.center = JSON.parse(this.element.dataset.center);
|
this.center = JSON.parse(this.element.dataset.center);
|
||||||
this.radius = this.element.dataset.radius;
|
this.radius = this.element.dataset.radius;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
// app/javascript/controllers/visit_name_controller.js
|
|
||||||
|
|
||||||
import { Controller } from "@hotwired/stimulus";
|
import { Controller } from "@hotwired/stimulus";
|
||||||
|
|
||||||
|
// This controller is used to handle the updating of visit names on the Visits page
|
||||||
export default class extends Controller {
|
export default class extends Controller {
|
||||||
static targets = ["name", "input"];
|
static targets = ["name", "input"];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
class Export < ApplicationRecord
|
class Export < ApplicationRecord
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
||||||
enum status: { created: 0, processing: 1, completed: 2, failed: 3 }
|
enum :status, { created: 0, processing: 1, completed: 2, failed: 3 }
|
||||||
|
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ class Import < ApplicationRecord
|
||||||
|
|
||||||
include ImportUploader::Attachment(:raw)
|
include ImportUploader::Attachment(:raw)
|
||||||
|
|
||||||
enum source: {
|
enum :source, {
|
||||||
google_semantic_history: 0, owntracks: 1, google_records: 2,
|
google_semantic_history: 0, owntracks: 1, google_records: 2,
|
||||||
google_phone_takeout: 3, gpx: 4, immich_api: 5, geojson: 6
|
google_phone_takeout: 3, gpx: 4, immich_api: 5, geojson: 6
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ class Notification < ApplicationRecord
|
||||||
|
|
||||||
validates :title, :content, :kind, presence: true
|
validates :title, :content, :kind, presence: true
|
||||||
|
|
||||||
enum kind: { info: 0, warning: 1, error: 2 }
|
enum :kind, { info: 0, warning: 1, error: 2 }
|
||||||
|
|
||||||
scope :unread, -> { where(read_at: nil) }
|
scope :unread, -> { where(read_at: nil) }
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class Place < ApplicationRecord
|
||||||
has_many :place_visits, dependent: :destroy
|
has_many :place_visits, dependent: :destroy
|
||||||
has_many :suggested_visits, through: :place_visits, source: :visit
|
has_many :suggested_visits, through: :place_visits, source: :visit
|
||||||
|
|
||||||
enum source: { manual: 0, photon: 1 }
|
enum :source, { manual: 0, photon: 1 }
|
||||||
|
|
||||||
def async_reverse_geocode
|
def async_reverse_geocode
|
||||||
return unless REVERSE_GEOCODING_ENABLED
|
return unless REVERSE_GEOCODING_ENABLED
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ class Point < ApplicationRecord
|
||||||
|
|
||||||
validates :latitude, :longitude, :timestamp, presence: true
|
validates :latitude, :longitude, :timestamp, presence: true
|
||||||
|
|
||||||
enum battery_status: { unknown: 0, unplugged: 1, charging: 2, full: 3 }, _suffix: true
|
enum :battery_status, { unknown: 0, unplugged: 1, charging: 2, full: 3 }, suffix: true
|
||||||
enum trigger: {
|
enum :trigger, {
|
||||||
unknown: 0, background_event: 1, circular_region_event: 2, beacon_event: 3,
|
unknown: 0, background_event: 1, circular_region_event: 2, beacon_event: 3,
|
||||||
report_location_message_event: 4, manual_event: 5, timer_based_event: 6,
|
report_location_message_event: 4, manual_event: 5, timer_based_event: 6,
|
||||||
settings_monitoring_event: 7
|
settings_monitoring_event: 7
|
||||||
}, _suffix: true
|
}, suffix: true
|
||||||
enum connection: { mobile: 0, wifi: 1, offline: 2, unknown: 4 }, _suffix: true
|
enum :connection, { mobile: 0, wifi: 1, offline: 2, unknown: 4 }, suffix: true
|
||||||
|
|
||||||
scope :reverse_geocoded, -> { where.not(geodata: {}) }
|
scope :reverse_geocoded, -> { where.not(geodata: {}) }
|
||||||
scope :not_reverse_geocoded, -> { where(geodata: {}) }
|
scope :not_reverse_geocoded, -> { where(geodata: {}) }
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,11 @@ class Visit < ApplicationRecord
|
||||||
|
|
||||||
validates :started_at, :ended_at, :duration, :name, :status, presence: true
|
validates :started_at, :ended_at, :duration, :name, :status, presence: true
|
||||||
|
|
||||||
enum status: { suggested: 0, confirmed: 1, declined: 2 }
|
enum :status, { suggested: 0, confirmed: 1, declined: 2 }
|
||||||
|
|
||||||
|
def reverse_geocoded?
|
||||||
|
place.geodata.present?
|
||||||
|
end
|
||||||
|
|
||||||
def coordinates
|
def coordinates
|
||||||
points.pluck(:latitude, :longitude).map { [_1[0].to_f, _1[1].to_f] }
|
points.pluck(:latitude, :longitude).map { [_1[0].to_f, _1[1].to_f] }
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,34 @@ class Visits::Prepare
|
||||||
grouped_points = Visits::GroupPoints.new(day_points).group_points_by_radius
|
grouped_points = Visits::GroupPoints.new(day_points).group_points_by_radius
|
||||||
day_result = prepare_day_result(grouped_points)
|
day_result = prepare_day_result(grouped_points)
|
||||||
|
|
||||||
|
# Iterate through the day_result, check if there are any points outside of visits that are between two consecutive visits. If there are none, merge the visits.
|
||||||
|
|
||||||
|
day_result.each_cons(2) do |visit1, visit2|
|
||||||
|
next if visit1[:points].last == visit2[:points].first
|
||||||
|
|
||||||
|
points_between_visits = day_points.select do |point|
|
||||||
|
point.timestamp > visit1[:points].last.timestamp &&
|
||||||
|
point.timestamp < visit2[:points].first.timestamp
|
||||||
|
end
|
||||||
|
|
||||||
|
if points_between_visits.any?
|
||||||
|
# If there are points between the visits, we need to check if they are close enough to the visits to be considered part of them.
|
||||||
|
|
||||||
|
points_between_visits.each do |point|
|
||||||
|
next unless visit1[:points].last.distance_to(point) < visit1[:radius] ||
|
||||||
|
visit2[:points].first.distance_to(point) < visit2[:radius] ||
|
||||||
|
(point.timestamp - visit1[:points].last.timestamp).to_i < 600
|
||||||
|
|
||||||
|
visit1[:points] << point
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
visit1[:points] += visit2[:points]
|
||||||
|
visit1[:duration] = (visit1[:points].last.timestamp - visit1[:points].first.timestamp).to_i / 60
|
||||||
|
visit1[:ended_at] = Time.zone.at(visit1[:points].last.timestamp)
|
||||||
|
day_result.delete(visit2)
|
||||||
|
end
|
||||||
|
|
||||||
next if day_result.blank?
|
next if day_result.blank?
|
||||||
|
|
||||||
{ date: day, visits: day_result }
|
{ date: day, visits: day_result }
|
||||||
|
|
@ -41,7 +69,9 @@ class Visits::Prepare
|
||||||
longitude: center_point.longitude,
|
longitude: center_point.longitude,
|
||||||
radius: calculate_radius(center_point, group),
|
radius: calculate_radius(center_point, group),
|
||||||
points: group,
|
points: group,
|
||||||
duration: (group.last.timestamp - group.first.timestamp).to_i / 60
|
duration: (group.last.timestamp - group.first.timestamp).to_i / 60,
|
||||||
|
started_at: Time.zone.at(group.first.timestamp).to_s,
|
||||||
|
ended_at: Time.zone.at(group.last.timestamp).to_s
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
3
db/schema.rb
generated
3
db/schema.rb
generated
|
|
@ -53,9 +53,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_08_22_092405) do
|
||||||
t.index ["user_id"], name: "index_areas_on_user_id"
|
t.index ["user_id"], name: "index_areas_on_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "data_migrations", primary_key: "version", id: :string, force: :cascade do |t|
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "exports", force: :cascade do |t|
|
create_table "exports", force: :cascade do |t|
|
||||||
t.string "name", null: false
|
t.string "name", null: false
|
||||||
t.string "url"
|
t.string "url"
|
||||||
|
|
|
||||||
|
|
@ -27,20 +27,26 @@ RSpec.describe Visits::Prepare do
|
||||||
subject { described_class.new(points).call }
|
subject { described_class.new(points).call }
|
||||||
|
|
||||||
it 'returns correct visits' do
|
it 'returns correct visits' do
|
||||||
expect(subject).to eq [
|
freezed_time = Time.current
|
||||||
{
|
|
||||||
date: 1.day.ago.to_date.to_s,
|
Timecop.freeze(freezed_time) do
|
||||||
visits: [
|
expect(subject).to eq [
|
||||||
{
|
{
|
||||||
latitude: 0.0,
|
date: 1.day.ago.to_date.to_s,
|
||||||
longitude: 0.0,
|
visits: [
|
||||||
radius: 10,
|
{
|
||||||
points:,
|
latitude: 0.0,
|
||||||
duration: 105
|
longitude: 0.0,
|
||||||
}
|
radius: 10,
|
||||||
]
|
points:,
|
||||||
}
|
duration: 105,
|
||||||
]
|
started_at: 1.day.ago.to_s,
|
||||||
|
ended_at: (1.day.ago + 105.minutes).to_s
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue