awestruct 0.5.6.beta5 → 0.5.6.beta6
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.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/awestruct.gemspec +1 -1
- data/lib/awestruct/cli/options.rb +1 -1
- data/lib/awestruct/engine.rb +57 -6
- data/lib/awestruct/version.rb +1 -1
- data/spec/awestruct/cli/init_spec.rb +1 -1
- data/spec/awestruct/cli/options_spec.rb +1 -1
- data/spec/awestruct/engine_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db7e55c31a2f868ff2af456fa99b3973cca5ace4
|
4
|
+
data.tar.gz: 75fa63745025b3c997570656784aa9a0d90d4282
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 434c89d4a35282060da472a792200ee1d6b0ec591562776f87af431bf4cee4a688741bf3c95df8ebe34c844c6e37d2e09aa02b018e660f85a505be6a35df804a
|
7
|
+
data.tar.gz: c7ff96fc604bdf64d679aadc7ab155880755e188f0df655df374fa224559062be1c5073d0252677ca3cd05d005bb69be33684f2a372886766723bb2c432fdebb
|
data/Gemfile
CHANGED
@@ -5,8 +5,8 @@ group :development do
|
|
5
5
|
gem 'rspec', '~> 2.14.1'
|
6
6
|
gem 'rake', '~> 10.2.2'
|
7
7
|
gem 'guard-rspec', '~> 4.2.0', :require => false
|
8
|
-
|
9
|
-
|
8
|
+
gem 'pry', :require => false
|
9
|
+
gem 'pry-byebug', :require => false
|
10
10
|
end
|
11
11
|
|
12
12
|
group :test do
|
data/awestruct.gemspec
CHANGED
@@ -4,7 +4,7 @@ require 'awestruct/version'
|
|
4
4
|
spec = Gem::Specification.new do |s|
|
5
5
|
s.name = 'awestruct'
|
6
6
|
s.version = Awestruct::VERSION
|
7
|
-
s.date = '2014-11-
|
7
|
+
s.date = '2014-11-12'
|
8
8
|
|
9
9
|
s.authors = ['Bob McWhirter', 'Jason Porter', 'Lance Ball', 'Dan Allen', 'Torsten Curdt', 'other contributors']
|
10
10
|
s.email = ['bob@mcwhirter.org', 'lightguard.jp@gmail.com', 'lball@redhat.com', 'dan.j.allen@gmail.com', 'tcurdt@vafer.org']
|
data/lib/awestruct/engine.rb
CHANGED
@@ -3,7 +3,6 @@ require 'awestruct/util/exception_helper'
|
|
3
3
|
require 'awestruct/util/default_inflections'
|
4
4
|
|
5
5
|
require 'awestruct/config'
|
6
|
-
require 'awestruct/compass/default_configuration'
|
7
6
|
require 'awestruct/site'
|
8
7
|
require 'awestruct/pipeline'
|
9
8
|
require 'awestruct/page'
|
@@ -267,14 +266,66 @@ module Awestruct
|
|
267
266
|
site.css_dir = File.join( site.config.output_dir, 'stylesheets' )
|
268
267
|
site.javascripts_dir = File.join( site.config.dir, 'javascripts' )
|
269
268
|
|
270
|
-
|
269
|
+
::Compass.configuration do |config|
|
270
|
+
config.project_type = :stand_alone
|
271
|
+
config.environment = site.profile
|
272
|
+
config.project_path = site.config.dir
|
273
|
+
config.sass_path = File.join(config.project_path, 'stylesheets')
|
274
|
+
config.http_path = site.base_url || site.config.options.base_url || '/'
|
275
|
+
config.css_path = File.join(site.output_dir, 'stylesheets')
|
276
|
+
config.javascripts_path = File.join(site.output_dir, 'javascripts')
|
277
|
+
config.http_javascripts_dir = File.join(config.http_path, 'javascripts')
|
278
|
+
config.http_stylesheets_dir = File.join(config.http_path, 'stylesheets')
|
279
|
+
config.generated_images_dir = File.join(site.output_dir, 'images')
|
280
|
+
config.http_generated_images_dir = File.join(config.http_path, 'images')
|
281
|
+
config.sprite_load_path = [config.images_path]
|
282
|
+
config.http_images_dir = File.join(config.http_path, 'images')
|
283
|
+
config.images_path = File.join(config.project_path, 'images')
|
284
|
+
config.fonts_dir = 'fonts'
|
285
|
+
config.fonts_path = File.join(config.project_path, 'fonts')
|
286
|
+
config.http_fonts_dir = File.join(config.http_path, 'fonts')
|
287
|
+
|
288
|
+
config.line_comments = lambda do
|
289
|
+
if site.profile.eql? 'production'
|
290
|
+
return false
|
291
|
+
else
|
292
|
+
if site.key? :compass_line_comments
|
293
|
+
return site.compass_line_comments
|
294
|
+
end
|
295
|
+
if site.key?(:scss) && site.scss.key?(:line_comments)
|
296
|
+
return site.scss.line_comments
|
297
|
+
end
|
298
|
+
if site.key?(:sass) && site.sass.key?(:line_comments)
|
299
|
+
return site.sass.line_comments
|
300
|
+
end
|
301
|
+
true
|
302
|
+
end
|
303
|
+
end.call
|
304
|
+
|
305
|
+
config.output_style = lambda do
|
306
|
+
if site.profile.eql? 'production'
|
307
|
+
return :compressed
|
308
|
+
else
|
309
|
+
if site.key? :compass_output_style
|
310
|
+
return site.compass_output_style
|
311
|
+
end
|
312
|
+
if (site.key? :scss) && (site.scss.key? :style)
|
313
|
+
return site.scss.style
|
314
|
+
end
|
315
|
+
if (site.key? :sass) && (site.sass.key? :style)
|
316
|
+
return site.sass.style
|
317
|
+
end
|
318
|
+
end
|
319
|
+
:expanded
|
320
|
+
end.call
|
321
|
+
|
322
|
+
config.relative_assets = false
|
323
|
+
end
|
324
|
+
|
271
325
|
compass_config_file = File.join(site.config.config_dir, 'compass.rb')
|
272
326
|
if (File.exists? compass_config_file)
|
273
|
-
|
327
|
+
::Compass.add_configuration ::Compass::Configuration::FileData.new_from_file(compass_config_file)
|
274
328
|
end
|
275
|
-
|
276
|
-
::Compass.reset_configuration!
|
277
|
-
::Compass.add_configuration default_config
|
278
329
|
::Compass.configuration # return for use elsewhere
|
279
330
|
|
280
331
|
# TODO: Should we add an on_stylesheet_error block?
|
data/lib/awestruct/version.rb
CHANGED
@@ -13,6 +13,6 @@ describe Awestruct::CLI::Init do
|
|
13
13
|
|
14
14
|
it "should not fail during init" do
|
15
15
|
init = Awestruct::CLI::Init.new('spec/support/clean_init', 'compass', true)
|
16
|
-
expect(init.run).to eql true
|
16
|
+
expect(init.run).to eql true # There may be some sort of race condition here
|
17
17
|
end
|
18
18
|
end
|
@@ -19,7 +19,7 @@ describe Awestruct::CLI::Options do
|
|
19
19
|
options.framework.should == 'compass'
|
20
20
|
options.scaffold.should == true
|
21
21
|
|
22
|
-
options.base_url.should ==
|
22
|
+
options.base_url.should == 'http://localhost:4242'
|
23
23
|
options.profile.should == nil
|
24
24
|
options.script.should == nil
|
25
25
|
options.verbose.should == false
|
@@ -103,7 +103,7 @@ describe Awestruct::Engine do
|
|
103
103
|
|
104
104
|
expect( Compass.configuration.line_comments ).to eq false
|
105
105
|
expect( Compass.configuration.output_style ).to eq :compressed
|
106
|
-
expect( Compass.configuration.http_path ).to
|
106
|
+
expect( Compass.configuration.http_path ).to eq "http://localhost:4242"
|
107
107
|
expect( Compass.configuration.relative_assets ).to eq false
|
108
108
|
end
|
109
109
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awestruct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.6.
|
4
|
+
version: 0.5.6.beta6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob McWhirter
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2014-11-
|
16
|
+
date: 2014-11-12 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: haml
|