walnut 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.yardopts ADDED
@@ -0,0 +1,6 @@
1
+ --title "walnut"
2
+ --protected
3
+ --private
4
+ lib/**/*
5
+ - LICENSE.md
6
+ - docs/**/*
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ # Copyright (c) 2013, Autumn Perrault, Matthew Carey
2
+ # All rights reserved.
3
+ # Distributed under the terms of the MIT license (see LICENSE.md).
4
+
5
+ source 'https://rubygems.org'
6
+
7
+ gemspec :development_group => :dev
8
+
9
+ # vim: set ts=4 sts=2 sw=2 et:
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ License
2
+ =======
3
+
4
+ **walnut** is free software distributed under the terms of the **MIT license**:
5
+
6
+ Copyright (c) 2013, Autumn Perrault, Matthew Carey
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
10
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
11
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all copies or substantial
15
+ portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
18
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
19
+ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,24 @@
1
+ walnut
2
+ ======
3
+
4
+ A gem for Ruby 1.9 which provides a simple, highly customizable shell.
5
+
6
+ + [Homepage](http://git.io/walnutrb)
7
+ + [Documentation](http://rdoc.info/github/noxgirl/walnut/)
8
+
9
+ **_Please see_** the licensing terms in LICENSE.md. walnut is free, open-source
10
+ software distributed under the permissive terms of the **MIT license**.
11
+
12
+ Synopsis
13
+ --------
14
+
15
+ **walnut** provides a simple, easy-to-use, yet highly customizable shell for
16
+ use in Ruby 1.9 applications.
17
+
18
+ Authors
19
+ -------
20
+
21
+ walnut was written by thus:
22
+
23
+ + [noxgirl](https://github.com/noxgirl)
24
+ + [swarley](https://github.com/swarley)
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ # Copyright (c) 2013, Autumn Perrault, Matthew Carey
2
+ # All rights reserved.
3
+ # Distributed under the terms of the MIT license (see LICENSE.md).
4
+
5
+ require 'bundler/gem_tasks'
6
+
7
+ # vim: set ts=4 sts=2 sw=2 et:
@@ -0,0 +1,24 @@
1
+ Interface for Walnut Input Drivers
2
+ ==================================
3
+
4
+ Synopsis
5
+ --------
6
+
7
+ Input drivers require elements which any IO object would generally mandate.
8
+
9
+ The essential ability to read, to write, and to test for an end of input.
10
+
11
+ Methods
12
+ -------
13
+
14
+ A basic input driver will require the following as a bare minimum:
15
+
16
+ - read(size) -- Read (size) number of characters from the input.
17
+ - write(\*strings) -- Write to the input.
18
+ - eof?() -- Check for a closed stream.
19
+ - puts(\*strings) -- Write with appended newlines.
20
+ - gets() -- Read one line from the source.
21
+ - close() -- Close the stream.
22
+
23
+ Driver Implementations
24
+ ----------------------
@@ -0,0 +1,30 @@
1
+ # Copyright (c) 2013, Autumn Perrault, Matthew Carey
2
+ # All rights reserved.
3
+ # Distributed under the terms of the MIT license (see LICENSE.md).
4
+
5
+ module Walnut
6
+
7
+ # Dummy class to give a namespace to the configuration object.
8
+ class Configuration < OpenStruct
9
+ # Let's just do this to ensure that this has its own class
10
+ end
11
+
12
+ # Make a globally accessible configuration that general configuration will go
13
+ #
14
+ # @author noxgirl
15
+ # @author swarley
16
+ #
17
+ # @return [Walnut::Configuration]
18
+ #
19
+ # @example
20
+ # Walnut.config.setting = true
21
+ # #=> #<Walnut::Configuration setting=true>
22
+ #
23
+ def self.config
24
+ # Ensure we have the same object every time.
25
+ @walnut_global_configuration||=Configuration.new
26
+ end
27
+
28
+ end
29
+
30
+ # vim: set ts=4 sts=2 sw=2 et:
@@ -0,0 +1,25 @@
1
+ # Copyright (c) 2013, Autumn Perrault, Matthew Carey
2
+ # All rights reserved.
3
+ # Distributed under the terms of the MIT license (see LICENSE.md).
4
+
5
+ module Walnut
6
+
7
+ # A simple shell.
8
+ class Shell
9
+
10
+ # Constructor.
11
+ def initialize
12
+ end
13
+
14
+ # Configure the shell.
15
+ def configure
16
+
17
+ yield Walnut.config if block_given?
18
+
19
+ end
20
+
21
+ end # class Shell
22
+
23
+ end # module Walnut
24
+
25
+ # vim: set ts=4 sts=2 sw=2 et:
@@ -0,0 +1,9 @@
1
+ # Copyright (c) 2013, Autumn Perrault, Matthew Carey
2
+ # All rights reserved.
3
+ # Distributed under the terms of the MIT license (see LICENSE.md).
4
+
5
+ module Walnut
6
+ VERSION = '0.0.1'
7
+ end
8
+
9
+ # vim: set ts=4 sts=2 sw=2 et:
data/lib/walnut.rb ADDED
@@ -0,0 +1,9 @@
1
+ # Copyright (c) 2013, Autumn Perrault, Matthew Carey
2
+ # All rights reserved.
3
+ # Distributed under the terms of the MIT license (see LICENSE.md).
4
+
5
+ require 'walnut/version'
6
+ require 'walnut/configuration'
7
+ require 'walnut/shell'
8
+
9
+ # vim: set ts=4 sts=2 sw=2 et:
data/walnut.gemspec ADDED
@@ -0,0 +1,31 @@
1
+ # Copyright (c) 2013, Autumn Perrault, Matthew Carey
2
+ # All rights reserved.
3
+ # Distributed under the terms of the MIT license (see LICENSE.md).
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ lib = File.expand_path('../lib', __FILE__)
7
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
8
+ require 'walnut/version'
9
+
10
+ Gem::Specification.new do |gem|
11
+
12
+ gem.name = 'walnut'
13
+ gem.version = Walnut::VERSION
14
+ gem.date = Time.now.strftime '%Y-%m-%d'
15
+
16
+ gem.authors = ['Autumn Perrault', 'Matthew Carey']
17
+ gem.email = ['xoeverlux@gmail.com', 'matthew.b.carey@gmail.com']
18
+ gem.summary = 'A simple shell for Ruby 1.9.'
19
+ gem.description = 'A simple, highly customizable shell for Ruby 1.9.'
20
+ gem.homepage = 'http://git.io/walnutrb'
21
+
22
+ files = `git ls-files`.split($/); files.delete('.template.rb')
23
+ gem.files = files
24
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
25
+ gem.require_paths = ['lib']
26
+
27
+ gem.add_development_dependency 'bacon', '~> 1.2'
28
+
29
+ end
30
+
31
+ # vim: set ts=4 sts=2 sw=2 et:
metadata ADDED
@@ -0,0 +1,75 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: walnut
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Autumn Perrault
9
+ - Matthew Carey
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2013-01-04 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bacon
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: '1.2'
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: '1.2'
31
+ description: A simple, highly customizable shell for Ruby 1.9.
32
+ email:
33
+ - xoeverlux@gmail.com
34
+ - matthew.b.carey@gmail.com
35
+ executables: []
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - .yardopts
40
+ - Gemfile
41
+ - LICENSE.md
42
+ - README.md
43
+ - Rakefile
44
+ - docs/interfaces/Input.md
45
+ - lib/walnut.rb
46
+ - lib/walnut/config.rb
47
+ - lib/walnut/shell.rb
48
+ - lib/walnut/version.rb
49
+ - walnut.gemspec
50
+ homepage: http://git.io/walnutrb
51
+ licenses: []
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ! '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubyforge_project:
70
+ rubygems_version: 1.8.23
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: A simple shell for Ruby 1.9.
74
+ test_files: []
75
+ has_rdoc: