pikabu 0.1.0 → 0.1.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 +4 -4
- data/demo.rb +4 -0
- data/lib/pikabu.rb +15 -8
- data/lib/pikabu/version.rb +1 -1
- data/pikabu-0.1.0.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f79b000f5c56c0aca8638bfc1b933f95e61a3a2
|
4
|
+
data.tar.gz: 654bdc3809634193cc93d9e4941024c651be91f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9da556f1cb6f448e4d4d617778aafc485b09278f2cdfaa5100b1e7570ecce98bd35ce26682108b9deb0f4810eeb9d7ba2fa5f7ed2a208b278433698b2dfaad2f
|
7
|
+
data.tar.gz: ef4239cec0662e3bde176f6915b44bc621e0493c5ac101df4bff6184669553dcc16b561c39d033e6575b2d3eec8dda946f190df99bf3b20486cebec527c40764
|
data/demo.rb
CHANGED
data/lib/pikabu.rb
CHANGED
@@ -35,11 +35,22 @@ class Pikabu
|
|
35
35
|
@file = File.open(@file_path)
|
36
36
|
@length = File.readlines(@file_path).size
|
37
37
|
@pwd = FileUtils.pwd()
|
38
|
-
|
38
|
+
new_file
|
39
|
+
end
|
40
|
+
|
41
|
+
def new_file
|
42
|
+
path_array = @file_path.split("/")
|
43
|
+
if path_array.length==1
|
44
|
+
@current_path = "#{@pwd}/temp.rb"
|
45
|
+
else
|
46
|
+
var = path_array[0..-2].join('/')
|
47
|
+
@current_path = "#{@pwd}/#{var}/temp.rb"
|
48
|
+
end
|
49
|
+
@f = File.new("#{@current_path}", "w")
|
39
50
|
end
|
40
51
|
|
41
52
|
def print_help
|
42
|
-
puts 'Welcome to Pikabu!'
|
53
|
+
puts 'Welcome to Pikabu! Please enter a command.'
|
43
54
|
puts 'pikabu [file.rb] : places a binding.pry if there is an error in your file'
|
44
55
|
puts 'pikabu [file.rb] [line #]: places a binding.pry on the line number you specify'
|
45
56
|
end
|
@@ -50,11 +61,7 @@ class Pikabu
|
|
50
61
|
if @error == []
|
51
62
|
puts "\nYou clever chicken! Pikabu detected no errors in your script!"
|
52
63
|
puts "\n"
|
53
|
-
|
54
|
-
puts " | "
|
55
|
-
puts " >OOOO "
|
56
|
-
puts " ^ ^ "
|
57
|
-
system 'rm temp.rb'
|
64
|
+
exec "rm #{@current_path}"
|
58
65
|
return
|
59
66
|
else
|
60
67
|
m = /.rb:(\d+)/.match(@error.first)
|
@@ -91,7 +98,7 @@ class Pikabu
|
|
91
98
|
@f << "binding.pry\n"
|
92
99
|
write_tail
|
93
100
|
@f.rewind
|
94
|
-
system
|
101
|
+
system "ruby #{@current_path};rm #{@current_path}"
|
95
102
|
end
|
96
103
|
|
97
104
|
end
|
data/lib/pikabu/version.rb
CHANGED
data/pikabu-0.1.0.gem
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pikabu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dana Najjar, Waruna Perera
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- demo.rb
|
70
70
|
- lib/pikabu.rb
|
71
71
|
- lib/pikabu/version.rb
|
72
|
+
- pikabu-0.1.0.gem
|
72
73
|
- pikabu.gemspec
|
73
74
|
homepage: https://github.com/dnajjar/pikabu
|
74
75
|
licenses:
|