Skip to content

Loading…

Getting working with Rails 3.2 and a rails mountable engine #4

Merged
merged 7 commits into from

2 participants

@pvertenten

These are changes I had to make to get this working inside of a rails mountable engine in my rails 3.2 environment.

I haven;t tested in a normal app, my changes don't seem specific to a rails engine however.

The module nesting was necessary for my environment, and adding tilt was necessary as well.

@AlexVangelov AlexVangelov merged commit 7d270bf into AlexVangelov:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 23, 2012
  1. @pvertenten

    Updating compass version

    pvertenten committed
  2. @pvertenten

    Fixign load erro

    pvertenten committed
  3. @pvertenten

    Fixing load error

    pvertenten committed
  4. @pvertenten

    Fixing dependency problems

    pvertenten committed
  5. @pvertenten

    Updating paths

    pvertenten committed
Commits on Jul 24, 2012
  1. @pvertenten

    Revert "Updating paths"

    pvertenten committed
    This reverts commit ed2f914.
  2. @pvertenten

    Adding includes

    pvertenten committed
This page is out of date. Refresh to see the latest.
Showing with 51 additions and 41 deletions.
  1. +1 −0 Gemfile
  2. +19 −18 Gemfile.lock
  3. +8 −4 lib/sass_load_paths.rb
  4. +6 −2 lib/theme_images.rb
  5. +17 −17 vendor/assets/stylesheets/sencha-touch-rails.scss
View
1 Gemfile
@@ -9,3 +9,4 @@ gem "sprockets"
gem "compass"
gem "sass"
gem "i18n"
+gem "tilt"
View
37 Gemfile.lock
@@ -1,52 +1,52 @@
PATH
remote: .
specs:
- sencha-touch-rails (1.0.1)
+ sencha-touch-rails (1.1.0)
railties (>= 3.2.1, < 5.0)
thor (~> 0.14)
GEM
remote: http://rubygems.org/
specs:
- actionpack (3.2.1)
- activemodel (= 3.2.1)
- activesupport (= 3.2.1)
+ actionpack (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.1)
rack (~> 1.4.0)
- rack-cache (~> 1.1)
+ rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.2)
- activemodel (3.2.1)
- activesupport (= 3.2.1)
+ activemodel (3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
- activesupport (3.2.1)
+ activesupport (3.2.3)
i18n (~> 0.6)
multi_json (~> 1.0)
builder (3.0.0)
chunky_png (1.2.5)
- compass (0.11.7)
+ compass (0.12.2)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
erubis (2.7.0)
- fssm (0.2.8.1)
+ fssm (0.2.9)
hike (1.2.1)
i18n (0.6.0)
- journey (1.0.1)
- json (1.6.5)
- multi_json (1.0.4)
+ journey (1.0.4)
+ json (1.7.3)
+ multi_json (1.3.6)
rack (1.4.1)
- rack-cache (1.1)
+ rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
- railties (3.2.1)
- actionpack (= 3.2.1)
- activesupport (= 3.2.1)
+ railties (3.2.3)
+ actionpack (= 3.2.3)
+ activesupport (= 3.2.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@@ -54,7 +54,7 @@ GEM
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
- sass (3.1.15)
+ sass (3.1.20)
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
@@ -72,3 +72,4 @@ DEPENDENCIES
sass
sencha-touch-rails!
sprockets
+ tilt
View
12 lib/sass_load_paths.rb
@@ -1,10 +1,14 @@
-module Sass::Rails
- class SassTemplate
+require 'tilt'
+
+module Sass
+ module Rails
+ class SassTemplate < Tilt::SassTemplate
def sass_options_from_rails(scope)
options = scope.environment.context_class.sass_config
options.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
- options.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/blueprint/stylesheets"
+ options.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/blueprint/stylesheets"
return options
end
end
-end
+ end
+end
View
8 lib/theme_images.rb
@@ -13,6 +13,10 @@ def theme_image(theme, path, mime_type = nil)
end
end
-module Sass::Script::Functions
- include SenchaTouch::SassExtensions::Functions::ThemeImages
+module Sass
+ module Script
+ module Functions
+ include SenchaTouch::SassExtensions::Functions::ThemeImages
+ end
+ end
end
View
34 vendor/assets/stylesheets/sencha-touch-rails.scss
@@ -1,18 +1,18 @@
@import 'sencha-touch/default/all';
-//
-// @include sencha-panel;
-// @include sencha-buttons;
-// @include sencha-sheet;
-// @include sencha-picker;
-// @include sencha-tabs;
-// @include sencha-toolbar;
-// @include sencha-toolbar-forms;
-// @include sencha-indexbar;
-// @include sencha-list;
-// @include sencha-list-paging;
-// @include sencha-list-pullrefresh;
-// @include sencha-layout;
-// @include sencha-carousel;
-// @include sencha-form;
-// @include sencha-msgbox;
-// @include sencha-loading-spinner;
+//
+@include sencha-panel;
+@include sencha-buttons;
+@include sencha-sheet;
+@include sencha-picker;
+@include sencha-tabs;
+@include sencha-toolbar;
+@include sencha-toolbar-forms;
+@include sencha-indexbar;
+@include sencha-list;
+@include sencha-list-paging;
+@include sencha-list-pullrefresh;
+@include sencha-layout;
+@include sencha-carousel;
+@include sencha-form;
+@include sencha-msgbox;
+@include sencha-loading-spinner;
Something went wrong with that request. Please try again.