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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c75425a2a6db4aafbd32c08ab2a00bcc8c6a5f271601781182ffc130f9ccfb8c
4
- data.tar.gz: '04423182fb72a7c72ea0505ab66b240634c2011f2d101caa27c5f2b2b2dba4b7'
3
+ metadata.gz: 5840d380fbc6bff2e848d22dda5d1b5193d3c05c4c4dbfef80fd6f2b916f40c8
4
+ data.tar.gz: 529cac1c7665e8b3beb7a39cdb8382e200ead7a9d5b98aa1a0710b2734d44ccd
5
5
  SHA512:
6
- metadata.gz: 312b80468c9a75d923f74f5c5b383b29616d6551fd2a249c76e41703739b3a852e3cd945c63737ca6e68d3cbb7b3d08277afd02e20ddd28f697e5dc2e49a5f95
7
- data.tar.gz: 6495229ecf2ab4d5a1afdafc56bc338a3f786ec8ae2baf58949cc884067755f2c62df778d6a321a7154f45ba3fe0b39e0af7ccf0e17d44df1a7a4c8ba3eca8e4
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: macos: `brew install 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 --name <your name>`
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 --name=<yourname>`
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)" -- -n <your name>`
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ChristmasTree
4
- VERSION = "0.3.0"
4
+ VERSION = "1.0.0"
5
5
  end
@@ -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.3.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-01 00:00:00.000000000 Z
11
+ date: 2023-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses