compass-edge 0.9.5.0 → 0.10.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. data/CHANGELOG.markdown +0 -153
  2. data/README.markdown +2 -12
  3. data/REVISION +1 -1
  4. data/Rakefile +2 -37
  5. data/VERSION.yml +1 -1
  6. data/examples/blueprint_default/index.html.haml +3 -3
  7. data/examples/blueprint_default/parts/forms.html.haml +0 -2
  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/src/utilities.sass +2 -2
  17. data/examples/downloader.rb +2 -2
  18. data/lib/compass/app_integration.rb +0 -21
  19. data/lib/compass/app_integration/rails.rb +0 -18
  20. data/lib/compass/app_integration/rails/configuration_defaults.rb +0 -16
  21. data/lib/compass/app_integration/rails/installer.rb +6 -6
  22. data/lib/compass/app_integration/stand_alone.rb +1 -20
  23. data/lib/compass/app_integration/stand_alone/configuration_defaults.rb +1 -5
  24. data/lib/compass/app_integration/stand_alone/installer.rb +17 -29
  25. data/lib/compass/commands.rb +2 -2
  26. data/lib/compass/commands/create_project.rb +1 -10
  27. data/lib/compass/commands/generate_grid_background.rb +1 -1
  28. data/lib/compass/commands/help.rb +7 -34
  29. data/lib/compass/commands/installer_command.rb +11 -15
  30. data/lib/compass/commands/project_base.rb +2 -2
  31. data/lib/compass/commands/update_project.rb +1 -51
  32. data/lib/compass/commands/validate_project.rb +3 -59
  33. data/lib/compass/commands/watch_project.rb +2 -4
  34. data/lib/compass/commands/write_configuration.rb +3 -84
  35. data/lib/compass/compiler.rb +4 -13
  36. data/lib/compass/configuration.rb +18 -23
  37. data/lib/compass/configuration/adapters.rb +1 -1
  38. data/lib/compass/configuration/data.rb +2 -5
  39. data/lib/compass/configuration/defaults.rb +1 -32
  40. data/lib/compass/configuration/helpers.rb +10 -47
  41. data/lib/compass/configuration/inheritance.rb +1 -1
  42. data/lib/compass/configuration/serialization.rb +2 -2
  43. data/lib/compass/errors.rb +1 -4
  44. data/lib/compass/exec.rb +0 -1
  45. data/lib/compass/exec/project_options_parser.rb +0 -4
  46. data/lib/compass/frameworks.rb +1 -40
  47. data/lib/compass/frameworks/blueprint/stylesheets/_blueprint.sass +1 -29
  48. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_ie.sass +2 -2
  49. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_print.sass +4 -1
  50. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_reset.sass +2 -57
  51. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_screen.sass +29 -2
  52. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +84 -2
  53. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +33 -2
  54. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +9 -2
  55. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +82 -2
  56. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +55 -2
  57. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +178 -2
  58. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +58 -2
  59. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +44 -2
  60. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +140 -2
  61. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +56 -2
  62. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +122 -2
  63. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +47 -2
  64. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +160 -2
  65. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +37 -2
  66. data/lib/compass/frameworks/blueprint/templates/buttons/buttons.sass +2 -2
  67. data/lib/compass/frameworks/blueprint/templates/buttons/manifest.rb +0 -12
  68. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons.sass +1 -1
  69. data/lib/compass/frameworks/blueprint/templates/link_icons/manifest.rb +0 -13
  70. data/lib/compass/frameworks/blueprint/templates/project/manifest.rb +0 -24
  71. data/lib/compass/frameworks/blueprint/templates/project/screen.sass +7 -1
  72. data/lib/compass/frameworks/blueprint/templates/project/welcome.html.haml +1 -9
  73. data/lib/compass/frameworks/compass/stylesheets/_compass.sass +1 -2
  74. data/lib/compass/frameworks/compass/stylesheets/compass/_utilities.sass +1 -0
  75. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_css3.sass +6 -0
  76. data/lib/compass/frameworks/compass/stylesheets/compass/{css3 → utilities/css3}/_border_radius.sass +0 -0
  77. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_box_shadow.sass +12 -0
  78. data/lib/compass/frameworks/compass/stylesheets/compass/{css3 → utilities/css3}/_box_sizing.sass +0 -0
  79. data/lib/compass/frameworks/compass/stylesheets/compass/{css3 → utilities/css3}/_columns.sass +0 -0
  80. data/lib/compass/frameworks/compass/stylesheets/compass/{css3 → utilities/css3}/_inline_block.sass +0 -0
  81. data/lib/compass/frameworks/compass/stylesheets/compass/{css3 → utilities/css3}/_opacity.sass +0 -0
  82. data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_reset.sass +2 -2
  83. data/lib/compass/frameworks/compass/templates/ellipsis/manifest.rb +1 -26
  84. data/lib/compass/frameworks/compass/templates/extension/manifest.rb +2 -16
  85. data/lib/compass/frameworks/compass/templates/project/manifest.rb +0 -1
  86. data/lib/compass/grid_builder.rb +1 -1
  87. data/lib/compass/installers.rb +1 -1
  88. data/lib/compass/installers/base.rb +52 -13
  89. data/lib/compass/installers/manifest.rb +1 -33
  90. data/lib/compass/logger.rb +2 -28
  91. data/lib/compass/sass_extensions/functions.rb +1 -3
  92. data/lib/compass/sass_extensions/functions/enumerate.rb +2 -2
  93. data/lib/compass/sass_extensions/functions/inline_image.rb +1 -22
  94. data/lib/compass/sass_extensions/functions/urls.rb +0 -20
  95. data/lib/compass/sass_extensions/monkey_patches.rb +2 -2
  96. data/lib/compass/validator.rb +3 -2
  97. data/lib/vendor/fssm.rb +6 -19
  98. data/lib/vendor/fssm/backends/fsevents.rb +60 -19
  99. data/lib/vendor/fssm/backends/polling.rb +18 -20
  100. data/lib/vendor/fssm/ext.rb +0 -30
  101. data/lib/vendor/fssm/monitor.rb +6 -10
  102. data/lib/vendor/fssm/path.rb +21 -24
  103. data/lib/vendor/fssm/state.rb +29 -37
  104. data/lib/vendor/fssm/support.rb +7 -3
  105. data/test/command_line_helper.rb +4 -12
  106. data/test/command_line_test.rb +2 -2
  107. data/test/compass_test.rb +4 -14
  108. data/test/configuration_test.rb +5 -5
  109. data/test/fixtures/stylesheets/blueprint/css/typography.css +3 -5
  110. data/test/fixtures/stylesheets/blueprint/sass/screen.sass +1 -1
  111. data/test/fixtures/stylesheets/blueprint/sass/typography.sass +2 -2
  112. data/test/fixtures/stylesheets/compass/css/print.css +8 -2
  113. data/test/fixtures/stylesheets/compass/css/reset.css +1 -1
  114. data/test/fixtures/stylesheets/image_urls/css/screen.css +0 -2
  115. data/test/io_helper.rb +1 -18
  116. data/test/rails_integration_test.rb +41 -3
  117. data/test/sass_extensions_test.rb +2 -2
  118. data/test/test_helper.rb +0 -1
  119. metadata +9 -124
  120. data/examples/compass/bootstrap.rb +0 -3
  121. data/examples/compass/extensions/yui/stylesheets/_yui.sass +0 -7
  122. data/examples/compass/extensions/yui/stylesheets/yui/modules/_base.sass +0 -70
  123. data/examples/compass/extensions/yui/stylesheets/yui/modules/_fonts.sass +0 -45
  124. data/examples/compass/extensions/yui/stylesheets/yui/modules/_grids.sass +0 -385
  125. data/examples/compass/extensions/yui/stylesheets/yui/modules/_reset.sass +0 -61
  126. data/examples/compass/extensions/yui/templates/project/manifest.rb +0 -1
  127. data/examples/compass/extensions/yui/templates/project/screen.sass +0 -4
  128. data/examples/css3/config.rb +0 -6
  129. data/examples/css3/extensions/fancy-fonts/templates/project/Vtks Revolt.ttf +0 -0
  130. data/examples/css3/extensions/fancy-fonts/templates/project/angelina.ttf +0 -0
  131. data/examples/css3/extensions/fancy-fonts/templates/project/fancy-fonts.sass +0 -7
  132. data/examples/css3/extensions/fancy-fonts/templates/project/manifest.rb +0 -5
  133. data/examples/css3/images/fresh-peas.jpg +0 -0
  134. data/examples/css3/index.html.haml +0 -55
  135. data/examples/css3/src/_base.sass +0 -14
  136. data/examples/css3/src/fancy-fonts.sass +0 -7
  137. data/examples/css3/src/gradient.sass +0 -10
  138. data/examples/css3/src/main.sass +0 -80
  139. data/examples/css3/stylesheets/fonts/Vtks Revolt.ttf +0 -0
  140. data/examples/css3/stylesheets/fonts/angelina.ttf +0 -0
  141. data/examples/susy/bootstrap.rb +0 -3
  142. data/examples/susy/config.rb +0 -9
  143. data/examples/susy/extensions/susy/LICENSE.txt +0 -28
  144. data/examples/susy/extensions/susy/README.mkdn +0 -235
  145. data/examples/susy/extensions/susy/compass-susy-plugin.gemspec +0 -35
  146. data/examples/susy/extensions/susy/docs/tutorial/build.sh +0 -141
  147. data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/_defaults.sass +0 -100
  148. data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/screen.sass +0 -98
  149. data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/_defaults.sass +0 -147
  150. data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/screen.sass +0 -19
  151. data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/_defaults.sass +0 -147
  152. data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/screen.sass +0 -48
  153. data/examples/susy/extensions/susy/docs/tutorial/code/_common/config.rb +0 -14
  154. data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/grid.png +0 -0
  155. data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/susy_logo.png +0 -0
  156. data/examples/susy/extensions/susy/docs/tutorial/code/_common/src/_base.sass +0 -63
  157. data/examples/susy/extensions/susy/docs/tutorial/code/_tools/Markdown.pl +0 -1450
  158. data/examples/susy/extensions/susy/docs/tutorial/code/site/src/_defaults.sass +0 -100
  159. data/examples/susy/extensions/susy/docs/tutorial/code/site/src/screen.sass +0 -91
  160. data/examples/susy/extensions/susy/docs/tutorial/figures/susy_element.png +0 -0
  161. data/examples/susy/extensions/susy/docs/tutorial/figures/susy_grid.png +0 -0
  162. data/examples/susy/extensions/susy/docs/tutorial/index.mkdn +0 -301
  163. data/examples/susy/extensions/susy/lib/susy.rb +0 -2
  164. data/examples/susy/extensions/susy/lib/susy/compass_plugin.rb +0 -5
  165. data/examples/susy/extensions/susy/lib/susy/sass_extensions.rb +0 -79
  166. data/examples/susy/extensions/susy/sass/susy/_grid.sass +0 -128
  167. data/examples/susy/extensions/susy/sass/susy/_reset.sass +0 -7
  168. data/examples/susy/extensions/susy/sass/susy/_susy.sass +0 -23
  169. data/examples/susy/extensions/susy/sass/susy/_text.sass +0 -15
  170. data/examples/susy/extensions/susy/sass/susy/_utils.sass +0 -81
  171. data/examples/susy/extensions/susy/templates/project/_base.sass +0 -62
  172. data/examples/susy/extensions/susy/templates/project/_defaults.sass +0 -147
  173. data/examples/susy/extensions/susy/templates/project/ie.sass +0 -9
  174. data/examples/susy/extensions/susy/templates/project/manifest.rb +0 -5
  175. data/examples/susy/extensions/susy/templates/project/print.sass +0 -7
  176. data/examples/susy/extensions/susy/templates/project/screen.sass +0 -44
  177. data/examples/susy/src/_base.sass +0 -62
  178. data/examples/susy/src/_defaults.sass +0 -148
  179. data/examples/susy/src/screen.sass +0 -114
  180. data/features/command_line.feature +0 -226
  181. data/features/extensions.feature +0 -20
  182. data/features/step_definitions/command_line_steps.rb +0 -223
  183. data/features/step_definitions/extension_steps.rb +0 -13
  184. data/lib/compass/commands/interactive.rb +0 -61
  185. data/lib/compass/commands/project_stats.rb +0 -162
  186. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.sass +0 -84
  187. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_colors.sass +0 -33
  188. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_debug.sass +0 -9
  189. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_fancy_type.sass +0 -82
  190. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_form.sass +0 -56
  191. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_grid.sass +0 -179
  192. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.sass +0 -58
  193. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_link_icons.sass +0 -44
  194. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.sass +0 -141
  195. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.sass +0 -123
  196. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.sass +0 -49
  197. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_typography.sass +0 -162
  198. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.sass +0 -37
  199. data/lib/compass/frameworks/compass/stylesheets/compass/_css3.sass +0 -14
  200. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_clip.sass +0 -16
  201. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_origin.sass +0 -18
  202. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_size.sass +0 -14
  203. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_box_shadow.sass +0 -20
  204. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_font_face.sass +0 -31
  205. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_gradient.sass +0 -40
  206. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_text_shadow.sass +0 -15
  207. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transform.sass +0 -60
  208. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transition.sass +0 -57
  209. data/lib/compass/frameworks/compass/templates/project/USAGE.markdown +0 -32
  210. data/lib/compass/installers/bare_installer.rb +0 -58
  211. data/lib/compass/installers/manifest_installer.rb +0 -59
  212. data/lib/compass/sass_extensions/functions/color_stop.rb +0 -10
  213. data/lib/compass/sass_extensions/functions/font_files.rb +0 -11
  214. data/lib/compass/sass_extensions/monkey_patches/traversal.rb +0 -23
  215. data/lib/compass/stats.rb +0 -92
  216. data/lib/vendor/fssm/cache.rb +0 -193
  217. data/lib/vendor/fssm/fsevents.rb +0 -129
  218. data/lib/vendor/fssm/tree.rb +0 -176
  219. data/test/fixtures/stylesheets/relative/assets/images/testing.png +0 -0
  220. data/test/fixtures/stylesheets/relative/config.rb +0 -9
  221. data/test/fixtures/stylesheets/relative/css/ie.css +0 -1
  222. data/test/fixtures/stylesheets/relative/css/print.css +0 -1
  223. data/test/fixtures/stylesheets/relative/css/screen.css +0 -1
  224. data/test/fixtures/stylesheets/relative/sass/ie.sass +0 -6
  225. data/test/fixtures/stylesheets/relative/sass/print.sass +0 -6
  226. data/test/fixtures/stylesheets/relative/sass/screen.sass +0 -3
  227. data/test/rails_helper.rb +0 -40
@@ -24,8 +24,8 @@ def fetch(uri_str, limit = 10)
24
24
  end
25
25
  end
26
26
 
27
- def install_from_github(user, project, ext_name, branch = "master", working_directory = Dir.pwd)
28
- download_link = "http://github.com/#{user}/#{project}/zipball/#{branch}"
27
+ def install_from_github(user, project, ext_name, working_directory = Dir.pwd)
28
+ download_link = "http://github.com/#{user}/#{project}/zipball/master"
29
29
  extdir = File.join(working_directory,'extensions')
30
30
 
31
31
  if !File.exists?(extdir)
@@ -1,24 +1,3 @@
1
1
  %w(stand_alone rails merb).each do |lib|
2
2
  require "compass/app_integration/#{lib}"
3
3
  end
4
-
5
- module Compass
6
- module AppIntegration
7
- module Helpers
8
- def lookup(project_type)
9
- eval "Compass::AppIntegration::#{camelize(project_type)}"
10
- rescue NameError
11
- raise Compass::Error, "No application integration exists for #{project_type}"
12
- end
13
-
14
- protected
15
-
16
- # Stolen from ActiveSupport
17
- def camelize(s)
18
- s.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
19
- end
20
-
21
- end
22
- extend Helpers
23
- end
24
- end
@@ -5,22 +5,4 @@ end
5
5
  require 'compass/app_integration/rails/runtime' if defined?(ActionController::Base)
6
6
 
7
7
 
8
- module Compass
9
- module AppIntegration
10
- module Rails
11
-
12
- extend self
13
-
14
- def installer(*args)
15
- Installer.new(*args)
16
- end
17
-
18
- def configuration
19
- Compass::Configuration::Data.new('rails').
20
- extend(ConfigurationDefaults)
21
- end
22
-
23
- end
24
- end
25
- end
26
8
 
@@ -3,18 +3,10 @@ module Compass
3
3
  module Rails
4
4
  module ConfigurationDefaults
5
5
 
6
- def project_type_without_default
7
- :rails
8
- end
9
-
10
6
  def default_images_dir
11
7
  File.join("public", "images")
12
8
  end
13
9
 
14
- def default_fonts_dir
15
- File.join("public", "fonts")
16
- end
17
-
18
10
  def default_javascripts_dir
19
11
  File.join("public", "javascripts")
20
12
  end
@@ -27,18 +19,10 @@ module Compass
27
19
  "/javascripts"
28
20
  end
29
21
 
30
- def default_http_fonts_path
31
- "/fonts"
32
- end
33
-
34
22
  def default_http_stylesheets_path
35
23
  "/stylesheets"
36
24
  end
37
25
 
38
- def default_extensions_dir
39
- "vendor/plugins/compass/extensions"
40
- end
41
-
42
26
  end
43
27
  end
44
28
  end
@@ -2,13 +2,15 @@ module Compass
2
2
  module Installers
3
3
  class Base
4
4
  end
5
- class ManifestInstaller < Base
6
- end
7
5
  end
8
6
 
9
7
  module AppIntegration
10
8
  module Rails
11
- class Installer < Compass::Installers::ManifestInstaller
9
+ class Installer < Compass::Installers::Base
10
+
11
+ def default_configuration
12
+ Compass::Configuration::Data.new.extend(ConfigurationDefaults)
13
+ end
12
14
 
13
15
  def completed_configuration
14
16
  config = {}
@@ -18,10 +20,8 @@ module Compass
18
20
  end
19
21
 
20
22
  def write_configuration_files(config_file = nil)
21
- config_file ||= targetize('config/compass.rb')
22
- directory File.dirname(config_file)
23
+ config_file ||= targetize('config/compass.config')
23
24
  write_file config_file, config_contents
24
- directory File.dirname(targetize('config/initializers/compass.rb'))
25
25
  write_file targetize('config/initializers/compass.rb'), initializer_contents
26
26
  end
27
27
 
@@ -1,22 +1,3 @@
1
1
  %w(configuration_defaults installer).each do |lib|
2
2
  require "compass/app_integration/stand_alone/#{lib}"
3
- end
4
-
5
- module Compass
6
- module AppIntegration
7
- module StandAlone
8
-
9
- extend self
10
-
11
- def installer(*args)
12
- Installer.new(*args)
13
- end
14
-
15
- def configuration
16
- Compass::Configuration::Data.new('stand_alone').
17
- extend(ConfigurationDefaults)
18
- end
19
-
20
- end
21
- end
22
- end
3
+ end
@@ -2,10 +2,6 @@ module Compass
2
2
  module AppIntegration
3
3
  module StandAlone
4
4
  module ConfigurationDefaults
5
- def default_project_type
6
- :stand_alone
7
- end
8
-
9
5
  def sass_dir_without_default
10
6
  "src"
11
7
  end
@@ -25,4 +21,4 @@ module Compass
25
21
 
26
22
  end
27
23
  end
28
- end
24
+ end
@@ -2,13 +2,11 @@ module Compass
2
2
  module Installers
3
3
  class Base
4
4
  end
5
- class ManifestInstaller < Base
6
- end
7
5
  end
8
6
 
9
7
  module AppIntegration
10
8
  module StandAlone
11
- class Installer < Compass::Installers::ManifestInstaller
9
+ class Installer < Compass::Installers::Base
12
10
 
13
11
  def init
14
12
  directory targetize("")
@@ -35,40 +33,30 @@ module Compass
35
33
  write_configuration_files unless config_files_exist? || !@manifest.generate_config?
36
34
  end
37
35
 
36
+ def default_configuration
37
+ Compass::Configuration::Data.new.extend(Compass::AppIntegration::StandAlone::ConfigurationDefaults)
38
+ end
39
+
38
40
  def completed_configuration
39
41
  nil
40
42
  end
41
43
 
42
44
  def finalize(options = {})
43
- if options[:create] && !manifest.welcome_message_options[:replace]
45
+ if options[:create]
44
46
  puts <<-NEXTSTEPS
45
47
 
46
- *********************************************************************
47
- Congratulations! Your compass project has been created.
48
-
49
- You may now add and edit sass stylesheets in the #{Compass.configuration.sass_dir} subdirectory of your project.
50
-
51
- Sass files beginning with an underscore are called partials and won't be
52
- compiled to CSS, but they can be imported into other sass stylesheets.
53
-
54
- You can configure your project by editing the config.rb configuration file.
55
-
56
- You must compile your sass stylesheets into CSS when they change.
57
- This can be done in one of the following ways:
58
- 1. To compile on demand:
59
- compass compile [path/to/project]
60
- 2. To monitor your project for changes and automatically recompile:
61
- compass watch [path/to/project]
62
-
63
- More Resources:
64
- * Wiki: http://wiki.github.com/chriseppstein/compass
65
- * Sass: http://sass-lang.com
66
- * Community: http://groups.google.com/group/compass-users/
67
-
68
- NEXTSTEPS
48
+ Congratulations! Your compass project has been created.
49
+ You must recompile your sass stylesheets when they change.
50
+ This can be done in one of the following ways:
51
+ 1. From within your project directory run:
52
+ compass
53
+ 2. From any directory run:
54
+ compass -u path/to/project
55
+ 3. To monitor your project for changes and automatically recompile:
56
+ compass --watch [path/to/project]
57
+ NEXTSTEPS
69
58
  end
70
- puts manifest.welcome_message if manifest.welcome_message
71
- if manifest.has_stylesheet? && !manifest.welcome_message_options[:replace]
59
+ if manifest.has_stylesheet?
72
60
  puts "\nTo import your new stylesheets add the following lines of HTML (or equivalent) to your webpage:"
73
61
  puts stylesheet_links
74
62
  end
@@ -5,7 +5,7 @@ require 'compass/commands/registry'
5
5
 
6
6
  %w(base generate_grid_background help list_frameworks project_base
7
7
  update_project watch_project create_project installer_command
8
- print_version project_stats stamp_pattern validate_project
9
- write_configuration interactive).each do |lib|
8
+ print_version stamp_pattern validate_project
9
+ write_configuration).each do |lib|
10
10
  require "compass/commands/#{lib}"
11
11
  end
@@ -15,10 +15,6 @@ module Compass
15
15
 
16
16
  Options:
17
17
  }.split("\n").map{|l| l.gsub(/^ */,'')}.join("\n")
18
-
19
- opts.on_tail("--bare", "Don't generate any Sass or CSS files.") do
20
- self.options[:bare] = true
21
- end
22
18
  else
23
19
  opts.banner = %Q{
24
20
  Usage: compass init project_type path/to/project [options]
@@ -68,15 +64,10 @@ module Compass
68
64
  end
69
65
  end
70
66
 
71
- def primary; true; end
72
-
73
67
  def parse!(arguments)
74
68
  parser = option_parser(arguments)
75
69
  parse_options!(parser, arguments)
76
70
  parse_arguments!(parser, arguments)
77
- if parser.options[:framework] && parser.options[:bare]
78
- raise Compass::Error, "A bare project cannot be created when a framework is specified."
79
- end
80
71
  set_default_arguments(parser)
81
72
  parser.options
82
73
  end
@@ -101,7 +92,7 @@ module Compass
101
92
  if arguments.size == 1
102
93
  parser.options[:project_name] = arguments.shift
103
94
  elsif arguments.size == 0
104
- # default to the current directory.
95
+ raise Compass::Error, "Please specify a path to the project."
105
96
  else
106
97
  raise Compass::Error, "Too many arguments were specified."
107
98
  end
@@ -66,7 +66,7 @@ Options:
66
66
  def initialize(working_path, options)
67
67
  super
68
68
  assert_project_directory_exists!
69
- Compass.add_configuration(options, 'command_line')
69
+ Compass.add_configuration(options)
70
70
  end
71
71
 
72
72
  def perform
@@ -11,45 +11,20 @@ Description:
11
11
 
12
12
  To get help on a particular command please specify the command.
13
13
 
14
- }
15
-
16
- primary_commands = Compass::Commands.all.select do |c|
17
- cmd = Compass::Commands[c]
18
- cmd.respond_to?(:primary) && cmd.primary
19
- end
20
- other_commands = Compass::Commands.all - primary_commands
14
+ Available commands:
21
15
 
22
- banner << command_list("Primary Commands:", primary_commands)
23
- banner << command_list("Other Commands:", other_commands)
24
-
25
- banner << "\nAvailable Frameworks & Patterns:\n\n"
26
- Compass::Frameworks::ALL.each do |framework|
27
- banner << " * #{framework.name}\n"
28
- framework.template_directories.each do |pattern|
29
- banner << " - #{framework.name}/#{pattern}"
30
- if description = framework.manifest(pattern).description
31
- banner << "\t- #{description}"
32
- end
33
- banner << "\n"
16
+ }
17
+ Compass::Commands.all.sort_by{|c| c.to_s}.each do |command|
18
+ banner << " * #{command}"
19
+ if Compass::Commands[command].respond_to? :description
20
+ banner << "\t- #{Compass::Commands[command].description(command)}"
34
21
  end
22
+ banner << "\n"
35
23
  end
36
-
37
24
  opts.banner = banner
38
25
 
39
26
  super
40
27
  end
41
-
42
- def command_list(header, commands)
43
- list = "#{header}\n"
44
- commands.sort_by{|c| c.to_s}.each do |command|
45
- list << " * #{command}"
46
- if Compass::Commands[command].respond_to? :description
47
- list << "\t- #{Compass::Commands[command].description(command)}"
48
- end
49
- list << "\n"
50
- end
51
- list
52
- end
53
28
  end
54
29
  class Help < Base
55
30
  register :help
@@ -78,8 +53,6 @@ To get help on a particular command please specify the command.
78
53
  $command = options[:help_command]
79
54
  puts Compass::Commands[options[:help_command]].usage
80
55
  $command = "help"
81
- elsif Compass::Frameworks.template_exists? options[:help_command]
82
- puts Compass::Frameworks.template_usage(options[:help_command])
83
56
  else
84
57
  raise OptionParser::ParseError, "No such command: #{options[:help_command]}"
85
58
  end
@@ -6,28 +6,24 @@ module Compass
6
6
  include Compass::Installers
7
7
 
8
8
  def configure!
9
- if respond_to?(:is_project_creation?) && is_project_creation?
10
- Compass.add_configuration(options.delete(:project_type) || :stand_alone)
11
- else
12
- Compass.add_project_configuration(:project_type => options.delete(:project_type))
13
- end
14
- Compass.add_configuration(options, 'command_line')
9
+ Compass.add_configuration(installer.default_configuration)
10
+ Compass.add_project_configuration
11
+ Compass.add_configuration(options)
12
+ Compass.add_configuration(installer.completed_configuration)
15
13
  if File.exists?(Compass.configuration.extensions_path)
16
14
  Compass::Frameworks.discover(Compass.configuration.extensions_path)
17
15
  end
18
- Compass.add_configuration(installer.completed_configuration, 'installer')
19
16
  end
20
17
 
21
- def app
22
- @app ||= Compass::AppIntegration.lookup(Compass.configuration.project_type)
18
+ def installer
19
+ project_type = options[:project_type] || Compass.configuration.project_type
20
+ installer_class = "Compass::AppIntegration::#{camelize(project_type)}::Installer"
21
+ @installer = eval("#{installer_class}.new *installer_args")
23
22
  end
24
23
 
25
- def installer
26
- @installer ||= if options[:bare]
27
- Compass::Installers::BareInstaller.new(*installer_args)
28
- else
29
- app.installer(*installer_args)
30
- end
24
+ # Stolen from ActiveSupport
25
+ def camelize(s)
26
+ s.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
31
27
  end
32
28
 
33
29
  def installer_args
@@ -11,7 +11,7 @@ module Compass
11
11
  def initialize(working_path, options = {})
12
12
  super(working_path, options)
13
13
  self.project_name = determine_project_name(working_path, options)
14
- Compass.add_configuration({:project_path => determine_project_directory(working_path, options)}, "implied")
14
+ Compass.configuration.project_path = determine_project_directory(working_path, options)
15
15
  configure!
16
16
  end
17
17
 
@@ -89,4 +89,4 @@ module Compass
89
89
 
90
90
  end
91
91
  end
92
- end
92
+ end
@@ -3,25 +3,8 @@ require 'compass/compiler'
3
3
 
4
4
  module Compass
5
5
  module Commands
6
- module CompileProjectOptionsParser
7
- def set_options(opts)
8
- opts.banner = %Q{
9
- Usage: compass compile [path/to/project] [options]
10
-
11
- Description:
12
- compile project at the path specified or the current director if not specified.
13
-
14
- Options:
15
- }.split("\n").map{|l| l.gsub(/^ */,'')}.join("\n")
16
-
17
- super
18
- end
19
- end
20
-
21
6
  class UpdateProject < ProjectBase
22
-
23
- register :compile
24
-
7
+
25
8
  def initialize(working_path, options)
26
9
  super
27
10
  assert_project_directory_exists! unless dry_run?
@@ -50,39 +33,6 @@ module Compass
50
33
  :force => options[:force]).merge(additional_options))
51
34
  end
52
35
 
53
- class << self
54
- def option_parser(arguments)
55
- parser = Compass::Exec::CommandOptionParser.new(arguments)
56
- parser.extend(Compass::Exec::GlobalOptionsParser)
57
- parser.extend(Compass::Exec::ProjectOptionsParser)
58
- parser.extend(CompileProjectOptionsParser)
59
- end
60
-
61
- def usage
62
- option_parser([]).to_s
63
- end
64
-
65
- def primary; true; end
66
-
67
- def description(command)
68
- "Compile Sass stylesheets to CSS"
69
- end
70
-
71
- def parse!(arguments)
72
- parser = option_parser(arguments)
73
- parser.parse!
74
- parse_arguments!(parser, arguments)
75
- parser.options
76
- end
77
-
78
- def parse_arguments!(parser, arguments)
79
- if arguments.size == 1
80
- parser.options[:project_name] = arguments.shift
81
- elsif arguments.size > 1
82
- raise Compass::Error, "Too many arguments were specified."
83
- end
84
- end
85
- end
86
36
  end
87
37
  end
88
38
  end