icepick 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: 2e343f6537242c146ed5d951e057ae678f733db8
4
+ data.tar.gz: 849eb3d592b8028f2490087604e7071c08530dd9
5
+ SHA512:
6
+ metadata.gz: ca20aa14b444682be29e63d21de405ffe105250038fd90e1fade279f1fab24f65f45ef7677900d145edbf1f0fcae21baba30fc738c89bfcea3ba8d42b9387bc3
7
+ data.tar.gz: cc945c42d5513d87349d1cce5906e117967ba7351031041ed1714fd13271c260baeaf1621a24fc3cae6ac6804918addd0bf0d6a4aa4fe18ff9f60e7e1a0c2852
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+
15
+ # YARD artifacts
16
+ .yardoc
17
+ _yardoc
18
+ doc/
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.0.0-p195
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ ## 0.1.0 (2013-12-31)
2
+
3
+ * First and last release of the year. Bundle [pry]() with [pry-doc](), [pry-debugger](), [pry-stack_explorer](), and [pry-rails](). [Awesome print](awesome_print) for colorized and formatted output. Configured as Rails' console when applicable.
4
+
5
+ [pry]: http://pry.github.com
6
+ [pry-doc]: https://github.com/pry/pry-doc
7
+ [pry-stack_explorer]: https://github.com/pry/pry-stack_explorer
8
+ [pry-debugger]: https://github.com/nixme/pry-debugger
9
+ [pry-byebug]: https://github.com/deivid-rodriguez/pry-byebug
10
+ [pry-rails]: https://github.com/rweng/pry-rails
11
+ [awesome_print]: https://github.com/michaeldv/awesome_print
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,82 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ icepick (0.1.0)
5
+ awesome_print (~> 1.2)
6
+ pry (~> 0.9.12)
7
+ pry-debugger (~> 0.2.2)
8
+ pry-doc (~> 0.4.6)
9
+ pry-rails (~> 0.3.2)
10
+ pry-stack_explorer (~> 0.4.9)
11
+ railties (>= 3.0, < 5.0)
12
+
13
+ GEM
14
+ remote: https://rubygems.org/
15
+ specs:
16
+ actionpack (4.0.2)
17
+ activesupport (= 4.0.2)
18
+ builder (~> 3.1.0)
19
+ erubis (~> 2.7.0)
20
+ rack (~> 1.5.2)
21
+ rack-test (~> 0.6.2)
22
+ activesupport (4.0.2)
23
+ i18n (~> 0.6, >= 0.6.4)
24
+ minitest (~> 4.2)
25
+ multi_json (~> 1.3)
26
+ thread_safe (~> 0.1)
27
+ tzinfo (~> 0.3.37)
28
+ atomic (1.1.14)
29
+ awesome_print (1.2.0)
30
+ binding_of_caller (0.7.2)
31
+ debug_inspector (>= 0.0.1)
32
+ builder (3.1.4)
33
+ coderay (1.1.0)
34
+ columnize (0.3.6)
35
+ debug_inspector (0.0.2)
36
+ debugger (1.6.5)
37
+ columnize (>= 0.3.1)
38
+ debugger-linecache (~> 1.2.0)
39
+ debugger-ruby_core_source (~> 1.3.1)
40
+ debugger-linecache (1.2.0)
41
+ debugger-ruby_core_source (1.3.1)
42
+ erubis (2.7.0)
43
+ i18n (0.6.9)
44
+ method_source (0.8.2)
45
+ minitest (4.7.5)
46
+ multi_json (1.8.2)
47
+ pry (0.9.12.4)
48
+ coderay (~> 1.0)
49
+ method_source (~> 0.8)
50
+ slop (~> 3.4)
51
+ pry-debugger (0.2.2)
52
+ debugger (~> 1.3)
53
+ pry (~> 0.9.10)
54
+ pry-doc (0.4.6)
55
+ pry (>= 0.9)
56
+ yard (>= 0.8)
57
+ pry-rails (0.3.2)
58
+ pry (>= 0.9.10)
59
+ pry-stack_explorer (0.4.9.1)
60
+ binding_of_caller (>= 0.7)
61
+ pry (>= 0.9.11)
62
+ rack (1.5.2)
63
+ rack-test (0.6.2)
64
+ rack (>= 1.0)
65
+ railties (4.0.2)
66
+ actionpack (= 4.0.2)
67
+ activesupport (= 4.0.2)
68
+ rake (>= 0.8.7)
69
+ thor (>= 0.18.1, < 2.0)
70
+ rake (10.1.1)
71
+ slop (3.4.7)
72
+ thor (0.18.1)
73
+ thread_safe (0.1.3)
74
+ atomic
75
+ tzinfo (0.3.38)
76
+ yard (0.8.7.3)
77
+
78
+ PLATFORMS
79
+ ruby
80
+
81
+ DEPENDENCIES
82
+ icepick!
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Spork
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ 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, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ Icepick
2
+ =======
3
+
4
+ __Icepick__ bundles Pry with a set of plugins and useful configuration:
5
+
6
+ * [Pry](pry) is a better alternative to IRB
7
+ * [Pry Doc](pry-doc) includes documentation and source for Code Ruby components
8
+ * [Pry Debugger](pry-debugger) is a powerful debugger for Pry
9
+ * [Pry Stack Explorer](pry-stack_explorer) includes support for call stack navigation
10
+ * [Pry Rails](pry-rails) adds Rails helpers to Pry like `show-routes` and `show-models`
11
+ * [Awesome Print](awesome_print) colorizes and formats output
12
+
13
+ ##Usage
14
+
15
+ Ruby 1.9.2+ only, support for Rails 3 and Rails 4. Add the following to your project's Gemfile:
16
+
17
+ ```ruby
18
+ group :development, :test do
19
+ gem 'icepick'
20
+ end
21
+ ```
22
+
23
+ Now you're ready! Just run `pry` or `rails console` as you normally would.
24
+
25
+ [pry]: http://pry.github.com
26
+ [pry-doc]: https://github.com/pry/pry-doc
27
+ [pry-stack_explorer]: https://github.com/pry/pry-stack_explorer
28
+ [pry-debugger]: https://github.com/nixme/pry-debugger
29
+ [pry-byebug]: https://github.com/deivid-rodriguez/pry-byebug
30
+ [pry-rails]: https://github.com/rweng/pry-rails
31
+ [awesome_print]: https://github.com/michaeldv/awesome_print
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env rake
2
+
3
+ require 'bundler/gem_tasks'
4
+
5
+ task :default
data/bin/icepick ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # (C) Sean Callan (doomspork)
4
+ # MIT license
5
+
6
+ $0 = 'pry'
7
+
8
+ begin
9
+ require 'icepick'
10
+ rescue LoadError
11
+ require 'rubygems'
12
+ require 'icepick'
13
+ end
14
+
15
+ # Process command line options and run Pry
16
+ Pry::CLI.parse_options
data/ext/mkrf_conf.rb ADDED
@@ -0,0 +1,17 @@
1
+ require 'rubygems/dependency_installer.rb'
2
+
3
+ #Load up the rubygem's dependency installer to
4
+ #installer the gems we want based on the version
5
+ #of Ruby the user has installed
6
+ installer = Gem::DependencyInstaller.new
7
+ begin
8
+ if RUBY_VERSION > '1.9'
9
+ installer.install 'pry-byebug', '~> 1.2.1'
10
+ else
11
+ installer.install 'pry-debugger', '~> 0.2.2'
12
+ end
13
+
14
+ rescue
15
+ #Exit with a non-zero value to let rubygems something went wrong
16
+ exit(1)
17
+ end
data/icepick.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ require File.expand_path('../lib/icepick/version', __FILE__)
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.name = 'icepick'
7
+ gem.version = Icepick::VERSION
8
+ gem.author = 'Sean Callan'
9
+ gem.email = 'seancallan@gmail.com'
10
+ gem.license = 'MIT'
11
+ gem.homepage = 'https://github.com/doomspork/icepick'
12
+ gem.summary = 'Pry bundled with plugins and helpful configurations.'
13
+ gem.description = gem.summary
14
+
15
+ gem.executables = ['icepick']
16
+ gem.files = `git ls-files`.split("\n")
17
+ gem.require_paths = ['lib']
18
+
19
+ # Dependencies
20
+ gem.required_ruby_version = '>= 1.9.2'
21
+ gem.add_runtime_dependency 'pry', '~> 0.9.12'
22
+ gem.add_runtime_dependency 'pry-doc', '~> 0.4.6'
23
+ gem.add_runtime_dependency 'pry-rails', '~> 0.3.2'
24
+ gem.add_runtime_dependency 'pry-stack_explorer', '~> 0.4.9'
25
+ gem.add_runtime_dependency 'pry-debugger', '~> 0.2.2'
26
+ gem.add_runtime_dependency 'awesome_print', '~> 1.2'
27
+ gem.add_runtime_dependency 'railties', '>= 3.0', '< 5.0'
28
+ end
data/lib/icepick.rb ADDED
@@ -0,0 +1,67 @@
1
+ require 'icepick/version'
2
+
3
+ require 'pry'
4
+ require 'pry-doc'
5
+ require 'pry-stack_explorer'
6
+ require 'pry-debugger'
7
+ require 'awesome_print'
8
+ require 'readline'
9
+
10
+ module Icepick
11
+
12
+ # AwesomePrint configuration options
13
+ AWESOME_OPTS = {
14
+ indent: 2,
15
+ sort_keys: true
16
+ }
17
+
18
+ # Public: Prohibit the instantiation of Icepick
19
+ #
20
+ # Raises NotImplementedError
21
+ def initialize
22
+ raise NotImplementedError
23
+ end
24
+
25
+ # Public: Setup and initialize Icepick
26
+ #
27
+ # options - Options to use in setup (defaults: {})
28
+ # * name: A name to use for the prompt
29
+ #
30
+ # Returns nothing
31
+ def self.initialize!(options = {})
32
+ silence_warnings do
33
+ # Set the prompt name, for the Railtie this is the application name
34
+ Pry.config.prompt_name = options[:name] || 'icepick'
35
+
36
+ # Use awesome_print for Pry output
37
+ Pry.config.print = ->(output, value) do
38
+ pretty = value.ai(AWESOME_OPTS)
39
+ Pry::Helpers::BaseHelpers.stagger_output("=> #{pretty}", output)
40
+ end
41
+
42
+ if defined?(PryDebugger) || defined?(PryByebug)
43
+ Pry.commands.alias_command 'c', 'continue'
44
+ Pry.commands.alias_command 's', 'step'
45
+ Pry.commands.alias_command 'n', 'next'
46
+ Pry.commands.alias_command 'f', 'finish'
47
+ end
48
+ end
49
+ end
50
+
51
+ private
52
+
53
+ def self.silence_warnings
54
+ old_verbose, $VERBOSE = $VERBOSE, nil
55
+ yield
56
+ ensure
57
+ $VERBOSE = old_verbose
58
+ end
59
+
60
+ end
61
+
62
+ if defined?(Rails)
63
+ require 'pry-rails'
64
+ require 'icepick/railtie'
65
+ else
66
+ Icepick.initialize!
67
+ end
@@ -0,0 +1,12 @@
1
+ module Icepick
2
+ class Railtie < Rails::Railtie
3
+ initializer 'icepick.initialize' do |app|
4
+ Icepick.initialize!({name: app.class.parent_name.underscore})
5
+
6
+ silence_warnings do
7
+ # Use Pry instead of IRB
8
+ IRB = Pry
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module Icepick
2
+ VERSION = '0.1.0'
3
+ end
metadata ADDED
@@ -0,0 +1,163 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: icepick
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Sean Callan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pry
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 0.9.12
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 0.9.12
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry-doc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.4.6
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 0.4.6
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 0.3.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.3.2
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry-stack_explorer
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.4.9
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 0.4.9
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry-debugger
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: 0.2.2
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: 0.2.2
83
+ - !ruby/object:Gem::Dependency
84
+ name: awesome_print
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '1.2'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '1.2'
97
+ - !ruby/object:Gem::Dependency
98
+ name: railties
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '3.0'
104
+ - - <
105
+ - !ruby/object:Gem::Version
106
+ version: '5.0'
107
+ type: :runtime
108
+ prerelease: false
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - '>='
112
+ - !ruby/object:Gem::Version
113
+ version: '3.0'
114
+ - - <
115
+ - !ruby/object:Gem::Version
116
+ version: '5.0'
117
+ description: Pry bundled with plugins and helpful configurations.
118
+ email: seancallan@gmail.com
119
+ executables:
120
+ - icepick
121
+ extensions: []
122
+ extra_rdoc_files: []
123
+ files:
124
+ - .gitignore
125
+ - .ruby-version
126
+ - CHANGELOG.md
127
+ - Gemfile
128
+ - Gemfile.lock
129
+ - LICENSE
130
+ - README.md
131
+ - Rakefile
132
+ - bin/icepick
133
+ - ext/mkrf_conf.rb
134
+ - icepick.gemspec
135
+ - lib/icepick.rb
136
+ - lib/icepick/railtie.rb
137
+ - lib/icepick/version.rb
138
+ homepage: https://github.com/doomspork/icepick
139
+ licenses:
140
+ - MIT
141
+ metadata: {}
142
+ post_install_message:
143
+ rdoc_options: []
144
+ require_paths:
145
+ - lib
146
+ required_ruby_version: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - '>='
149
+ - !ruby/object:Gem::Version
150
+ version: 1.9.2
151
+ required_rubygems_version: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - '>='
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
156
+ requirements: []
157
+ rubyforge_project:
158
+ rubygems_version: 2.0.2
159
+ signing_key:
160
+ specification_version: 4
161
+ summary: Pry bundled with plugins and helpful configurations.
162
+ test_files: []
163
+ has_rdoc: