compass-fontcustom 1.0.0.pre3 → 1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c28d5c1c02bdd9f5ce4285a99f225c33bfdd5c75
4
- data.tar.gz: ae49f5276fcbffa47833a2093e6a12a6b15cc7ea
3
+ metadata.gz: a503c96a46269f387121518502e538e211077cf9
4
+ data.tar.gz: 76eec2fa2928c3da1f65dd2de53d962be18bef04
5
5
  SHA512:
6
- metadata.gz: 21633cb61deea542ec6d84f0be0dd642004bfbf799df7d0e351b0414d01feb041b2255802fc7cfa2d3211e3ea451e68527cc00e18b8d548f164b44285d29762f
7
- data.tar.gz: 01befe286c13a26e2a85b0c9f96e4ccfc254ed8ccefe9131d58456d247d8d373dfae3e63627fee232855ebf20aba9414e04b04dda250d3425db2a24d7bf6a676
6
+ metadata.gz: a9a72d46c048d49a2367d352681216441043028770279f571f9c25034ba26cda5fefc60003c6b18eabbdc853033da4a1ee12fb03161d3f81052124fd3e6185d0
7
+ data.tar.gz: 6a509cec8776ce4592be0832c39c84a0ceba91a6e0b3ab9c7c98f4c5b6165da2169ebdee3e43ef00c5668c89fac15537c2eadd67600eaddbda90eabf3791c8aa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ **1.0.0** Feature release
4
+
5
+ - Adding mixin for generating custom glyph classes
6
+
7
+ **1.0.0.pre3** Bugfix release
8
+
9
+ - Fixing CSS class <-> glyph mapping
10
+
3
11
  **1.0.0.pre2** Maintenance release
4
12
 
5
13
  - Depending on fontcustom 1.0.0.pre2
data/README.md CHANGED
@@ -1,7 +1,16 @@
1
- # Compass::Fontcustom [![Build Status](https://travis-ci.org/glaszig/compass-fontcustom.png?branch=experimental)](https://travis-ci.org/glaszig/compass-fontcustom) [![Gem Version](https://badge.fury.io/rb/compass-fontcustom.png)](http://badge.fury.io/rb/compass-fontcustom) [![Test Coverage](https://coveralls.io/repos/glaszig/compass-fontcustom/badge.png?branch=master)](https://coveralls.io/r/glaszig/compass-fontcustom)
1
+ # Compass::Fontcustom
2
+
3
+ [![Build Status](https://travis-ci.org/glaszig/compass-fontcustom.png?branch=master)](https://travis-ci.org/glaszig/compass-fontcustom)
4
+ [![Gem Version](https://badge.fury.io/rb/compass-fontcustom.png)](http://badge.fury.io/rb/compass-fontcustom)
5
+ [![Test Coverage](https://coveralls.io/repos/glaszig/compass-fontcustom/badge.png?branch=master)](https://coveralls.io/r/glaszig/compass-fontcustom)
6
+ [![endorse](https://api.coderwall.com/glaszig/endorsecount.png)](https://coderwall.com/glaszig)
2
7
 
3
8
  This is my attempt of integrating [Font Custom](http://fontcustom.com) with [Compass](http://compass-style.org).
4
9
 
10
+ ## Requirements
11
+
12
+ Made for ruby 1.9+. Tested on 1.9.3 and 2.0.0.
13
+
5
14
  ## Installation
6
15
 
7
16
  Add this line to your application's Gemfile:
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ spec.required_ruby_version = '>= 1.9.3'
22
+
21
23
  spec.add_dependency "compass"
22
24
  spec.add_dependency "fontcustom", "~> 1.0.0"
23
25
 
@@ -12,3 +12,9 @@ $<%= name %>-glyphs: glyph-map("<%= uri %>");
12
12
  @include fontcustom-font-face($<%= name %>-glyphs);
13
13
  @include glyphs($<%= name %>-glyphs, <%= glyph_names.join " " %>, $<%= name %>-font-base-class)
14
14
  }
15
+
16
+ @mixin <%= name %>-glyph($glyph-name) {
17
+ @extend #{$<%= name %>-font-base-class};
18
+ $index: index(<%= glyph_names.join " " %>, $glyph-name);
19
+ &:before { content: glyph($index); }
20
+ }
@@ -1,5 +1,5 @@
1
1
  module Compass
2
2
  module Fontcustom
3
- VERSION = "1.0.0.pre3"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ class FontImporterTest < Test::Unit::TestCase
19
19
  Compass.add_configuration(config, "fontcustom_config")
20
20
 
21
21
  Compass::Fontcustom::GlyphMap.configure do |config|
22
- config.generator_options = { :debug => true }
22
+ config.generator_options = { :debug => false }
23
23
  end
24
24
  end
25
25
 
@@ -71,4 +71,23 @@ class FontImporterTest < Test::Unit::TestCase
71
71
  assert css =~ %r{.icon-#{fontname}-d}i, "icon d css class missing"
72
72
  end
73
73
 
74
+ def test_glyph_mixin
75
+ fontname = 'myfont'
76
+
77
+ Compass.configuration.fontcustom_hash = false
78
+
79
+ css = render <<-SCSS
80
+ @import "#{fontname}/*.svg";
81
+ @include fontcustom-font-face($myfont-glyphs);
82
+
83
+ .custom-class-name {
84
+ @include myfont-glyph(C);
85
+ }
86
+ SCSS
87
+
88
+ assert css =~ %r{.#{fontname}-font, .custom-class-name}, "extending base class missing"
89
+ assert css =~ %r{@font-face}, "font-face definition missing"
90
+ assert css =~ %r{.custom-class-name:before}, "cusom class missing missing"
91
+ end
92
+
74
93
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass-fontcustom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - glaszig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-21 00:00:00.000000000 Z
11
+ date: 2013-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: compass
@@ -119,15 +119,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - '>='
121
121
  - !ruby/object:Gem::Version
122
- version: '0'
122
+ version: 1.9.3
123
123
  required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  requirements:
125
- - - '>'
125
+ - - '>='
126
126
  - !ruby/object:Gem::Version
127
- version: 1.3.1
127
+ version: '0'
128
128
  requirements: []
129
129
  rubyforge_project:
130
- rubygems_version: 2.0.0
130
+ rubygems_version: 2.0.3
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: Integrates Fontcustom with Compass
@@ -138,4 +138,3 @@ test_files:
138
138
  - test/test_helper.rb
139
139
  - test/unit/font_importer_test.rb
140
140
  - test/unit/glyph_map_test.rb
141
- has_rdoc: