remedy 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c57a50932b4e8ce59e0c961d944c67c5cb93b444
4
- data.tar.gz: ed2b6bfb4d72f4dab134e3cbdec8abb89a1477c9
3
+ metadata.gz: 1559e748181af1073d2ec04a4ece294755c74bf5
4
+ data.tar.gz: 444c5a3c0d1ad62b5bbcd70d955dae88f1a73808
5
5
  SHA512:
6
- metadata.gz: 7c458b0e9eacccfb956afd4f29456ece91dc17eec562f37b7ee2fd05bf3ec40f7067bea1d0f46feb6250cc0cd4862a4811d80b805aae1d613ed70e55edc8a97a
7
- data.tar.gz: 20cc90d989ec4545ae2fb697b7a1520175f2a27a377f6aa63e10c5db492c9a5b5450e9e4d84ee3c581b2dafb08324d70ee98bc90906e0b88514af2cc97dceb40
6
+ metadata.gz: 00d0ca77b90ed30ca7147f612a738ad2300cb0362c159003fa2d3f2154641257220ceb028d32f3565dea7c10a1e38474bfb049fab769d457000e2e9b75ca9a9f
7
+ data.tar.gz: 91747e9cabc4e54003e0f1203d1a54bac3dca0f7c1e8608e6507a2dedb0d781ef07ba680d27d618a6995f04d85787f919824a50f5403ca43488b1c9cb1156a87
@@ -66,7 +66,7 @@ module Remedy
66
66
  '`' => :back_quote,
67
67
 
68
68
  '[' => :left_bracket,
69
- ']' => :right_bracked,
69
+ ']' => :right_bracket,
70
70
  '(' => :left_paren,
71
71
  ')' => :right_paren,
72
72
 
@@ -30,7 +30,7 @@ module Remedy
30
30
  end
31
31
 
32
32
  def width
33
- @width ||= lines.max{|line| line.length }
33
+ @width ||= lines.max{|line| line.length }.length
34
34
  end
35
35
 
36
36
  def size
@@ -1,3 +1,3 @@
1
1
  module Remedy
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -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.coords
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
@@ -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 = ["anthonymichaelcook@gmail.com"]
11
- gem.description = %q{Pure Ruby console interaction library in the vein of Curses with baked-in MVC support.}
12
- gem.summary = %q{MVC Console Interaction Library}
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.0
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-01 00:00:00.000000000 Z
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 baked-in
28
- MVC support.
27
+ description: Pure Ruby console interaction library in the vein of Curses with MVC-style
28
+ seperation of concerns.
29
29
  email:
30
- - anthonymichaelcook@gmail.com
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: MVC Console Interaction Library
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