terminal 0.1 → 0.1.1

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
  SHA1:
3
- metadata.gz: d516a6b1b58bab0cc47218e13a03e77ad2cf00e0
4
- data.tar.gz: 5cbcd3804c846cc919e4e5c3cb043fd8a4239164
3
+ metadata.gz: 09dfff4392ea46e4a5144da077dcab6bd7d2de74
4
+ data.tar.gz: ff847cde4fbb22554c860fc29aaede5965c529f1
5
5
  SHA512:
6
- metadata.gz: 2972ffd87796ed75c73ed8f72e54864c0d6d092c5d658ea0b36f58f8c1fb90251867c786977e8e2916df83398d2b3dddaac6f24f352e192dc7b1aa979887eb42
7
- data.tar.gz: 00807d190ecb2c6c194e6bad44700e60591e5eb00e6b23277b734d8dafe600132341063afddc5c8823f96fc0a41cb59fe25a02412c505b58259506ab838aafd6
6
+ metadata.gz: 288d154ac92e734370a9e629da2d35f1117c6772ee3cd2cabe3b87641bdc7bd1ade693ec2f3d9a563fa7b96384a271fd0ea25020a8d467e5812aea3e0896e42b
7
+ data.tar.gz: 7cb708606953a5bfa8d9945130a3a7c5a4b2c8624354e1f18136c0309f813600678975cbb8dab5a739637e1275bc012c6b7d3ef1b04957bc191e676dd0d8c3cb
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- terminal (0.0.1)
4
+ terminal (0.1)
5
5
  escape_utils (~> 1.0)
6
6
 
7
7
  GEM
File without changes
@@ -1,5 +1,5 @@
1
1
  #!/bin/bash
2
2
 
3
- ASCII=`cat homer.txt`
3
+ ASCII=`cat homer.ansi`
4
4
 
5
5
  echo -e "\033[33m$ASCII\033[0m"
@@ -0,0 +1,47 @@
1
+                                                                                                    
2
+                                                                             0101                   
3
+                                                                          000001                    
4
+                                                                      011010001                     
5
+                                                                   00010101111                      
6
+                                                                 011000000101                       
7
+                                                                101011100101                        
8
+                                                              111001101011                          
9
+                                                            1101100010000                           
10
+        1  1011001                                         010001000101                             
11
+    1010001011101101011000110         1000000001001011   110101111000                               
12
+        10011011100011111101011000000010001000001100010110100011101          1000                   
13
+              001101100001001111101011101100011001001100001111111          0000000000               
14
+                   10001100010001011010001010101111010101110011         0010111001010001            
15
+                           0001110001111111101000110110101011110      1011101111011110000110        
16
+                          001010010100100010111001010000101111000   110110100110101100101111100     
17
+                          10  001111010000111101011  010001101110 100010111010110101101101010010    
18
+                         1110   0100110110111011     01001001010000100010010110100101101010111      
19
+                        0001000110101100010100010111010001011100101001100111001111000001110         
20
+                        0001010111010101110111100011001000111100010011111001110011111101            
21
+                       10001111010010001000110100011101011010101100000000010110100111               
22
+                       10101011001011100100010000101111000000001001111100000000101                  
23
+                         100011010011100110011110100100101010001010000011011001101011               
24
+                          1111000110010110101101111101001110111000010011000010010011011001          
25
+                            1111001001010110100100100011011111111      00011011010010000001010      
26
+                               0100001010011110001000000000010001          100111010111010110       
27
+                              101010100010101101100001001010001001       0110101111110001           
28
+                              1000010011011010001111111001001111100    0111101011011                
29
+                              10010111011111010111001010100001001000  0100111110101                 
30
+                             1010101101101011100110011001010100111101    000100100011010            
31
+                             10101100110111010000011100010110001111110        100000011101          
32
+                            000110010000001001001001111000000001001000      111101100111            
33
+                            1010010100010011000101111111011111100000000   0000011110                
34
+                           00000110100010011100100100110111000101100001 00100001                    
35
+                           0001101111010011100111001011000010101110100000110                        
36
+                           100000101010001111111011101011001110010011000                            
37
+                           11101111001111100001011101000010001000011011                             
38
+                            111101001110001100111101101111011010111010                              
39
+                             1001110000101011001010001100001001011110                               
40
+                               0010111000111010110101000000000011001                                
41
+                             10011111011               0111010010100                                
42
+                           10001000000                       01011110                               
43
+                           0110111                            0111000                               
44
+                                                                01000                               
45
+                                                                                                    
46
+                                                                                                    
47
+ 
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ ASCII=`cat pikachu.ansi`
4
+
5
+ echo -e "\033[33m$ASCII\033[0m"
@@ -9,7 +9,7 @@ module Terminal
9
9
  max_total_size = 4 * 1024 * 1024
10
10
  if output.bytesize > max_total_size
11
11
  output = output.byteslice(0, max_total_size)
12
- output << "\n\nWarning: Terminal has chopped off the rest of the build as it's over the allowed #{number_to_human_size(max_total_size)} limit for logs."
12
+ output << "\n\nWarning: Terminal has chopped off the rest of the build as it's over the allowed 4 megabyte limit for logs."
13
13
  end
14
14
 
15
15
  # Limit each line to (x) chars
@@ -1,3 +1,3 @@
1
1
  module Terminal
2
- VERSION = "0.1"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -11,15 +11,21 @@ describe Terminal::Renderer do
11
11
  end
12
12
  end
13
13
 
14
- describe "rendering of ascii.sh" do
14
+ describe "rendering of homer.sh" do
15
15
  it "returns the expected result" do
16
- fixture = Fixture.for("ascii.sh")
16
+ fixture = Fixture.for("homer.sh")
17
17
 
18
18
  expect(renderer.render(fixture.raw)).to eql(fixture.rendered)
19
19
  end
20
20
  end
21
21
 
22
22
  describe "#render" do
23
+ it "chops off logs longer than 4 megabytes" do
24
+ long_string = "x" * 4.5 * 1024 * 1024
25
+
26
+ expect(renderer.render(long_string)).to end_with("Warning: Terminal has chopped the rest of this line off as it&#39;s over the allowed 50000 characters per line limit.")
27
+ end
28
+
23
29
  it "closes colors that get opened" do
24
30
  raw = "he\033[81mllo"
25
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terminal
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Pitt
@@ -80,10 +80,12 @@ files:
80
80
  - Rakefile
81
81
  - Readme.md
82
82
  - bin/terminal
83
- - examples/ascii.sh
84
83
  - examples/curl.sh
85
84
  - examples/generate
86
- - examples/homer.txt
85
+ - examples/homer.ansi
86
+ - examples/homer.sh
87
+ - examples/pikachu.ansi
88
+ - examples/pikachu.sh
87
89
  - lib/terminal.rb
88
90
  - lib/terminal/cli.rb
89
91
  - lib/terminal/color.rb
@@ -93,10 +95,10 @@ files:
93
95
  - lib/terminal/reset.rb
94
96
  - lib/terminal/templates/preview.html.erb
95
97
  - lib/terminal/version.rb
96
- - spec/fixtures/ascii.sh.raw
97
- - spec/fixtures/ascii.sh.rendered
98
98
  - spec/fixtures/curl.sh.raw
99
99
  - spec/fixtures/curl.sh.rendered
100
+ - spec/fixtures/homer.sh.raw
101
+ - spec/fixtures/homer.sh.rendered
100
102
  - spec/spec_helper.rb
101
103
  - spec/support/fixture.rb
102
104
  - spec/terminal/renderer_spec.rb
@@ -126,10 +128,10 @@ signing_key:
126
128
  specification_version: 4
127
129
  summary: Renders ASCII as HTML
128
130
  test_files:
129
- - spec/fixtures/ascii.sh.raw
130
- - spec/fixtures/ascii.sh.rendered
131
131
  - spec/fixtures/curl.sh.raw
132
132
  - spec/fixtures/curl.sh.rendered
133
+ - spec/fixtures/homer.sh.raw
134
+ - spec/fixtures/homer.sh.rendered
133
135
  - spec/spec_helper.rb
134
136
  - spec/support/fixture.rb
135
137
  - spec/terminal/renderer_spec.rb