lumitrace 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ba7add22897e99449be04384c54d69bc475240840e2d229f73b90a5f289c0a0
4
- data.tar.gz: 259751a540b06b2f790bef892f14191b1daaa8341ec5a484b8e91affe46120fa
3
+ metadata.gz: 66baf120e1cb07b8e78b9d3dcd077c17946e162f5d3729388304abd6b415dc40
4
+ data.tar.gz: 115363aaf16d9dd233de67132acbbc51287f99ab78206dc27f6550cda00f6e36
5
5
  SHA512:
6
- metadata.gz: cf8fc986e2d8ff10480bbbbb8ce57eac21cd9d72ba94a83604ffdba7e4cdccd8b6cb9a8e0e52b6413f5bf098a4d8d4d90e60c8cd70038d52bb0826d83b26c56a
7
- data.tar.gz: e3752f0b9f8249345443352898c69a138e4cdb35f5ff3257c5a52b7bd9665b0ac48e6c0aca16575a6577b67838d47d709c453238ce35fc5ba6d8506c1a0420b2
6
+ metadata.gz: d9757f79cb379340dd7a7e9a7645fc6960afa0f55a6a373cb32ae69d493369b987f539b2823be7cc0e56880c3de83690db7d0aa3d754f727fa012091299806de
7
+ data.tar.gz: 4536b220791efbbf5174f320da975cfb3642c78eaf1962aa2bc72a1629563376cea4793e1eae24e903c7fca0b30a1f5180ce6ecc50a88daece306182eab0ad5d
@@ -58,12 +58,10 @@ def lumitrace_git_root(dir, git_cmd)
58
58
  end
59
59
 
60
60
  def lumitrace_diff_ranges
61
- target = File.expand_path($PROGRAM_NAME)
62
- base_dir = File.dirname(target)
61
+ base_dir = Dir.pwd
63
62
  git_cmd = ENV.fetch("LUMITRACE_GIT_CMD", "git")
64
63
  root = lumitrace_git_root(base_dir, git_cmd)
65
64
  args = [git_cmd, "-C", base_dir, "diff", "--unified=0", "--no-color"] + lumitrace_diff_args
66
- args += ["--", target] if File.file?(target)
67
65
  stdout, status = Open3.capture2(*args)
68
66
  return nil unless status.success?
69
67
  ranges_by_file = lumitrace_parse_git_diff_ranges(stdout, root)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lumitrace
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -16,14 +16,21 @@ jobs:
16
16
  - name: Setup Ruby
17
17
  uses: ruby/setup-ruby@v1
18
18
  with:
19
- ruby-version: "3.2"
19
+ ruby-version: "4.0"
20
20
 
21
21
  - name: Install dependencies
22
22
  run: bundle install
23
23
 
24
+ - name: Debug repo context
25
+ run: |
26
+ pwd
27
+ ls -a
28
+ git rev-parse --show-toplevel || true
29
+ git status -sb || true
30
+
24
31
  - name: Run tests with Lumitrace
25
32
  env:
26
- LUMITRACE_GIT_DIFF: "range:origin/${{ github.base_ref || HEAD~1 }}...HEAD"
33
+ LUMITRACE_GIT_DIFF: ${{ github.event_name == 'pull_request' && format('range:origin/{0}...HEAD', github.base_ref) || 'range:HEAD~1...HEAD' }}
27
34
  LUMITRACE_HTML_OUT: "${{ github.workspace }}/lumitrace_recorded.html"
28
35
  run: RUBYOPT='-r lumitrace/enable_git_diff' bundle exec rake test
29
36
 
@@ -2,4 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "lumitrace", path: ".."
5
+ gem "lumitrace"
6
+ gem "rake"
7
+ gem "minitest"
@@ -7,4 +7,8 @@ class SampleProjectTest < Minitest::Test
7
7
  def test_compute
8
8
  assert_equal 13, compute(5)
9
9
  end
10
+
11
+ def test_foo
12
+ assert_equal 42, 1 + 2 * 3
13
+ end
10
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lumitrace
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
  - Koichi Sasada