Permalink
Browse files

Bump version to 0.0.2:

---
- remove deprication warning (works fine with Rails 3.2 now)
- add application scss detection
  • Loading branch information...
1 parent fe8c4a1 commit 8bd0485cafe5ee74eb01e12f1fd564165a650b89 Vlad Shvedov committed Jan 25, 2012
@@ -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
@@ -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
@@ -1,5 +1,5 @@
module Skeleton
module Rails
- VERSION = "0.0.1"
+ VERSION = "0.0.2"
end
end

0 comments on commit 8bd0485

Please sign in to comment.