picture_frame 0.0.2 → 0.0.3
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.
- data/LICENSE +1 -1
- data/bin/picture_frame +55 -0
- data/lib/picture_frame/predefined.rb +4 -0
- data/lib/picture_frame/version.rb +1 -1
- data/picture_frame.gemspec +1 -0
- metadata +9 -5
data/LICENSE
CHANGED
data/bin/picture_frame
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'picture_frame'
|
4
|
+
require 'optparse'
|
5
|
+
|
6
|
+
def main
|
7
|
+
showcase = false
|
8
|
+
style = :default
|
9
|
+
args = nil
|
10
|
+
|
11
|
+
OptionParser.new do |opts|
|
12
|
+
opts.banner = "Usage #{File.basename($0)} [OPTION]... [TEXT]...\n" +
|
13
|
+
"Print framed TEXT, or standard input, to standard output.\n\n"
|
14
|
+
|
15
|
+
opts.version = PictureFrame::VERSION
|
16
|
+
|
17
|
+
opts.on '-s', '--style STYLE', 'Use this frame style' do |s|
|
18
|
+
style = s.to_sym
|
19
|
+
end
|
20
|
+
|
21
|
+
opts.on '-r', '--random', 'Use a random frame style' do
|
22
|
+
style = :random
|
23
|
+
end
|
24
|
+
|
25
|
+
opts.on '-l', '--list', 'List all styles' do
|
26
|
+
puts PictureFrame::Predefined.list
|
27
|
+
exit
|
28
|
+
end
|
29
|
+
|
30
|
+
opts.on '--showcase', 'Show text in all available frame styles' do
|
31
|
+
showcase = true
|
32
|
+
end
|
33
|
+
|
34
|
+
opts.on '-h', '--help', 'Display this help.' do
|
35
|
+
puts opts
|
36
|
+
exit
|
37
|
+
end
|
38
|
+
|
39
|
+
args = opts.parse!(ARGV)
|
40
|
+
end
|
41
|
+
|
42
|
+
text = if args.empty?
|
43
|
+
$stdin.read
|
44
|
+
else
|
45
|
+
args.join(' ')
|
46
|
+
end
|
47
|
+
|
48
|
+
if showcase
|
49
|
+
PictureFrame.showcase(text)
|
50
|
+
else
|
51
|
+
puts PictureFrame.create(style).frame(text)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
main
|
data/picture_frame.gemspec
CHANGED
@@ -7,6 +7,7 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.description = %q{Draw pretty frames around text.}
|
8
8
|
gem.summary = %q{Draw predefined or custom frames around text.}
|
9
9
|
gem.homepage = "https://github.com/mschuerig/picture_frame"
|
10
|
+
gem.license = 'MIT'
|
10
11
|
|
11
12
|
gem.files = `git ls-files`.split($\)
|
12
13
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: picture_frame
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,13 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-02 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Draw pretty frames around text.
|
15
15
|
email:
|
16
16
|
- michael@schuerig.de
|
17
|
-
executables:
|
17
|
+
executables:
|
18
|
+
- picture_frame
|
18
19
|
extensions: []
|
19
20
|
extra_rdoc_files: []
|
20
21
|
files:
|
@@ -23,6 +24,7 @@ files:
|
|
23
24
|
- LICENSE
|
24
25
|
- README.md
|
25
26
|
- Rakefile
|
27
|
+
- bin/picture_frame
|
26
28
|
- lib/picture_frame.rb
|
27
29
|
- lib/picture_frame/canvas.rb
|
28
30
|
- lib/picture_frame/frame.rb
|
@@ -39,7 +41,8 @@ files:
|
|
39
41
|
- test/stencil_test.rb
|
40
42
|
- test/test_helper.rb
|
41
43
|
homepage: https://github.com/mschuerig/picture_frame
|
42
|
-
licenses:
|
44
|
+
licenses:
|
45
|
+
- MIT
|
43
46
|
post_install_message:
|
44
47
|
rdoc_options: []
|
45
48
|
require_paths:
|
@@ -58,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
61
|
version: '0'
|
59
62
|
requirements: []
|
60
63
|
rubyforge_project:
|
61
|
-
rubygems_version: 1.8.
|
64
|
+
rubygems_version: 1.8.23
|
62
65
|
signing_key:
|
63
66
|
specification_version: 3
|
64
67
|
summary: Draw predefined or custom frames around text.
|
@@ -69,3 +72,4 @@ test_files:
|
|
69
72
|
- test/raster_test.rb
|
70
73
|
- test/stencil_test.rb
|
71
74
|
- test/test_helper.rb
|
75
|
+
has_rdoc:
|