take-a-look 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.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in take-a-look.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # take-a-look
2
+
3
+ This is a rubygem that I wrote to try writing a simple debugger.
4
+
5
+
6
+ ## Install
7
+
8
+ gem install take-a-look
9
+
10
+ # Usage
11
+
12
+ * When you want to debug some program, just drop the following line in the place you want to inspect.
13
+
14
+ binding.take_a_look
15
+
16
+ * That will start a REPL in which you can play with the constants and values of variables set in the program.
17
+
18
+ * If you feel that it's a lengthy method name, `binding.peep` also works.
19
+
20
+ Enjoy!
21
+
22
+ ## Notes
23
+
24
+ * It's all just 6 lines + a test case.
25
+ * This gem was written in 13 minutes (not that I'm proud of it).
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
@@ -0,0 +1,9 @@
1
+ require 'ripl'
2
+
3
+ class Binding
4
+ def take_a_look
5
+ Ripl.start :binding => self
6
+ end
7
+
8
+ alias_method :peep, :take_a_look
9
+ end
@@ -0,0 +1,6 @@
1
+ require 'rspec'
2
+ require 'take-a-look'
3
+
4
+ RSpec.configure do |config|
5
+ # Nothing here for now
6
+ end
@@ -0,0 +1,10 @@
1
+ require "spec_helper"
2
+
3
+ describe Binding do
4
+ describe "#take_a_look" do
5
+ it "should start a Ripl repl with the binding" do
6
+ Ripl.should_receive(:start).with(:binding => an_instance_of(Binding))
7
+ binding.take_a_look
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.authors = ["Akash Manohar J"]
5
+ gem.email = ["akash@akash.im"]
6
+ gem.description = %q{A try a writing a simple ruby debugger}
7
+ gem.summary = %q{Inspired by Pry, I wanted to write a simple debugger. And I came up with this gem which is a 5-line solution.}
8
+ gem.homepage = ""
9
+
10
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
11
+ gem.files = `git ls-files`.split("\n")
12
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
13
+ gem.name = "take-a-look"
14
+ gem.require_paths = ["lib"]
15
+ gem.version = "0.1"
16
+
17
+ gem.add_dependency "ripl", ">= 0"
18
+ gem.add_dependency "ripl-multi_line", ">= 0"
19
+ gem.add_dependency "ripl-irb", ">= 0"
20
+
21
+ gem.add_development_dependency "rspec", ">= 0"
22
+ end
metadata ADDED
@@ -0,0 +1,101 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: take-a-look
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Akash Manohar J
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-05-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: ripl
16
+ requirement: &70179876063180 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70179876063180
25
+ - !ruby/object:Gem::Dependency
26
+ name: ripl-multi_line
27
+ requirement: &70179876062700 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70179876062700
36
+ - !ruby/object:Gem::Dependency
37
+ name: ripl-irb
38
+ requirement: &70179858690060 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70179858690060
47
+ - !ruby/object:Gem::Dependency
48
+ name: rspec
49
+ requirement: &70179858689600 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70179858689600
58
+ description: A try a writing a simple ruby debugger
59
+ email:
60
+ - akash@akash.im
61
+ executables: []
62
+ extensions: []
63
+ extra_rdoc_files: []
64
+ files:
65
+ - .gitignore
66
+ - .rspec
67
+ - Gemfile
68
+ - README.md
69
+ - Rakefile
70
+ - lib/take-a-look.rb
71
+ - spec/spec_helper.rb
72
+ - spec/take_a_look_spec.rb
73
+ - take-a-look.gemspec
74
+ homepage: ''
75
+ licenses: []
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 1.8.17
95
+ signing_key:
96
+ specification_version: 3
97
+ summary: Inspired by Pry, I wanted to write a simple debugger. And I came up with
98
+ this gem which is a 5-line solution.
99
+ test_files:
100
+ - spec/spec_helper.rb
101
+ - spec/take_a_look_spec.rb