diff --git a/CHANGELOG.md b/CHANGELOG.md index dfab3d1a7..0855d79b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ ## next release -- Fix a bug: on some linux hosts, a filename too long error is triggered when accessing the trainings API -- Fix a bug: on some linux hosts, a filename too long error is triggered when accessing the groups API +- Updated axlsx gem for excel files generation, possible fix for #489 +- Fix a bug: on some linux hosts, a filename too long error is triggered when accessing the following API: trainings, groups, events, prices - update docker/README.md ## v2.5.9 2017 July 13 diff --git a/Gemfile b/Gemfile index 0796722e2..94257d0e0 100644 --- a/Gemfile +++ b/Gemfile @@ -149,6 +149,5 @@ gem 'has_secure_token' gem 'apipie-rails' # XLS files generation -gem 'rubyzip', '~> 1.1.0' -gem 'axlsx', '2.1.0.pre' +gem 'axlsx', git: 'https://github.com/randym/axlsx', branch: 'release-3.0.0' gem 'axlsx_rails' diff --git a/Gemfile.lock b/Gemfile.lock index 5e252f9a5..f992737be 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,14 @@ +GIT + remote: https://github.com/randym/axlsx + revision: 977c09de1515e86536f0c952c08be319fbbab870 + branch: release-3.0.0 + specs: + axlsx (3.0.0.pre) + htmlentities (~> 4.3.4) + mimemagic (~> 0.3) + nokogiri (>= 1.7.1) + rubyzip (~> 1.2, >= 1.2.1) + GEM remote: https://rubygems.org/ specs: @@ -56,10 +67,6 @@ GEM descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) - axlsx (2.1.0.pre) - htmlentities (~> 4.3.1) - nokogiri (>= 1.4.1) - rubyzip (~> 1.1.7) axlsx_rails (0.4.0) axlsx (>= 2.0.1) rails (>= 3.1) @@ -70,7 +77,7 @@ GEM autoprefixer-rails (>= 5.0.0.1) sass (>= 3.2.19) buftok (0.2.0) - builder (3.2.2) + builder (3.2.3) byebug (8.2.3) camertron-eprun (1.1.0) capistrano (2.15.5) @@ -202,18 +209,18 @@ GEM httparty (0.13.7) json (~> 1.8) multi_xml (>= 0.5.2) - i18n (0.7.0) + i18n (0.8.6) ice_nine (0.11.1) jbuilder (2.5.0) activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) jbuilder_cache_multi (0.0.3) jbuilder (>= 1.5.0, < 3) - jquery-rails (4.0.3) - rails-dom-testing (~> 1.0) + jquery-rails (4.3.1) + rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (1.8.3) + json (1.8.6) jwt (1.5.1) kaminari (0.16.3) actionpack (>= 3.0.0) @@ -237,9 +244,10 @@ GEM message_format (0.0.3) twitter_cldr (~> 3.1) mime-types (2.99) + mimemagic (0.3.2) mini_magick (4.2.0) - mini_portile2 (2.1.0) - minitest (5.9.1) + mini_portile2 (2.2.0) + minitest (5.10.3) minitest-reporters (1.1.8) ansi builder @@ -257,9 +265,8 @@ GEM net-ssh-gateway (1.2.0) net-ssh (>= 2.6.5) netrc (0.10.3) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) + nokogiri (1.8.0) + mini_portile2 (~> 2.2.0) notify_with (0.0.2) jbuilder (~> 2.0) rails (>= 4.2.0) @@ -288,7 +295,6 @@ GEM ruby-rc4 ttfunk pg (0.18.1) - pkg-config (1.1.7) prawn (2.0.1) pdf-core (~> 0.5.1) ttfunk (~> 1.4.0) @@ -299,7 +305,7 @@ GEM rack (>= 1.1, < 2.0) pundit (1.0.0) activesupport (>= 3.0.0) - rack (1.6.4) + rack (1.6.8) rack-protection (1.5.3) rack rack-test (0.6.3) @@ -318,9 +324,9 @@ GEM sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) + rails-dom-testing (1.0.8) activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) + nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) @@ -337,7 +343,7 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) raindrops (0.13.0) - rake (11.3.0) + rake (12.0.0) rb-fsevent (0.9.4) rb-inotify (0.9.5) ffi (>= 0.5.0) @@ -358,7 +364,7 @@ GEM rolify (4.0.0) ruby-progressbar (1.7.5) ruby-rc4 (0.1.5) - rubyzip (1.1.7) + rubyzip (1.2.1) rufus-scheduler (3.0.9) tzinfo rvm-capistrano (1.5.6) @@ -425,8 +431,8 @@ GEM daemons (>= 1.0.9) eventmachine (>= 0.12.6) rack (>= 1.0.0) - thor (0.19.1) - thread_safe (0.3.5) + thor (0.19.4) + thread_safe (0.3.6) tilt (1.4.1) timers (4.0.1) hitimes @@ -450,7 +456,7 @@ GEM cldr-plurals-runtime-rb (~> 1.0.0) json tzinfo - tzinfo (1.2.2) + tzinfo (1.2.3) thread_safe (~> 0.1) uglifier (2.7.1) execjs (>= 0.3.0) @@ -490,7 +496,7 @@ DEPENDENCIES api-pagination apipie-rails awesome_print - axlsx (= 2.1.0.pre) + axlsx! axlsx_rails bootstrap-sass byebug @@ -542,7 +548,6 @@ DEPENDENCIES recurrence responders (~> 2.0) rolify - rubyzip (~> 1.1.0) rvm-capistrano sass-rails (= 5.0.1) sdoc (~> 0.4.0) @@ -563,4 +568,4 @@ DEPENDENCIES webmock BUNDLED WITH - 1.13.6 + 1.15.3 diff --git a/app/views/api/events/index.json.jbuilder b/app/views/api/events/index.json.jbuilder index 83f10f52a..8512897bd 100644 --- a/app/views/api/events/index.json.jbuilder +++ b/app/views/api/events/index.json.jbuilder @@ -1,10 +1,8 @@ total = @events.except(:offset, :limit, :order).count -json.cache! [@events, @page] do - json.array!(@events) do |event| - json.partial! 'api/events/event', event: event - json.event_image_small event.event_image.attachment.small.url if event.event_image - json.url event_url(event, format: :json) - json.nb_total_events total - end +json.array!(@events) do |event| + json.partial! 'api/events/event', event: event + json.event_image_small event.event_image.attachment.small.url if event.event_image + json.url event_url(event, format: :json) + json.nb_total_events total end diff --git a/app/views/api/events/upcoming.json.jbuilder b/app/views/api/events/upcoming.json.jbuilder index 4d97b3978..3a12b9481 100644 --- a/app/views/api/events/upcoming.json.jbuilder +++ b/app/views/api/events/upcoming.json.jbuilder @@ -1,7 +1,5 @@ -json.cache! @events do - json.array!(@events) do |event| - json.partial! 'api/events/event', event: event - json.event_image_medium event.event_image.attachment.medium.url if event.event_image - json.url event_url(event, format: :json) - end +json.array!(@events) do |event| + json.partial! 'api/events/event', event: event + json.event_image_medium event.event_image.attachment.medium.url if event.event_image + json.url event_url(event, format: :json) end diff --git a/app/views/api/prices/index.json.jbuilder b/app/views/api/prices/index.json.jbuilder index 8a03cbb34..1d35eab98 100644 --- a/app/views/api/prices/index.json.jbuilder +++ b/app/views/api/prices/index.json.jbuilder @@ -1,3 +1 @@ -json.cache! @prices do - json.partial! 'api/prices/price', collection: @prices, as: :price -end +json.partial! 'api/prices/price', collection: @prices, as: :price