textbringer 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: acc31bc853df5cf7a60816b8b22397e96eea7aa3
4
+ data.tar.gz: '058c53153c9645dfe51c7aaf9112e0a9ef27e5b5'
5
+ SHA512:
6
+ metadata.gz: 6d66c3c3fefd66a2ac7b669c24216a77a627b9265ca93d3ac9d3ed4321b6dbc3433ab70bd6b1a675e740dad40ad684f84579bd8f81d57a238fc16412fb913fad
7
+ data.tar.gz: 8d9b9c1cb9717ad7da44786b46be1033e85017eb5f42a06cff89b83d81813ca4c4a147e2c7d03b366ddf885022dd81453b8905ec84d49e4e9005d8cb110cda0f
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ tags
data/.travis.yml ADDED
@@ -0,0 +1,13 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.3
5
+ - 2.4.0
6
+ cache: bundler
7
+ script:
8
+ - bundle exec rake test
9
+ - bundle exec bundle-audit check --update
10
+ notifications:
11
+ email:
12
+ on_success: never
13
+ on_failure: always
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in textbringer.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,41 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ textbringer (0.1.0)
5
+ ncursesw (~> 1.4)
6
+ unicode-display_width (~> 1.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ bundler-audit (0.5.0)
12
+ bundler (~> 1.2)
13
+ thor (~> 0.18)
14
+ docile (1.1.5)
15
+ json (2.0.3)
16
+ ncursesw (1.4.10)
17
+ power_assert (0.4.1)
18
+ rake (10.5.0)
19
+ simplecov (0.12.0)
20
+ docile (~> 1.1.0)
21
+ json (>= 1.8, < 3)
22
+ simplecov-html (~> 0.10.0)
23
+ simplecov-html (0.10.0)
24
+ test-unit (3.2.3)
25
+ power_assert
26
+ thor (0.19.4)
27
+ unicode-display_width (1.1.3)
28
+
29
+ PLATFORMS
30
+ ruby
31
+
32
+ DEPENDENCIES
33
+ bundler (~> 1.11)
34
+ bundler-audit
35
+ rake (~> 10.0)
36
+ simplecov
37
+ test-unit
38
+ textbringer!
39
+
40
+ BUNDLED WITH
41
+ 1.13.7
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Shugo Maeda
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # Textbringer
2
+
3
+ [![Build Status](https://travis-ci.org/shugo/textbringer.svg?branch=master)](https://travis-ci.org/shugo/textbringer)
4
+
5
+ Textbringer is a member of a demon race that takes on the form of a text
6
+ editor.
7
+
8
+ ## Demo
9
+
10
+ [![asciicast](https://asciinema.org/a/100156.png)](https://asciinema.org/a/100156)
11
+
12
+ ## Installation
13
+
14
+ $ gem install textbringer
15
+
16
+ ## Usage
17
+
18
+ $ tb
19
+
20
+ You can quit the editor by C-x C-c.
21
+
22
+ ## Configuration of terminal emulators
23
+
24
+ ### xterm
25
+
26
+ Add the following line to ~/.Xresources.
27
+
28
+ XTerm*metaSendsEscape: true
29
+
30
+ ### mlterm
31
+
32
+ Add the following lines to ~/.mlterm/main.
33
+
34
+ mod_meta_key = alt
35
+ mod_meta_mode = esc
36
+ col_size_of_width_a = 1
37
+
38
+ ### screen
39
+
40
+ Add the following line to ~/.screenrc.
41
+
42
+ cjkwidth off
43
+
44
+ ## Development
45
+
46
+ After checking out the repo, run `bundle install` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
47
+
48
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
49
+
50
+ ## Contributing
51
+
52
+ Bug reports and pull requests are welcome on GitHub at https://github.com/shugo/textbringer.
53
+
54
+
55
+ ## License
56
+
57
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
58
+
data/Rakefile ADDED
@@ -0,0 +1,9 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+ task :default => :test
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.libs << "test"
7
+ t.test_files = FileList["test/**/test_*.rb"]
8
+ t.verbose = true
9
+ end
data/bin/console ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "textbringer"
5
+ require "irb"
6
+
7
+ include Textbringer
8
+
9
+ IRB.start
data/exe/tb ADDED
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "textbringer"
4
+
5
+ include Textbringer
6
+ include Commands
7
+
8
+ def load_user_config
9
+ config_file = File.expand_path("~/.textbringer.rb")
10
+ begin
11
+ load(config_file)
12
+ rescue LoadError
13
+ end
14
+ end
15
+
16
+ $VERBOSE = nil
17
+
18
+ Controller.current = Controller.new
19
+ Window.start do
20
+ message("Type C-x C-c to exit Textbringer")
21
+ begin
22
+ load_user_config
23
+ ruby_mode
24
+ if ARGV.size > 0
25
+ ARGV.each do |arg|
26
+ find_file(arg)
27
+ end
28
+ end
29
+ rescue Exception => e
30
+ handle_exception(e)
31
+ end
32
+ Window.redisplay
33
+ trap(:CONT) do
34
+ Window.redraw
35
+ end
36
+ loop do
37
+ Controller.current.command_loop(TOP_LEVEL_TAG)
38
+ Window.redisplay
39
+ end
40
+ end