pry-git 0.2.0 → 0.2.2

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.
Files changed (4) hide show
  1. data/README.md +38 -13
  2. data/Rakefile +1 -0
  3. data/lib/pry-git/version.rb +2 -2
  4. metadata +12 -1
data/README.md CHANGED
@@ -3,7 +3,7 @@ pry-git
3
3
 
4
4
  (C) John Mair (banisterfiend) 2011
5
5
 
6
- _ruby aware git_
6
+ _A Ruby-aware git layer_
7
7
 
8
8
  Retrieve blame, perform diffs, make commits using the natural units of
9
9
  Ruby code.
@@ -12,19 +12,18 @@ pry-git enables you to diff an individual _method_ , it can show you
12
12
  the blame for a method and ultimately allow you to commit 'methods' (rather than amorphous
13
13
  'hunks' of code).
14
14
 
15
- pry-git is a plugin for the [pry](http://github.com/banister/pry)
16
- REPL, a powerful IRB alternative.
15
+ pry-git is a plugin for the [pry](http://github.com/pry/pry)
16
+ REPL.
17
17
 
18
18
  pry-git is very much proof of concept right now, stay tuned!
19
19
 
20
- * NOT AVAILABLE: Install the [gem](https://rubygems.org/gems/pry-git): `gem install pry-git`
21
- * NOT AVAILABLE: Read the [documentation](http://rdoc.info/github/banister/pry-git/master/file/README.md)
22
- * See the [source code](http://github.com/banister/pry-git)
20
+ * Install the [gem](https://rubygems.org/gems/pry-git): `gem install pry-git`
21
+ * See the [source code](http://github.com/pry/pry-git)
23
22
 
24
23
  Example: blame
25
24
  --------
26
25
 
27
- pry(main)> blame Pry#repl
26
+ pry(main)> git blame Pry#repl
28
27
  John Mair def repl(target=TOPLEVEL_BINDING)
29
28
  John Mair target = Pry.binding_for(target)
30
29
  John Mair target_self = target.eval('self')
@@ -49,7 +48,7 @@ Example: blame
49
48
  Example: diff
50
49
  --------
51
50
 
52
- pry(main)> diff Pry#repl
51
+ pry(main)> git diff Pry#repl
53
52
  def repl(target=TOPLEVEL_BINDING)
54
53
  +
55
54
  + # hey baby
@@ -73,15 +72,41 @@ Example: diff
73
72
  return_value = repl_epilogue(target, nesting_level, break_data)
74
73
  return_value || target_self
75
74
  end
76
- -
77
- - # Perform a read-eval-print.
78
- - # If no parameter is given, default to top-level (main).
75
+
76
+ Example: add
77
+ --------
78
+
79
+ Note that `.git` invokes the system `git` command (a `.` prefix
80
+ forwards the line to the shell, see: [shell commands](https://github.com/pry/pry/wiki/Shell-Integration#Execute_shell_commands))
81
+
82
+ pry(main) git add Pry#repl
83
+ pry(main) .git diff --cached
84
+ diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb
85
+ index 7a4c403..6483a4a 100644
86
+ --- a/lib/pry/pry_instance.rb
87
+ +++ b/lib/pry/pry_instance.rb
88
+ @@ -164,9 +164,11 @@ class Pry
89
+ # Pry.new.repl(Object.new)
90
+ def repl(target=TOPLEVEL_BINDING)
91
+
92
+ + # hey baby
93
+ target = Pry.binding_for(target)
94
+ target_self = target.eval('self')
95
+
96
+ + # bink
97
+ repl_prologue(target)
98
+
99
+ # cannot rely on nesting.level as
79
100
 
80
101
  Features and limitations
81
102
  -------------------------
82
103
 
83
- * commit-method not yet implemented
84
- * BETA software, not guaranteed to work properly yet, stay tuned.
104
+ * Just a proof of concept at this stage.
105
+ * The methods you're invoking the git commands on must be part of a
106
+ git repo (of course).
107
+ * Commands currently just work with respect to `HEAD`; this
108
+ restriction will be lifted in a later version.
109
+ * BETA software, beware!
85
110
 
86
111
  Contact
87
112
  -------
data/Rakefile CHANGED
@@ -26,6 +26,7 @@ def apply_spec_defaults(s)
26
26
  s.files = Dir["lib/**/*.rb", "test/*.rb", "CHANGELOG", "README.md", "Rakefile"]
27
27
  s.add_dependency("diffy")
28
28
  s.add_dependency("grit")
29
+ s.add_dependency("pry", ">=0.9.2")
29
30
  end
30
31
 
31
32
  desc "run pry with plugin enabled"
@@ -1,3 +1,3 @@
1
1
  module PryGit
2
- VERSION = "0.2.0"
3
- end
2
+ VERSION = "0.2.2"
3
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: pry-git
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - John Mair (banisterfiend)
@@ -34,6 +34,17 @@ dependencies:
34
34
  version: "0"
35
35
  type: :runtime
36
36
  version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
+ name: pry
39
+ prerelease: false
40
+ requirement: &id003 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 0.9.2
46
+ type: :runtime
47
+ version_requirements: *id003
37
48
  description: A Ruby-aware git layer
38
49
  email: jrmair@gmail.com
39
50
  executables: []