Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility for Redmine v4.1 #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ Installation

$ rake emoji

4. Run the plugin rake task to provide the assets (from the Redmine root directory):
4. If your Redmine version 4.1, run the following rake install. Otherwise, skip to step 5.

$ rake emojibutton:install

5. Run the plugin rake task to provide the assets (from the Redmine root directory):

$ rake redmine:plugins:migrate RAILS_ENV=production

5. Restart redmine
6. Restart redmine


Usage
Expand Down
15 changes: 15 additions & 0 deletions lib/tasks/install.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
desc 'Add requirements for Redmine v4.1+'
namespace :emojibutton do
task :install do

# Uncomment the sprockets railtie requirement
path = "#{Rake.original_dir}/config/application.rb"
IO.write(path, File.open(path) { |f| f.read.gsub(/^# require 'sprockets\/railtie'$/, "require 'sprockets/railtie'") })

# Add a blank manifest file for sprockets
unless File.exist?(Rails.root.join('app', 'assets', 'config', 'manifest.js'))
`mkdir -p app/assets/config && echo '{}' > app/assets/config/manifest.js`
end

end
end