tp 0.7.0pre1 → 0.7.0pre2

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: 9813a862d681061c6eae802d73fa465781b9c552
4
- data.tar.gz: 5e7e87045104c9d1fc27f81578428f53abc1c30a
3
+ metadata.gz: dce4ec0c53ab2d9dbbb1b484e65da65b3a2dc391
4
+ data.tar.gz: f216644030d74c7cbcb3c901ff1f3203de968561
5
5
  SHA512:
6
- metadata.gz: ac5aeb3b0295ed94721d33e443699ced0e4dbd9f1db6832bec02203e4efe7427fafff37b2a39f0543055da71712048bac43363c9bd597b22d49e8dca884ebe54
7
- data.tar.gz: 2d420ed3e99cda9fbaf6a4993977cf3777e32f0af987e8a1cf6c0f29bd2feb9046b6c43814847b03850754eba732b44f715bb9d7411a4dfee8e719e0038ee900
6
+ metadata.gz: cf0ce4dc392ba6077d19e5f57c58f53ff3a2dc09b757a57b31d221dd119a2543cfc14c6e1d17a5ffd09cf13c566ad6ba7687b01f60b35019fac4d27f7bbc8e3b
7
+ data.tar.gz: 448769e2bfdb35e292e5d4f3582919b1a8f99cb66fa7b2e59f5cdea51808045bae65daeaeb284f9062c084c0b33888c5063d43a972ce7ad67500610e3d35db25
data/lib/screen.rb CHANGED
@@ -3,6 +3,8 @@ module Screen
3
3
 
4
4
  X_GUTTER = 2
5
5
  Y_GUTTER = 1
6
+ GUTTER_CHAR = "\u2591"
7
+ SUGGEST_CHAR = "\u2588"
6
8
 
7
9
  def add_gutter(text)
8
10
  text = text.lines.map { |line|
@@ -29,12 +31,12 @@ module Screen
29
31
  end
30
32
 
31
33
  def suggest(x, y)
32
- Y_GUTTER.times { print "x" * (x + X_GUTTER * 2) + "\n" }
34
+ Y_GUTTER.times { print GUTTER_CHAR * (x + X_GUTTER * 2) + "\n" }
33
35
  y.times do |n|
34
36
  print "\n" if n.nonzero?
35
- print "x" * X_GUTTER + "\u2588" * x + "x" * X_GUTTER
37
+ print GUTTER_CHAR * X_GUTTER + SUGGEST_CHAR * x + GUTTER_CHAR * X_GUTTER
36
38
  end
37
- Y_GUTTER.times { print "\n" + "x" * (x + X_GUTTER * 2) }
39
+ Y_GUTTER.times { print "\n" + GUTTER_CHAR * (x + X_GUTTER * 2) }
38
40
  end
39
41
 
40
42
  def width
data/lib/tp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TP
2
- VERSION = "0.7.0pre1"
2
+ VERSION = "0.7.0pre2"
3
3
  end
@@ -39,6 +39,8 @@ describe Screen do
39
39
  describe ".height" do
40
40
  subject(:height) { klass.height }
41
41
 
42
+ before { klass.unstub :height }
43
+
42
44
  it "returns the height" do
43
45
  height.should be_nonzero
44
46
  end
@@ -72,9 +74,17 @@ describe Screen do
72
74
  end
73
75
  end
74
76
 
77
+ describe ".suggest" do
78
+ it "prints the slide size with gutter" do
79
+
80
+ end
81
+ end
82
+
75
83
  describe ".width" do
76
84
  subject(:width) { klass.width }
77
85
 
86
+ before { klass.unstub :width }
87
+
78
88
  it "returns the width" do
79
89
  width.should be_nonzero
80
90
  end
data/spec/spec_helper.rb CHANGED
@@ -17,5 +17,6 @@ RSpec.configure do |config|
17
17
 
18
18
  config.before do
19
19
  Screen.stub clear!: nil, print: nil
20
+ Screen.stub height: 34, width: 80
20
21
  end
21
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0pre1
4
+ version: 0.7.0pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Campbell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-03 00:00:00.000000000 Z
11
+ date: 2014-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coderay