marmot 0.0.3 → 0.0.4

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: 228f38b8858271aa4a229d71b3fbacc753419c5d
4
- data.tar.gz: 1872cd0700969adbbf3a8300d67faba615a59dd3
3
+ metadata.gz: 7a4b4139fb105fef311c6330107fe35398efde24
4
+ data.tar.gz: cf1901eecd1897cc33ab0c74f3c198c4480f1270
5
5
  SHA512:
6
- metadata.gz: 0ea52f31499bed84da982e75457719e4054e82576fbf2586eddaefb65921e0a115c01e854a3c5b12b49601187157c6cd6931cf70eeebc25eb0a98a17d45c340c
7
- data.tar.gz: b4cdf3fd93d01dac5c6f88a0e1714302ed1162b3df7023d4e5ae863a069cbdb7bd6dda9657475e81df252a93dd03c71fbf40792d749f2a412cca80cb9438f8bb
6
+ metadata.gz: 9b98e7a5dcc4780b852c6d14ae1e4d3bd363cf114465c34cadf168ac686e8f93c8e91503e9fea3bf919c286e897a312bedea00032d353ef6d045da946731eba6
7
+ data.tar.gz: 79d1483c47e443c19b0b88e2df6df3f353e1b2acdabb8bb79de89cb04b179e115cf32b11ec409d137e45911eb0a2e31111875c8bf47428f758112827b8683d26
data/.gitignore CHANGED
@@ -3,4 +3,5 @@
3
3
  *.gem
4
4
  bin/marmot-local
5
5
  .yardoc
6
- sandbox
6
+ sandbox
7
+ new-version.rb
data/bin/marmot CHANGED
@@ -21,20 +21,21 @@ end
21
21
  class Marmot::CLI
22
22
 
23
23
  BANNER = <<-EOF
24
- Usage: marmot [options] input [output]
24
+ Usage: marmot [options] input [output]
25
25
 
26
- Description:
27
- Convert font files to a webfont kit using FontSquirrel Webfont Generator
26
+ Description:
27
+ Convert font files to a webfont kit using FontSquirrel Webfont Generator
28
28
 
29
- Example:
30
- marmot -v font.ttf
31
- marmot font.ttf archive.zip
32
- marmot -c config.txt font.ttf
33
- marmot --formats=ttf,woff font.ttf
34
- marmot --add-spaces --no-add-hyphens font.ttf
29
+ Example:
30
+ marmot -v font.ttf
31
+ marmot font.ttf archive.zip
32
+ marmot -c config.txt font.ttf
33
+ marmot --formats=ttf,woff font.ttf
34
+ marmot --add-spaces --no-add-hyphens font.ttf
35
35
 
36
- Options:
37
- EOF
36
+ Options:
37
+ EOF
38
+ .gsub /^ /, ''
38
39
 
39
40
  MAPPING = {
40
41
  :array => :string,
@@ -100,7 +101,9 @@ EOF
100
101
 
101
102
 
102
103
  if(config_file)
103
- options = JSON.parse(config_file.read.gsub /^#.*$/, '').merge options
104
+ options_from_config = JSON.parse(config_file.read.gsub /^#.*$/, '')
105
+ options_from_config = Marmot::OptionsSanitizer::FALSE_CHECKBOXES.merge(options_from_config)
106
+ options = options_from_config.merge options
104
107
  end
105
108
  if(output_file)
106
109
  options[:output_io] = output_file
@@ -36,7 +36,11 @@ module Marmot
36
36
  }
37
37
 
38
38
  NON_EXPERT_OPTIONS = [:id, :agreement, :mode]
39
- SUBSET_OPTIONS = [:subset_range, :subset_custom, :subset_custom_range]
39
+ SUBSET_OPTIONS = [:subset_range, :subset_custom, :subset_custom_range]
40
+
41
+ #{:fix_vertical_metrics=>false, :fix_gasp=>false, :remove_kerning=>false, :add_spaces=>false, :add_hyphens=>false, :webonly=>false, :base64=>false, :style_link=>false, :agreement=>false}
42
+ FALSE_CHECKBOXES = Hash[OPTIONS.collect{|k,v| [k,false] if v[0] == :checkbox }.compact]
43
+
40
44
 
41
45
  # Sanitize options
42
46
  def self.sanitize options, custom_options={}
@@ -1,3 +1,3 @@
1
1
  module Marmot
2
- VERSION = "0.0.3".freeze
2
+ VERSION = "0.0.4".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marmot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Filimonov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-17 00:00:00.000000000 Z
11
+ date: 2013-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop