chriseppstein-compass 0.6.15 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.markdown +170 -0
- data/LICENSE.markdown +29 -0
- data/README.markdown +10 -2
- data/REVISION +1 -1
- data/Rakefile +126 -0
- data/VERSION.yml +2 -2
- data/deps.rip +1 -0
- data/examples/blueprint_default/src/images/grid.png +0 -0
- data/examples/blueprint_plugins/src/images/grid.png +0 -0
- data/examples/blueprint_scoped/images/grid.png +0 -0
- data/examples/blueprint_scoped_form/images/grid.png +0 -0
- data/examples/blueprint_semantic/src/images/grid.png +0 -0
- data/examples/blueprint_semantic/src/liquid.sass +2 -2
- data/examples/blueprint_semantic/src/screen.sass +3 -3
- data/examples/compass/src/images/blue_arrow.gif +0 -0
- data/frameworks/blueprint/stylesheets/blueprint/_ie.sass +42 -0
- data/frameworks/blueprint/stylesheets/blueprint/_reset.sass +3 -0
- data/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +10 -9
- data/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +35 -23
- data/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +7 -7
- data/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +56 -0
- data/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +2 -2
- data/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +2 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +3 -2
- data/frameworks/blueprint/templates/project/manifest.rb +2 -1
- data/frameworks/blueprint/templates/project/partials/_base.sass +11 -0
- data/frameworks/blueprint/templates/project/screen.sass +38 -6
- data/frameworks/compass/stylesheets/compass/_utilities.sass +1 -0
- data/frameworks/compass/stylesheets/compass/utilities/_sprites.sass +1 -0
- data/frameworks/compass/stylesheets/compass/utilities/general/_reset.sass +106 -28
- data/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +1 -1
- data/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite_img.sass +12 -0
- data/frameworks/compass/stylesheets/compass/utilities/text/_replacement.sass +10 -3
- data/frameworks/compass/templates/project/manifest.rb +1 -1
- data/frameworks/compass/templates/project/screen.sass +6 -0
- data/lib/compass/actions.rb +7 -0
- data/lib/compass/{merb.rb → app_integration/merb.rb} +0 -0
- data/lib/compass/app_integration/rails/action_controller.rb +15 -0
- data/lib/compass/app_integration/rails/image_url.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.rb +12 -0
- data/lib/compass/app_integration.rb +5 -0
- data/lib/compass/commands/project_base.rb +12 -2
- data/lib/compass/commands/update_project.rb +13 -3
- data/lib/compass/commands/watch_project.rb +27 -28
- data/lib/compass/commands/write_configuration.rb +5 -1
- data/lib/compass/compiler.rb +14 -2
- data/lib/compass/configuration.rb +78 -2
- data/lib/compass/exec.rb +78 -37
- data/lib/compass/installers/base.rb +4 -2
- data/lib/compass/installers/rails.rb +3 -2
- data/lib/compass/installers/stand_alone.rb +3 -2
- 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/image_url.rb +88 -0
- data/lib/compass/sass_extensions/functions/inline_image.rb +35 -0
- data/lib/compass/sass_extensions/functions/selectors.rb +39 -0
- data/lib/compass/sass_extensions/functions.rb +19 -0
- data/lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb +23 -0
- data/lib/compass/sass_extensions/monkey_patches.rb +3 -0
- data/lib/compass/sass_extensions.rb +5 -0
- data/lib/compass/version.rb +2 -3
- data/lib/compass.rb +3 -18
- data/test/command_line_helper.rb +102 -0
- data/test/command_line_test.rb +2 -106
- data/test/compass_test.rb +18 -6
- data/test/configuration_test.rb +73 -0
- data/test/fixtures/stylesheets/blueprint/images/grid.png +0 -0
- data/test/fixtures/stylesheets/compass/css/reset.css +42 -46
- data/test/fixtures/stylesheets/compass/sass/reset.sass +9 -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/rails_integration_test.rb +83 -0
- data/test/sass_extensions_test.rb +0 -1
- data/test/test_case_helper.rb +13 -0
- data/test/test_helper.rb +3 -27
- data/test/test_rails_helper.rb +20 -0
- metadata +51 -4
- data/lib/sass_extensions.rb +0 -67
@@ -0,0 +1,83 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__),'test_helper')
|
2
|
+
require 'fileutils'
|
3
|
+
require 'compass'
|
4
|
+
require 'compass/exec'
|
5
|
+
require 'timeout'
|
6
|
+
|
7
|
+
class RailsIntegrationTest < Test::Unit::TestCase
|
8
|
+
include Compass::TestCaseHelper
|
9
|
+
include Compass::CommandLineHelper
|
10
|
+
|
11
|
+
def setup
|
12
|
+
Compass.configuration.reset!
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_rails_install
|
16
|
+
within_tmp_directory do
|
17
|
+
generate_rails_app_directories("compass_rails")
|
18
|
+
Dir.chdir "compass_rails" do
|
19
|
+
compass("--rails", '--trace', ".") do |responder|
|
20
|
+
responder.respond_to "Is this OK? (Y/n) ", :with => "Y", :required => true
|
21
|
+
responder.respond_to "Emit compiled stylesheets to public/stylesheets/compiled/? (Y/n) ", :with => "Y", :required => true
|
22
|
+
end
|
23
|
+
# puts ">>>#{@last_result}<<<"
|
24
|
+
assert_action_performed :create, "./app/stylesheets/screen.sass"
|
25
|
+
assert_action_performed :create, "./config/initializers/compass.rb"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
rescue LoadError
|
29
|
+
puts "Skipping rails test. Couldn't Load rails"
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_rails_install_with_no_dialog
|
33
|
+
within_tmp_directory do
|
34
|
+
generate_rails_app_directories("compass_rails")
|
35
|
+
Dir.chdir "compass_rails" do
|
36
|
+
compass(*%w(--rails --trace --sass-dir app/stylesheets --css-dir public/stylesheets/compiled .))
|
37
|
+
assert_action_performed :create, "./app/stylesheets/screen.sass"
|
38
|
+
assert_action_performed :create, "./config/initializers/compass.rb"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
rescue LoadError
|
42
|
+
puts "Skipping rails test. Couldn't Load rails"
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
def generate_rails_app_directories(name)
|
47
|
+
Dir.mkdir name
|
48
|
+
Dir.mkdir File.join(name, "config")
|
49
|
+
Dir.mkdir File.join(name, "config", "initializers")
|
50
|
+
end
|
51
|
+
|
52
|
+
# Generate a rails application without polluting our current set of requires
|
53
|
+
# with the rails libraries. This will allow testing against multiple versions of rails
|
54
|
+
# by manipulating the load path.
|
55
|
+
def generate_rails_app(name)
|
56
|
+
if pid = fork
|
57
|
+
Process.wait(pid)
|
58
|
+
if $?.exitstatus == 2
|
59
|
+
raise LoadError, "Couldn't load rails"
|
60
|
+
elsif $?.exitstatus != 0
|
61
|
+
raise "Failed to generate rails application."
|
62
|
+
end
|
63
|
+
else
|
64
|
+
begin
|
65
|
+
require 'rails/version'
|
66
|
+
require 'rails_generator'
|
67
|
+
require 'rails_generator/scripts/generate'
|
68
|
+
Rails::Generator::Base.use_application_sources!
|
69
|
+
capture_output do
|
70
|
+
Rails::Generator::Base.logger = Rails::Generator::SimpleLogger.new $stdout
|
71
|
+
Rails::Generator::Scripts::Generate.new.run([name], :generator => 'app')
|
72
|
+
end
|
73
|
+
rescue LoadError
|
74
|
+
Kernel.exit(2)
|
75
|
+
rescue => e
|
76
|
+
$stderr.puts e
|
77
|
+
Kernel.exit!(1)
|
78
|
+
end
|
79
|
+
Kernel.exit!(0)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,15 +1,4 @@
|
|
1
|
-
# allows testing with edge Rails by creating a test/rails symlink
|
2
|
-
RAILS_ROOT = linked_rails = File.dirname(__FILE__) + '/rails'
|
3
|
-
RAILS_ENV = 'test'
|
4
|
-
|
5
1
|
need_gems = false
|
6
|
-
if File.exists?(linked_rails) && !$:.include?(linked_rails + '/activesupport/lib')
|
7
|
-
puts "[ using linked Rails ]"
|
8
|
-
$:.unshift linked_rails + '/activesupport/lib'
|
9
|
-
$:.unshift linked_rails + '/actionpack/lib'
|
10
|
-
else
|
11
|
-
need_gems = true
|
12
|
-
end
|
13
2
|
|
14
3
|
# allows testing with edge Haml by creating a test/haml symlink
|
15
4
|
linked_haml = File.dirname(__FILE__) + '/haml'
|
@@ -24,22 +13,9 @@ end
|
|
24
13
|
|
25
14
|
require 'rubygems' if need_gems
|
26
15
|
|
27
|
-
require '
|
28
|
-
require 'action_view'
|
29
|
-
|
16
|
+
require 'compass'
|
30
17
|
|
31
18
|
require 'test/unit'
|
32
19
|
|
33
|
-
|
34
|
-
|
35
|
-
def absolutize(path)
|
36
|
-
if path.blank?
|
37
|
-
File.dirname(__FILE__)
|
38
|
-
elsif path[0] == ?/
|
39
|
-
"#{File.dirname(__FILE__)}#{path}"
|
40
|
-
else
|
41
|
-
"#{File.dirname(__FILE__)}/#{path}"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
20
|
+
require File.join(File.dirname(__FILE__), 'test_case_helper')
|
21
|
+
require File.join(File.dirname(__FILE__), 'command_line_helper')
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# XXX This file isn't in use at the moment, but will be used to help test
|
2
|
+
# XXX deep rails integration of compass features.
|
3
|
+
need_gems = false
|
4
|
+
|
5
|
+
# allows testing with edge Rails by creating a test/rails symlink
|
6
|
+
RAILS_ROOT = linked_rails = File.dirname(__FILE__) + '/rails'
|
7
|
+
RAILS_ENV = 'test'
|
8
|
+
|
9
|
+
if File.exists?(linked_rails) && !$:.include?(linked_rails + '/activesupport/lib')
|
10
|
+
puts "[ using linked Rails ]"
|
11
|
+
$:.unshift linked_rails + '/activesupport/lib'
|
12
|
+
$:.unshift linked_rails + '/actionpack/lib'
|
13
|
+
else
|
14
|
+
need_gems = true
|
15
|
+
end
|
16
|
+
|
17
|
+
require 'rubygems' if need_gems
|
18
|
+
|
19
|
+
require 'action_controller'
|
20
|
+
require 'action_view'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chriseppstein-compass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Eppstein
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-06-
|
12
|
+
date: 2009-06-28 00:00:00 -07:00
|
13
13
|
default_executable: compass
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -29,13 +29,17 @@ executables:
|
|
29
29
|
extensions: []
|
30
30
|
|
31
31
|
extra_rdoc_files:
|
32
|
+
- LICENSE.markdown
|
32
33
|
- README.markdown
|
33
34
|
files:
|
34
35
|
- CHANGELOG.markdown
|
36
|
+
- LICENSE.markdown
|
35
37
|
- README.markdown
|
36
38
|
- REVISION
|
39
|
+
- Rakefile
|
37
40
|
- VERSION.yml
|
38
41
|
- bin/compass
|
42
|
+
- deps.rip
|
39
43
|
- examples/blueprint_default/config.rb
|
40
44
|
- examples/blueprint_default/images/grid.png
|
41
45
|
- examples/blueprint_default/index.html.haml
|
@@ -46,6 +50,7 @@ files:
|
|
46
50
|
- examples/blueprint_default/parts/test.jpg
|
47
51
|
- examples/blueprint_default/parts/valid.png
|
48
52
|
- examples/blueprint_default/src/ie.sass
|
53
|
+
- examples/blueprint_default/src/images/grid.png
|
49
54
|
- examples/blueprint_default/src/print.sass
|
50
55
|
- examples/blueprint_default/src/screen.sass
|
51
56
|
- examples/blueprint_plugins/config.rb
|
@@ -71,13 +76,16 @@ files:
|
|
71
76
|
- examples/blueprint_plugins/plugins/rtl.html.haml
|
72
77
|
- examples/blueprint_plugins/src/buttons.sass
|
73
78
|
- examples/blueprint_plugins/src/ie.sass
|
79
|
+
- examples/blueprint_plugins/src/images/grid.png
|
74
80
|
- examples/blueprint_plugins/src/link_icons.sass
|
75
81
|
- examples/blueprint_plugins/src/print.sass
|
76
82
|
- examples/blueprint_plugins/src/rtl_screen.sass
|
77
83
|
- examples/blueprint_plugins/src/screen.sass
|
84
|
+
- examples/blueprint_scoped/images/grid.png
|
78
85
|
- examples/blueprint_scoped/src/ie.sass
|
79
86
|
- examples/blueprint_scoped/src/print.sass
|
80
87
|
- examples/blueprint_scoped/src/screen.sass
|
88
|
+
- examples/blueprint_scoped_form/images/grid.png
|
81
89
|
- examples/blueprint_scoped_form/src/ie.sass
|
82
90
|
- examples/blueprint_scoped_form/src/print.sass
|
83
91
|
- examples/blueprint_scoped_form/src/screen.sass
|
@@ -90,6 +98,7 @@ files:
|
|
90
98
|
- examples/blueprint_semantic/parts/test.jpg
|
91
99
|
- examples/blueprint_semantic/parts/valid.png
|
92
100
|
- examples/blueprint_semantic/src/ie.sass
|
101
|
+
- examples/blueprint_semantic/src/images/grid.png
|
93
102
|
- examples/blueprint_semantic/src/liquid.sass
|
94
103
|
- examples/blueprint_semantic/src/print.sass
|
95
104
|
- examples/blueprint_semantic/src/screen.sass
|
@@ -97,6 +106,7 @@ files:
|
|
97
106
|
- examples/compass/config.rb
|
98
107
|
- examples/compass/images/blue_arrow.gif
|
99
108
|
- examples/compass/src/compass.sass
|
109
|
+
- examples/compass/src/images/blue_arrow.gif
|
100
110
|
- examples/compass/src/sticky_footer.sass
|
101
111
|
- examples/compass/src/utilities.sass
|
102
112
|
- examples/compass/sticky_footer.html.haml
|
@@ -116,6 +126,7 @@ files:
|
|
116
126
|
- frameworks/blueprint/stylesheets/_blueprint.sass
|
117
127
|
- frameworks/blueprint/stylesheets/blueprint/_ie.sass
|
118
128
|
- frameworks/blueprint/stylesheets/blueprint/_print.sass
|
129
|
+
- frameworks/blueprint/stylesheets/blueprint/_reset.sass
|
119
130
|
- frameworks/blueprint/stylesheets/blueprint/_screen.sass
|
120
131
|
- frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass
|
121
132
|
- frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass
|
@@ -126,6 +137,7 @@ files:
|
|
126
137
|
- frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass
|
127
138
|
- frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass
|
128
139
|
- frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass
|
140
|
+
- frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass
|
129
141
|
- frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass
|
130
142
|
- frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass
|
131
143
|
- frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass
|
@@ -148,6 +160,7 @@ files:
|
|
148
160
|
- frameworks/blueprint/templates/project/grid.png
|
149
161
|
- frameworks/blueprint/templates/project/ie.sass
|
150
162
|
- frameworks/blueprint/templates/project/manifest.rb
|
163
|
+
- frameworks/blueprint/templates/project/partials/_base.sass
|
151
164
|
- frameworks/blueprint/templates/project/print.sass
|
152
165
|
- frameworks/blueprint/templates/project/screen.sass
|
153
166
|
- frameworks/compass.rb
|
@@ -161,6 +174,7 @@ files:
|
|
161
174
|
- frameworks/compass/stylesheets/compass/utilities/_links.sass
|
162
175
|
- frameworks/compass/stylesheets/compass/utilities/_lists.sass
|
163
176
|
- frameworks/compass/stylesheets/compass/utilities/_print.sass
|
177
|
+
- frameworks/compass/stylesheets/compass/utilities/_sprites.sass
|
164
178
|
- frameworks/compass/stylesheets/compass/utilities/_tables.sass
|
165
179
|
- frameworks/compass/stylesheets/compass/utilities/_text.sass
|
166
180
|
- frameworks/compass/stylesheets/compass/utilities/general/_clearfix.sass
|
@@ -176,6 +190,7 @@ files:
|
|
176
190
|
- frameworks/compass/stylesheets/compass/utilities/lists/_bullets.sass
|
177
191
|
- frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass
|
178
192
|
- frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass
|
193
|
+
- frameworks/compass/stylesheets/compass/utilities/sprites/_sprite_img.sass
|
179
194
|
- frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass
|
180
195
|
- frameworks/compass/stylesheets/compass/utilities/tables/_borders.sass
|
181
196
|
- frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.sass
|
@@ -195,6 +210,13 @@ files:
|
|
195
210
|
- frameworks/yui/templates/project/screen.sass
|
196
211
|
- lib/compass.rb
|
197
212
|
- lib/compass/actions.rb
|
213
|
+
- lib/compass/app_integration.rb
|
214
|
+
- lib/compass/app_integration/merb.rb
|
215
|
+
- lib/compass/app_integration/rails.rb
|
216
|
+
- lib/compass/app_integration/rails/action_controller.rb
|
217
|
+
- lib/compass/app_integration/rails/image_url.rb
|
218
|
+
- lib/compass/app_integration/rails/sass_plugin.rb
|
219
|
+
- lib/compass/app_integration/rails/templates/compass-install-rails.rb
|
198
220
|
- lib/compass/commands/base.rb
|
199
221
|
- lib/compass/commands/create_project.rb
|
200
222
|
- lib/compass/commands/generate_grid_background.rb
|
@@ -221,16 +243,25 @@ files:
|
|
221
243
|
- lib/compass/installers/rails.rb
|
222
244
|
- lib/compass/installers/stand_alone.rb
|
223
245
|
- lib/compass/logger.rb
|
224
|
-
- lib/compass/
|
246
|
+
- lib/compass/sass_extensions.rb
|
247
|
+
- lib/compass/sass_extensions/functions.rb
|
248
|
+
- lib/compass/sass_extensions/functions/display.rb
|
249
|
+
- lib/compass/sass_extensions/functions/enumerate.rb
|
250
|
+
- lib/compass/sass_extensions/functions/image_url.rb
|
251
|
+
- lib/compass/sass_extensions/functions/inline_image.rb
|
252
|
+
- lib/compass/sass_extensions/functions/selectors.rb
|
253
|
+
- lib/compass/sass_extensions/monkey_patches.rb
|
254
|
+
- lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb
|
225
255
|
- lib/compass/test_case.rb
|
226
256
|
- lib/compass/validator.rb
|
227
257
|
- lib/compass/version.rb
|
228
|
-
-
|
258
|
+
- test/command_line_helper.rb
|
229
259
|
- test/command_line_test.rb
|
230
260
|
- test/compass_test.rb
|
231
261
|
- test/configuration_test.rb
|
232
262
|
- test/fixtures/stylesheets/blueprint/config.rb
|
233
263
|
- test/fixtures/stylesheets/blueprint/css/typography.css
|
264
|
+
- test/fixtures/stylesheets/blueprint/images/grid.png
|
234
265
|
- test/fixtures/stylesheets/blueprint/sass/ie.sass
|
235
266
|
- test/fixtures/stylesheets/blueprint/sass/print.sass
|
236
267
|
- test/fixtures/stylesheets/blueprint/sass/screen.sass
|
@@ -244,14 +275,21 @@ files:
|
|
244
275
|
- test/fixtures/stylesheets/compass/sass/print.sass
|
245
276
|
- test/fixtures/stylesheets/compass/sass/reset.sass
|
246
277
|
- test/fixtures/stylesheets/compass/sass/utilities.sass
|
278
|
+
- test/fixtures/stylesheets/image_urls/config.rb
|
279
|
+
- test/fixtures/stylesheets/image_urls/css/screen.css
|
280
|
+
- test/fixtures/stylesheets/image_urls/images/grid.png
|
281
|
+
- test/fixtures/stylesheets/image_urls/sass/screen.sass
|
247
282
|
- test/fixtures/stylesheets/yui/config.rb
|
248
283
|
- test/fixtures/stylesheets/yui/css/mixins.css
|
249
284
|
- test/fixtures/stylesheets/yui/sass/base.sass
|
250
285
|
- test/fixtures/stylesheets/yui/sass/fonts.sass
|
251
286
|
- test/fixtures/stylesheets/yui/sass/grids.sass
|
252
287
|
- test/fixtures/stylesheets/yui/sass/mixins.sass
|
288
|
+
- test/rails_integration_test.rb
|
253
289
|
- test/sass_extensions_test.rb
|
290
|
+
- test/test_case_helper.rb
|
254
291
|
- test/test_helper.rb
|
292
|
+
- test/test_rails_helper.rb
|
255
293
|
has_rdoc: false
|
256
294
|
homepage: http://compass-style.org
|
257
295
|
post_install_message:
|
@@ -279,11 +317,13 @@ signing_key:
|
|
279
317
|
specification_version: 3
|
280
318
|
summary: A Real Stylesheet Framework
|
281
319
|
test_files:
|
320
|
+
- test/command_line_helper.rb
|
282
321
|
- test/command_line_test.rb
|
283
322
|
- test/compass_test.rb
|
284
323
|
- test/configuration_test.rb
|
285
324
|
- test/fixtures/stylesheets/blueprint/config.rb
|
286
325
|
- test/fixtures/stylesheets/blueprint/css/typography.css
|
326
|
+
- test/fixtures/stylesheets/blueprint/images/grid.png
|
287
327
|
- test/fixtures/stylesheets/blueprint/sass/ie.sass
|
288
328
|
- test/fixtures/stylesheets/blueprint/sass/print.sass
|
289
329
|
- test/fixtures/stylesheets/blueprint/sass/screen.sass
|
@@ -297,11 +337,18 @@ test_files:
|
|
297
337
|
- test/fixtures/stylesheets/compass/sass/print.sass
|
298
338
|
- test/fixtures/stylesheets/compass/sass/reset.sass
|
299
339
|
- test/fixtures/stylesheets/compass/sass/utilities.sass
|
340
|
+
- test/fixtures/stylesheets/image_urls/config.rb
|
341
|
+
- test/fixtures/stylesheets/image_urls/css/screen.css
|
342
|
+
- test/fixtures/stylesheets/image_urls/images/grid.png
|
343
|
+
- test/fixtures/stylesheets/image_urls/sass/screen.sass
|
300
344
|
- test/fixtures/stylesheets/yui/config.rb
|
301
345
|
- test/fixtures/stylesheets/yui/css/mixins.css
|
302
346
|
- test/fixtures/stylesheets/yui/sass/base.sass
|
303
347
|
- test/fixtures/stylesheets/yui/sass/fonts.sass
|
304
348
|
- test/fixtures/stylesheets/yui/sass/grids.sass
|
305
349
|
- test/fixtures/stylesheets/yui/sass/mixins.sass
|
350
|
+
- test/rails_integration_test.rb
|
306
351
|
- test/sass_extensions_test.rb
|
352
|
+
- test/test_case_helper.rb
|
307
353
|
- test/test_helper.rb
|
354
|
+
- test/test_rails_helper.rb
|
data/lib/sass_extensions.rb
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
require 'sass/plugin'
|
2
|
-
|
3
|
-
module Sass::Script::Functions
|
4
|
-
COMMA_SEPARATOR = /\s*,\s*/
|
5
|
-
|
6
|
-
def nest(*arguments)
|
7
|
-
nested = arguments.map{|a| a.value}.inject do |memo,arg|
|
8
|
-
ancestors = memo.split(COMMA_SEPARATOR)
|
9
|
-
descendants = arg.split(COMMA_SEPARATOR)
|
10
|
-
ancestors.map{|a| descendants.map{|d| "#{a} #{d}"}.join(", ")}.join(", ")
|
11
|
-
end
|
12
|
-
Sass::Script::String.new(nested)
|
13
|
-
end
|
14
|
-
|
15
|
-
def enumerate(prefix, from, through)
|
16
|
-
selectors = (from.value..through.value).map{|i| "#{prefix.value}-#{i}"}.join(", ")
|
17
|
-
Sass::Script::String.new(selectors)
|
18
|
-
end
|
19
|
-
|
20
|
-
def image_url(path)
|
21
|
-
if absolute_path?(path.value)
|
22
|
-
return Sass::Script::String.new("url(#{path})")
|
23
|
-
end
|
24
|
-
http_images_path = if Compass.configuration.http_images_path == :relative
|
25
|
-
if (target_css_file = options[:css_filename])
|
26
|
-
images_path = File.join(Compass.configuration.project_path, Compass.configuration.images_dir)
|
27
|
-
Pathname.new(images_path).relative_path_from(Pathname.new(File.dirname(target_css_file))).to_s
|
28
|
-
else
|
29
|
-
nil
|
30
|
-
end
|
31
|
-
else
|
32
|
-
Compass.configuration.http_images_path
|
33
|
-
end
|
34
|
-
if http_images_path
|
35
|
-
http_images_path = "#{http_images_path}/" unless http_images_path[-1..-1] == "/"
|
36
|
-
path = "#{http_images_path}#{path}"
|
37
|
-
end
|
38
|
-
Sass::Script::String.new("url(#{path})")
|
39
|
-
end
|
40
|
-
|
41
|
-
private
|
42
|
-
def absolute_path?(path)
|
43
|
-
path[0..0] == "/" || path[0..3] == "http"
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
# XXX: We can remove this check and monkeypatch once Sass 2.2 is released.
|
48
|
-
module Sass::Plugin
|
49
|
-
class << self
|
50
|
-
unless method_defined?(:exact_stylesheet_needs_update?)
|
51
|
-
def stylesheet_needs_update?(name, template_path, css_path)
|
52
|
-
css_file = css_filename(name, css_path)
|
53
|
-
template_file = template_filename(name, template_path)
|
54
|
-
exact_stylesheet_needs_update?(css_file, template_file)
|
55
|
-
end
|
56
|
-
def exact_stylesheet_needs_update?(css_file, template_file)
|
57
|
-
if !File.exists?(css_file)
|
58
|
-
return true
|
59
|
-
else
|
60
|
-
css_mtime = File.mtime(css_file)
|
61
|
-
File.mtime(template_file) > css_mtime ||
|
62
|
-
dependencies(template_file).any?(&dependency_updated?(css_mtime))
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|