remedy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/remedy/characters.rb +1 -1
- data/lib/remedy/partial.rb +1 -1
- data/lib/remedy/version.rb +1 -1
- data/lib/remedy/viewport.rb +3 -1
- data/remedy.gemspec +4 -3
- data/spec/partial_spec.rb +12 -0
- data/spec/viewport_spec.rb +13 -0
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1559e748181af1073d2ec04a4ece294755c74bf5
|
4
|
+
data.tar.gz: 444c5a3c0d1ad62b5bbcd70d955dae88f1a73808
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00d0ca77b90ed30ca7147f612a738ad2300cb0362c159003fa2d3f2154641257220ceb028d32f3565dea7c10a1e38474bfb049fab769d457000e2e9b75ca9a9f
|
7
|
+
data.tar.gz: 91747e9cabc4e54003e0f1203d1a54bac3dca0f7c1e8608e6507a2dedb0d781ef07ba680d27d618a6995f04d85787f919824a50f5403ca43488b1c9cb1156a87
|
data/lib/remedy/characters.rb
CHANGED
data/lib/remedy/partial.rb
CHANGED
data/lib/remedy/version.rb
CHANGED
data/lib/remedy/viewport.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'remedy/view'
|
2
2
|
require 'remedy/size'
|
3
3
|
require 'remedy/content'
|
4
|
+
require 'remedy/console'
|
5
|
+
require 'remedy/ansi'
|
4
6
|
|
5
7
|
module Remedy
|
6
8
|
class Viewport
|
@@ -23,7 +25,7 @@ module Remedy
|
|
23
25
|
row_size, col_size = heightwidth
|
24
26
|
row_limit, col_limit = partial.size
|
25
27
|
|
26
|
-
center_row, center_col = center
|
28
|
+
center_row, center_col = center
|
27
29
|
|
28
30
|
row_range = center_range center_row, row_size, row_limit
|
29
31
|
col_range = center_range center_col, col_size, col_limit
|
data/remedy.gemspec
CHANGED
@@ -7,9 +7,10 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.name = "remedy"
|
8
8
|
gem.version = Remedy::VERSION
|
9
9
|
gem.authors = ["Anthony M. Cook"]
|
10
|
-
gem.email = ["
|
11
|
-
gem.description = %q{Pure Ruby console interaction library in the vein of Curses with
|
12
|
-
gem.summary = %q{
|
10
|
+
gem.email = ["github@anthonymcook.com"]
|
11
|
+
gem.description = %q{Pure Ruby console interaction library in the vein of Curses with MVC-style seperation of concerns.}
|
12
|
+
gem.summary = %q{Pure Ruby Console Interaction Library}
|
13
|
+
gem.licenses = ['MIT']
|
13
14
|
gem.homepage = "http://github.com/acook/remedy"
|
14
15
|
|
15
16
|
gem.files = `git ls-files`.split($/)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
require 'remedy/partial'
|
3
|
+
|
4
|
+
describe Remedy::Partial do
|
5
|
+
subject { described_class.new.tap{|p| p << "foo"; p << "bar"; p << "remedy" } }
|
6
|
+
|
7
|
+
describe '#width' do
|
8
|
+
it 'gives length of longest line' do
|
9
|
+
expect(subject.width).to eq 6
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
require 'remedy/viewport'
|
3
|
+
|
4
|
+
describe Remedy::Viewport do
|
5
|
+
it 'should be able to execute the example code from the readme' do
|
6
|
+
joke = ::Remedy::Content.new
|
7
|
+
joke << "Q: What's the difference between a duck?"
|
8
|
+
joke << "A: Purple, because ice cream has no bones!"
|
9
|
+
|
10
|
+
screen = ::Remedy::Viewport.new
|
11
|
+
screen.draw joke
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remedy
|
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
|
- Anthony M. Cook
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -24,10 +24,10 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description: Pure Ruby console interaction library in the vein of Curses with
|
28
|
-
|
27
|
+
description: Pure Ruby console interaction library in the vein of Curses with MVC-style
|
28
|
+
seperation of concerns.
|
29
29
|
email:
|
30
|
-
-
|
30
|
+
- github@anthonymcook.com
|
31
31
|
executables: []
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
@@ -58,10 +58,13 @@ files:
|
|
58
58
|
- lib/remedy/viewport.rb
|
59
59
|
- remedy.gemspec
|
60
60
|
- spec/key_spec.rb
|
61
|
+
- spec/partial_spec.rb
|
61
62
|
- spec/remedy_spec.rb
|
62
63
|
- spec/spec_helper.rb
|
64
|
+
- spec/viewport_spec.rb
|
63
65
|
homepage: http://github.com/acook/remedy
|
64
|
-
licenses:
|
66
|
+
licenses:
|
67
|
+
- MIT
|
65
68
|
metadata: {}
|
66
69
|
post_install_message:
|
67
70
|
rdoc_options: []
|
@@ -82,8 +85,10 @@ rubyforge_project:
|
|
82
85
|
rubygems_version: 2.6.7
|
83
86
|
signing_key:
|
84
87
|
specification_version: 4
|
85
|
-
summary:
|
88
|
+
summary: Pure Ruby Console Interaction Library
|
86
89
|
test_files:
|
87
90
|
- spec/key_spec.rb
|
91
|
+
- spec/partial_spec.rb
|
88
92
|
- spec/remedy_spec.rb
|
89
93
|
- spec/spec_helper.rb
|
94
|
+
- spec/viewport_spec.rb
|