remedy 0.0.4.pre → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3656685f4f4eca02da54269885a8ba11a5662bef
4
+ data.tar.gz: cb12f074fc24fdf142a882edf15f3115ac47f73a
5
+ SHA512:
6
+ metadata.gz: 6b5dc6cce2e13229f7322d22cb711d330c2b43c69a1d7065729625f58880ac33391888c7362658a9a7f4ba4deb11747490e75c2b0f0ad0b80e006c8c628091ae
7
+ data.tar.gz: 4756a1a9438777926813cbf2bf3f7edc63cf96ed4caedb9cd537940503d64c7f9a0d2bde6f7aed256518dc6942a6b82ffa0ca3d597228bb7cbf84c586c906068
@@ -0,0 +1 @@
1
+ remedy
@@ -0,0 +1 @@
1
+ ruby-2
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.2
4
+ script: bundle exec rspec
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in remedy.gemspec
4
4
  gemspec
5
+
6
+ gem 'pry'
7
+ gem 'pry-doc'
8
+ gem 'pry-theme'
@@ -3,6 +3,8 @@ Remedy
3
3
 
4
4
  Remedy is a console interaction framework along the lines of Curses written in pure Ruby with an Object-Oriented approach and baked-in support for bulding MVC applications.
5
5
 
6
+ [![TravisCI](http://img.shields.io/travis/acook/remedy.svg?style=flat)](https://travis-ci.org/acook/remedy)
7
+
6
8
  THIS SOFTWARE IS PRE-ALPHA!!
7
9
  ----------------------------
8
10
 
@@ -38,11 +40,11 @@ Usage
38
40
 
39
41
  Remedy makes a few different classes and modules available to allow straight forward half-duplex communication with users via the console.
40
42
 
41
- There are obejcts for input as well as output, including low level console keystroke reads and screen drawing.
43
+ There are objects for input as well as output, including low level console keystroke reads and screen drawing.
42
44
 
43
45
  ### Interaction
44
46
 
45
- The Interaction object wraps raw keyboard reads and streamlines some aspects of accepting keyboard input.
47
+ The `Interaction` object wraps raw keyboard reads and streamlines some aspects of accepting keyboard input.
46
48
 
47
49
  ```ruby
48
50
  include Remedy
@@ -55,7 +57,7 @@ The Interaction object wraps raw keyboard reads and streamlines some aspects of
55
57
 
56
58
  ### Viewport
57
59
 
58
- Viewport is the object that draws on your screen, you can give it any compatible Remedy::Partial object, or something that responds like one.
60
+ `Viewport` is the object that draws on your screen, you can give it any compatible `Remedy::Partial` object, or something that responds like one.
59
61
 
60
62
  ```ruby
61
63
  include Remedy
@@ -67,7 +69,7 @@ Viewport is the object that draws on your screen, you can give it any compatible
67
69
  screen.draw joke
68
70
  ```
69
71
 
70
- Remedy::Partial has the subclasses Header, Footer, and Content.
72
+ `Remedy::Partial` has the subclasses `Header`, `Footer`, and `Content`.
71
73
 
72
74
  You can use the above classes to divide your Views into 3 seperate pieces. Content will be truncated as needed to accomodate the header and footer and the dimensions of the console. You can also specify the cursor/scroll position of the content being drawn, and when specifying headers or footers, you must.
73
75
 
@@ -89,7 +91,7 @@ You can use the above classes to divide your Views into 3 seperate pieces. Conte
89
91
 
90
92
  ### Console
91
93
 
92
- If you want easy access to some lower level console commands, you can use Console.
94
+ If you want easy access to some lower level console commands, you can use `Console`.
93
95
 
94
96
  The most interesting function in my opinion is the callback that gets triggered when the user resizes the console window.
95
97
 
@@ -1,9 +1,15 @@
1
- %w{
2
- version ansi characters console resized_console content header footer
3
- interaction key keyboard partial view viewport
4
- }.each do |lib|
5
- require "remedy/#{lib}"
1
+ module Remedy
2
+ module_function
3
+
4
+ def libs
5
+ %w{
6
+ version ansi characters console console_resized content header footer
7
+ interaction key keyboard partial view viewport
8
+ }
9
+ end
6
10
  end
7
11
 
8
- module Remedy
12
+ Remedy.libs.each do |lib|
13
+ require "remedy/#{lib}"
9
14
  end
15
+
@@ -1,3 +1,3 @@
1
1
  module Remedy
2
- VERSION = "0.0.4.pre"
2
+ VERSION = '0.0.4'
3
3
  end
@@ -19,9 +19,9 @@ module Remedy
19
19
  Console.output << view
20
20
  end
21
21
 
22
- def range_find map, center, heightwidth
22
+ def range_find partial, center, heightwidth
23
23
  row_size, col_size = heightwidth
24
- row_limit, col_limit = map.size
24
+ row_limit, col_limit = partial.size
25
25
 
26
26
  center_row, center_col = center.coords
27
27
 
@@ -16,4 +16,6 @@ Gem::Specification.new do |gem|
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
+
20
+ gem.add_development_dependency 'rspec'
19
21
  end
@@ -0,0 +1,5 @@
1
+ require_relative 'spec_helper'
2
+
3
+ describe Remedy do
4
+ specify { expect(described_class).to be }
5
+ end
File without changes
metadata CHANGED
@@ -1,16 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remedy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.pre
5
- prerelease: 6
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Anthony M. Cook
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-01 00:00:00.000000000 Z
13
- dependencies: []
11
+ date: 2015-05-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
14
27
  description: Pure Ruby console interaction library in the vein of Curses with baked-in
15
28
  MVC support.
16
29
  email:
@@ -19,7 +32,10 @@ executables: []
19
32
  extensions: []
20
33
  extra_rdoc_files: []
21
34
  files:
22
- - .gitignore
35
+ - ".gitignore"
36
+ - ".ruby-gemset"
37
+ - ".ruby-version"
38
+ - ".travis.yml"
23
39
  - Gemfile
24
40
  - LICENSE.txt
25
41
  - README.markdown
@@ -41,29 +57,32 @@ files:
41
57
  - lib/remedy/view.rb
42
58
  - lib/remedy/viewport.rb
43
59
  - remedy.gemspec
60
+ - spec/remedy_spec.rb
61
+ - spec/spec_helper.rb
44
62
  homepage: http://github.com/acook/remedy
45
63
  licenses: []
64
+ metadata: {}
46
65
  post_install_message:
47
66
  rdoc_options: []
48
67
  require_paths:
49
68
  - lib
50
69
  required_ruby_version: !ruby/object:Gem::Requirement
51
70
  requirements:
52
- - - ! '>='
71
+ - - ">="
53
72
  - !ruby/object:Gem::Version
54
73
  version: '0'
55
- none: false
56
74
  required_rubygems_version: !ruby/object:Gem::Requirement
57
75
  requirements:
58
- - - ! '>'
76
+ - - ">="
59
77
  - !ruby/object:Gem::Version
60
- version: 1.3.1
61
- none: false
78
+ version: '0'
62
79
  requirements: []
63
80
  rubyforge_project:
64
- rubygems_version: 1.8.24
81
+ rubygems_version: 2.4.6
65
82
  signing_key:
66
- specification_version: 3
83
+ specification_version: 4
67
84
  summary: MVC Console Interaction Library
68
- test_files: []
85
+ test_files:
86
+ - spec/remedy_spec.rb
87
+ - spec/spec_helper.rb
69
88
  has_rdoc: