compass-edge 0.9.4 → 0.9.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. data/CHANGELOG.markdown +32 -2
  2. data/README.markdown +12 -2
  3. data/REVISION +1 -1
  4. data/Rakefile +3 -1
  5. data/VERSION.yml +1 -2
  6. data/examples/blueprint_default/index.html.haml +3 -3
  7. data/examples/blueprint_default/parts/forms.html.haml +2 -0
  8. data/examples/blueprint_default/src/screen.sass +1 -1
  9. data/examples/blueprint_plugins/index.html.haml +6 -6
  10. data/examples/blueprint_plugins/src/buttons.sass +2 -2
  11. data/examples/blueprint_plugins/src/link_icons.sass +1 -1
  12. data/examples/blueprint_plugins/src/rtl_screen.sass +3 -3
  13. data/examples/blueprint_plugins/src/screen.sass +2 -2
  14. data/examples/blueprint_semantic/src/liquid.sass +4 -4
  15. data/examples/blueprint_semantic/src/screen.sass +3 -3
  16. data/examples/compass/bootstrap.rb +3 -0
  17. data/examples/compass/extensions/yui/stylesheets/_yui.sass +7 -0
  18. data/examples/compass/extensions/yui/stylesheets/yui/modules/_base.sass +70 -0
  19. data/examples/compass/extensions/yui/stylesheets/yui/modules/_fonts.sass +45 -0
  20. data/examples/compass/extensions/yui/stylesheets/yui/modules/_grids.sass +385 -0
  21. data/examples/compass/extensions/yui/stylesheets/yui/modules/_reset.sass +61 -0
  22. data/examples/compass/extensions/yui/templates/project/manifest.rb +1 -0
  23. data/examples/compass/extensions/yui/templates/project/screen.sass +4 -0
  24. data/examples/compass/src/utilities.sass +2 -2
  25. data/examples/css3/config.rb +6 -0
  26. data/examples/css3/extensions/fancy-fonts/templates/project/Vtks Revolt.ttf +0 -0
  27. data/examples/css3/extensions/fancy-fonts/templates/project/angelina.ttf +0 -0
  28. data/examples/css3/extensions/fancy-fonts/templates/project/fancy-fonts.sass +7 -0
  29. data/examples/css3/extensions/fancy-fonts/templates/project/manifest.rb +5 -0
  30. data/examples/css3/images/fresh-peas.jpg +0 -0
  31. data/examples/css3/index.html.haml +55 -0
  32. data/examples/css3/src/_base.sass +14 -0
  33. data/examples/css3/src/fancy-fonts.sass +7 -0
  34. data/examples/css3/src/gradient.sass +10 -0
  35. data/examples/css3/src/main.sass +80 -0
  36. data/examples/css3/stylesheets/fonts/Vtks Revolt.ttf +0 -0
  37. data/examples/css3/stylesheets/fonts/angelina.ttf +0 -0
  38. data/examples/downloader.rb +2 -2
  39. data/examples/ninesixty/extensions/ninesixty/README.mkdn +56 -0
  40. data/examples/ninesixty/extensions/ninesixty/compass-960-plugin.gemspec +36 -0
  41. data/examples/ninesixty/extensions/ninesixty/lib/ninesixty.rb +1 -0
  42. data/examples/ninesixty/extensions/ninesixty/lib/ninesixty/compass_plugin.rb +5 -0
  43. data/examples/ninesixty/extensions/ninesixty/sass/960/_grid.sass +64 -0
  44. data/examples/ninesixty/extensions/ninesixty/sass/960/_text.sass +59 -0
  45. data/examples/ninesixty/extensions/ninesixty/templates/project/grid.sass +34 -0
  46. data/examples/ninesixty/extensions/ninesixty/templates/project/manifest.rb +2 -0
  47. data/examples/ninesixty/extensions/ninesixty/templates/project/text.sass +10 -0
  48. data/examples/susy/bootstrap.rb +3 -0
  49. data/examples/susy/config.rb +9 -0
  50. data/examples/susy/extensions/susy/LICENSE.txt +28 -0
  51. data/examples/susy/extensions/susy/README.mkdn +235 -0
  52. data/examples/susy/extensions/susy/compass-susy-plugin.gemspec +35 -0
  53. data/examples/susy/extensions/susy/docs/tutorial/build.sh +141 -0
  54. data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/_defaults.sass +100 -0
  55. data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/screen.sass +98 -0
  56. data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/_defaults.sass +147 -0
  57. data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/screen.sass +19 -0
  58. data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/_defaults.sass +147 -0
  59. data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/screen.sass +48 -0
  60. data/examples/susy/extensions/susy/docs/tutorial/code/_common/config.rb +14 -0
  61. data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/grid.png +0 -0
  62. data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/susy_logo.png +0 -0
  63. data/examples/susy/extensions/susy/docs/tutorial/code/_common/src/_base.sass +63 -0
  64. data/examples/susy/extensions/susy/docs/tutorial/code/_tools/Markdown.pl +1450 -0
  65. data/examples/susy/extensions/susy/docs/tutorial/code/site/src/_defaults.sass +100 -0
  66. data/examples/susy/extensions/susy/docs/tutorial/code/site/src/screen.sass +91 -0
  67. data/examples/susy/extensions/susy/docs/tutorial/figures/susy_element.png +0 -0
  68. data/examples/susy/extensions/susy/docs/tutorial/figures/susy_grid.png +0 -0
  69. data/examples/susy/extensions/susy/docs/tutorial/index.mkdn +301 -0
  70. data/examples/susy/extensions/susy/lib/susy.rb +2 -0
  71. data/examples/susy/extensions/susy/lib/susy/compass_plugin.rb +5 -0
  72. data/examples/susy/extensions/susy/lib/susy/sass_extensions.rb +79 -0
  73. data/examples/susy/extensions/susy/sass/susy/_grid.sass +128 -0
  74. data/examples/susy/extensions/susy/sass/susy/_reset.sass +7 -0
  75. data/examples/susy/extensions/susy/sass/susy/_susy.sass +23 -0
  76. data/examples/susy/extensions/susy/sass/susy/_text.sass +15 -0
  77. data/examples/susy/extensions/susy/sass/susy/_utils.sass +81 -0
  78. data/examples/susy/extensions/susy/templates/project/_base.sass +62 -0
  79. data/examples/susy/extensions/susy/templates/project/_defaults.sass +147 -0
  80. data/examples/susy/extensions/susy/templates/project/ie.sass +9 -0
  81. data/examples/susy/extensions/susy/templates/project/manifest.rb +5 -0
  82. data/examples/susy/extensions/susy/templates/project/print.sass +7 -0
  83. data/examples/susy/extensions/susy/templates/project/screen.sass +44 -0
  84. data/examples/susy/src/_base.sass +62 -0
  85. data/examples/susy/src/_defaults.sass +148 -0
  86. data/examples/susy/src/screen.sass +114 -0
  87. data/examples/yui/extensions/yui/stylesheets/_yui.sass +7 -0
  88. data/examples/yui/extensions/yui/stylesheets/yui/modules/_base.sass +70 -0
  89. data/examples/yui/extensions/yui/stylesheets/yui/modules/_fonts.sass +45 -0
  90. data/examples/yui/extensions/yui/stylesheets/yui/modules/_grids.sass +385 -0
  91. data/examples/yui/extensions/yui/stylesheets/yui/modules/_reset.sass +61 -0
  92. data/examples/yui/extensions/yui/templates/project/manifest.rb +1 -0
  93. data/examples/yui/extensions/yui/templates/project/screen.sass +4 -0
  94. data/lib/compass/app_integration/rails/configuration_defaults.rb +9 -1
  95. data/lib/compass/commands/watch_project.rb +1 -1
  96. data/lib/compass/compiler.rb +9 -1
  97. data/lib/compass/configuration.rb +23 -18
  98. data/lib/compass/configuration/adapters.rb +1 -1
  99. data/lib/compass/configuration/defaults.rb +30 -0
  100. data/lib/compass/frameworks.rb +1 -1
  101. data/lib/compass/frameworks/blueprint/stylesheets/_blueprint.sass +29 -1
  102. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.sass +84 -0
  103. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_colors.sass +33 -0
  104. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_debug.sass +9 -0
  105. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_fancy_type.sass +82 -0
  106. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_form.sass +56 -0
  107. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_grid.sass +179 -0
  108. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_ie.sass +2 -2
  109. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.sass +58 -0
  110. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_link_icons.sass +44 -0
  111. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.sass +141 -0
  112. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_print.sass +1 -4
  113. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_reset.sass +57 -2
  114. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.sass +123 -0
  115. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.sass +49 -0
  116. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_screen.sass +2 -29
  117. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_typography.sass +162 -0
  118. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.sass +37 -0
  119. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +2 -84
  120. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +2 -33
  121. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +2 -9
  122. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +2 -82
  123. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +2 -55
  124. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +2 -178
  125. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +2 -58
  126. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +2 -44
  127. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +2 -140
  128. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +2 -56
  129. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +2 -122
  130. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +2 -47
  131. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +2 -160
  132. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +2 -37
  133. data/lib/compass/frameworks/blueprint/templates/buttons/buttons.sass +2 -2
  134. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons.sass +1 -1
  135. data/lib/compass/frameworks/blueprint/templates/project/screen.sass +1 -7
  136. data/lib/compass/frameworks/blueprint/templates/project/welcome.html.haml +5 -2
  137. data/lib/compass/frameworks/compass/stylesheets/compass/_css3.sass +8 -0
  138. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_clip.sass +16 -0
  139. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_origin.sass +18 -0
  140. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_size.sass +14 -0
  141. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_box_shadow.sass +18 -10
  142. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_font_face.sass +31 -0
  143. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_gradient.sass +40 -0
  144. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_text_shadow.sass +15 -0
  145. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transform.sass +60 -0
  146. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transition.sass +57 -0
  147. data/lib/compass/grid_builder.rb +1 -1
  148. data/lib/compass/installers/base.rb +5 -1
  149. data/lib/compass/installers/manifest.rb +1 -0
  150. data/lib/compass/logger.rb +28 -2
  151. data/lib/compass/sass_extensions/functions.rb +3 -1
  152. data/lib/compass/sass_extensions/functions/color_stop.rb +10 -0
  153. data/lib/compass/sass_extensions/functions/enumerate.rb +2 -2
  154. data/lib/compass/sass_extensions/functions/font_files.rb +11 -0
  155. data/lib/compass/sass_extensions/functions/inline_image.rb +22 -1
  156. data/lib/compass/sass_extensions/functions/urls.rb +20 -0
  157. data/lib/vendor/fssm.rb +19 -6
  158. data/lib/vendor/fssm/backends/fsevents.rb +19 -60
  159. data/lib/vendor/fssm/backends/polling.rb +20 -18
  160. data/lib/vendor/fssm/cache.rb +193 -0
  161. data/lib/vendor/fssm/ext.rb +30 -0
  162. data/lib/vendor/fssm/fsevents.rb +129 -0
  163. data/lib/vendor/fssm/monitor.rb +10 -6
  164. data/lib/vendor/fssm/path.rb +24 -21
  165. data/lib/vendor/fssm/state.rb +37 -29
  166. data/lib/vendor/fssm/support.rb +3 -7
  167. data/lib/vendor/fssm/tree.rb +176 -0
  168. data/test/command_line_helper.rb +8 -4
  169. data/test/command_line_test.rb +2 -2
  170. data/test/compass_test.rb +14 -4
  171. data/test/configuration_test.rb +5 -5
  172. data/test/fixtures/stylesheets/blueprint/css/typography.css +5 -3
  173. data/test/fixtures/stylesheets/blueprint/sass/screen.sass +1 -1
  174. data/test/fixtures/stylesheets/blueprint/sass/typography.sass +2 -2
  175. data/test/fixtures/stylesheets/compass/css/print.css +2 -8
  176. data/test/fixtures/stylesheets/image_urls/css/screen.css +2 -0
  177. data/test/fixtures/stylesheets/relative/assets/images/testing.png +0 -0
  178. data/test/fixtures/stylesheets/relative/config.rb +9 -0
  179. data/test/fixtures/stylesheets/relative/css/ie.css +1 -0
  180. data/test/fixtures/stylesheets/relative/css/print.css +1 -0
  181. data/test/fixtures/stylesheets/relative/css/screen.css +1 -0
  182. data/test/fixtures/stylesheets/relative/sass/ie.sass +6 -0
  183. data/test/fixtures/stylesheets/relative/sass/print.sass +6 -0
  184. data/test/fixtures/stylesheets/relative/sass/screen.sass +3 -0
  185. data/test/rails_integration_test.rb +1 -1
  186. data/test/sass_extensions_test.rb +2 -2
  187. metadata +120 -2
@@ -1,46 +1,54 @@
1
+ require 'yaml'
1
2
  class FSSM::State
2
- def initialize(path, preload=true)
3
+ def initialize(path)
3
4
  @path = path
4
- @snapshot = {}
5
- snapshot if preload
6
- end
7
-
8
- def refresh
9
- previous = @snapshot
10
- current = snapshot
11
-
12
- deleted(previous, current)
13
- created(previous, current)
14
- modified(previous, current)
15
- end
16
-
5
+ @cache = FSSM::Tree::Cache.new
6
+ end
7
+
8
+ def refresh(base=nil, skip_callbacks=false)
9
+ previous, current = recache(base || @path.to_pathname)
10
+
11
+ unless skip_callbacks
12
+ deleted(previous, current)
13
+ created(previous, current)
14
+ modified(previous, current)
15
+ end
16
+ end
17
+
17
18
  private
18
-
19
+
19
20
  def created(previous, current)
20
21
  (current.keys - previous.keys).each {|created| @path.create(created)}
21
22
  end
22
-
23
+
23
24
  def deleted(previous, current)
24
25
  (previous.keys - current.keys).each {|deleted| @path.delete(deleted)}
25
26
  end
26
-
27
+
27
28
  def modified(previous, current)
28
29
  (current.keys & previous.keys).each do |file|
29
30
  @path.update(file) if (current[file] <=> previous[file]) != 0
30
31
  end
31
32
  end
32
-
33
- def snapshot
34
- snap = {}
35
- @path.glob.each {|glob| add_glob(snap, glob)}
36
- @snapshot = snap
37
- end
38
-
39
- def add_glob(snap, glob)
40
- Pathname.glob(@path.to_pathname.join(glob)).each do |fn|
41
- next unless fn.file?
42
- snap["#{fn}"] = fn.mtime
33
+
34
+ def recache(base)
35
+ base = Pathname.for(base)
36
+ previous = @cache.files
37
+ snapshot(base)
38
+ current = @cache.files
39
+ [previous, current]
40
+ end
41
+
42
+ def snapshot(base)
43
+ base = Pathname.for(base)
44
+ @cache.unset(base)
45
+ @path.glob.each {|glob| add_glob(base, glob)}
46
+ end
47
+
48
+ def add_glob(base, glob)
49
+ Pathname.glob(base.join(glob).to_s).each do |fn|
50
+ @cache.set(fn)
43
51
  end
44
52
  end
45
-
53
+
46
54
  end
@@ -1,17 +1,13 @@
1
1
  module FSSM::Support
2
2
  class << self
3
- # def backend
4
- # (mac? && carbon_core?) ? 'FSEvents' : 'Polling'
5
- # end
6
-
7
3
  def backend
8
- 'Polling'
4
+ (mac? && carbon_core?) ? 'FSEvents' : 'Polling'
9
5
  end
10
-
6
+
11
7
  def mac?
12
8
  @@mac ||= RUBY_PLATFORM =~ /darwin/i
13
9
  end
14
-
10
+
15
11
  def carbon_core?
16
12
  @@carbon_core ||= begin
17
13
  require 'osx/foundation'
@@ -0,0 +1,176 @@
1
+ module FSSM::Tree
2
+ module NodeBase
3
+ def initialize
4
+ @children = {}
5
+ end
6
+
7
+ protected
8
+
9
+ def child(segment)
10
+ @children["#{segment}"]
11
+ end
12
+
13
+ def child!(segment)
14
+ (@children["#{segment}"] ||= Node.new)
15
+ end
16
+
17
+ def has_child?(segment)
18
+ @children.has_key?("#{segment}")
19
+ end
20
+
21
+ def remove_child(segment)
22
+ @children.delete("#{segment}")
23
+ end
24
+
25
+ def remove_children
26
+ @children.clear
27
+ end
28
+ end
29
+
30
+ module NodeEnumerable
31
+ include NodeBase
32
+ include Enumerable
33
+
34
+ def each(prefix=nil, &block)
35
+ @children.each do |segment, node|
36
+ cprefix = prefix ?
37
+ Pathname.for(prefix).join(segment) :
38
+ Pathname.for(segment)
39
+ block.call(cprefix, node)
40
+ node.each(cprefix, &block)
41
+ end
42
+ end
43
+ end
44
+
45
+ module NodeInsertion
46
+ include NodeBase
47
+
48
+ def unset(path)
49
+ key = key_segments(path)
50
+
51
+ if key.empty?
52
+ remove_children
53
+ return nil
54
+ end
55
+
56
+ segment = key.pop
57
+ node = descendant(key)
58
+
59
+ return unless node
60
+
61
+ node.remove_child(segment)
62
+
63
+ nil
64
+ end
65
+
66
+ def set(path)
67
+ node = descendant!(path)
68
+ node.from_path(path).mtime
69
+ end
70
+
71
+ protected
72
+
73
+ def key_segments(key)
74
+ return key if key.is_a?(Array)
75
+ Pathname.for(key).segments
76
+ end
77
+
78
+ def descendant(path)
79
+ recurse(path, false)
80
+ end
81
+
82
+ def descendant!(path)
83
+ recurse(path, true)
84
+ end
85
+
86
+ def recurse(key, create=false)
87
+ key = key_segments(key)
88
+ node = self
89
+
90
+ until key.empty?
91
+ segment = key.shift
92
+ node = create ? node.child!(segment) : node.child(segment)
93
+ return nil unless node
94
+ end
95
+
96
+ node
97
+ end
98
+ end
99
+
100
+ module CacheDebug
101
+ def set(path)
102
+ FSSM.dbg("Cache#set(#{path})")
103
+ super
104
+ end
105
+
106
+ def unset(path)
107
+ FSSM.dbg("Cache#unset(#{path})")
108
+ super
109
+ end
110
+
111
+ def ftype(ft)
112
+ FSSM.dbg("Cache#ftype(#{ft})")
113
+ super
114
+ end
115
+ end
116
+
117
+ class Node
118
+ include NodeBase
119
+ include NodeEnumerable
120
+
121
+ attr_accessor :mtime
122
+ attr_accessor :ftype
123
+
124
+ def <=>(other)
125
+ return unless other.is_a?(::FSSM::Tree::Node)
126
+ self.mtime <=> other.mtime
127
+ end
128
+
129
+ def from_path(path)
130
+ path = Pathname.for(path)
131
+ @ftype = path.ftype
132
+ # this handles bad symlinks without failing. why handle bad symlinks at
133
+ # all? well, we could still be interested in their creation and deletion.
134
+ @mtime = path.symlink? ? Time.at(0) : path.mtime
135
+ self
136
+ end
137
+ end
138
+
139
+ class Cache
140
+ include NodeBase
141
+ include NodeEnumerable
142
+ include NodeInsertion
143
+ include CacheDebug if $DEBUG
144
+
145
+ def set(path)
146
+ # all paths set from this level need to be absolute
147
+ # realpath will fail on broken links
148
+ path = Pathname.for(path).expand_path
149
+ super(path)
150
+ end
151
+
152
+ def files
153
+ ftype('file')
154
+ end
155
+
156
+ def directories
157
+ ftype('directory')
158
+ end
159
+
160
+ def links
161
+ ftype('link')
162
+ end
163
+ alias symlinks links
164
+
165
+ private
166
+
167
+ def ftype(ft)
168
+ inject({}) do |hash, entry|
169
+ path, node = entry
170
+ hash["#{path}"] = node.mtime if node.ftype == ft
171
+ hash
172
+ end
173
+ end
174
+ end
175
+
176
+ end
@@ -30,7 +30,7 @@ module Compass::CommandLineHelper
30
30
  end
31
31
  end
32
32
  responder.assert_required_responses!
33
- @last_result = output
33
+ @last_result = decolorize(output)
34
34
  else
35
35
  #child process
36
36
  execute *arguments
@@ -38,15 +38,19 @@ module Compass::CommandLineHelper
38
38
  end
39
39
  else
40
40
  @last_error = capture_warning do
41
- @last_result = capture_output do
41
+ @last_result = decolorize(capture_output do
42
42
  @last_exit_code = execute *arguments
43
- end
43
+ end)
44
44
  end
45
45
  end
46
46
  rescue Timeout::Error
47
47
  fail "Read from child process timed out"
48
48
  end
49
49
 
50
+ def decolorize(str)
51
+ str.gsub(/\e\[\d+m/,'')
52
+ end
53
+
50
54
  class Responder
51
55
  Response = Struct.new(:prompt, :text, :required, :responded)
52
56
  def initialize
@@ -79,7 +83,7 @@ module Compass::CommandLineHelper
79
83
  actions_found << line.first if line.last == path
80
84
  end
81
85
  message = "Action #{action.inspect} was not performed on: #{path}."
82
- message += "The following actions were performed: #{actions_found.join(", ")}" if actions_found.any?
86
+ message += "The following actions were performed: #{actions_found.map{|a|a.inspect}.join(", ")}" if actions_found.any?
83
87
  puts @last_result
84
88
  fail message
85
89
  end
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__)+'/test_helper'
1
+ require 'test_helper'
2
2
  require 'fileutils'
3
3
  require 'compass'
4
4
  require 'compass/exec'
@@ -64,4 +64,4 @@ class CommandLineTest < Test::Unit::TestCase
64
64
  end
65
65
  end
66
66
 
67
- end
67
+ end
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__)+'/test_helper'
1
+ require 'test_helper'
2
2
  require 'fileutils'
3
3
  require 'compass'
4
4
 
@@ -9,7 +9,7 @@ class CompassTest < Test::Unit::TestCase
9
9
  end
10
10
 
11
11
  def teardown
12
- teardown_fixtures :blueprint, :empty, :compass, :image_urls
12
+ teardown_fixtures :blueprint, :empty, :compass, :image_urls, :relative
13
13
  end
14
14
 
15
15
  def teardown_fixtures(*project_names)
@@ -55,6 +55,15 @@ class CompassTest < Test::Unit::TestCase
55
55
  end
56
56
  end
57
57
 
58
+ def test_image_urls
59
+ within_project('relative') do |proj|
60
+ each_css_file(proj.css_path) do |css_file|
61
+ assert_no_errors css_file, 'relative'
62
+ end
63
+ assert_renders_correctly :screen
64
+ end
65
+ end
66
+
58
67
  private
59
68
  def assert_no_errors(css_file, project_name)
60
69
  file = css_file[(tempfile_path(project_name).size+1)..-1]
@@ -68,7 +77,7 @@ private
68
77
  actual_result_file = "#{tempfile_path(@current_project)}/#{name}.css"
69
78
  expected_result_file = "#{result_path(@current_project)}/#{name}.css"
70
79
  actual_lines = File.read(actual_result_file).split("\n")
71
- expected_lines = File.read(expected_result_file).split("\n")
80
+ expected_lines = ERB.new(File.read(expected_result_file)).result(binding).split("\n")
72
81
  expected_lines.zip(actual_lines).each_with_index do |pair, line|
73
82
  message = "template: #{name}\nline: #{line + 1}"
74
83
  assert_equal(pair.first, pair.last, message)
@@ -83,6 +92,7 @@ private
83
92
  @current_project = project_name
84
93
  Compass.add_configuration(configuration_file(project_name)) if File.exists?(configuration_file(project_name))
85
94
  Compass.configuration.project_path = project_path(project_name)
95
+ Compass.configuration.environment = :production
86
96
  args = Compass.configuration.to_compiler_arguments(:logger => Compass::NullLogger.new)
87
97
  if Compass.configuration.sass_path && File.exists?(Compass.configuration.sass_path)
88
98
  compiler = Compass::Compiler.new *args
@@ -129,4 +139,4 @@ private
129
139
  File.join(project_path(project_name), "saved")
130
140
  end
131
141
 
132
- end
142
+ end
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__)+'/test_helper'
1
+ require 'test_helper'
2
2
  require 'compass'
3
3
  require 'stringio'
4
4
 
@@ -15,12 +15,12 @@ class ConfigurationTest < Test::Unit::TestCase
15
15
  # Require any additional compass plugins here.
16
16
 
17
17
  project_type = :stand_alone
18
+ # Set this to the root of your project when deployed:
19
+ http_path = "/"
18
20
  css_dir = "css"
19
21
  sass_dir = "sass"
20
22
  images_dir = "img"
21
23
  javascripts_dir = "js"
22
- # Set this to the root of your project when deployed:
23
- http_path = "/"
24
24
  output_style = :nested
25
25
  # To enable relative paths to assets via compass helper functions. Uncomment:
26
26
  # relative_assets = true
@@ -87,9 +87,9 @@ class ConfigurationTest < Test::Unit::TestCase
87
87
  expected_serialization = <<EXPECTED
88
88
  # Require any additional compass plugins here.
89
89
  project_path = "/home/chris/my_compass_project"
90
- css_dir = "css"
91
90
  # Set this to the root of your project when deployed:
92
91
  http_path = "/"
92
+ css_dir = "css"
93
93
  # To enable relative paths to assets via compass helper functions. Uncomment:
94
94
  # relative_assets = true
95
95
  additional_import_paths = ["../foo", "/path/to/my/framework"]
@@ -120,4 +120,4 @@ EXPECTED
120
120
  assert_equal expected_serialization, Compass.configuration.serialize
121
121
  end
122
122
 
123
- end
123
+ end
@@ -111,14 +111,16 @@ pre, code, tt {
111
111
  line-height: 1.5; }
112
112
 
113
113
  li ul, li ol {
114
- margin: 0 1.5em; }
114
+ margin: 0; }
115
+
116
+ ul, ol {
117
+ margin: 0 1.5em 1.5em 0;
118
+ padding-left: 3.333em; }
115
119
 
116
120
  ul {
117
- margin: 0 1.5em 1.5em 1.5em;
118
121
  list-style-type: disc; }
119
122
 
120
123
  ol {
121
- margin: 0 1.5em 1.5em 1.5em;
122
124
  list-style-type: decimal; }
123
125
 
124
126
  dl {
@@ -1,4 +1,4 @@
1
- @import blueprint/screen
1
+ @import blueprint.sass
2
2
  @import compass/reset
3
3
 
4
4
  +blueprint