pry-coolline 0.1.3

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.
data/.gemtest ADDED
File without changes
data/.gitignore ADDED
@@ -0,0 +1,7 @@
1
+ Makefile
2
+ *.so
3
+ *.o
4
+ *.def
5
+ doc/
6
+ pkg/
7
+ .yardoc/
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --markup markdown
data/CHANGELOG ADDED
File without changes
data/LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ License
2
+ -------
3
+
4
+ (The MIT License)
5
+
6
+ Copyright (c) 2012 John Mair (banisterfiend)
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining
9
+ a copy of this software and associated documentation files (the
10
+ 'Software'), to deal in the Software without restriction, including
11
+ without limitation the rights to use, copy, modify, merge, publish,
12
+ distribute, sublicense, and/or sell copies of the Software, and to
13
+ permit persons to whom the Software is furnished to do so, subject to
14
+ the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be
17
+ included in all copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
20
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # **PLEASE NOTE: This Gem has been yanked until further notice due to usability issues**
2
+
3
+ pry-coolline
4
+ ===========
5
+
6
+ (C) John Mair (banisterfiend) 2012
7
+
8
+ _live syntax-highlighting for the Pry REPL_
9
+
10
+ The `pry-coolline` plugin provides live syntax highlighting for the
11
+ [Pry](http://pry.github.com) REPL for Ruby 1.9.2+ (MRI).
12
+
13
+ It makes use of the [coolline](https://github.com/mon-ouie/coolline)
14
+ gem and the `io/console` library.
15
+
16
+ * Install the [gem](https://rubygems.org/gems/pry-coolline): `gem install pry-coolline`
17
+ * See the [source code](http://github.com/pry/pry-coolline)
18
+
19
+
20
+ **How to use:**
21
+
22
+ After installing `pry-coolline` just start Pry as normal, the coolline
23
+ plugin will be detected and used automatically.
24
+
25
+ **Known Issues:**
26
+
27
+ On some platforms the up and down cursor keys do not work properly; to
28
+ get around this you can use the emacs keybindings.
29
+
30
+ These are:
31
+
32
+
33
+ `^p` equivalent to up-arrow
34
+
35
+ `^n` equivalent to down-arrow
36
+
37
+ `^d` equivalent to delete
38
+
39
+ `^e` navigate to end of line
40
+
41
+ `^a` navigate to start of line
42
+
43
+ <center>
44
+ ![Alt text](http://dl.dropbox.com/u/26521875/coolline.png)
45
+
46
+ Limitations
47
+ -----------
48
+
49
+ * No Ruby < 1.9.2 support.
50
+ * MRI only.
51
+ * Poor support for long lines.
52
+ * Pry's automatic indent is not yet compatible.
53
+ * Occasionally has some quirks (hopefully ironed out in future).
54
+
55
+ Contact
56
+ -------
57
+
58
+ Problems or questions contact me at [github](http://github.com/banister)
59
+
60
+
61
+ License
62
+ -------
63
+
64
+ (The MIT License)
65
+
66
+ Copyright (c) 2012 John Mair (banisterfiend)
67
+
68
+ Permission is hereby granted, free of charge, to any person obtaining
69
+ a copy of this software and associated documentation files (the
70
+ 'Software'), to deal in the Software without restriction, including
71
+ without limitation the rights to use, copy, modify, merge, publish,
72
+ distribute, sublicense, and/or sell copies of the Software, and to
73
+ permit persons to whom the Software is furnished to do so, subject to
74
+ the following conditions:
75
+
76
+ The above copyright notice and this permission notice shall be
77
+ included in all copies or substantial portions of the Software.
78
+
79
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
80
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
81
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
82
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
83
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
84
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
85
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,90 @@
1
+ $:.unshift 'lib'
2
+
3
+ dlext = Config::CONFIG['DLEXT']
4
+ direc = File.dirname(__FILE__)
5
+
6
+ PROJECT_NAME = "pry-coolline"
7
+
8
+ require 'rake/clean'
9
+ require 'rake/gempackagetask'
10
+ require "#{PROJECT_NAME}/version"
11
+
12
+ CLOBBER.include("**/*~", "**/*#*", "**/*.log")
13
+ CLEAN.include("**/*#*", "**/*#*.*", "**/*_flymake*.*", "**/*_flymake",
14
+ "**/*.rbc", "**/.#*.*")
15
+
16
+ def apply_spec_defaults(s)
17
+ s.name = PROJECT_NAME
18
+ s.summary = "Live syntax-highlighting for the Pry REPL"
19
+ s.version = PryCoolline::VERSION
20
+ s.date = Time.now.strftime '%Y-%m-%d'
21
+ s.author = "John Mair (banisterfiend)"
22
+ s.email = 'jrmair@gmail.com'
23
+ s.description = s.summary
24
+ s.add_dependency("coolline","~>0.1.0")
25
+ s.add_dependency("io-console","~>0.3.0")
26
+ s.required_ruby_version = '>= 1.9.2'
27
+ s.require_path = 'lib'
28
+ s.homepage = "https://github.com/pry/pry-coolline"
29
+ s.files = `git ls-files`.split("\n")
30
+ s.test_files = `git ls-files -- test/*`.split("\n")
31
+ end
32
+
33
+ task :default => :test
34
+
35
+ desc "run pry with plugin enabled"
36
+ task :pry do
37
+ exec("pry -I#{direc}/lib/ -r #{direc}/lib/#{PROJECT_NAME}")
38
+ end
39
+
40
+ desc "run tests"
41
+ task :test do
42
+ sh "bacon -Itest -rubygems -a"
43
+ end
44
+
45
+ desc "Show version"
46
+ task :version do
47
+ puts "PryCoolline version: #{PryCoolline::VERSION}"
48
+ end
49
+
50
+ desc "Generate gemspec file"
51
+ task :gemspec => "ruby:gemspec"
52
+
53
+ namespace :ruby do
54
+ spec = Gem::Specification.new do |s|
55
+ apply_spec_defaults(s)
56
+ s.platform = Gem::Platform::RUBY
57
+ end
58
+
59
+ Rake::GemPackageTask.new(spec) do |pkg|
60
+ pkg.need_zip = false
61
+ pkg.need_tar = false
62
+ end
63
+
64
+ desc "Generate gemspec file"
65
+ task :gemspec do
66
+ File.open("#{spec.name}.gemspec", "w") do |f|
67
+ f << spec.to_ruby
68
+ end
69
+ end
70
+ end
71
+
72
+ desc "shorthand for :gems task"
73
+ task :gem => :gems
74
+
75
+ desc "build all platform gems at once"
76
+ task :gems => [:clean, :rmgems, "ruby:gem"]
77
+
78
+ desc "remove all platform gems"
79
+ task :rmgems => ["ruby:clobber_package"]
80
+
81
+ desc "build and push latest gems"
82
+ task :pushgems => :gems do
83
+ chdir("#{File.dirname(__FILE__)}/pkg") do
84
+ Dir["*.gem"].each do |gemfile|
85
+ sh "gem push #{gemfile}"
86
+ end
87
+ end
88
+ end
89
+
90
+
@@ -0,0 +1,3 @@
1
+ module PryCoolline
2
+ VERSION = "0.1.3"
3
+ end
@@ -0,0 +1,24 @@
1
+ # pry-coolline.rb
2
+ # (C) John Mair (banisterfiend); MIT license
3
+
4
+ require 'pry'
5
+ require "pry-coolline/version"
6
+
7
+ begin
8
+ require 'coolline'
9
+
10
+ Pry.config.input = Coolline.new do |cool|
11
+ cool.word_boundaries = [" ", "\t", ",", ";", ".", '"', "'", "`", "<", ">",
12
+ "=", ";", "|", "{", "}", "(", ")", "-"]
13
+
14
+ # bring saved history into coolline
15
+ cool.history_file = Pry.config.history.file
16
+
17
+ cool.transform_proc = proc do
18
+ CodeRay.scan(cool.line, :ruby).term
19
+ end
20
+ end
21
+
22
+ rescue LoadError
23
+ end if ENV["TERM"] != "dumb"
24
+
@@ -0,0 +1,34 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "pry-coolline"
5
+ s.version = "0.1.3"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["John Mair (banisterfiend)"]
9
+ s.date = "2012-04-03"
10
+ s.description = "Live syntax-highlighting for the Pry REPL"
11
+ s.email = "jrmair@gmail.com"
12
+ s.files = [".gemtest", ".gitignore", ".yardopts", "CHANGELOG", "LICENSE", "README.md", "Rakefile", "lib/pry-coolline.rb", "lib/pry-coolline/version.rb", "pry-coolline.gemspec", "test/test.rb"]
13
+ s.homepage = "https://github.com/pry/pry-coolline"
14
+ s.require_paths = ["lib"]
15
+ s.required_ruby_version = Gem::Requirement.new(">= 1.9.2")
16
+ s.rubygems_version = "1.8.16"
17
+ s.summary = "Live syntax-highlighting for the Pry REPL"
18
+ s.test_files = ["test/test.rb"]
19
+
20
+ if s.respond_to? :specification_version then
21
+ s.specification_version = 3
22
+
23
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
24
+ s.add_runtime_dependency(%q<coolline>, ["~> 0.1.0"])
25
+ s.add_runtime_dependency(%q<io-console>, ["~> 0.3.0"])
26
+ else
27
+ s.add_dependency(%q<coolline>, ["~> 0.1.0"])
28
+ s.add_dependency(%q<io-console>, ["~> 0.3.0"])
29
+ end
30
+ else
31
+ s.add_dependency(%q<coolline>, ["~> 0.1.0"])
32
+ s.add_dependency(%q<io-console>, ["~> 0.3.0"])
33
+ end
34
+ end
data/test/test.rb ADDED
@@ -0,0 +1,12 @@
1
+ direc = File.dirname(__FILE__)
2
+
3
+ require 'rubygems'
4
+ require "#{direc}/../lib/pry-coolline"
5
+ require 'bacon'
6
+
7
+ puts "Testing pry-coolline version #{PryCoolline::VERSION}..."
8
+ puts "Ruby version: #{RUBY_VERSION}"
9
+
10
+ describe PryCoolline do
11
+ end
12
+
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pry-coolline
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - John Mair (banisterfiend)
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-04-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: coolline
16
+ requirement: &70288428368700 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.1.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70288428368700
25
+ - !ruby/object:Gem::Dependency
26
+ name: io-console
27
+ requirement: &70288428366140 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 0.3.0
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70288428366140
36
+ description: Live syntax-highlighting for the Pry REPL
37
+ email: jrmair@gmail.com
38
+ executables: []
39
+ extensions: []
40
+ extra_rdoc_files: []
41
+ files:
42
+ - .gemtest
43
+ - .gitignore
44
+ - .yardopts
45
+ - CHANGELOG
46
+ - LICENSE
47
+ - README.md
48
+ - Rakefile
49
+ - lib/pry-coolline.rb
50
+ - lib/pry-coolline/version.rb
51
+ - pry-coolline.gemspec
52
+ - test/test.rb
53
+ homepage: https://github.com/pry/pry-coolline
54
+ licenses: []
55
+ post_install_message:
56
+ rdoc_options: []
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ! '>='
63
+ - !ruby/object:Gem::Version
64
+ version: 1.9.2
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ requirements: []
72
+ rubyforge_project:
73
+ rubygems_version: 1.8.16
74
+ signing_key:
75
+ specification_version: 3
76
+ summary: Live syntax-highlighting for the Pry REPL
77
+ test_files:
78
+ - test/test.rb