mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -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/)
|
||||
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
|
||||
|
||||
### Added
|
||||
|
|
@ -31,8 +56,8 @@ Path for placing files to import was changed from `tmp/imports` to `public/impor
|
|||
container_name: dawarich_app
|
||||
volumes:
|
||||
- gem_cache:/usr/local/bundle/gems
|
||||
- - tmp:/var/app/tmp
|
||||
+ - public:/var/app/public/imports
|
||||
- - tmp:/var/app/tmp
|
||||
+ - public:/var/app/public/imports
|
||||
|
||||
...
|
||||
```
|
||||
|
|
@ -44,8 +69,8 @@ volumes:
|
|||
db_data:
|
||||
gem_cache:
|
||||
shared_data:
|
||||
- tmp:
|
||||
+ public:
|
||||
- tmp:
|
||||
+ public:
|
||||
```
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ class Exports::Create
|
|||
def initialize(export:, start_at:, end_at:)
|
||||
@export = export
|
||||
@user = export.user
|
||||
@start_at = start_at
|
||||
@end_at = end_at
|
||||
@start_at = start_at.to_datetime
|
||||
@end_at = end_at.to_datetime
|
||||
end
|
||||
|
||||
def call
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ services:
|
|||
container_name: dawarich_sidekiq
|
||||
volumes:
|
||||
- gem_cache:/usr/local/bundle/gems
|
||||
- public:/var/app/public
|
||||
networks:
|
||||
- dawarich
|
||||
stdin_open: true
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ RSpec.describe Exports::Create do
|
|||
subject(:create_export) { described_class.new(export:, start_at:, end_at:).call }
|
||||
|
||||
let(:user) { create(:user) }
|
||||
let(:start_at) { DateTime.new(2021, 1, 1) }
|
||||
let(:end_at) { DateTime.new(2021, 1, 2) }
|
||||
let(:start_at) { DateTime.new(2021, 1, 1).to_s }
|
||||
let(:end_at) { DateTime.new(2021, 1, 2).to_s }
|
||||
let(:export_name) { "#{start_at.to_date}_#{end_at.to_date}" }
|
||||
let(:export) { create(:export, user:, name: export_name, status: :created) }
|
||||
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
|
||||
create_export
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ paths:
|
|||
lat: 52.502397
|
||||
lon: 13.356718
|
||||
tid: Swagger
|
||||
tst: 1718219019
|
||||
tst: 1718355569
|
||||
servers:
|
||||
- url: http://{defaultHost}
|
||||
variables:
|
||||
|
|
|
|||
Loading…
Reference in a new issue