lumitrace 0.1.1 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66baf120e1cb07b8e78b9d3dcd077c17946e162f5d3729388304abd6b415dc40
4
- data.tar.gz: 115363aaf16d9dd233de67132acbbc51287f99ab78206dc27f6550cda00f6e36
3
+ metadata.gz: e03b4d880369e5f87e97dc3d9512afe78f27e310efd2b960a1b2ce545e3a70d1
4
+ data.tar.gz: '0970a1a220cf484be1d75aa1d51f6004c08ce7bc1154857180247edc44253353'
5
5
  SHA512:
6
- metadata.gz: d9757f79cb379340dd7a7e9a7645fc6960afa0f55a6a373cb32ae69d493369b987f539b2823be7cc0e56880c3de83690db7d0aa3d754f727fa012091299806de
7
- data.tar.gz: 4536b220791efbbf5174f320da975cfb3642c78eaf1962aa2bc72a1629563376cea4793e1eae24e903c7fca0b30a1f5180ce6ecc50a88daece306182eab0ad5d
6
+ metadata.gz: 28a83ebc1a957b33da7a9421a78176f4d348cd3963d702f2b926eba5fa3e1b1fb7277d1a8e9635644a71af25c63e5072829ba32e7c3671636d956d266b2eb22a
7
+ data.tar.gz: 83956ce933a06f9cfd128e35146b7745410215a392b9bcd22008ae26b4568db8369cafdbb93d48bdb7d92785ccb7f342fe3445f4cf38fbba985c392b95637825
@@ -287,11 +287,7 @@ module GenerateResultedHtml
287
287
  by_file = events.group_by { |e| e[:file] }
288
288
  ranges_by_file = normalize_ranges_by_file(ranges_by_file)
289
289
 
290
- target_paths = if ranges_by_file
291
- ranges_by_file.keys
292
- else
293
- by_file.keys
294
- end
290
+ target_paths = by_file.keys
295
291
 
296
292
  sections = target_paths.sort.map do |path|
297
293
  next unless File.exist?(path)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lumitrace
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -7,6 +7,10 @@ on:
7
7
  jobs:
8
8
  run-lumitrace:
9
9
  runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: read
12
+ pages: write
13
+ id-token: write
10
14
  steps:
11
15
  - name: Checkout
12
16
  uses: actions/checkout@v4
@@ -32,7 +36,12 @@ jobs:
32
36
  env:
33
37
  LUMITRACE_GIT_DIFF: ${{ github.event_name == 'pull_request' && format('range:origin/{0}...HEAD', github.base_ref) || 'range:HEAD~1...HEAD' }}
34
38
  LUMITRACE_HTML_OUT: "${{ github.workspace }}/lumitrace_recorded.html"
35
- run: RUBYOPT='-r lumitrace/enable_git_diff' bundle exec rake test
39
+ run: bundle exec ruby -r lumitrace/enable_git_diff test/test_sample_test.rb
40
+
41
+ - name: Prepare Pages content
42
+ run: |
43
+ mkdir -p public
44
+ cp lumitrace_recorded.html public/index.html
36
45
 
37
46
  - name: Upload Lumitrace HTML
38
47
  uses: actions/upload-artifact@v4
@@ -40,6 +49,19 @@ jobs:
40
49
  name: lumitrace-recorded-html
41
50
  path: lumitrace_recorded.html
42
51
 
52
+ - name: Upload Pages artifact
53
+ uses: actions/upload-pages-artifact@v3
54
+ with:
55
+ path: public
56
+ name: lumitrace-pages
57
+
58
+ - name: Deploy Pages
59
+ id: deployment
60
+ uses: actions/deploy-pages@v4
61
+ with:
62
+ artifact_name: lumitrace-pages
63
+
43
64
  - name: Artifact URL
44
65
  run: |
45
66
  echo "Artifact URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
67
+ echo "Pages URL: ${{ steps.deployment.outputs.page_url }}" >> $GITHUB_STEP_SUMMARY
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "lumitrace"
5
+ gem "lumitrace", git: "https://github.com/ko1/lumitrace.git", branch: "master"
6
6
  gem "rake"
7
7
  gem "minitest"
@@ -9,6 +9,11 @@ class SampleProjectTest < Minitest::Test
9
9
  end
10
10
 
11
11
  def test_foo
12
- assert_equal 42, 1 + 2 * 3
12
+ assert_equal 42, 30 + 3 * 4
13
13
  end
14
+
15
+ def test_bar
16
+ assert_equal 43, 30 + 3 * 4 + 1
17
+ end
18
+
14
19
  end
@@ -7,3 +7,4 @@ def compute(x)
7
7
  end
8
8
 
9
9
  puts compute(5)
10
+ p :ok
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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koichi Sasada