twirb 0.0.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 +15 -0
- data/.gitignore +17 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +22 -0
- data/README.md +48 -0
- data/Rakefile +17 -0
- data/lib/twirb/version.rb +3 -0
- data/lib/twirb.rb +18 -0
- data/twirb.gemspec +23 -0
- metadata +81 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
MzEzODQzYThhMzI5MTU0MWYwYTBjZmQyNzg3N2QzOTBmZjY0MGNlMA==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
YTIzNWZmZmJkNTcyZTgzZGM3Y2EzOTgyNmE1YTljM2RiNzZlNjIzOQ==
|
|
7
|
+
SHA512:
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
NzhkMzM3ZWM4NDJhMGE3ZjYyZWJiZGJkZGVlZmI5MjU4NmIzNTRkN2RkMTlh
|
|
10
|
+
ZWZiYzNlMWZiZmY2OWY2Mjk3NmE5ZDJkNzJjZDEwZGJhZjZkNzBlZDQ3NTk3
|
|
11
|
+
M2Q1Yjk5YzE3MGNmMTA5NjI0ZWFlZDZlYTM3N2I4ZDExMTUyOTE=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
MzMyODJhNTM0OGI5ZDhjM2RlNzUzZTVkMTA5YmNiOTg1Y2JmNzNkYjE3ZTI0
|
|
14
|
+
MWZlZDE2MDQwZjEzNjgwOGViMGVjZmQxZTI3MTQ0OWY0ZGIyNTRjMzFiNDA4
|
|
15
|
+
NDE4ZjlmMGE0NGNlMGEyYzM0MzY4OGQxOTg5YmYxNzMzZDlkYTg=
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2013 Antonio
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Twirb
|
|
2
|
+
|
|
3
|
+
Simple Ruby text editor as a ruby gem
|
|
4
|
+
==============================================
|
|
5
|
+
|
|
6
|
+
This is a little tool with syntax highlighting and indentation for writing ruby code and execute it directly in your terminal thanks to some useful command listed below: It can be used in three different ways:
|
|
7
|
+
auto mode(default option): automatic syntax highlighting and indentation and numerated lines while writing your code.
|
|
8
|
+
edit mode: if you want to add some thing to the code written so far you can activate the edit mode hitting Escape-key: in this way automatic indentation and highlight will be deactivated in order to allow changes.
|
|
9
|
+
After that you can reactivat auto mode hitting double-key-Escape and then space key: in this way the code that you added will be automatic formatted and you can continue writing in auto mode.
|
|
10
|
+
text mode: pressing control-q the code will be converted as if in a text file making all the changes you want. You can reactivate auto mode every time you want just hitting control-w and then space key. the code will be automatic formatted.
|
|
11
|
+
You can execute the code you have written so far just pressing control-e: in this way the code will be executed on your terminal as if in irb.
|
|
12
|
+
For other commands and instructions visit http://www.twirb.org
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
Twirb needs "tk" that is the standard graphical user interface for Ruby.
|
|
17
|
+
The Ruby Tk bindings are distributed with Ruby but Tk is a separate installation. Windows users can download a single click Tk installation from ActiveState's ActiveTcl(http://www.activestate.com/activetcl/downloads)
|
|
18
|
+
|
|
19
|
+
Mac and Linux users may not need to install it because there is a great chance that its already installed along with OS but if not, you can download prebuilt packages or get the source from the Tcl Developer Xchange(http://www.tcl.tk/software/tcltk/downloadnow84.tml).
|
|
20
|
+
For more details you can visit Tkdocs(http://www.tkdocs.com/tutorial/install.html)
|
|
21
|
+
|
|
22
|
+
Add this line to your application's Gemfile:
|
|
23
|
+
|
|
24
|
+
gem 'twirb'
|
|
25
|
+
|
|
26
|
+
And then execute:
|
|
27
|
+
|
|
28
|
+
$ bundle
|
|
29
|
+
|
|
30
|
+
Or install it yourself as:
|
|
31
|
+
|
|
32
|
+
$ gem install twirb
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
you can use it simply typing
|
|
37
|
+
|
|
38
|
+
$ twirb
|
|
39
|
+
|
|
40
|
+
in the command line.
|
|
41
|
+
|
|
42
|
+
## Contributing
|
|
43
|
+
|
|
44
|
+
1. Fork it
|
|
45
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
46
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
47
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
48
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
|
2
|
+
require 'rdoc/task'
|
|
3
|
+
|
|
4
|
+
task :default => [:test]
|
|
5
|
+
|
|
6
|
+
desc %Q|Run test(s) in project 'test' folder|
|
|
7
|
+
task :test do
|
|
8
|
+
tests = Dir.glob("test/*_{spec,test}.rb").join(' ')
|
|
9
|
+
ruby tests
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
desc %Q|Generates documentation|
|
|
13
|
+
RDoc::Task.new do |rdoc|
|
|
14
|
+
rdoc.main = "README.md"
|
|
15
|
+
rdoc.rdoc_files.include("README.md", "lib/*.rb", 'bin/*.rb')
|
|
16
|
+
end
|
|
17
|
+
|
data/lib/twirb.rb
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
require "tk"
|
|
2
|
+
require "tkextlib/tile"
|
|
3
|
+
$LOAD_PATH << './lib'
|
|
4
|
+
require 'keywords'
|
|
5
|
+
require 'manipulation'
|
|
6
|
+
require 'textgui'
|
|
7
|
+
require 'twirb/version'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
module Twirb
|
|
11
|
+
class TextEdit < TextGui
|
|
12
|
+
include Manipulation
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
Twirb::TextEdit.new
|
|
17
|
+
Tk.mainloop
|
|
18
|
+
|
data/twirb.gemspec
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'twirb/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "twirb"
|
|
8
|
+
spec.version = Twirb::VERSION
|
|
9
|
+
spec.authors = ["Antonio"]
|
|
10
|
+
spec.email = ["antalby@hotmail.com"]
|
|
11
|
+
spec.description = %q{Twirb is a Ruby text-editor and an alternative to irb, with syntax highlighting and indentation for writing ruby code and executing it directly in your terminal}
|
|
12
|
+
spec.summary = %q{twirb is a ruby text editor}
|
|
13
|
+
spec.homepage = "http://www.twirb.org"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files`.split($/)
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ["lib"]
|
|
20
|
+
|
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
|
22
|
+
spec.add_development_dependency "rake"
|
|
23
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: twirb
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Antonio
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2013-09-20 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ~>
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.3'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ~>
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.3'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rake
|
|
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
|
+
description: Twirb is a Ruby text-editor and an alternative to irb, with syntax highlighting
|
|
42
|
+
and indentation for writing ruby code and executing it directly in your terminal
|
|
43
|
+
email:
|
|
44
|
+
- antalby@hotmail.com
|
|
45
|
+
executables: []
|
|
46
|
+
extensions: []
|
|
47
|
+
extra_rdoc_files: []
|
|
48
|
+
files:
|
|
49
|
+
- .gitignore
|
|
50
|
+
- Gemfile
|
|
51
|
+
- LICENSE.txt
|
|
52
|
+
- README.md
|
|
53
|
+
- Rakefile
|
|
54
|
+
- lib/twirb.rb
|
|
55
|
+
- lib/twirb/version.rb
|
|
56
|
+
- twirb.gemspec
|
|
57
|
+
homepage: http://www.twirb.org
|
|
58
|
+
licenses:
|
|
59
|
+
- MIT
|
|
60
|
+
metadata: {}
|
|
61
|
+
post_install_message:
|
|
62
|
+
rdoc_options: []
|
|
63
|
+
require_paths:
|
|
64
|
+
- lib
|
|
65
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
|
+
requirements:
|
|
67
|
+
- - ! '>='
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: '0'
|
|
70
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - ! '>='
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '0'
|
|
75
|
+
requirements: []
|
|
76
|
+
rubyforge_project:
|
|
77
|
+
rubygems_version: 2.1.3
|
|
78
|
+
signing_key:
|
|
79
|
+
specification_version: 4
|
|
80
|
+
summary: twirb is a ruby text editor
|
|
81
|
+
test_files: []
|