diff --git a/.app_version b/.app_version index a918a2aa..ee6cdce3 100644 --- a/.app_version +++ b/.app_version @@ -1 +1 @@ -0.6.0 +0.6.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 19aa7a38..d1d36f9e 100644 --- a/CHANGELOG.md +++ b/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: ``` --- diff --git a/app/services/exports/create.rb b/app/services/exports/create.rb index b84082c1..7cfcb6d2 100644 --- a/app/services/exports/create.rb +++ b/app/services/exports/create.rb @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 9ecdf66f..ab1e4005 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/spec/services/exports/create_spec.rb b/spec/services/exports/create_spec.rb index 2f4429f1..5b2ddb26 100644 --- a/spec/services/exports/create_spec.rb +++ b/spec/services/exports/create_spec.rb @@ -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 diff --git a/swagger/v1/swagger.yaml b/swagger/v1/swagger.yaml index 5241a62c..af7899b9 100644 --- a/swagger/v1/swagger.yaml +++ b/swagger/v1/swagger.yaml @@ -180,7 +180,7 @@ paths: lat: 52.502397 lon: 13.356718 tid: Swagger - tst: 1718219019 + tst: 1718355569 servers: - url: http://{defaultHost} variables: