templates/lurker_app.rb in lurker-0.6.0 vs templates/lurker_app.rb in lurker-0.6.1

- old
+ new

@@ -1,10 +1,15 @@ gem 'rack-cors', require: 'rack/cors' gem 'rspec-rails' gem 'spring-commands-rspec' gem 'database_cleaner' gem 'simplecov', '~> 0.7.1', require: false +gem 'kramdown', '~> 1.3' +gem 'pdfkit', '~> 0.5' +gem 'wkhtmltopdf-binary', '~> 0.9' +gem 'execjs' +gem 'coderay' unless ENV['TRAVIS'] if RUBY_VERSION > '2.0.0' gem 'pry-byebug', group: [:development, :test] else @@ -15,13 +20,23 @@ gem 'unicorn', group: :production gem 'therubyracer', group: :production append_to_file 'Gemfile' do + gem = if ENV['TRAVIS'] + "gem 'lurker', github: 'razum2um/lurker', branch: 'master'" + else + origin = `cd ../.. && git config --get remote.origin.url`.scan(/github\.com.(.*).git/).flatten.first.strip rescue 'razum2um/lurker' + branch = `cd ../.. && git rev-parse --abbrev-ref HEAD`.strip rescue 'master' + "gem 'lurker', github: '#{origin}', branch: '#{branch}'" + end + <<-CODE - # new line above is important - gem 'lurker', github: 'razum2um/lurker', branch: 'master' + # new line above is important, branch is also important + # please, dont commit here: "gem 'lurker', path: '../../'" + # as I deploy this app instantly with this Gemfile + #{gem} CODE end file 'config/unicorn.rb' do <<-CODE