christmas_tree 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -4
- data/lib/christmas_tree/version.rb +1 -1
- data/lib/christmas_tree.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5840d380fbc6bff2e848d22dda5d1b5193d3c05c4c4dbfef80fd6f2b916f40c8
|
4
|
+
data.tar.gz: 529cac1c7665e8b3beb7a39cdb8382e200ead7a9d5b98aa1a0710b2734d44ccd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5378d86fbbd6dd3dfd880fb36b9b8142408c93217e34050701c407e95cfddb7b17679dbbe56ef35e7a995808ccd1d73f62597e606d29c7f3afabd17394cdcf6
|
7
|
+
data.tar.gz: 84d5385b70aa219d490c75bebc79ca6252779ff7e6d3afb3e1226d801a84d9a8f0280dc6c7a8583a78f3f7364a6cde75102720f7f69590c51db21325b83421b6
|
data/README.md
CHANGED
@@ -7,7 +7,15 @@ christmas tree cli
|
|
7
7
|
System dependencies:
|
8
8
|
|
9
9
|
- Ruby 3.0+
|
10
|
-
- Ncurses:
|
10
|
+
- Ncurses:
|
11
|
+
- Macos: `brew install ncurses`
|
12
|
+
- Linux: `apt install libncurses5-dev` or `apt install libncursesw5-dev`
|
13
|
+
|
14
|
+
Gem dependencies
|
15
|
+
|
16
|
+
Ruby below 3.0, need install gems by manually:
|
17
|
+
|
18
|
+
- Curses: `gem install curses`
|
11
19
|
|
12
20
|
# local run
|
13
21
|
|
@@ -17,7 +25,7 @@ System dependencies:
|
|
17
25
|
|
18
26
|
## add your name
|
19
27
|
|
20
|
-
`./christmas_tree.rb --
|
28
|
+
`./christmas_tree.rb --merry_to <your name>`
|
21
29
|
|
22
30
|
# remote run
|
23
31
|
|
@@ -27,7 +35,7 @@ System dependencies:
|
|
27
35
|
|
28
36
|
### add your name
|
29
37
|
|
30
|
-
`gem exec christmas_tree --
|
38
|
+
`gem exec christmas_tree --merry_to <yourname>`
|
31
39
|
|
32
40
|
## use Curl
|
33
41
|
|
@@ -35,7 +43,7 @@ System dependencies:
|
|
35
43
|
|
36
44
|
### add your name
|
37
45
|
|
38
|
-
`ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Mark24Code/christmas_tree/main/christmas_tree.rb)" --
|
46
|
+
`ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Mark24Code/christmas_tree/main/christmas_tree.rb)" -- --merry_to <your name>`
|
39
47
|
|
40
48
|
# preview
|
41
49
|
|
data/lib/christmas_tree.rb
CHANGED
@@ -65,6 +65,10 @@ module ChristmasTree
|
|
65
65
|
Curses.curs_set(0)
|
66
66
|
end
|
67
67
|
|
68
|
+
def tree_star
|
69
|
+
@buffer << [Token.new("★", :yellow, :bold)]
|
70
|
+
end
|
71
|
+
|
68
72
|
def tree_crown
|
69
73
|
(1..@buffer_count).each do |count|
|
70
74
|
total = 2*count-1
|
@@ -138,6 +142,7 @@ module ChristmasTree
|
|
138
142
|
def draw_canvas
|
139
143
|
@buffer = []
|
140
144
|
border(3)
|
145
|
+
tree_star
|
141
146
|
tree_crown
|
142
147
|
tree_trunk
|
143
148
|
footer_text
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: christmas_tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark24Code
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|