cli_miami 0.0.1 → 0.0.2
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/Gemfile +1 -1
- data/Gemfile.lock +6 -4
- data/README.md +59 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd7d67a105b5bf10eb4c7866715f2a339790d95f
|
4
|
+
data.tar.gz: d6174185ffba6ed82b5afb8fafc775b99f6d143b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a021f7b6cee5a2fb6f3c86c979bef4911798e09d02a8727b7fcd5c4eb8c2ac5512fbe4a1bf9bb03683141f99bd6fe0ea366dd62b6217611eb1ad5f3ab15ae7e7
|
7
|
+
data.tar.gz: ca06fe71cc4cb3fae24b79a13bdee0efb47678897c2be1d578645aa012e9174b9212d1d3f78a586c4c6a3dc6d2757b02ab7a8ef3915c52e20a809edde506849d
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -4,11 +4,10 @@ GEM
|
|
4
4
|
celluloid (0.16.0)
|
5
5
|
timers (~> 4.0.0)
|
6
6
|
coderay (1.1.0)
|
7
|
-
colorize (0.7.3)
|
8
7
|
diff-lcs (1.2.5)
|
9
8
|
ffi (1.9.6)
|
10
9
|
formatador (0.2.5)
|
11
|
-
guard (2.
|
10
|
+
guard (2.10.0)
|
12
11
|
formatador (>= 0.2.4)
|
13
12
|
listen (~> 2.7)
|
14
13
|
lumberjack (~> 1.0)
|
@@ -18,7 +17,7 @@ GEM
|
|
18
17
|
guard (~> 2.1)
|
19
18
|
rspec (>= 2.14, < 4.0)
|
20
19
|
hitimes (1.2.2)
|
21
|
-
listen (2.8.
|
20
|
+
listen (2.8.3)
|
22
21
|
celluloid (>= 0.15.2)
|
23
22
|
rb-fsevent (>= 0.9.3)
|
24
23
|
rb-inotify (>= 0.9)
|
@@ -44,17 +43,20 @@ GEM
|
|
44
43
|
rspec-support (~> 3.1.0)
|
45
44
|
rspec-support (3.1.2)
|
46
45
|
slop (3.6.0)
|
46
|
+
term-ansicolor (1.3.0)
|
47
|
+
tins (~> 1.0)
|
47
48
|
terminal-notifier-guard (1.6.4)
|
48
49
|
thor (0.19.1)
|
49
50
|
timers (4.0.1)
|
50
51
|
hitimes
|
52
|
+
tins (1.3.3)
|
51
53
|
|
52
54
|
PLATFORMS
|
53
55
|
ruby
|
54
56
|
|
55
57
|
DEPENDENCIES
|
56
|
-
colorize (~> 0.7)
|
57
58
|
guard (~> 2.6)
|
58
59
|
guard-rspec (~> 4.3)
|
59
60
|
rspec (~> 3.1)
|
61
|
+
term-ansicolor (~> 1.3)
|
60
62
|
terminal-notifier-guard (~> 1.5)
|
data/README.md
CHANGED
@@ -1,10 +1,68 @@
|
|
1
1
|
# CLI Miami
|
2
2
|
A feature rich alternative for `gets` and `puts` for your cli interface
|
3
3
|
|
4
|
+
_Gemfile_
|
5
|
+
```ruby
|
6
|
+
# This exposes the shortened API for `A.sk` and `S.ay`
|
7
|
+
gem 'cli_miami'
|
8
|
+
|
9
|
+
# if you need the API to be namespaced (`CliMiami::A.sk`, `CliMiami::S.ay`)
|
10
|
+
gem 'cli_miami', :require => :namespaced
|
11
|
+
```
|
12
|
+
|
13
|
+
#### S.ay
|
14
|
+
`S.ay` accepts 2 arguments, a string, and a variety of options
|
15
|
+
_* see supported options below_
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
S.ay 'Hello World', :color => :red
|
19
|
+
```
|
20
|
+
|
21
|
+
#### A.sk
|
22
|
+
`A.sk` accepts the same arguments as `S.say`, with additional support for a block that passes the users response
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
A.sk 'What is your name?', :color => :yellow do |response|
|
26
|
+
S.ay "#{response} smells!", :style => :bold
|
27
|
+
end
|
28
|
+
```
|
29
|
+
|
30
|
+
#### Options
|
31
|
+
Both `S.ay` and `A.sk` suport the same options
|
32
|
+
|
33
|
+
https://github.com/flori/term-ansicolor/tree/master/lib/term/ansicolor/attribute
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
color: => [symbol] # See ansi color codes below
|
37
|
+
bgcolor: => [symbol] # See ansi color codes below
|
38
|
+
style: => [symbol] # See ansi style codes below. Can accept multiple styles as an array
|
39
|
+
justify: => [center|ljust|rjust] # The type of justification to use
|
40
|
+
padding: => [integer] # The maximum string size to justify text in
|
41
|
+
indent: => [integer] # The number of characters to indent
|
42
|
+
newline: => [boolean] # True if you want a newline after the output
|
43
|
+
overwrite: => [boolean] # True if you want the next line to overwrite the current line
|
44
|
+
```
|
45
|
+
|
46
|
+
###### ANSI Color Codes
|
47
|
+
* `:black`
|
48
|
+
* `:red`
|
49
|
+
* `:green`
|
50
|
+
* `:yellow`
|
51
|
+
* `:blue`
|
52
|
+
* `:magenta`
|
53
|
+
* `:cyan`
|
54
|
+
* `:white`
|
55
|
+
|
56
|
+
###### ANSI Style Codes
|
57
|
+
* `:bold`
|
58
|
+
* `:bright`
|
59
|
+
* `:underline`
|
60
|
+
* `:negative` _Swap foreground color with background color_
|
61
|
+
|
4
62
|
### Development & Testing
|
5
63
|
|
6
64
|
```shell
|
7
|
-
gem install
|
65
|
+
gem install cli_miami
|
8
66
|
yuyi -m https://raw.githubusercontent.com/brewster1134/turple/master/yuyi_menu
|
9
67
|
bundle install
|
10
68
|
bundle exec guard
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cli_miami
|
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
|
- Ryan Brewster
|
@@ -11,19 +11,19 @@ cert_chain: []
|
|
11
11
|
date: 2014-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: term-ansicolor
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.3'
|
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
|
-
version: '
|
26
|
+
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: guard
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '1.9'
|
111
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
112
|
requirements:
|
113
113
|
- - ">="
|