mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
Fix a bug where the export file was not being created in the public folder
This commit is contained in:
parent
85510b5fcb
commit
6af4d6d7ef
6 changed files with 37 additions and 11 deletions
|
|
@ -1 +1 @@
|
||||||
0.6.0
|
0.6.1
|
||||||
|
|
|
||||||
33
CHANGELOG.md
33
CHANGELOG.md
|
|
@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## [0.6.1] — 2024-06-14
|
||||||
|
|
||||||
|
⚠️ IMPORTANT: ⚠️
|
||||||
|
|
||||||
|
Please update your `docker-compose.yml` file to include the following changes:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
dawarich_sidekiq:
|
||||||
|
image: freikin/dawarich:latest
|
||||||
|
container_name: dawarich_sidekiq
|
||||||
|
volumes:
|
||||||
|
- gem_cache:/usr/local/bundle/gems
|
||||||
|
+ - public:/var/app/public
|
||||||
|
```
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added a line with public volume to sidekiq's docker-compose service to allow sidekiq process to write to the public folder
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed a bug where the export file was not being created in the public folder
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## [0.6.0] — 2024-06-12
|
## [0.6.0] — 2024-06-12
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
@ -31,8 +56,8 @@ Path for placing files to import was changed from `tmp/imports` to `public/impor
|
||||||
container_name: dawarich_app
|
container_name: dawarich_app
|
||||||
volumes:
|
volumes:
|
||||||
- gem_cache:/usr/local/bundle/gems
|
- gem_cache:/usr/local/bundle/gems
|
||||||
- - tmp:/var/app/tmp
|
- - tmp:/var/app/tmp
|
||||||
+ - public:/var/app/public/imports
|
+ - public:/var/app/public/imports
|
||||||
|
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
@ -44,8 +69,8 @@ volumes:
|
||||||
db_data:
|
db_data:
|
||||||
gem_cache:
|
gem_cache:
|
||||||
shared_data:
|
shared_data:
|
||||||
- tmp:
|
- tmp:
|
||||||
+ public:
|
+ public:
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ class Exports::Create
|
||||||
def initialize(export:, start_at:, end_at:)
|
def initialize(export:, start_at:, end_at:)
|
||||||
@export = export
|
@export = export
|
||||||
@user = export.user
|
@user = export.user
|
||||||
@start_at = start_at
|
@start_at = start_at.to_datetime
|
||||||
@end_at = end_at
|
@end_at = end_at.to_datetime
|
||||||
end
|
end
|
||||||
|
|
||||||
def call
|
def call
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ services:
|
||||||
container_name: dawarich_sidekiq
|
container_name: dawarich_sidekiq
|
||||||
volumes:
|
volumes:
|
||||||
- gem_cache:/usr/local/bundle/gems
|
- gem_cache:/usr/local/bundle/gems
|
||||||
|
- public:/var/app/public
|
||||||
networks:
|
networks:
|
||||||
- dawarich
|
- dawarich
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@ RSpec.describe Exports::Create do
|
||||||
subject(:create_export) { described_class.new(export:, start_at:, end_at:).call }
|
subject(:create_export) { described_class.new(export:, start_at:, end_at:).call }
|
||||||
|
|
||||||
let(:user) { create(:user) }
|
let(:user) { create(:user) }
|
||||||
let(:start_at) { DateTime.new(2021, 1, 1) }
|
let(:start_at) { DateTime.new(2021, 1, 1).to_s }
|
||||||
let(:end_at) { DateTime.new(2021, 1, 2) }
|
let(:end_at) { DateTime.new(2021, 1, 2).to_s }
|
||||||
let(:export_name) { "#{start_at.to_date}_#{end_at.to_date}" }
|
let(:export_name) { "#{start_at.to_date}_#{end_at.to_date}" }
|
||||||
let(:export) { create(:export, user:, name: export_name, status: :created) }
|
let(:export) { create(:export, user:, name: export_name, status: :created) }
|
||||||
let(:export_content) { ExportSerializer.new(points, user.email).call }
|
let(:export_content) { ExportSerializer.new(points, user.email).call }
|
||||||
let!(:points) { create_list(:point, 10, user:, timestamp: start_at.to_i) }
|
let!(:points) { create_list(:point, 10, user:, timestamp: start_at.to_datetime.to_i) }
|
||||||
|
|
||||||
it 'writes the data to a file' do
|
it 'writes the data to a file' do
|
||||||
create_export
|
create_export
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ paths:
|
||||||
lat: 52.502397
|
lat: 52.502397
|
||||||
lon: 13.356718
|
lon: 13.356718
|
||||||
tid: Swagger
|
tid: Swagger
|
||||||
tst: 1718219019
|
tst: 1718355569
|
||||||
servers:
|
servers:
|
||||||
- url: http://{defaultHost}
|
- url: http://{defaultHost}
|
||||||
variables:
|
variables:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue