Skip to content

Commit

Permalink
Fix error when using Appraisal + Combustion + install_if
Browse files Browse the repository at this point in the history
Failure/Error: Combustion.initialize! :active_record, :action_controller

SyntaxError:
  /home/nicolas/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/appraisal-40956d3ae826/lib/appraisal/gemfile.rb:33: syntax error, unexpected `end', expecting end-of-input

Instead of using a raw String as explained here (thoughtbot#176) it uses the
interpreted version:

<Proc:0x00007f7aab911770 /home/nicolas/PROJECTS/CONCERTO/gems/ajax-datatables-rails/gemfiles/rails_6.1.4.gemfile:8 (lambda)>
<Proc:0x00007f7aab9177d8 /home/nicolas/PROJECTS/CONCERTO/gems/ajax-datatables-rails/gemfiles/rails_6.1.4.gemfile:12 (lambda)>
<Proc:0x00007f7aab917490 /home/nicolas/PROJECTS/CONCERTO/gems/ajax-datatables-rails/gemfiles/rails_6.1.4.gemfile:16 (lambda)>
"-> { ENV[\"DB_ADAPTER\"] == \"sqlite3\" }"
"-> { ENV[\"DB_ADAPTER\"] == \"mysql2\" }"
"-> { ENV[\"DB_ADAPTER\"] == \"oracle_enhanced\" }"
  • Loading branch information
n-rodriguez committed Aug 4, 2023
1 parent feb78bc commit 003a778
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/appraisal/conditional.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def to_s

# :nodoc:
def for_dup
return unless @condition.is_a?(String)

"install_if #{@condition} do\n#{indent(super)}\nend"
end
end
Expand Down

0 comments on commit 003a778

Please sign in to comment.