palett 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 +7 -0
- data/README.md +21 -19
- data/lib/palett.rb +3 -3
- metadata +22 -46
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c486b04c9b61a7a373903dfa2ac96ec0c64c56cd
|
4
|
+
data.tar.gz: 91021f04e90cd714cafdbe2fe6c903aae04bdc57
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: aad0a7d2f17f0b89f3e9c98704a08aed47e8456efb69d856bdc1fd764345570e28cd00504aeb82989a8385895b27cd40c778063b27e1adfcafc6b9c99fa86b0a
|
7
|
+
data.tar.gz: 3b9e78b9329aa4308e030d15cddf6cca21de43dfe36e5c36634993074d9577792f6cadba66687f32822350d7156ba74d6b5a798b13d1692c345cf7607fb42d0c
|
data/README.md
CHANGED
@@ -3,25 +3,27 @@ Yet another one gem for terminal output coloring.
|
|
3
3
|
Usage:
|
4
4
|
----
|
5
5
|
|
6
|
-
|
6
|
+
```ruby
|
7
|
+
require 'palett'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
# working with simple strings
|
10
|
+
puts 'Just red'.red
|
11
|
+
puts 'White on magenta '.white.magenta_background
|
12
|
+
puts 'Bold black on white'.black.white_background.bold
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
# working with blocks
|
15
|
+
white do
|
16
|
+
blue_background do
|
17
|
+
puts ( 'a'..'z' ).map { |l| l }.join(', ')
|
18
|
+
end
|
19
|
+
end
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
bold do
|
22
|
+
red do
|
23
|
+
white_background do
|
24
|
+
puts File.open('Agile_Manifesto').read
|
25
|
+
puts "-" * 50
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
```
|
data/lib/palett.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'stringio'
|
2
2
|
|
3
3
|
module Kernel
|
4
|
-
def
|
4
|
+
def palette_color text, code
|
5
5
|
"\e[#{code}m#{text}\e[0m"
|
6
6
|
end
|
7
7
|
end
|
@@ -20,7 +20,7 @@ module Palett
|
|
20
20
|
|
21
21
|
ANSI_PROPERTIES.each do |code, name|
|
22
22
|
define_method name do
|
23
|
-
|
23
|
+
palette_color self, code
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -43,5 +43,5 @@ class Object
|
|
43
43
|
puts sio.string.strip.#{name}
|
44
44
|
end
|
45
45
|
EOM
|
46
|
-
end
|
46
|
+
end
|
47
47
|
end
|
metadata
CHANGED
@@ -1,71 +1,47 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: palett
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Sergey Gerasimov
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2011-07-14 00:00:00 +03:00
|
19
|
-
default_executable:
|
11
|
+
date: 2011-07-14 00:00:00.000000000 Z
|
20
12
|
dependencies: []
|
21
|
-
|
22
13
|
description: Another one gem for terminal output coloring.
|
23
|
-
email:
|
14
|
+
email:
|
24
15
|
- mail@grsmv.com
|
25
16
|
executables: []
|
26
|
-
|
27
17
|
extensions: []
|
28
|
-
|
29
18
|
extra_rdoc_files: []
|
30
|
-
|
31
|
-
files:
|
19
|
+
files:
|
32
20
|
- README.md
|
33
21
|
- CHANGELOG.md
|
34
22
|
- LICENSE
|
35
23
|
- lib/palett.rb
|
36
|
-
|
37
|
-
homepage: http://github.com/grsmv/day
|
24
|
+
homepage: http://github.com/grsmv/palett
|
38
25
|
licenses: []
|
39
|
-
|
26
|
+
metadata: {}
|
40
27
|
post_install_message:
|
41
28
|
rdoc_options: []
|
42
|
-
|
43
|
-
require_paths:
|
29
|
+
require_paths:
|
44
30
|
- lib
|
45
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
none: false
|
56
|
-
requirements:
|
57
|
-
- - ">="
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
hash: 3
|
60
|
-
segments:
|
61
|
-
- 0
|
62
|
-
version: "0"
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
63
41
|
requirements: []
|
64
|
-
|
65
42
|
rubyforge_project: palett
|
66
|
-
rubygems_version:
|
43
|
+
rubygems_version: 2.0.3
|
67
44
|
signing_key:
|
68
|
-
specification_version:
|
45
|
+
specification_version: 4
|
69
46
|
summary: Another one gem for terminal output coloring.
|
70
47
|
test_files: []
|
71
|
-
|