fontdock 0.0.1
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 +7 -0
- data/.gitignore +17 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/NEWS.md +5 -0
- data/README.md +48 -0
- data/Rakefile +9 -0
- data/bin/fontdock +5 -0
- data/fontdock.gemspec +29 -0
- data/lib/fontdock/command.rb +12 -0
- data/lib/fontdock/local.rb +19 -0
- data/lib/fontdock/version.rb +3 -0
- data/lib/fontdock.rb +5 -0
- data/test/run-test.rb +11 -0
- data/test/test-command.rb +17 -0
- metadata +161 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5b6f62319d0ba956deef7b4c67790995af5335ff
|
4
|
+
data.tar.gz: 4659e3624a1775b9b96231ceb58b8d31ba356bea
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a25eaa9a90f54232c0494531635357aa8780fee4b736becaedeee2d8da7e8fb8092efc60a8271d5f4c25315e1fa2fead478a1d11088df6f585b4567a3d79caa1
|
7
|
+
data.tar.gz: 49398d9219baabc0bd26e794aa038d06e74f29fe6305f2aaf08418c2dac8aada3ab9bf2241bea2c16fc9ca03bfc5269aff8f8a329ce1c07d0799813ea0c5bd24
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Masafumi Yokoyama
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# Fontdock - Fonts Toolbox [](http://travis-ci.org/myokoym/fontdock)
|
2
|
+
|
3
|
+
A toolbox for managing font families.
|
4
|
+
|
5
|
+
## Requirements
|
6
|
+
|
7
|
+
* Ruby/Pango in [Ruby-GNOME2](http://ruby-gnome2.sourceforge.jp/)
|
8
|
+
* [Thor](http://whatisthor.com/)
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
gem 'fontdock'
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
$ gem install fontdock
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
### Command Line
|
27
|
+
|
28
|
+
#### List abailable fonts
|
29
|
+
|
30
|
+
$ fontdock ls
|
31
|
+
|
32
|
+
### Library
|
33
|
+
|
34
|
+
#### Get abailable font names
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
require "fontdock"
|
38
|
+
|
39
|
+
names = Fontdock::Local.names
|
40
|
+
```
|
41
|
+
|
42
|
+
## Contributing
|
43
|
+
|
44
|
+
1. Fork it
|
45
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
46
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
47
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
48
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/bin/fontdock
ADDED
data/fontdock.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'fontdock/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "fontdock"
|
8
|
+
spec.version = Fontdock::VERSION
|
9
|
+
spec.authors = ["Masafumi Yokoyama"]
|
10
|
+
spec.email = ["myokoym@gmail.com"]
|
11
|
+
spec.description = %q{A toolbox for managing font families.}
|
12
|
+
spec.summary = %q{Fonts Toolbox}
|
13
|
+
spec.homepage = "https://github.com/myokoym/fontdock"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) {|f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency("pango")
|
22
|
+
spec.add_runtime_dependency("thor")
|
23
|
+
|
24
|
+
spec.add_development_dependency("test-unit")
|
25
|
+
spec.add_development_dependency("test-unit-notify")
|
26
|
+
spec.add_development_dependency("test-unit-rr")
|
27
|
+
spec.add_development_dependency("bundler", "~> 1.3")
|
28
|
+
spec.add_development_dependency("rake")
|
29
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "pango"
|
2
|
+
|
3
|
+
module Fontdock
|
4
|
+
class Local
|
5
|
+
class << self
|
6
|
+
def font_map
|
7
|
+
Pango::CairoFontMap.default
|
8
|
+
end
|
9
|
+
|
10
|
+
def families
|
11
|
+
font_map.families
|
12
|
+
end
|
13
|
+
|
14
|
+
def names
|
15
|
+
families.collect {|family| family.name }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/fontdock.rb
ADDED
data/test/run-test.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "test-unit"
|
4
|
+
require "test/unit/notify"
|
5
|
+
require "test/unit/rr"
|
6
|
+
|
7
|
+
base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
8
|
+
$LOAD_PATH.unshift(File.join(base_dir, "lib"))
|
9
|
+
$LOAD_PATH.unshift(File.join(base_dir, "test"))
|
10
|
+
|
11
|
+
exit Test::Unit::AutoRunner.run(true)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "stringio"
|
2
|
+
require "fontdock/command"
|
3
|
+
|
4
|
+
class CommandTest < Test::Unit::TestCase
|
5
|
+
def setup
|
6
|
+
@command = Fontdock::Command.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_ls
|
10
|
+
s = ""
|
11
|
+
io = StringIO.new(s)
|
12
|
+
$stdout = io
|
13
|
+
@command.ls
|
14
|
+
assert_match(/Gothic/, s)
|
15
|
+
$stdout = STDOUT
|
16
|
+
end
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fontdock
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Masafumi Yokoyama
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-12-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: pango
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: test-unit
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: test-unit-notify
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: test-unit-rr
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.3'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: A toolbox for managing font families.
|
112
|
+
email:
|
113
|
+
- myokoym@gmail.com
|
114
|
+
executables:
|
115
|
+
- fontdock
|
116
|
+
extensions: []
|
117
|
+
extra_rdoc_files: []
|
118
|
+
files:
|
119
|
+
- .gitignore
|
120
|
+
- .travis.yml
|
121
|
+
- Gemfile
|
122
|
+
- LICENSE.txt
|
123
|
+
- NEWS.md
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- bin/fontdock
|
127
|
+
- fontdock.gemspec
|
128
|
+
- lib/fontdock.rb
|
129
|
+
- lib/fontdock/command.rb
|
130
|
+
- lib/fontdock/local.rb
|
131
|
+
- lib/fontdock/version.rb
|
132
|
+
- test/run-test.rb
|
133
|
+
- test/test-command.rb
|
134
|
+
homepage: https://github.com/myokoym/fontdock
|
135
|
+
licenses:
|
136
|
+
- MIT
|
137
|
+
metadata: {}
|
138
|
+
post_install_message:
|
139
|
+
rdoc_options: []
|
140
|
+
require_paths:
|
141
|
+
- lib
|
142
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - '>='
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - '>='
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
requirements: []
|
153
|
+
rubyforge_project:
|
154
|
+
rubygems_version: 2.0.14
|
155
|
+
signing_key:
|
156
|
+
specification_version: 4
|
157
|
+
summary: Fonts Toolbox
|
158
|
+
test_files:
|
159
|
+
- test/run-test.rb
|
160
|
+
- test/test-command.rb
|
161
|
+
has_rdoc:
|