testhelper 0.2.1 → 1.0.0

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/file_line.rb +9 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70fc75ff94da2123990958c5de2007f31b178311
4
- data.tar.gz: 1ca3aaf53d7640cfd2d227d9fb0b0d05b547d533
3
+ metadata.gz: dac353f37c90b3bb54f8174199ef2fb95d852b9c
4
+ data.tar.gz: 27edcba0c31d12ad18feb3fee875d0e3478bdd10
5
5
  SHA512:
6
- metadata.gz: 01cbcea6b682e27c46193d91fb8c038ac26157aea007604277e9688e8e1d7da55f93f5f431bd98a37561699b0e22f4464fefcafa44ed6fadae083cd3df3f3ddd
7
- data.tar.gz: 4f0a1ac7eed75a0801ad613daa681a6263521a3c91fbb3ef860978a0161d112a2b65267a6fe3535d701632e5337c588a70393f6f9310c0dc05fcf037ae130dd6
6
+ metadata.gz: dd62cff87c4ed214518af42cf0c760fad67119ba437be3a97d603ec67cef5f05a7f85ad29529c98e461a629ee3fe400456cd077864fbfc8a47a67d94743572f4
7
+ data.tar.gz: 643ee3bcd6b595b956880b18a1b7df833b49a8af2835e2d3b96311f1d90bdb5db85fba93d1b3ec01656a14b59462a9e14bb954064e55c99ba3621e5e6c0d4590
data/lib/file_line.rb CHANGED
@@ -10,7 +10,12 @@ end
10
10
  module SourceFile
11
11
  def self.split_file_name_and_no(location_str)
12
12
  source_infos = location_str.split(":")
13
- [source_infos[0], source_infos[1].to_i]
13
+ if source_infos.size == 4
14
+ # for windows path
15
+ [source_infos[0]+":"+source_infos[1], source_infos[2].to_i]
16
+ else
17
+ [source_infos[0], source_infos[1].to_i]
18
+ end
14
19
  end
15
20
 
16
21
  def self.analyze_variable_name(the_line, the_callee)
@@ -41,6 +46,9 @@ if __FILE__ == $0
41
46
  location_str = "/Users/colin/work/testhelper/lib/testhelper.rb:55:in `<main>'"
42
47
  SourceFile.split_file_name_and_no(location_str).must_equal(
43
48
  ["/Users/colin/work/testhelper/lib/testhelper.rb", 55])
49
+ location_str = "C:/Users/colin/work/testhelper/lib/testhelper.rb:55:in `<main>'"
50
+ SourceFile.split_file_name_and_no(location_str).must_equal(
51
+ ["C:/Users/colin/work/testhelper/lib/testhelper.rb", 55])
44
52
  end
45
53
  it "analyze variable name from a line of source" do
46
54
  the_line = " mm.ppt()\n"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testhelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin Ji
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-04 00:00:00.000000000 Z
11
+ date: 2015-01-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Some print helper methods like pt, ptl, ppt, pptl, flag_test for testing.
14
14
  email: jichen3000@gmail.com