pikabu 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cfeb212ca3cc852495150b9342375aa7b524eaeb
4
- data.tar.gz: 15eda6d82f6469795ed4e5678fb2dbfe52925687
3
+ metadata.gz: 6f79b000f5c56c0aca8638bfc1b933f95e61a3a2
4
+ data.tar.gz: 654bdc3809634193cc93d9e4941024c651be91f5
5
5
  SHA512:
6
- metadata.gz: eea6c88e26cb77aa5942a3b38d94c5d999e52e8c3ca9d3505280aadd774356b73840d81ee229d88e9ba3d801bd3b80e403a371c94bb09d8c7a73c84ffdecbf00
7
- data.tar.gz: 22e0750aa37c687efdb6a5c4d6b315d4b39b4e2a7a8bf1c005d893e15125d329cd679ee00a0ad481cc15ce1d655f31851e2ee91efe3a282f7bcdac45582adbcb
6
+ metadata.gz: 9da556f1cb6f448e4d4d617778aafc485b09278f2cdfaa5100b1e7570ecce98bd35ce26682108b9deb0f4810eeb9d7ba2fa5f7ed2a208b278433698b2dfaad2f
7
+ data.tar.gz: ef4239cec0662e3bde176f6915b44bc621e0493c5ac101df4bff6184669553dcc16b561c39d033e6575b2d3eec8dda946f190df99bf3b20486cebec527c40764
data/demo.rb CHANGED
@@ -0,0 +1,4 @@
1
+ def hello
2
+ HELLO
3
+ end
4
+ hello
@@ -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
- @f = File.new("#{@pwd}/temp.rb", "w")
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
- puts " O> "
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 'ruby temp.rb; rm temp.rb'
101
+ system "ruby #{@current_path};rm #{@current_path}"
95
102
  end
96
103
 
97
104
  end
@@ -1,3 +1,3 @@
1
1
  class Pikabu
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-17 00:00:00.000000000 Z
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: