Skip to content

Commit

Permalink
fix: export participants to csv
Browse files Browse the repository at this point in the history
  • Loading branch information
kugaevsky committed May 25, 2022
1 parent 2c3b84e commit 71695e7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/docker-build-and-push-develpoment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Docker build and push develpoment
on:
push:
branches:
- 'it52'
push
jobs:
build-development:
runs-on: ubuntu-latest
Expand Down
30 changes: 15 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ GEM
factory_bot_rails (6.2.0)
factory_bot (~> 6.2.0)
railties (>= 5.0.0)
faker (2.19.0)
i18n (>= 1.6, < 2)
faraday (2.2.0)
faker (2.21.0)
i18n (>= 1.8.11, < 2)
faraday (2.3.0)
faraday-net_http (~> 2.0)
ruby2_keywords (>= 0.0.4)
faraday-net_http (2.0.1)
faraday-net_http (2.0.3)
fast_jsonapi (1.5)
activesupport (>= 4.2)
ffaker (2.21.0)
Expand Down Expand Up @@ -224,7 +224,7 @@ GEM
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
json (2.6.1)
json (2.6.2)
jsonapi-renderer (0.2.2)
jwt (2.3.0)
kaminari (1.2.2)
Expand All @@ -241,15 +241,15 @@ GEM
kaminari-core (1.2.2)
launchy (2.5.0)
addressable (~> 2.7)
letter_opener (1.7.0)
launchy (~> 2.2)
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
llhttp-ffi (0.4.0)
ffi-compiler (~> 1.0)
rake (~> 13.0)
loofah (2.16.0)
loofah (2.18.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
Expand Down Expand Up @@ -293,9 +293,9 @@ GEM
timeout
net-ssh (6.1.0)
netrc (0.11.0)
newrelic_rpm (8.6.0)
newrelic_rpm (8.7.0)
nio4r (2.5.8)
nokogiri (1.13.4)
nokogiri (1.13.6)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
oauth (0.5.8)
Expand All @@ -305,7 +305,7 @@ GEM
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
oj (3.13.11)
oj (3.13.13)
omniauth (1.9.1)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
Expand All @@ -328,7 +328,7 @@ GEM
omniauth-oauth2 (>= 1.5, <= 1.6)
orm_adapter (0.5.0)
ox (2.14.11)
parallel (1.21.0)
parallel (1.22.1)
parser (3.1.1.0)
ast (~> 2.4.1)
pg (1.3.5)
Expand Down Expand Up @@ -416,7 +416,7 @@ GEM
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-rails (5.1.1)
rspec-rails (5.1.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
railties (>= 5.2)
Expand Down Expand Up @@ -471,7 +471,7 @@ GEM
semantic_range (3.0.0)
shoulda-matchers (5.1.0)
activesupport (>= 5.2.0)
sidekiq (6.4.1)
sidekiq (6.4.2)
connection_pool (>= 2.2.2)
rack (~> 2.0)
redis (>= 4.2.0)
Expand Down Expand Up @@ -511,7 +511,7 @@ GEM
ssrf_filter (1.0.7)
strscan (3.0.1)
temple (0.8.2)
test-prof (1.0.7)
test-prof (1.0.9)
thor (1.2.1)
tilt (2.0.10)
timeout (0.2.0)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def participants

respond_to do |format|
format.csv do
send_data RenderARCollectionToCsv.perform(participants, columns_to_export),
send_data RenderArCollectionToCsv.perform(participants, columns_to_export),
type: Mime::Type.lookup('text/csv'),
disposition: "attachment; filename=#{filename}.csv"
end
Expand Down
2 changes: 1 addition & 1 deletion app/services/render_ar_collection_to_csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'csv'

class RenderARCollectionToCsv
class RenderArCollectionToCsv
def self.perform(collection, column_names = nil, options = {})
column_names ||= collection.table_name.singularize.capitalize.constantize.column_names

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.1.1-alpine
FROM quay.io/evl.ms/fullstaq-ruby:3.1-jemalloc-slim

RUN apk add --no-cache build-base \
postgresql-dev \
Expand Down

0 comments on commit 71695e7

Please sign in to comment.