fontdock 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +7 -0
- data/README.md +2 -2
- data/lib/fontdock/command.rb +5 -0
- data/lib/fontdock/local.rb +16 -0
- data/lib/fontdock/version.rb +1 -1
- data/test/test-local.rb +13 -0
- metadata +23 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0d8b6415e1e9ac396c9fb81b07a86c8e7fed25a
|
4
|
+
data.tar.gz: b1ac8c6bb4ca1375fa5d31da546f37e7638949ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e31796892153c2dd2c0ab5aab52feb6abaee801af89ae31e448272ade6d919b8cebb96920ed474cc7639e5857627f6d09253ee9173a9052726cb0b0f5096ba2
|
7
|
+
data.tar.gz: 5125b75c6336ade3a2ad5f59ac7f447fd02b39b005eb00ef54d7e57d24fccc617bff3fd96e2d9323dbce7b94778603eff92d66a10e9dc5016b0f171fd90f98ed
|
data/NEWS.md
CHANGED
data/README.md
CHANGED
@@ -25,13 +25,13 @@ Or install it yourself as:
|
|
25
25
|
|
26
26
|
### Command Line
|
27
27
|
|
28
|
-
#### List
|
28
|
+
#### List available fonts
|
29
29
|
|
30
30
|
$ fontdock ls
|
31
31
|
|
32
32
|
### Library
|
33
33
|
|
34
|
-
#### Get
|
34
|
+
#### Get available font names
|
35
35
|
|
36
36
|
```ruby
|
37
37
|
require "fontdock"
|
data/lib/fontdock/command.rb
CHANGED
data/lib/fontdock/local.rb
CHANGED
@@ -14,6 +14,22 @@ module Fontdock
|
|
14
14
|
def names
|
15
15
|
families.collect {|family| family.name }
|
16
16
|
end
|
17
|
+
|
18
|
+
def find(part_of_name)
|
19
|
+
find_from_pattern(/\A#{part_of_name}\z/) ||
|
20
|
+
find_from_pattern(/\A#{part_of_name}\z/i) ||
|
21
|
+
find_from_pattern(/\A#{part_of_name}/) ||
|
22
|
+
find_from_pattern(/\A#{part_of_name}/i) ||
|
23
|
+
find_from_pattern(/#{part_of_name}/) ||
|
24
|
+
find_from_pattern(/#{part_of_name}/i)
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
def find_from_pattern(pattern)
|
29
|
+
names.find do |name|
|
30
|
+
pattern =~ name
|
31
|
+
end
|
32
|
+
end
|
17
33
|
end
|
18
34
|
end
|
19
35
|
end
|
data/lib/fontdock/version.rb
CHANGED
data/test/test-local.rb
ADDED
metadata
CHANGED
@@ -1,111 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fontdock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masafumi Yokoyama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pango
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: thor
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: test-unit
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: test-unit-notify
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: test-unit-rr
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '1.3'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.3'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
description: A toolbox for managing font families.
|
@@ -116,8 +116,8 @@ executables:
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
-
- .gitignore
|
120
|
-
- .travis.yml
|
119
|
+
- ".gitignore"
|
120
|
+
- ".travis.yml"
|
121
121
|
- Gemfile
|
122
122
|
- LICENSE.txt
|
123
123
|
- NEWS.md
|
@@ -131,6 +131,7 @@ files:
|
|
131
131
|
- lib/fontdock/version.rb
|
132
132
|
- test/run-test.rb
|
133
133
|
- test/test-command.rb
|
134
|
+
- test/test-local.rb
|
134
135
|
homepage: https://github.com/myokoym/fontdock
|
135
136
|
licenses:
|
136
137
|
- MIT
|
@@ -141,21 +142,21 @@ require_paths:
|
|
141
142
|
- lib
|
142
143
|
required_ruby_version: !ruby/object:Gem::Requirement
|
143
144
|
requirements:
|
144
|
-
- -
|
145
|
+
- - ">="
|
145
146
|
- !ruby/object:Gem::Version
|
146
147
|
version: '0'
|
147
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
149
|
requirements:
|
149
|
-
- -
|
150
|
+
- - ">="
|
150
151
|
- !ruby/object:Gem::Version
|
151
152
|
version: '0'
|
152
153
|
requirements: []
|
153
154
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.0
|
155
|
+
rubygems_version: 2.2.0
|
155
156
|
signing_key:
|
156
157
|
specification_version: 4
|
157
158
|
summary: Fonts Toolbox
|
158
159
|
test_files:
|
159
160
|
- test/run-test.rb
|
160
161
|
- test/test-command.rb
|
161
|
-
|
162
|
+
- test/test-local.rb
|