textbringer-startrek 1.0.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
+ SHA256:
3
+ metadata.gz: ad7a6d8181a939306eccb69b85f5a23345782f62d092b2dbbbbcf13b5d5bb388
4
+ data.tar.gz: 9067fbe83dbd8d2e78c5dbbedc7052a32814bb0eadd51d1a123c5df08e2d81aa
5
+ SHA512:
6
+ metadata.gz: 349b3e9b984900de2cd78697ad6bade6f234264ce29432ec57d8f313ed5fb97fd8ca58af11e69602bf99ce0f9f1d74eb6d161a687134a053be5912d400003cbd
7
+ data.tar.gz: 96cad597d74111af2e6a0717131556d382c7d60160de175524eda0fda4739eec6503bfaff4b48ba2fa2fd1908cde4efa4966f8aee65b7992b0aa092b0654da63
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in textbringer-presentation.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 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,25 @@
1
+ # textbringer-startrek
2
+
3
+ Play a Star Trek animation file on [Textbringer](https://github.com/shugo/textbringer).
4
+
5
+ ## Demo
6
+
7
+ [![asciicast](https://asciinema.org/a/NfNAwiBtvMzPlBKEFxKb3gdsv.svg)](https://asciinema.org/a/NfNAwiBtvMzPlBKEFxKb3gdsv)
8
+
9
+ ## Installation
10
+
11
+ $ gem install textbringer-startrek
12
+
13
+ ## Usage
14
+
15
+ Type `M-x startrek` to start the animation.
16
+
17
+ ## Credit
18
+
19
+ Inspired by [vim-starwars](https://github.com/mattn/vim-starwars) written by Yasuhiro Matsumoto.
20
+
21
+ The animation file will be downloaded from [VT100 ART AND ANIMATIONS](http://artscene.textfiles.com/vt100/).
22
+
23
+ ## License
24
+
25
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "textbringer/presentation"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,29 @@
1
+ require "net/http"
2
+
3
+ define_command :startrek, doc: "Play a Star Trek animation file" do
4
+ buffer = Buffer.find_or_new("*summary*", undo_limit: 0,
5
+ read_only: true)
6
+ switch_to_buffer(buffer)
7
+ buffer.read_only_edit do
8
+ buffer.replace("")
9
+ end
10
+ message("Loading...")
11
+ background do
12
+ s = Net::HTTP.get(URI("http://artscene.textfiles.com/vt100/startrek.vt"))
13
+ frames = s.sub(/\A\e\[H\e\[J\n/, "").split(/\e\[H\n/)
14
+ foreground do
15
+ message("")
16
+ end
17
+ frames.each do |frame|
18
+ foreground do
19
+ buffer.read_only_edit do
20
+ buffer.replace(frame)
21
+ end
22
+ end
23
+ sleep(0.1)
24
+ end
25
+ foreground do
26
+ message("END")
27
+ end
28
+ end
29
+ end
@@ -0,0 +1 @@
1
+ require_relative "textbringer/startrek"
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "textbringer-startrek"
7
+ spec.version = "1.0.0"
8
+ spec.authors = ["Shugo Maeda"]
9
+ spec.email = ["shugo@ruby-lang.org"]
10
+
11
+ spec.summary = "Star Trek animation for Textbringer."
12
+ spec.description = "Star Trek animation for Textbringer."
13
+ spec.homepage = "https://github.com/shugo/textbringer-startrek"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_runtime_dependency "textbringer"
24
+
25
+ spec.add_development_dependency "bundler"
26
+ spec.add_development_dependency "rake", "~> 12.0"
27
+ end
metadata ADDED
@@ -0,0 +1,96 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: textbringer-startrek
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Shugo Maeda
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-01-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: textbringer
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '12.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '12.0'
55
+ description: Star Trek animation for Textbringer.
56
+ email:
57
+ - shugo@ruby-lang.org
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - bin/console
68
+ - bin/setup
69
+ - lib/textbringer/startrek.rb
70
+ - lib/textbringer_plugin.rb
71
+ - textbringer-startrek.gemspec
72
+ homepage: https://github.com/shugo/textbringer-startrek
73
+ licenses:
74
+ - MIT
75
+ metadata: {}
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubyforge_project:
92
+ rubygems_version: 3.0.0.beta3
93
+ signing_key:
94
+ specification_version: 4
95
+ summary: Star Trek animation for Textbringer.
96
+ test_files: []