matrext 0.4.10 → 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 +4 -4
- data/README.md +14 -11
- data/bin/matrext +8 -9
- data/lib/matrext/version.rb +1 -1
- data/matrext.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ab3db1bd27e87e005f6dab216ceeaea2d964fe8
|
4
|
+
data.tar.gz: 883dd167ce57433df2463e56bfc54bccbd28e372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: beabab7e629b5eebf938c325f4b49f2bcece11d43796e2a8db998f0c57331d59bc150ff8f26ab9f006510f6fa090533886779e064052c2c53708650a18b3ee7b
|
7
|
+
data.tar.gz: 793308f77f9f6025152ba838f7116c0741a4db27ccae949c81bd832a30b6067f20ee450f55d284b5292466e5af7ebf631ef57c9d377d7f69f6103f7abfa85817
|
data/README.md
CHANGED
@@ -1,23 +1,26 @@
|
|
1
1
|
# Matrext
|
2
2
|
|
3
|
-
|
3
|
+
[](http://badge.fury.io/rb/matrext)
|
4
4
|
|
5
|
-
|
5
|
+
A simple Ruby gem that takes a phrase and writes it back to the screen, one letter a time, as if each character was being "decoded", Matrix-style.
|
6
6
|
|
7
|
-
|
7
|
+
## Usage
|
8
8
|
|
9
|
-
```ruby
|
10
|
-
gem 'matrext'
|
11
9
|
```
|
10
|
+
# default foreground color on background color
|
11
|
+
$ matrext "hello world"
|
12
12
|
|
13
|
-
|
13
|
+
# red text on green background
|
14
|
+
$ matrext -c red -b green "hello world"
|
14
15
|
|
15
|
-
|
16
|
+
# white text on blue background, at insane speed
|
17
|
+
$ matrext -c white -b blue -s insane "hello world this is your computer speaking to you"
|
18
|
+
```
|
16
19
|
|
17
|
-
|
20
|
+
## Contributing
|
18
21
|
|
19
|
-
|
22
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/michaelchadwick/matrext.
|
20
23
|
|
21
|
-
##
|
24
|
+
## License
|
22
25
|
|
23
|
-
|
26
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/bin/matrext
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'optparse'
|
4
|
-
|
5
4
|
require_relative '../lib/matrext'
|
6
5
|
require_relative '../lib/matrext/version'
|
7
6
|
|
@@ -19,7 +18,8 @@ def parse_options
|
|
19
18
|
}
|
20
19
|
|
21
20
|
optparse = OptionParser.new do |opts|
|
22
|
-
opts.banner = '
|
21
|
+
opts.banner = 'Display text like it\'s being decoded, Matrix-style'
|
22
|
+
opts.banner = 'usage: matrext PHRASE [-o] [-s insane|fast|slow] [-a true|false] [-n true|false] [-r true|false] [-c color_symbol] [-b background_symbol]'
|
23
23
|
|
24
24
|
opts.on('-s', '--speed SPEED', 'Speed at which the text decodes') do |speed|
|
25
25
|
options[:speed] = speed
|
@@ -59,11 +59,11 @@ def parse_options
|
|
59
59
|
end
|
60
60
|
|
61
61
|
opts.on('-v', '--version', 'Display version number and exit') do
|
62
|
-
puts "#{
|
62
|
+
puts "#{Matrext::VERSION}"
|
63
63
|
exit
|
64
64
|
end
|
65
65
|
|
66
|
-
opts.on('-h', '--help', 'Display this screen and exit') do
|
66
|
+
opts.on('-h', '-?', '--help', 'Display this screen and exit') do
|
67
67
|
puts opts
|
68
68
|
exit
|
69
69
|
end
|
@@ -77,10 +77,9 @@ end
|
|
77
77
|
def print_error(error)
|
78
78
|
case error
|
79
79
|
when OptionParser::InvalidOption
|
80
|
-
puts "#{BINARY_NAME}: illegal option #{error.args.join(' ')}"
|
80
|
+
puts "#{BINARY_NAME} ERROR: illegal option #{error.args.join(' ')}"
|
81
81
|
else
|
82
|
-
puts "
|
83
|
-
puts " #{error}\n"
|
82
|
+
puts "#{BINARY_NAME} ERROR: #{error}"
|
84
83
|
end
|
85
84
|
end
|
86
85
|
|
@@ -88,10 +87,10 @@ begin
|
|
88
87
|
options = parse_options
|
89
88
|
|
90
89
|
if (ARGV.count > 0)
|
91
|
-
options[:phrase] = ARGV
|
90
|
+
options[:phrase] = ARGV.join(" ")
|
92
91
|
Matrext::Base.new(options)
|
93
92
|
else
|
94
|
-
puts "#{BINARY_NAME}
|
93
|
+
puts "#{BINARY_NAME} ERROR: missing phrase"
|
95
94
|
end
|
96
95
|
rescue => error
|
97
96
|
print_error(error)
|
data/lib/matrext/version.rb
CHANGED
data/matrext.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.authors = ['Michael Chadwick']
|
11
11
|
spec.email = ['mike@codana.me']
|
12
12
|
spec.homepage = 'http://rubygems.org/gems/matrext'
|
13
|
-
spec.summary = '
|
13
|
+
spec.summary = 'Display text like it\'s being decoded, Matrix-style'
|
14
14
|
spec.description = 'Matrext takes a string input and then prints it back to the console, one letter at a time after "searching" through character noise, as if it was decoding the string itself.'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split("\n")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matrext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Chadwick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -110,8 +110,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.5.0
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
|
-
summary:
|
116
|
+
summary: Display text like it's being decoded, Matrix-style
|
117
117
|
test_files: []
|