Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #6 from vshvedov/master

Version 0.0.2
  • Loading branch information...
commit 894f24b391216c049eb948b3aa911103dd44f6d4 2 parents fe8c4a1 + 8bd0485
@mod mod authored
View
16 lib/generators/skeleton/install/install_generator.rb
@@ -21,10 +21,20 @@ class InstallGenerator < ::Rails::Generators::Base
desc "This generator installs Skeleton CSS framework to Asset Pipeline"
def add_assets
- insert_into_file "app/assets/javascripts/application.js", "//= require tabs\n", :after => "jquery_ujs\n"
- insert_into_file "app/assets/stylesheets/application.css", " *= require base\n *= require layout\n *= require skeleton\n", :after => "require_self\n"
- end
+ css_inject = " *= require base\n *= require layout\n *= require skeleton\n"
+ app_scss = File.join(::Rails.root, 'app', 'assets', 'stylesheets', 'application.scss')
+ app_css = File.join(::Rails.root, 'app', 'assets', 'stylesheets', 'application.css')
+
+ insert_into_file File.join(::Rails.root, 'app', 'assets', 'javascripts', 'application.js'), "//= require tabs\n", :after => "jquery_ujs\n"
+ if File.exist?(app_scss)
+ insert_into_file app_scss, css_inject, :after => "require_self\n"
+ elsif File.exist?(app_css)
+ insert_into_file app_css, css_inject, :after => "require_self\n"
+ else
+ say_status('Nor application.css/application.scss could not be found!')
+ end
+ end
end
end
end
View
4 lib/skeleton-rails/rails/engine.rb
@@ -3,9 +3,9 @@
module SkeletonRails
module Rails
class Engine < ::Rails::Engine
- initializer 'skeleton-rails.setup',
+ initializer 'skeleton-rails.setup',
:group => :all do |app|
- app.config.paths << File.join(config.root, 'vendor')
+ app.paths['config'] << File.join(config.root, 'vendor')
end
end
end
View
2  lib/skeleton-rails/version.rb
@@ -1,5 +1,5 @@
module Skeleton
module Rails
- VERSION = "0.0.1"
+ VERSION = "0.0.2"
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.