Skip to content

Instantly share code, notes, and snippets.

@bbenezech
Last active September 29, 2015 00:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bbenezech/1523639 to your computer and use it in GitHub Desktop.
Save bbenezech/1523639 to your computer and use it in GitHub Desktop.
RailsAdmin theme engine template
say "Create theme stub for '#{theme_name = name.sub('rails_admin_', '')}' in gem '#{name}'. This may take a while"
run "rm -rf app/ script/ config/ lib/tasks/"
run "mkdir -p vendor/assets/stylesheets/rails_admin/themes/#{theme_name}/"
inside "vendor/assets/stylesheets/rails_admin/themes/#{theme_name}/" do
get "https://github.com/sferik/rails_admin/raw/master/app/assets/stylesheets/rails_admin/themes/default/mixins.scss", "mixins.scss"
get "https://github.com/sferik/rails_admin/raw/master/app/assets/stylesheets/rails_admin/themes/default/variables.scss", "variables.scss"
get "https://github.com/sferik/rails_admin/raw/master/app/assets/stylesheets/rails_admin/themes/default/theming.scss", "theming.scss"
end
run "mkdir -p vendor/assets/images/rails_admin/themes/#{theme_name}/"
gsub_file "#{name}.gemspec", /app,config,db,lib/, "lib,vendor"
say "RailsAdmin theme stub generator is done, you can go hack into '#{name}/vendor/assets/stylesheets/rails_admin/themes/#{theme_name}/'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment