Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

Merged
merged 7 commits into from almost 2 years ago

2 participants

pvertenten AlexVangelov
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 from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
1  Gemfile
@@ -9,3 +9,4 @@ gem "sprockets"
9 9 gem "compass"
10 10 gem "sass"
11 11 gem "i18n"
  12 +gem "tilt"
37 Gemfile.lock
... ... @@ -1,52 +1,52 @@
1 1 PATH
2 2 remote: .
3 3 specs:
4   - sencha-touch-rails (1.0.1)
  4 + sencha-touch-rails (1.1.0)
5 5 railties (>= 3.2.1, < 5.0)
6 6 thor (~> 0.14)
7 7
8 8 GEM
9 9 remote: http://rubygems.org/
10 10 specs:
11   - actionpack (3.2.1)
12   - activemodel (= 3.2.1)
13   - activesupport (= 3.2.1)
  11 + actionpack (3.2.3)
  12 + activemodel (= 3.2.3)
  13 + activesupport (= 3.2.3)
14 14 builder (~> 3.0.0)
15 15 erubis (~> 2.7.0)
16 16 journey (~> 1.0.1)
17 17 rack (~> 1.4.0)
18   - rack-cache (~> 1.1)
  18 + rack-cache (~> 1.2)
19 19 rack-test (~> 0.6.1)
20 20 sprockets (~> 2.1.2)
21   - activemodel (3.2.1)
22   - activesupport (= 3.2.1)
  21 + activemodel (3.2.3)
  22 + activesupport (= 3.2.3)
23 23 builder (~> 3.0.0)
24   - activesupport (3.2.1)
  24 + activesupport (3.2.3)
25 25 i18n (~> 0.6)
26 26 multi_json (~> 1.0)
27 27 builder (3.0.0)
28 28 chunky_png (1.2.5)
29   - compass (0.11.7)
  29 + compass (0.12.2)
30 30 chunky_png (~> 1.2)
31 31 fssm (>= 0.2.7)
32 32 sass (~> 3.1)
33 33 erubis (2.7.0)
34   - fssm (0.2.8.1)
  34 + fssm (0.2.9)
35 35 hike (1.2.1)
36 36 i18n (0.6.0)
37   - journey (1.0.1)
38   - json (1.6.5)
39   - multi_json (1.0.4)
  37 + journey (1.0.4)
  38 + json (1.7.3)
  39 + multi_json (1.3.6)
40 40 rack (1.4.1)
41   - rack-cache (1.1)
  41 + rack-cache (1.2)
42 42 rack (>= 0.4)
43 43 rack-ssl (1.3.2)
44 44 rack
45 45 rack-test (0.6.1)
46 46 rack (>= 1.0)
47   - railties (3.2.1)
48   - actionpack (= 3.2.1)
49   - activesupport (= 3.2.1)
  47 + railties (3.2.3)
  48 + actionpack (= 3.2.3)
  49 + activesupport (= 3.2.3)
50 50 rack-ssl (~> 1.3.2)
51 51 rake (>= 0.8.7)
52 52 rdoc (~> 3.4)
@@ -54,7 +54,7 @@ GEM
54 54 rake (0.9.2.2)
55 55 rdoc (3.12)
56 56 json (~> 1.4)
57   - sass (3.1.15)
  57 + sass (3.1.20)
58 58 sprockets (2.1.2)
59 59 hike (~> 1.2)
60 60 rack (~> 1.0)
@@ -72,3 +72,4 @@ DEPENDENCIES
72 72 sass
73 73 sencha-touch-rails!
74 74 sprockets
  75 + tilt
12 lib/sass_load_paths.rb
... ... @@ -1,10 +1,14 @@
1   -module Sass::Rails
2   - class SassTemplate
  1 +require 'tilt'
  2 +
  3 +module Sass
  4 + module Rails
  5 + class SassTemplate < Tilt::SassTemplate
3 6 def sass_options_from_rails(scope)
4 7 options = scope.environment.context_class.sass_config
5 8 options.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
6   - options.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/blueprint/stylesheets"
  9 + options.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/blueprint/stylesheets"
7 10 return options
8 11 end
9 12 end
10   -end
  13 + end
  14 +end
8 lib/theme_images.rb
@@ -13,6 +13,10 @@ def theme_image(theme, path, mime_type = nil)
13 13 end
14 14 end
15 15
16   -module Sass::Script::Functions
17   - include SenchaTouch::SassExtensions::Functions::ThemeImages
  16 +module Sass
  17 + module Script
  18 + module Functions
  19 + include SenchaTouch::SassExtensions::Functions::ThemeImages
  20 + end
  21 + end
18 22 end
34 vendor/assets/stylesheets/sencha-touch-rails.scss
... ... @@ -1,18 +1,18 @@
1 1 @import 'sencha-touch/default/all';
2   -//
3   -// @include sencha-panel;
4   -// @include sencha-buttons;
5   -// @include sencha-sheet;
6   -// @include sencha-picker;
7   -// @include sencha-tabs;
8   -// @include sencha-toolbar;
9   -// @include sencha-toolbar-forms;
10   -// @include sencha-indexbar;
11   -// @include sencha-list;
12   -// @include sencha-list-paging;
13   -// @include sencha-list-pullrefresh;
14   -// @include sencha-layout;
15   -// @include sencha-carousel;
16   -// @include sencha-form;
17   -// @include sencha-msgbox;
18   -// @include sencha-loading-spinner;
  2 +//
  3 +@include sencha-panel;
  4 +@include sencha-buttons;
  5 +@include sencha-sheet;
  6 +@include sencha-picker;
  7 +@include sencha-tabs;
  8 +@include sencha-toolbar;
  9 +@include sencha-toolbar-forms;
  10 +@include sencha-indexbar;
  11 +@include sencha-list;
  12 +@include sencha-list-paging;
  13 +@include sencha-list-pullrefresh;
  14 +@include sencha-layout;
  15 +@include sencha-carousel;
  16 +@include sencha-form;
  17 +@include sencha-msgbox;
  18 +@include sencha-loading-spinner;

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.