compass 0.10.0.pre4 → 0.10.0.pre5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. data/CHANGELOG.markdown +16 -0
  2. data/REVISION +1 -1
  3. data/Rakefile +1 -0
  4. data/VERSION.yml +1 -1
  5. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/_blueprint.sass +0 -0
  6. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_buttons.sass +0 -0
  7. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_colors.sass +0 -0
  8. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_debug.sass +0 -0
  9. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_fancy_type.sass +0 -0
  10. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_form.sass +0 -0
  11. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_grid.sass +0 -0
  12. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_ie.sass +0 -0
  13. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_interaction.sass +0 -0
  14. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_link_icons.sass +0 -0
  15. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_liquid.sass +0 -0
  16. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_print.sass +0 -0
  17. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_reset.sass +0 -0
  18. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_rtl.sass +0 -0
  19. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_scaffolding.sass +0 -0
  20. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_screen.sass +0 -0
  21. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_typography.sass +0 -0
  22. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/_utilities.sass +0 -0
  23. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_buttons.sass.html +0 -0
  24. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_colors.sass.html +0 -0
  25. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_debug.sass.html +0 -0
  26. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_fancy_type.sass.html +0 -0
  27. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_form.sass.html +0 -0
  28. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_grid.sass.html +0 -0
  29. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_ie.sass.html +0 -0
  30. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_interaction.sass.html +0 -0
  31. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_link_icons.sass.html +0 -0
  32. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_liquid.sass.html +0 -0
  33. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_print.sass.html +0 -0
  34. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_reset.sass.html +0 -0
  35. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_rtl.sass.html +0 -0
  36. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_scaffolding.sass.html +0 -0
  37. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_screen.sass.html +0 -0
  38. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_typography.sass.html +0 -0
  39. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/_utilities.sass.html +0 -0
  40. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/index.html +0 -0
  41. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_buttons.sass.html +0 -0
  42. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_colors.sass.html +0 -0
  43. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_debug.sass.html +0 -0
  44. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_fancy_type.sass.html +0 -0
  45. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_form.sass.html +0 -0
  46. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_grid.sass.html +0 -0
  47. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_interaction.sass.html +0 -0
  48. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_link_icons.sass.html +0 -0
  49. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_liquid.sass.html +0 -0
  50. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_reset.sass.html +0 -0
  51. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_rtl.sass.html +0 -0
  52. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_scaffolding.sass.html +0 -0
  53. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_typography.sass.html +0 -0
  54. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/docs/modules/_utilities.sass.html +0 -0
  55. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_buttons.sass +0 -0
  56. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_colors.sass +0 -0
  57. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_debug.sass +0 -0
  58. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +0 -0
  59. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_form.sass +0 -0
  60. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_grid.sass +0 -0
  61. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_interaction.sass +0 -0
  62. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_link_icons.sass +0 -0
  63. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_liquid.sass +0 -0
  64. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_reset.sass +0 -0
  65. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_rtl.sass +0 -0
  66. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +0 -0
  67. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_typography.sass +0 -0
  68. data/{lib/compass/frameworks → frameworks}/blueprint/stylesheets/blueprint/modules/_utilities.sass +0 -0
  69. data/{lib/compass/frameworks → frameworks}/blueprint/templates/buttons/buttons.sass +0 -0
  70. data/{lib/compass/frameworks → frameworks}/blueprint/templates/buttons/buttons/cross.png +0 -0
  71. data/{lib/compass/frameworks → frameworks}/blueprint/templates/buttons/buttons/key.png +0 -0
  72. data/{lib/compass/frameworks → frameworks}/blueprint/templates/buttons/buttons/tick.png +0 -0
  73. data/{lib/compass/frameworks → frameworks}/blueprint/templates/buttons/manifest.rb +0 -0
  74. data/{lib/compass/frameworks → frameworks}/blueprint/templates/link_icons/link_icons.sass +0 -0
  75. data/{lib/compass/frameworks → frameworks}/blueprint/templates/link_icons/link_icons/doc.png +0 -0
  76. data/{lib/compass/frameworks → frameworks}/blueprint/templates/link_icons/link_icons/email.png +0 -0
  77. data/{lib/compass/frameworks → frameworks}/blueprint/templates/link_icons/link_icons/external.png +0 -0
  78. data/{lib/compass/frameworks → frameworks}/blueprint/templates/link_icons/link_icons/feed.png +0 -0
  79. data/{lib/compass/frameworks → frameworks}/blueprint/templates/link_icons/link_icons/im.png +0 -0
  80. data/{lib/compass/frameworks → frameworks}/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
  81. data/{lib/compass/frameworks → frameworks}/blueprint/templates/link_icons/link_icons/visited.png +0 -0
  82. data/{lib/compass/frameworks → frameworks}/blueprint/templates/link_icons/link_icons/xls.png +0 -0
  83. data/{lib/compass/frameworks → frameworks}/blueprint/templates/link_icons/manifest.rb +0 -0
  84. data/{lib/compass/frameworks → frameworks}/blueprint/templates/project/grid.png +0 -0
  85. data/{lib/compass/frameworks → frameworks}/blueprint/templates/project/ie.sass +0 -0
  86. data/{lib/compass/frameworks → frameworks}/blueprint/templates/project/manifest.rb +0 -2
  87. data/{lib/compass/frameworks → frameworks}/blueprint/templates/project/partials/_base.sass +0 -0
  88. data/{lib/compass/frameworks → frameworks}/blueprint/templates/project/print.sass +0 -0
  89. data/{lib/compass/frameworks → frameworks}/blueprint/templates/project/screen.sass +0 -0
  90. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/_compass.sass +0 -0
  91. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/_css3.sass +0 -0
  92. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/_layout.sass +0 -0
  93. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/_misc.sass +0 -0
  94. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/_reset.sass +0 -0
  95. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/_utilities.sass +0 -0
  96. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_background_clip.sass +0 -0
  97. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_background_origin.sass +0 -0
  98. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_background_size.sass +0 -0
  99. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_border_radius.sass +0 -0
  100. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_box_shadow.sass +0 -0
  101. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_box_sizing.sass +0 -0
  102. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_columns.sass +0 -0
  103. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_font_face.sass +0 -0
  104. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_gradient.sass +0 -0
  105. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_inline_block.sass +0 -0
  106. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_opacity.sass +0 -0
  107. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_text_shadow.sass +0 -0
  108. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_transform.sass +0 -0
  109. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/css3/_transition.sass +0 -0
  110. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/layout/_sticky_footer.sass +0 -0
  111. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/_general.sass +0 -0
  112. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/_links.sass +0 -0
  113. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/_lists.sass +0 -0
  114. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/_print.sass +0 -0
  115. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/_sprites.sass +0 -0
  116. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/_tables.sass +0 -0
  117. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/_text.sass +0 -0
  118. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/general/_clearfix.sass +0 -0
  119. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/general/_float.sass +0 -0
  120. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/general/_hacks.sass +0 -0
  121. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/general/_min.sass +0 -0
  122. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/general/_reset.sass +0 -0
  123. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/general/_tabs.sass +0 -0
  124. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +0 -0
  125. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/links/_hover_link.sass +0 -0
  126. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/links/_link_colors.sass +0 -0
  127. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +0 -0
  128. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/lists/_bullets.sass +0 -0
  129. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +0 -0
  130. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/lists/_inline_list.sass +0 -0
  131. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/sprites/_sprite_img.sass +0 -0
  132. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +0 -0
  133. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/tables/_borders.sass +0 -0
  134. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/tables/_scaffolding.sass +0 -0
  135. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/text/_ellipsis.sass +0 -0
  136. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/text/_nowrap.sass +0 -0
  137. data/{lib/compass/frameworks → frameworks}/compass/stylesheets/compass/utilities/text/_replacement.sass +0 -0
  138. data/{lib/compass/frameworks → frameworks}/compass/templates/ellipsis/ellipsis.sass +0 -0
  139. data/{lib/compass/frameworks → frameworks}/compass/templates/ellipsis/manifest.rb +0 -0
  140. data/{lib/compass/frameworks → frameworks}/compass/templates/ellipsis/xml/ellipsis.xml +0 -0
  141. data/{lib/compass/frameworks → frameworks}/compass/templates/extension/manifest.rb +0 -0
  142. data/{lib/compass/frameworks → frameworks}/compass/templates/extension/stylesheets/main.sass +0 -0
  143. data/{lib/compass/frameworks → frameworks}/compass/templates/extension/templates/project/manifest.rb +0 -0
  144. data/{lib/compass/frameworks → frameworks}/compass/templates/extension/templates/project/screen.sass +0 -0
  145. data/{lib/compass/frameworks → frameworks}/compass/templates/project/USAGE.markdown +0 -0
  146. data/{lib/compass/frameworks → frameworks}/compass/templates/project/ie.sass +0 -0
  147. data/{lib/compass/frameworks → frameworks}/compass/templates/project/manifest.rb +0 -0
  148. data/{lib/compass/frameworks → frameworks}/compass/templates/project/print.sass +0 -0
  149. data/{lib/compass/frameworks → frameworks}/compass/templates/project/screen.sass +0 -0
  150. data/lib/compass/app_integration/rails/installer.rb +4 -3
  151. data/lib/compass/app_integration/rails/templates/compass-install-rails.rb +18 -13
  152. data/lib/compass/commands/watch_project.rb +42 -4
  153. data/lib/compass/configuration.rb +1 -1
  154. data/lib/compass/configuration/data.rb +3 -0
  155. data/lib/compass/configuration/paths.rb +19 -0
  156. data/lib/compass/exec.rb +2 -0
  157. data/lib/compass/exec/global_options_parser.rb +4 -0
  158. data/lib/compass/exec/switch_ui.rb +4 -0
  159. data/lib/compass/frameworks.rb +1 -1
  160. data/lib/compass/grid_builder.rb +7 -4
  161. data/lib/compass/sass_extensions/functions/urls.rb +1 -1
  162. data/lib/vendor/{fssm.rb → fssm/fssm.rb} +3 -10
  163. data/lib/vendor/fssm/{backends → fssm/backends}/fsevents.rb +4 -5
  164. data/lib/vendor/fssm/{backends → fssm/backends}/inotify.rb +3 -5
  165. data/lib/vendor/fssm/{backends → fssm/backends}/polling.rb +2 -3
  166. data/lib/vendor/fssm/{backends → fssm/backends}/rubycocoa/fsevents.rb +0 -0
  167. data/lib/vendor/fssm/fssm/monitor.rb +26 -0
  168. data/lib/vendor/fssm/{path.rb → fssm/path.rb} +1 -1
  169. data/lib/vendor/fssm/{pathname.rb → fssm/pathname.rb} +0 -0
  170. data/lib/vendor/fssm/fssm/state/directory.rb +57 -0
  171. data/lib/vendor/fssm/fssm/state/file.rb +24 -0
  172. data/lib/vendor/fssm/{support.rb → fssm/support.rb} +14 -6
  173. data/lib/vendor/fssm/{tree.rb → fssm/tree.rb} +0 -0
  174. data/test/command_line_helper.rb +14 -4
  175. data/test/command_line_test.rb +8 -8
  176. data/test/configuration_test.rb +25 -0
  177. data/test/rails_integration_test.rb +9 -5
  178. metadata +160 -160
  179. data/deps.rip +0 -1
  180. data/lib/compass/frameworks/blueprint/templates/project/welcome.html.haml +0 -21
  181. data/lib/vendor/fssm/monitor.rb +0 -25
  182. data/lib/vendor/fssm/state.rb +0 -54
@@ -1,6 +1,22 @@
1
1
  COMPASS CHANGELOG
2
2
  =================
3
3
 
4
+ 0.10.0.pre5 (January 18, 2010)
5
+ ------------------------------
6
+ * Fixed a bug in the grid builder in ruby 1.8.6 (Credit: [Richard Wöber][der-rich])
7
+ * Better sudo handling for the rails installer via environment variables or prompt. (Credit: Ryan Shaw, Evan Sharp)
8
+ * Removed support for the rip package manager.
9
+ * Support for scss files in the compass watcher.
10
+ * Cache buster timestamps were not working in some cases.
11
+ * Make ANSI color output work on windows.
12
+ * Command line switch (--boring) to turn off colorized output.
13
+ * Strip trailing slash from directory and path configuration variables.
14
+ * Added a --poll option to the compass watch subcommand to force polling.
15
+ * Fixed a test failure in ruby 1.9 due to faulty test code.
16
+ * Move the frameworks directory back to the top level. There's not actually a good reason for it to be buried in the ruby source.
17
+ * Upgrade FSSM. (Hopfully) Fixes a watcher issue that caused the watcher to not trigger for some users.
18
+ * Silence a deprecation warning in Rails 3.
19
+
4
20
  0.10.0.pre4 (January 04, 2010)
5
21
  ------------------------------
6
22
  * Fixed an FSSM loading issue that broke the compass watcher.
data/REVISION CHANGED
@@ -1 +1 @@
1
- 08894dc6ab17c4d79297868e177cbed3d338b93b
1
+ 9503512782eba7e387ba0dec14e5cfe1f3c0f22b
data/Rakefile CHANGED
@@ -63,6 +63,7 @@ begin
63
63
  gemspec.files -= Dir.glob("examples/**/*.css")
64
64
  gemspec.files -= Dir.glob("examples/**/*.html")
65
65
  gemspec.files -= Dir.glob("examples/*/extensions/**")
66
+ gemspec.files += Dir.glob("frameworks/**/*")
66
67
  gemspec.files += Dir.glob("lib/**/*")
67
68
  gemspec.files += Dir.glob("test/**/*.*")
68
69
  gemspec.files -= Dir.glob("test/fixtures/stylesheets/*/saved/**/*.*")
@@ -2,4 +2,4 @@
2
2
  :patch: 0
3
3
  :major: 0
4
4
  :minor: 10
5
- :build: pre4
5
+ :build: pre5
@@ -7,8 +7,6 @@ stylesheet 'ie.sass', :media => 'screen, projection', :condition => "lt IE 8
7
7
 
8
8
  image 'grid.png'
9
9
 
10
- html 'welcome.html.haml', :erb => true
11
-
12
10
  help %Q{
13
11
  Please see the blueprint website for documentation on how blueprint works:
14
12
 
@@ -62,7 +62,7 @@ module Compass
62
62
  print %Q{Compass recommends that you keep your stylesheets in #{recommended_location}
63
63
  instead of the Sass default location of #{default_location}.
64
64
  Is this OK? (Y/n) }
65
- answer = gets.downcase[0]
65
+ answer = $stdin.gets.downcase[0]
66
66
  answer == ?n ? default_location : recommended_location
67
67
  end
68
68
 
@@ -74,7 +74,8 @@ module Compass
74
74
  instead the Sass default of #{default_location}/.
75
75
  However, if you're exclusively using Sass, then #{default_location}/ is recommended.
76
76
  Emit compiled stylesheets to #{recommended_location}/? (Y/n) }
77
- answer = gets.downcase[0]
77
+ answer = $stdin.gets
78
+ answer = answer.downcase[0]
78
79
  answer == ?n ? default_location : recommended_location
79
80
  end
80
81
 
@@ -92,7 +93,7 @@ module Compass
92
93
  %Q{require 'compass'
93
94
  # If you have any compass plugins, require them here.
94
95
  Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.rb"))
95
- Compass.configuration.environment = RAILS_ENV.to_sym
96
+ Compass.configuration.environment = (defined?(Rails) ? Rails.env : RAILS_ENV).to_sym
96
97
  Compass.configure_sass_plugin!
97
98
  }
98
99
  end
@@ -28,6 +28,15 @@
28
28
  # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29
29
  # OTHER DEALINGS IN THE SOFTWARE.
30
30
  # =================================================================
31
+
32
+ # Determine if we use sudo, defaults to true unless we are
33
+ # on win32, cygwin, or mingw32 or they ask us not to
34
+ def sudo_is_an_option?
35
+ return false if RUBY_PLATFORM =~ /(win|w)32$/ # true if win32, cygwin or mingw32
36
+ return false if ENV['NO_SUDO'] =~ /true/i
37
+ return true
38
+ end
39
+
31
40
  puts "==================================================="
32
41
  puts "Welcome to the Compass Installer for Ruby on Rails!"
33
42
  puts "==================================================="
@@ -45,29 +54,25 @@ sass_dir = "app/stylesheets" if sass_dir.blank?
45
54
  css_dir = ask("Where would you like Compass to store your compiled css files? (default: 'public/stylesheets/compiled')")
46
55
  css_dir = "public/stylesheets/compiled" if css_dir.blank?
47
56
 
57
+ # use sudo for gem commands?
58
+ use_sudo = sudo_is_an_option?
59
+ if sudo_is_an_option? # dont give them the option if they are on a system that can't use sudo (aka windows)
60
+ use_sudo = yes?("Use sudo for the gem commands? (the default for your system is #{sudo_is_an_option? ? 'yes' : 'no'})")
61
+ end
62
+
48
63
  # define dependencies
49
64
  gem "haml", :version => ">=2.2.16"
50
65
  gem "compass", :version => ">= 0.8.17"
51
66
 
52
67
  # install and unpack
53
- unless RUBY_PLATFORM =~ /(win|w)32$/ # true if win32, cygwin or mingw32
54
- rake "gems:install GEM=haml", :sudo => true
55
- rake "gems:install GEM=compass", :sudo => true
56
- else
57
- rake "gems:install GEM=haml"
58
- rake "gems:install GEM=compass"
59
- end
68
+ rake "gems:install GEM=haml", :sudo => use_sudo
69
+ rake "gems:install GEM=compass", :sudo => use_sudo
60
70
  rake "gems:unpack GEM=compass"
61
71
 
62
72
  # load any compass framework plugins
63
73
  if css_framework =~ /960/
64
74
  gem "compass-960-plugin", :lib => "ninesixty"
65
- unless RUBY_PLATFORM =~ /(win|w)32$/
66
- rake "gems:install GEM=compass-960-plugin", :sudo => true
67
- else
68
- rake "gems:install GEM=compass-960-plugin"
69
- end
70
- rake "gems:unpack GEM=compass-960-plugin"
75
+ rake "gems:install GEM=compass-960-plugin", :sudo => use_sudo
71
76
  css_framework = "960" # rename for command
72
77
  plugin_require = "-r ninesixty"
73
78
  end
@@ -5,6 +5,25 @@ require 'compass/commands/update_project'
5
5
 
6
6
  module Compass
7
7
  module Commands
8
+ module WatchProjectOptionsParser
9
+ def set_options(opts)
10
+ super
11
+
12
+ opts.banner = %Q{
13
+ Usage: compass watch [path/to/project] [path/to/project/src/file.sass ...] [options]
14
+
15
+ Description:
16
+ watch the project for changes and recompile when they occur.
17
+
18
+ Options:
19
+ }.split("\n").map{|l| l.gsub(/^ */,'')}.join("\n")
20
+
21
+ opts.on("--poll", :NONE, "Check periodically if there's been changes.") do
22
+ self.options[:poll] = 1 # check every 1 second.
23
+ end
24
+
25
+ end
26
+ end
8
27
  class WatchProject < UpdateProject
9
28
 
10
29
  register :watch
@@ -19,19 +38,29 @@ module Compass
19
38
 
20
39
  recompile
21
40
 
22
- puts ">>> Compass is watching for changes. Press Ctrl-C to Stop."
23
-
24
41
  begin
25
42
  require 'fssm'
26
43
  rescue LoadError
27
- $: << File.join(Compass.lib_directory, 'vendor')
44
+ $: << File.join(Compass.lib_directory, 'vendor', 'fssm')
28
45
  retry
29
46
  end
30
47
 
48
+ if options[:poll]
49
+ require "fssm/backends/polling"
50
+ # have to silence the ruby warning about chaning a constant.
51
+ stderr, $stderr = $stderr, StringIO.new
52
+ FSSM::Backends.const_set("Default", FSSM::Backends::Polling)
53
+ $stderr = stderr
54
+ end
55
+
56
+ action = FSSM::Backends::Default.to_s == "FSSM::Backends::Polling" ? "polling" : "watching"
57
+
58
+ puts ">>> Compass is #{action} for changes. Press Ctrl-C to Stop."
59
+
31
60
  FSSM.monitor do |monitor|
32
61
  Compass.configuration.sass_load_paths.each do |load_path|
33
62
  monitor.path load_path do |path|
34
- path.glob '**/*.sass'
63
+ path.glob '**/*.s[ac]ss'
35
64
 
36
65
  path.update &method(:recompile)
37
66
  path.delete {|base, relative| remove_obsolete_css(base,relative); recompile(base, relative)}
@@ -66,6 +95,15 @@ module Compass
66
95
  end
67
96
  end
68
97
 
98
+ class << self
99
+ def option_parser(arguments)
100
+ parser = Compass::Exec::CommandOptionParser.new(arguments)
101
+ parser.extend(Compass::Exec::GlobalOptionsParser)
102
+ parser.extend(Compass::Exec::ProjectOptionsParser)
103
+ parser.extend(CompileProjectOptionsParser)
104
+ parser.extend(WatchProjectOptionsParser)
105
+ end
106
+ end
69
107
  end
70
108
  end
71
109
  end