awestruct 0.5.6.beta5 → 0.5.6.beta6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8da264db525dd9720d5fb24fcf7caa8f7e0be5f
4
- data.tar.gz: eccb58baf90c70f61768063f74afbfa2fdb6ec0d
3
+ metadata.gz: db7e55c31a2f868ff2af456fa99b3973cca5ace4
4
+ data.tar.gz: 75fa63745025b3c997570656784aa9a0d90d4282
5
5
  SHA512:
6
- metadata.gz: 28fed5e74ec3e7e0009a91a89712988d8e29cfc7baed8e2e7235598ad104930e472325e522e751a4f96ab0266050f43f493685d14c1b97a64b8672d6dcffa869
7
- data.tar.gz: f446847490a8208a8da6884a0511a9fcfca1441618cdae077883ab657bd5bf2b2b3d25928843f05bcb062dbb38869aeaacd32cbacd0979cd4ebc4277b4dea8ef
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
- #gem 'pry', :require => false
9
- #gem 'pry-byebug', :require => false
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-05'
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']
@@ -47,7 +47,7 @@ module Awestruct
47
47
  @init = false
48
48
  @framework = 'compass'
49
49
  @scaffold = true
50
- @base_url = nil
50
+ @base_url = DEFAULT_BASE_URL
51
51
  @profile = nil
52
52
  @deploy = false
53
53
  @script = nil
@@ -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
- default_config = Awestruct::Compass::DefaultConfiguration.new(site)
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
- default_config.inherit_from! ::Compass::Configuration::FileData.new_from_file(compass_config_file)
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?
@@ -1,3 +1,3 @@
1
1
  module Awestruct
2
- VERSION = '0.5.6.beta5'
2
+ VERSION = '0.5.6.beta6'
3
3
  end
@@ -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 == nil
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 be nil
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.beta5
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-05 00:00:00.000000000 Z
16
+ date: 2014-11-12 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: haml