jekyll-sass-converter 1.0.0.rc3 → 1.0.0.rc4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5787320a28ad51c979351e93af1496add206e76c
4
- data.tar.gz: b4f6d23d49bc906f7834c7a77e365bb69143ec89
3
+ metadata.gz: e62ef230908db14e202a28b5a34e94b977a8611b
4
+ data.tar.gz: 02b00a0ed7815186816adb92740dc185755f8c96
5
5
  SHA512:
6
- metadata.gz: afa9fababe0d08d8b94f0ea6a26dc4e477c385725564a60d96046bfabf88deeb553a143e858e7b363da3a6d35cca537b603a1ef79d096d586b3d666c596cc49c
7
- data.tar.gz: 193490607df2234630201b3d29b2590a6008145ea4b2ef710d2be691819264ab283d57d1e386424837de8c7e93e1b2962d792260936d37b75f8bcc50adb25d3d
6
+ metadata.gz: 2b5821d76557b12c224d9105d58d4ab68b44a53db9219bb82de0e79a2c6bcc5960d61467f6c9561b31e8f668a1a5e70ca278051fa6b1473f243c1e82e0ae9abe
7
+ data.tar.gz: 04f8089e22e46c36193f6131166b9af599ba272d813fd67cbaf65ce5325c37d90731e0911dccc8e45a4afc4e18c9a882127eb791b8a517b903c8db92957aeda5
data/Gemfile CHANGED
@@ -3,5 +3,5 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in jekyll-sass-converter.gemspec
4
4
  gemspec
5
5
 
6
- gem "jekyll", git: "git://github.com/jekyll/jekyll.git", branch: "no-core-ext"
6
+ gem "jekyll", "2.0.0.alpha.2"
7
7
  gem "rouge"
data/History.markdown CHANGED
@@ -2,3 +2,4 @@
2
2
 
3
3
  * Birthday!
4
4
  * Don't use core extensions (#2)
5
+ * Allow users to set style of outputted CSS (#4)
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Let Jekyll build your Sass and SCSS!
4
4
 
5
- [![Build Status](https://travis-ci.org/jekyll/jekyll-sass-converter.png?branch=master)](https://travis-ci.org/jekyll/jekyll-sass-converter)
5
+ [![Build Status](https://travis-ci.org/jekyll/jekyll-sass-converter.svg?branch=master)](https://travis-ci.org/jekyll/jekyll-sass-converter)
6
6
 
7
7
  ## Installation
8
8
 
@@ -1,3 +1,3 @@
1
1
  module JekyllSassConverter
2
- VERSION = "1.0.0.rc3"
2
+ VERSION = "1.0.0.rc4"
3
3
  end
@@ -16,7 +16,11 @@ module Jekyll
16
16
  end
17
17
 
18
18
  def jekyll_sass_configuration
19
- @config["sass"] || {}
19
+ options = @config["sass"] || {}
20
+ unless options["style"].nil?
21
+ options["style"] = options["style"].to_s.gsub(/\A:/, '').to_sym
22
+ end
23
+ options
20
24
  end
21
25
 
22
26
  def sass_build_configuration_options(overrides)
@@ -1,2 +1 @@
1
- .half {
2
- width: 50%; }
1
+ .half{width:50%}
@@ -27,6 +27,10 @@ body {\n font-family: Helvetica, sans-serif;\n font-color: fuschia; }
27
27
  CSS
28
28
  end
29
29
 
30
+ def compressed(content)
31
+ content.gsub(/\s+/, '').gsub(/;}/, '}') + "\n"
32
+ end
33
+
30
34
  def converter(overrides = {})
31
35
  Jekyll::Converters::Sass.new(site_configuration({"sass" => overrides}))
32
36
  end
@@ -78,6 +82,10 @@ CSS
78
82
  expect(converter.sass_configs[:syntax]).to eql(:sass)
79
83
  end
80
84
 
85
+ it "allow for other styles" do
86
+ expect(converter({"style" => :compressed}).sass_configs[:style]).to eql(:compressed)
87
+ end
88
+
81
89
  it "not allow sass_dirs outside of site source" do
82
90
  expect(
83
91
  converter({"sass_dir" => "/etc/passwd"}).sass_dir_relative_to_site_source
@@ -93,13 +101,13 @@ CSS
93
101
 
94
102
  context "converting sass" do
95
103
  it "produces CSS" do
96
- expect(converter.convert(sass_content)).to eql(css_output)
104
+ expect(converter.convert(sass_content)).to eql(compressed(css_output))
97
105
  end
98
106
  end
99
107
 
100
108
  context "converting SCSS" do
101
109
  it "produces CSS" do
102
- expect(converter.convert(scss_content)).to eql(css_output)
110
+ expect(converter.convert(scss_content)).to eql(compressed(css_output))
103
111
  end
104
112
  end
105
113
 
@@ -112,7 +120,13 @@ CSS
112
120
  end
113
121
 
114
122
  it "imports SCSS partial" do
115
- expect(File.read(test_css_file)).to eql(".half {\n width: 50%; }\n")
123
+ expect(File.read(test_css_file)).to eql(compressed(".half {\n width: 50%; }\n"))
124
+ end
125
+
126
+ it "uses a compressed style" do
127
+ instance = site.getConverterImpl(Jekyll::Converters::Sass)
128
+ expect(instance.jekyll_sass_configuration).to eql({"style" => :compressed})
129
+ expect(instance.sass_configs[:style]).to eql(:compressed)
116
130
  end
117
131
  end
118
132
  end
@@ -0,0 +1,3 @@
1
+ sass:
2
+ style: :compressed
3
+ highlighter: rouge
data/spec/spec_helper.rb CHANGED
@@ -6,6 +6,8 @@ lib = File.expand_path('../lib', __FILE__)
6
6
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
7
  require 'jekyll-sass-converter'
8
8
 
9
+ Jekyll.logger.log_level = Jekyll::Stevenson::ERROR
10
+
9
11
  RSpec.configure do |config|
10
12
  config.treat_symbols_as_metadata_keys_with_true_values = true
11
13
  config.run_all_when_everything_filtered = true
@@ -26,8 +28,8 @@ RSpec.configure do |config|
26
28
  end
27
29
 
28
30
  def site_configuration(overrides = {})
29
- Jekyll::Utils.hash_deep_merge(Jekyll::Configuration::DEFAULTS, overrides.merge({
30
- "source" => source_dir,
31
+ Jekyll.configuration(overrides.merge({
32
+ "source" => source_dir,
31
33
  "destination" => dest_dir
32
34
  }))
33
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-sass-converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc3
4
+ version: 1.0.0.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Parker Moore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-04 00:00:00.000000000 Z
11
+ date: 2014-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -90,6 +90,7 @@ files:
90
90
  - script/release
91
91
  - spec/dest/css/main.css
92
92
  - spec/sass_coverter_spec.rb
93
+ - spec/source/_config.yml
93
94
  - spec/source/_sass/_grid.scss
94
95
  - spec/source/css/main.scss
95
96
  - spec/spec_helper.rb
@@ -120,6 +121,7 @@ summary: A basic Sass converter for Jekyll.
120
121
  test_files:
121
122
  - spec/dest/css/main.css
122
123
  - spec/sass_coverter_spec.rb
124
+ - spec/source/_config.yml
123
125
  - spec/source/_sass/_grid.scss
124
126
  - spec/source/css/main.scss
125
127
  - spec/spec_helper.rb