compass-edge 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.markdown +528 -0
- data/LICENSE.markdown +29 -0
- data/README.markdown +46 -0
- data/REVISION +1 -0
- data/Rakefile +131 -0
- data/VERSION.yml +4 -0
- data/bin/compass +26 -0
- data/deps.rip +1 -0
- data/examples/README.markdown +4 -0
- data/examples/blueprint_default/config.rb +7 -0
- data/examples/blueprint_default/images/grid.png +0 -0
- data/examples/blueprint_default/index.html.haml +85 -0
- data/examples/blueprint_default/parts/elements.html.haml +282 -0
- data/examples/blueprint_default/parts/forms.html.haml +190 -0
- data/examples/blueprint_default/parts/grid.html.haml +274 -0
- data/examples/blueprint_default/parts/test-small.jpg +0 -0
- data/examples/blueprint_default/parts/test.jpg +0 -0
- data/examples/blueprint_default/parts/valid.png +0 -0
- data/examples/blueprint_default/src/ie.sass +3 -0
- data/examples/blueprint_default/src/images/grid.png +0 -0
- data/examples/blueprint_default/src/print.sass +3 -0
- data/examples/blueprint_default/src/screen.sass +8 -0
- data/examples/blueprint_plugins/config.rb +8 -0
- data/examples/blueprint_plugins/images/buttons/cross.png +0 -0
- data/examples/blueprint_plugins/images/buttons/key.png +0 -0
- data/examples/blueprint_plugins/images/buttons/tick.png +0 -0
- data/examples/blueprint_plugins/images/grid.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/doc.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/email.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/external.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/feed.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/im.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/pdf.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/visited.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/xls.png +0 -0
- data/examples/blueprint_plugins/images/test-small.jpg +0 -0
- data/examples/blueprint_plugins/images/test.jpg +0 -0
- data/examples/blueprint_plugins/images/valid.png +0 -0
- data/examples/blueprint_plugins/index.html.haml +96 -0
- data/examples/blueprint_plugins/plugins/buttons.html.haml +67 -0
- data/examples/blueprint_plugins/plugins/fancy_type.html.haml +100 -0
- data/examples/blueprint_plugins/plugins/link_icons.html.haml +61 -0
- data/examples/blueprint_plugins/plugins/rtl.html.haml +100 -0
- data/examples/blueprint_plugins/src/buttons.sass +49 -0
- data/examples/blueprint_plugins/src/ie.sass +3 -0
- data/examples/blueprint_plugins/src/images/grid.png +0 -0
- data/examples/blueprint_plugins/src/link_icons.sass +13 -0
- data/examples/blueprint_plugins/src/print.sass +3 -0
- data/examples/blueprint_plugins/src/rtl_screen.sass +13 -0
- data/examples/blueprint_plugins/src/screen.sass +11 -0
- data/examples/blueprint_scoped/images/grid.png +0 -0
- data/examples/blueprint_scoped/src/ie.sass +4 -0
- data/examples/blueprint_scoped/src/print.sass +4 -0
- data/examples/blueprint_scoped/src/screen.sass +5 -0
- data/examples/blueprint_scoped_form/images/grid.png +0 -0
- data/examples/blueprint_scoped_form/src/ie.sass +3 -0
- data/examples/blueprint_scoped_form/src/print.sass +3 -0
- data/examples/blueprint_scoped_form/src/screen.sass +10 -0
- data/examples/blueprint_semantic/config.rb +7 -0
- data/examples/blueprint_semantic/images/grid.png +0 -0
- data/examples/blueprint_semantic/index.html.haml +86 -0
- data/examples/blueprint_semantic/parts/fancy_type.html.haml +100 -0
- data/examples/blueprint_semantic/parts/liquid.html.haml +100 -0
- data/examples/blueprint_semantic/parts/test-small.jpg +0 -0
- data/examples/blueprint_semantic/parts/test.jpg +0 -0
- data/examples/blueprint_semantic/parts/valid.png +0 -0
- data/examples/blueprint_semantic/src/ie.sass +3 -0
- data/examples/blueprint_semantic/src/images/grid.png +0 -0
- data/examples/blueprint_semantic/src/liquid.sass +69 -0
- data/examples/blueprint_semantic/src/print.sass +3 -0
- data/examples/blueprint_semantic/src/screen.sass +70 -0
- data/examples/compass/compass.html.haml +39 -0
- data/examples/compass/config.rb +7 -0
- data/examples/compass/images/blue_arrow.gif +0 -0
- data/examples/compass/src/compass.sass +47 -0
- data/examples/compass/src/images/blue_arrow.gif +0 -0
- data/examples/compass/src/sticky_footer.sass +11 -0
- data/examples/compass/src/utilities.sass +108 -0
- data/examples/compass/sticky_footer.html.haml +14 -0
- data/examples/compass/utilities.html.haml +189 -0
- data/examples/downloader.rb +57 -0
- data/examples/logo/logo.html.haml +40 -0
- data/examples/logo/src/ie.sass +6 -0
- data/examples/logo/src/print.sass +6 -0
- data/examples/logo/src/screen.sass +29 -0
- data/examples/ninesixty/bootstrap.rb +4 -0
- data/examples/ninesixty/config.rb +9 -0
- data/examples/ninesixty/extensions/ninesixty/README.mkdn +56 -0
- data/examples/ninesixty/extensions/ninesixty/compass-960-plugin.gemspec +36 -0
- data/examples/ninesixty/extensions/ninesixty/lib/ninesixty.rb +1 -0
- data/examples/ninesixty/extensions/ninesixty/lib/ninesixty/compass_plugin.rb +5 -0
- data/examples/ninesixty/extensions/ninesixty/sass/960/_grid.sass +64 -0
- data/examples/ninesixty/extensions/ninesixty/sass/960/_text.sass +59 -0
- data/examples/ninesixty/extensions/ninesixty/templates/project/grid.sass +34 -0
- data/examples/ninesixty/extensions/ninesixty/templates/project/manifest.rb +2 -0
- data/examples/ninesixty/extensions/ninesixty/templates/project/text.sass +10 -0
- data/examples/ninesixty/src/grid.sass +16 -0
- data/examples/ninesixty/src/text.sass +10 -0
- data/examples/yui/bootstrap.rb +3 -0
- data/examples/yui/divisions.html.haml +179 -0
- data/examples/yui/extensions/yui/stylesheets/_yui.sass +7 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_base.sass +70 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_fonts.sass +45 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_grids.sass +385 -0
- data/examples/yui/extensions/yui/stylesheets/yui/modules/_reset.sass +61 -0
- data/examples/yui/extensions/yui/templates/project/manifest.rb +1 -0
- data/examples/yui/extensions/yui/templates/project/screen.sass +4 -0
- data/examples/yui/index.html.haml +19 -0
- data/examples/yui/src/screen.sass +13 -0
- data/examples/yui/sub_divisions.html.haml +169 -0
- data/examples/yui/templates.html.haml +54 -0
- data/examples/yui/test.jpg +0 -0
- data/examples/yui/typography.html.haml +132 -0
- data/lib/compass.rb +22 -0
- data/lib/compass/actions.rb +116 -0
- data/lib/compass/app_integration.rb +3 -0
- data/lib/compass/app_integration/merb.rb +1 -0
- data/lib/compass/app_integration/merb/runtime.rb +63 -0
- data/lib/compass/app_integration/rails.rb +8 -0
- data/lib/compass/app_integration/rails/action_controller.rb +15 -0
- data/lib/compass/app_integration/rails/configuration_defaults.rb +29 -0
- data/lib/compass/app_integration/rails/installer.rb +127 -0
- data/lib/compass/app_integration/rails/runtime.rb +14 -0
- data/lib/compass/app_integration/rails/sass_plugin.rb +5 -0
- data/lib/compass/app_integration/rails/templates/compass-install-rails.rb +80 -0
- data/lib/compass/app_integration/rails/urls.rb +14 -0
- data/lib/compass/app_integration/stand_alone.rb +3 -0
- data/lib/compass/app_integration/stand_alone/configuration_defaults.rb +24 -0
- data/lib/compass/app_integration/stand_alone/installer.rb +71 -0
- data/lib/compass/commands.rb +11 -0
- data/lib/compass/commands/base.rb +36 -0
- data/lib/compass/commands/create_project.rb +113 -0
- data/lib/compass/commands/generate_grid_background.rb +91 -0
- data/lib/compass/commands/help.rb +62 -0
- data/lib/compass/commands/installer_command.rb +34 -0
- data/lib/compass/commands/list_frameworks.rb +16 -0
- data/lib/compass/commands/print_version.rb +91 -0
- data/lib/compass/commands/project_base.rb +92 -0
- data/lib/compass/commands/registry.rb +22 -0
- data/lib/compass/commands/stamp_pattern.rb +86 -0
- data/lib/compass/commands/update_project.rb +38 -0
- data/lib/compass/commands/validate_project.rb +21 -0
- data/lib/compass/commands/watch_project.rb +69 -0
- data/lib/compass/commands/write_configuration.rb +32 -0
- data/lib/compass/compiler.rb +54 -0
- data/lib/compass/configuration.rb +38 -0
- data/lib/compass/configuration/adapters.rb +59 -0
- data/lib/compass/configuration/comments.rb +22 -0
- data/lib/compass/configuration/data.rb +103 -0
- data/lib/compass/configuration/defaults.rb +107 -0
- data/lib/compass/configuration/helpers.rb +83 -0
- data/lib/compass/configuration/inheritance.rb +170 -0
- data/lib/compass/configuration/serialization.rb +86 -0
- data/lib/compass/core_ext.rb +14 -0
- data/lib/compass/dependencies.rb +6 -0
- data/lib/compass/errors.rb +7 -0
- data/lib/compass/exec.rb +15 -0
- data/lib/compass/exec/command_option_parser.rb +23 -0
- data/lib/compass/exec/global_options_parser.rb +37 -0
- data/lib/compass/exec/helpers.rb +28 -0
- data/lib/compass/exec/project_options_parser.rb +42 -0
- data/lib/compass/exec/sub_command_ui.rb +45 -0
- data/lib/compass/exec/switch_ui.rb +166 -0
- data/lib/compass/frameworks.rb +53 -0
- data/lib/compass/frameworks/blueprint/stylesheets/_blueprint.sass +3 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_ie.sass +99 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_print.sass +90 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_reset.sass +3 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_screen.sass +29 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +84 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +33 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +9 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +82 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +55 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +178 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +58 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +44 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +141 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +56 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +122 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +47 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +160 -0
- data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +37 -0
- data/lib/compass/frameworks/blueprint/templates/buttons/buttons.sass +49 -0
- data/lib/compass/frameworks/blueprint/templates/buttons/buttons/cross.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/buttons/buttons/key.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/buttons/buttons/tick.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/buttons/manifest.rb +5 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons.sass +13 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/doc.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/email.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/external.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/feed.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/im.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/visited.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons/xls.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/link_icons/manifest.rb +10 -0
- data/lib/compass/frameworks/blueprint/templates/project/grid.png +0 -0
- data/lib/compass/frameworks/blueprint/templates/project/ie.sass +16 -0
- data/lib/compass/frameworks/blueprint/templates/project/manifest.rb +8 -0
- data/lib/compass/frameworks/blueprint/templates/project/partials/_base.sass +11 -0
- data/lib/compass/frameworks/blueprint/templates/project/print.sass +8 -0
- data/lib/compass/frameworks/blueprint/templates/project/screen.sass +47 -0
- data/lib/compass/frameworks/blueprint/templates/project/welcome.html.haml +13 -0
- data/lib/compass/frameworks/compass/stylesheets/_compass.sass +1 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/_layout.sass +1 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/_misc.sass +24 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/_reset.sass +3 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/_utilities.sass +7 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass +19 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_css3.sass +6 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_general.sass +5 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_links.sass +3 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_lists.sass +3 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_print.sass +18 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_sprites.sass +1 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_tables.sass +3 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/_text.sass +2 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_border_radius.sass +47 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_box_shadow.sass +12 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_box_sizing.sass +13 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_columns.sass +37 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_inline_block.sass +7 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/css3/_opacity.sass +18 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.sass +24 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_float.sass +17 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_hacks.sass +6 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_reset.sass +134 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_tabs.sass +0 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +19 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/links/_hover_link.sass +5 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/links/_link_colors.sass +24 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +7 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.sass +21 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +52 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass +29 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite_img.sass +52 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +20 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_borders.sass +27 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.sass +9 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/text/_ellipsis.sass +13 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/text/_nowrap.sass +3 -0
- data/lib/compass/frameworks/compass/stylesheets/compass/utilities/text/_replacement.sass +17 -0
- data/lib/compass/frameworks/compass/templates/ellipsis/ellipsis.sass +6 -0
- data/lib/compass/frameworks/compass/templates/ellipsis/manifest.rb +2 -0
- data/lib/compass/frameworks/compass/templates/ellipsis/xml/ellipsis.xml +14 -0
- data/lib/compass/frameworks/compass/templates/extension/manifest.rb +6 -0
- data/lib/compass/frameworks/compass/templates/extension/stylesheets/main.sass +1 -0
- data/lib/compass/frameworks/compass/templates/extension/templates/project/manifest.rb +2 -0
- data/lib/compass/frameworks/compass/templates/extension/templates/project/screen.sass +2 -0
- data/lib/compass/frameworks/compass/templates/project/ie.sass +6 -0
- data/lib/compass/frameworks/compass/templates/project/manifest.rb +3 -0
- data/lib/compass/frameworks/compass/templates/project/print.sass +6 -0
- data/lib/compass/frameworks/compass/templates/project/screen.sass +13 -0
- data/lib/compass/grid_builder.rb +76 -0
- data/lib/compass/installers.rb +3 -0
- data/lib/compass/installers/base.rb +186 -0
- data/lib/compass/installers/manifest.rb +79 -0
- data/lib/compass/installers/template_context.rb +44 -0
- data/lib/compass/logger.rb +42 -0
- data/lib/compass/sass_extensions.rb +5 -0
- data/lib/compass/sass_extensions/functions.rb +19 -0
- data/lib/compass/sass_extensions/functions/display.rb +22 -0
- data/lib/compass/sass_extensions/functions/enumerate.rb +6 -0
- data/lib/compass/sass_extensions/functions/inline_image.rb +35 -0
- data/lib/compass/sass_extensions/functions/selectors.rb +42 -0
- data/lib/compass/sass_extensions/functions/urls.rb +105 -0
- data/lib/compass/sass_extensions/monkey_patches.rb +3 -0
- data/lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb +23 -0
- data/lib/compass/test_case.rb +38 -0
- data/lib/compass/validator.rb +10 -0
- data/lib/compass/version.rb +57 -0
- data/lib/vendor/fssm.rb +28 -0
- data/lib/vendor/fssm/backends/fsevents.rb +78 -0
- data/lib/vendor/fssm/backends/polling.rb +24 -0
- data/lib/vendor/fssm/ext.rb +7 -0
- data/lib/vendor/fssm/monitor.rb +21 -0
- data/lib/vendor/fssm/path.rb +88 -0
- data/lib/vendor/fssm/state.rb +46 -0
- data/lib/vendor/fssm/support.rb +26 -0
- data/test/command_line_helper.rb +97 -0
- data/test/command_line_test.rb +67 -0
- data/test/compass_test.rb +132 -0
- data/test/configuration_test.rb +123 -0
- data/test/fixtures/stylesheets/blueprint/config.rb +9 -0
- data/test/fixtures/stylesheets/blueprint/css/typography.css +158 -0
- data/test/fixtures/stylesheets/blueprint/images/grid.png +0 -0
- data/test/fixtures/stylesheets/blueprint/sass/ie.sass +3 -0
- data/test/fixtures/stylesheets/blueprint/sass/print.sass +3 -0
- data/test/fixtures/stylesheets/blueprint/sass/screen.sass +17 -0
- data/test/fixtures/stylesheets/blueprint/sass/typography.sass +3 -0
- data/test/fixtures/stylesheets/compass/config.rb +9 -0
- data/test/fixtures/stylesheets/compass/css/layout.css +15 -0
- data/test/fixtures/stylesheets/compass/css/print.css +18 -0
- data/test/fixtures/stylesheets/compass/css/reset.css +60 -0
- data/test/fixtures/stylesheets/compass/css/utilities.css +17 -0
- data/test/fixtures/stylesheets/compass/sass/layout.sass +3 -0
- data/test/fixtures/stylesheets/compass/sass/print.sass +5 -0
- data/test/fixtures/stylesheets/compass/sass/reset.sass +10 -0
- data/test/fixtures/stylesheets/compass/sass/utilities.sass +6 -0
- data/test/fixtures/stylesheets/image_urls/config.rb +17 -0
- data/test/fixtures/stylesheets/image_urls/css/screen.css +3 -0
- data/test/fixtures/stylesheets/image_urls/images/grid.png +0 -0
- data/test/fixtures/stylesheets/image_urls/sass/screen.sass +6 -0
- data/test/io_helper.rb +19 -0
- data/test/rails_integration_test.rb +84 -0
- data/test/sass_extensions_test.rb +31 -0
- data/test/test_case_helper.rb +13 -0
- data/test/test_helper.rb +27 -0
- data/test/test_rails_helper.rb +20 -0
- metadata +404 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'fileutils'
|
3
|
+
require 'rubygems'
|
4
|
+
require 'zip/zip'
|
5
|
+
|
6
|
+
|
7
|
+
def fetch(uri_str, limit = 10)
|
8
|
+
raise ArgumentError, 'HTTP redirect too deep' if limit == 0
|
9
|
+
|
10
|
+
url = URI.parse(uri_str)
|
11
|
+
http = Net::HTTP.new(url.host, url.port)
|
12
|
+
http.open_timeout = 2
|
13
|
+
http.read_timeout = 30
|
14
|
+
response = http.start do |http|
|
15
|
+
puts "getting #{url.path}"
|
16
|
+
http.request_get(url.path)
|
17
|
+
end
|
18
|
+
|
19
|
+
case response
|
20
|
+
when Net::HTTPSuccess then response
|
21
|
+
when Net::HTTPRedirection then fetch(response['location'], limit - 1)
|
22
|
+
else
|
23
|
+
response.error!
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def install_from_github(user, project, ext_name, working_directory = Dir.pwd)
|
28
|
+
download_link = "http://github.com/#{user}/#{project}/zipball/master"
|
29
|
+
extdir = File.join(working_directory,'extensions')
|
30
|
+
|
31
|
+
if !File.exists?(extdir)
|
32
|
+
begin
|
33
|
+
puts "Downloading the #{ext_name} plugin into #{extdir}."
|
34
|
+
FileUtils.mkdir(extdir)
|
35
|
+
zipfile = File.join(extdir, "#{ext_name}.zip")
|
36
|
+
open(zipfile, "wb") do |tgz|
|
37
|
+
tgz << fetch(download_link).body
|
38
|
+
end
|
39
|
+
puts "Unzipping the #{ext_name} plugin."
|
40
|
+
Zip::ZipFile::open(zipfile) { |zf|
|
41
|
+
zf.each { |e|
|
42
|
+
fpath = File.join(extdir, e.name)
|
43
|
+
FileUtils.mkdir_p(File.dirname(fpath))
|
44
|
+
zf.extract(e, fpath)
|
45
|
+
}
|
46
|
+
}
|
47
|
+
File.unlink(zipfile)
|
48
|
+
funky_directory = Dir.glob(File.join(extdir,"#{user}-#{project}-*"))[0]
|
49
|
+
FileUtils.mv(funky_directory, File.join(extdir, ext_name))
|
50
|
+
puts "#{ext_name} installed."
|
51
|
+
rescue Exception => e
|
52
|
+
FileUtils.rm_rf(extdir)
|
53
|
+
raise
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
%html
|
2
|
+
%head
|
3
|
+
%link{ :href => "stylesheets/screen.css", :rel => "stylesheet", :media => "screen", :type => "text/css", :charset => "utf-8" }
|
4
|
+
%body
|
5
|
+
#logo-large
|
6
|
+
%span.selector
|
7
|
+
un
|
8
|
+
%span.brace
|
9
|
+
{
|
10
|
+
%span.rule
|
11
|
+
ob:tru-sive;
|
12
|
+
%span.brace
|
13
|
+
}
|
14
|
+
#logo-medium
|
15
|
+
%span.selector
|
16
|
+
un
|
17
|
+
%span.brace
|
18
|
+
{
|
19
|
+
%span.rule
|
20
|
+
ob:tru-sive;
|
21
|
+
%span.brace
|
22
|
+
}
|
23
|
+
#logo
|
24
|
+
%span.selector
|
25
|
+
un
|
26
|
+
%span.brace
|
27
|
+
{
|
28
|
+
%span.rule
|
29
|
+
ob:tru-sive;
|
30
|
+
%span.brace
|
31
|
+
}
|
32
|
+
#logo-small
|
33
|
+
%span.selector
|
34
|
+
un
|
35
|
+
%span.brace
|
36
|
+
{
|
37
|
+
%span.rule
|
38
|
+
ob:tru-sive;
|
39
|
+
%span.brace
|
40
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/*
|
2
|
+
Welcome to Compass.
|
3
|
+
In this file you should write your main styles. (or centralize your imports)
|
4
|
+
Import this file using the following HTML or equivalent:
|
5
|
+
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
6
|
+
|
7
|
+
@import compass/reset.sass
|
8
|
+
@import compass/misc.sass
|
9
|
+
|
10
|
+
#logo-large,
|
11
|
+
#logo-medium,
|
12
|
+
#logo,
|
13
|
+
#logo-small
|
14
|
+
:text-align center
|
15
|
+
:margin
|
16
|
+
:bottom 40px
|
17
|
+
|
18
|
+
#logo-large
|
19
|
+
+unobtrusive-logo(3em)
|
20
|
+
:margin-top 20px
|
21
|
+
|
22
|
+
#logo-medium
|
23
|
+
+unobtrusive-logo(2em)
|
24
|
+
|
25
|
+
#logo
|
26
|
+
+unobtrusive-logo
|
27
|
+
|
28
|
+
#logo-small
|
29
|
+
+unobtrusive-logo(0.5em)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
project_type = :stand_alone
|
2
|
+
# Set this to the root of your project when deployed:
|
3
|
+
http_path = "/"
|
4
|
+
css_dir = "stylesheets"
|
5
|
+
sass_dir = "src"
|
6
|
+
images_dir = "images"
|
7
|
+
output_style = :compact
|
8
|
+
# To enable relative paths to assets via compass helper functions. Uncomment:
|
9
|
+
# relative_assets = true
|
@@ -0,0 +1,56 @@
|
|
1
|
+
960 Grid System - Compass Plugin
|
2
|
+
================================
|
3
|
+
|
4
|
+
* Port of Version 1.0
|
5
|
+
* 2008-03-24
|
6
|
+
|
7
|
+
Created by Nathan Smith. See the official site for more info: <http://960.gs/>
|
8
|
+
|
9
|
+
---------
|
10
|
+
|
11
|
+
This plugin adds the 960 Grid System framework to [Compass](http://compass-style.org/).
|
12
|
+
|
13
|
+
Install
|
14
|
+
=======
|
15
|
+
|
16
|
+
sudo gem install chriseppstein-compass
|
17
|
+
sudo gem install chriseppstein-compass-960-plugin
|
18
|
+
|
19
|
+
Create a 960-based Compass Project
|
20
|
+
==================================
|
21
|
+
|
22
|
+
compass -r ninesixty -f 960 <project name>
|
23
|
+
|
24
|
+
Then edit your `grid.sass` and `text.sass` files accordingly. A reset is added into grid.sass automatically.
|
25
|
+
|
26
|
+
Customizing your Grid System
|
27
|
+
============================
|
28
|
+
|
29
|
+
To create a grid system with other number of columns use the `+grid-system` mixin to generate
|
30
|
+
the corresponding classes.
|
31
|
+
|
32
|
+
Example:
|
33
|
+
|
34
|
+
#wrap
|
35
|
+
+grid-system(24)
|
36
|
+
|
37
|
+
Making Semantic Grids
|
38
|
+
=====================
|
39
|
+
|
40
|
+
* Use the `+grid-container` mixin to declare your container element.
|
41
|
+
* Use the `+grid` mixin to declare a grid element.
|
42
|
+
* Use the `+alpha` and `+omega` mixins to declare the first and last grid elements for a row.
|
43
|
+
* User the `+grid-prefix` and `+grid-suffix` mixins to add grid columns before or after a grid element.
|
44
|
+
|
45
|
+
Example:
|
46
|
+
|
47
|
+
#wrap
|
48
|
+
+grid-container
|
49
|
+
#left-nav
|
50
|
+
+alpha
|
51
|
+
+grid(5,16)
|
52
|
+
#main-content
|
53
|
+
+grid-prefix(1,16)
|
54
|
+
+grid(10, 16)
|
55
|
+
+omega
|
56
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{compass-960-plugin}
|
5
|
+
s.version = "0.9.10"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Chris Eppstein"]
|
9
|
+
s.date = %q{2009-09-27}
|
10
|
+
s.description = %q{The 960 Grid System is an effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. http://960.gs/}
|
11
|
+
s.email = %q{chris@eppsteins.net}
|
12
|
+
s.extra_rdoc_files = ["lib/ninesixty/compass_plugin.rb", "lib/ninesixty.rb", "README.mkdn"]
|
13
|
+
s.files = ["compass-960-plugin.gemspec", "lib/ninesixty/compass_plugin.rb", "lib/ninesixty.rb", "Manifest", "Rakefile", "README.mkdn", "sass/960/_grid.sass", "sass/960/_text.sass", "templates/project/grid.sass", "templates/project/manifest.rb", "templates/project/text.sass", "VERSION"]
|
14
|
+
s.homepage = %q{http://github.com/chriseppstein/compass-960-plugin}
|
15
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Compass-960-plugin", "--main", "README.mkdn"]
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
s.rubyforge_project = %q{compass-960-plugin}
|
18
|
+
s.rubygems_version = %q{1.3.3}
|
19
|
+
s.summary = %q{Compass compatible Sass port of 960.gs.}
|
20
|
+
|
21
|
+
if s.respond_to? :specification_version then
|
22
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
23
|
+
s.specification_version = 3
|
24
|
+
|
25
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
26
|
+
s.add_runtime_dependency(%q<chriseppstein-compass>, [">= 0"])
|
27
|
+
s.add_development_dependency(%q<echoe>, [">= 0"])
|
28
|
+
else
|
29
|
+
s.add_dependency(%q<chriseppstein-compass>, [">= 0"])
|
30
|
+
s.add_dependency(%q<echoe>, [">= 0"])
|
31
|
+
end
|
32
|
+
else
|
33
|
+
s.add_dependency(%q<chriseppstein-compass>, [">= 0"])
|
34
|
+
s.add_dependency(%q<echoe>, [">= 0"])
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'ninesixty', 'compass_plugin')
|
@@ -0,0 +1,5 @@
|
|
1
|
+
options = Hash.new
|
2
|
+
options[:stylesheets_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'sass'))
|
3
|
+
options[:templates_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'templates'))
|
4
|
+
|
5
|
+
Compass::Frameworks.register('960', options)
|
@@ -0,0 +1,64 @@
|
|
1
|
+
!ninesixty_gutter_width ||= 20px
|
2
|
+
!ninesixty_grid_width ||= 960px
|
3
|
+
!ninesixty_columns ||= 12
|
4
|
+
|
5
|
+
=grid-container
|
6
|
+
:margin-left auto
|
7
|
+
:margin-right auto
|
8
|
+
:width= !ninesixty_grid_width
|
9
|
+
|
10
|
+
=grid-width(!n, !cols = !ninesixty_columns, !gutter_width = !ninesixty_gutter_width)
|
11
|
+
:width= (!ninesixty_grid_width / !cols) * !n - !gutter_width
|
12
|
+
|
13
|
+
=grid-unit-base(!gutter_width = !ninesixty_gutter_width)
|
14
|
+
:display inline
|
15
|
+
:float left
|
16
|
+
:margin
|
17
|
+
:left= !gutter_width / 2
|
18
|
+
:right= !gutter_width / 2
|
19
|
+
|
20
|
+
=grid(!n, !cols = !ninesixty_columns, !gutter_width = !ninesixty_gutter_width)
|
21
|
+
+grid-unit-base(!gutter_width)
|
22
|
+
+grid-width(!n, !cols, !gutter_width)
|
23
|
+
|
24
|
+
=alpha
|
25
|
+
:margin-left 0
|
26
|
+
|
27
|
+
=omega
|
28
|
+
:margin-right 0
|
29
|
+
|
30
|
+
=grids(!cols = !ninesixty_columns, !gutter_width = !ninesixty_gutter_width)
|
31
|
+
#{enumerate(".grid",1,!cols,"_")}
|
32
|
+
+grid-unit-base
|
33
|
+
@for !n from 1 through !cols
|
34
|
+
.grid_#{!n}
|
35
|
+
+grid-width(!n, !cols, !gutter_width)
|
36
|
+
|
37
|
+
=grid-prefix(!n, !cols = !ninesixty_columns)
|
38
|
+
:padding-left= (!ninesixty_grid_width / !cols) * !n
|
39
|
+
|
40
|
+
=grid-prefixes(!cols = !ninesixty_columns)
|
41
|
+
@for !n from 1 through !cols - 1
|
42
|
+
.prefix_#{!n}
|
43
|
+
+grid-prefix(!n, !cols)
|
44
|
+
|
45
|
+
=grid-suffix(!n, !cols = !ninesixty_columns)
|
46
|
+
:padding-right= (!ninesixty_grid_width / !cols) * !n
|
47
|
+
|
48
|
+
=grid-suffixes(!cols = !ninesixty_columns)
|
49
|
+
@for !n from 1 through !cols - 1
|
50
|
+
.suffix_#{!n}
|
51
|
+
+grid-suffix(!n, !cols)
|
52
|
+
|
53
|
+
=grid-children
|
54
|
+
.alpha
|
55
|
+
+alpha
|
56
|
+
.omega
|
57
|
+
+omega
|
58
|
+
|
59
|
+
=grid-system(!cols = !ninesixty_columns)
|
60
|
+
+grid-container
|
61
|
+
+grids(!cols)
|
62
|
+
+grid-prefixes(!cols)
|
63
|
+
+grid-suffixes(!cols)
|
64
|
+
+grid-children
|
@@ -0,0 +1,59 @@
|
|
1
|
+
!ninesixty_font_family ||= "Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif"
|
2
|
+
|
3
|
+
=text(!font_family = !ninesixty_font_family)
|
4
|
+
body
|
5
|
+
:font= "13px/1.5" !font_family
|
6
|
+
|
7
|
+
a:focus
|
8
|
+
:outline 1px dotted invert
|
9
|
+
|
10
|
+
hr
|
11
|
+
:border-color #ccc
|
12
|
+
:border-style solid
|
13
|
+
:border-width 1px 0 0
|
14
|
+
:clear both
|
15
|
+
:height 0
|
16
|
+
|
17
|
+
h1
|
18
|
+
:font-size 25px
|
19
|
+
|
20
|
+
h2
|
21
|
+
:font-size 23px
|
22
|
+
|
23
|
+
h3
|
24
|
+
:font-size 21px
|
25
|
+
|
26
|
+
h4
|
27
|
+
:font-size 19px
|
28
|
+
|
29
|
+
h5
|
30
|
+
:font-size 17px
|
31
|
+
|
32
|
+
h6
|
33
|
+
:font-size 15px
|
34
|
+
|
35
|
+
ol
|
36
|
+
:list-style decimal
|
37
|
+
|
38
|
+
ul
|
39
|
+
:list-style square
|
40
|
+
|
41
|
+
li
|
42
|
+
:margin-left 30px
|
43
|
+
|
44
|
+
p,
|
45
|
+
dl,
|
46
|
+
hr,
|
47
|
+
h1,
|
48
|
+
h2,
|
49
|
+
h3,
|
50
|
+
h4,
|
51
|
+
h5,
|
52
|
+
h6,
|
53
|
+
ol,
|
54
|
+
ul,
|
55
|
+
pre,
|
56
|
+
table,
|
57
|
+
address,
|
58
|
+
fieldset
|
59
|
+
:margin-bottom 20px
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/*
|
2
|
+
960 Grid System ~ Core CSS.
|
3
|
+
Learn more ~ http://960.gs/
|
4
|
+
|
5
|
+
Licensed under GPL and MIT.
|
6
|
+
|
7
|
+
@import compass/utilities/general/reset.sass
|
8
|
+
@import 960/grid.sass
|
9
|
+
|
10
|
+
+global-reset
|
11
|
+
|
12
|
+
// The following generates the default grids provided by the css version of 960.gs
|
13
|
+
.container_12
|
14
|
+
+grid-system(12)
|
15
|
+
|
16
|
+
.container_16
|
17
|
+
+grid-system(16)
|
18
|
+
|
19
|
+
// But most compass users prefer to construct semantic layouts like so (two column layout with header and footer):
|
20
|
+
|
21
|
+
!ninesixty_columns = 24
|
22
|
+
.two-column
|
23
|
+
+grid-container
|
24
|
+
#header,
|
25
|
+
#footer,
|
26
|
+
#sidebar,
|
27
|
+
#main-content
|
28
|
+
+grid-unit-base
|
29
|
+
#header, #footer
|
30
|
+
+grid-width(24)
|
31
|
+
#sidebar
|
32
|
+
+grid-width(8)
|
33
|
+
#main-content
|
34
|
+
+grid-width(16)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/*
|
2
|
+
960 Grid System ~ Core CSS.
|
3
|
+
Learn more ~ http://960.gs/
|
4
|
+
|
5
|
+
Licensed under GPL and MIT.
|
6
|
+
|
7
|
+
@import compass/utilities/general/reset.sass
|
8
|
+
@import 960/grid.sass
|
9
|
+
|
10
|
+
+global-reset
|
11
|
+
|
12
|
+
.container_12
|
13
|
+
+grid-system(12)
|
14
|
+
|
15
|
+
.container_16
|
16
|
+
+grid-system(16)
|