Project

General

Profile

Actions

Defect #14028

closed

Plugins Gemfiles loading breaks __FILE__

Added by Jean-Baptiste Barth almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Low
Category:
Plugin API
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When loading Gemfile inside plugins, Redmine simply does an instance_eval call. This breaks __FILE__ inside loaded files because the filename is not provided (it's set to (eval) actually). This breaks the ability to provide a gemspec, and it may break other features of bundler that relies on current path. The gemspec directive won't work out of the box with the filename provided, but at least it will be possible to manually provide an option to the current directory of the gemspec.

Bundler now provides a eval_gemfile directive in its DSL that would be safer overall, but it's only here since 1.2.0, and we don't enforce such restriction for now (only restriction on bundler version is imposed by rails, requiring ~> 1.0).

Actions #1

Updated by Jean-Baptiste Barth almost 11 years ago

  • Status changed from Confirmed to Closed
  • Target version set to 2.4.0
  • Resolution set to Fixed

Fixed in r11826.

Actions

Also available in: Atom PDF