stack_frames 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 +4 -4
- data/.github/workflows/ci.yml +24 -0
- data/ext/stack_frames/buffer.c +2 -1
- data/ext/stack_frames/frame.c +2 -0
- data/ext/stack_frames/stack_frames.c +1 -3
- data/lib/stack_frames/version.rb +1 -1
- data/stack_frames.gemspec +3 -1
- metadata +8 -7
- data/.travis.yml +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c404f9278a85b107921a9ecb3fce96b487843140922499441eaf01f6615955c1
|
4
|
+
data.tar.gz: daf9693bff25c25e07c0cbf169b04f56e3b716888ae3c501a031e997e275963a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c62e52062931e7e5e288a30bfa9524584146e198f2f5f9466f9e9d1fc8ade8cc8d2b2e70c108de426844036f25a3fa516d575fae7f3ba38529c2a463f07823ed
|
7
|
+
data.tar.gz: ce7b41fd1c8ca4eccba5535ab3efaef3d29e412d7a55bb53fdac3b634354dcf56d5928e4627160d048fedf8a15db39b5f67666a0d7566c00d16de790debd729c
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: Tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
push
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
test:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
ruby: [
|
13
|
+
'2.6', # minimum supported
|
14
|
+
'2.7',
|
15
|
+
'3.0',
|
16
|
+
'3.1',
|
17
|
+
]
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
bundler-cache: true
|
24
|
+
- run: bundle exec rake
|
data/ext/stack_frames/buffer.c
CHANGED
@@ -58,11 +58,12 @@ static VALUE buffer_initialize(VALUE self, VALUE size) {
|
|
58
58
|
TypedData_Get_Struct(self, buffer_t, &buffer_data_type, buffer);
|
59
59
|
buffer->profile_frames = ALLOC_N(VALUE, capacity);
|
60
60
|
buffer->lines = ALLOC_N(int, capacity);
|
61
|
-
buffer->capacity = capacity;
|
62
61
|
buffer->frames = ALLOC_N(VALUE, capacity);
|
63
62
|
|
63
|
+
buffer->capacity = 0;
|
64
64
|
for (int i = 0; i < capacity; i++) {
|
65
65
|
buffer->frames[i] = stack_frame_new(self, i);
|
66
|
+
buffer->capacity++;
|
66
67
|
}
|
67
68
|
return Qnil;
|
68
69
|
}
|
data/ext/stack_frames/frame.c
CHANGED
@@ -72,6 +72,8 @@ DEFINE_FRAME_ACCESSOR(qualified_method_name)
|
|
72
72
|
|
73
73
|
void stack_frame_define(VALUE mStackFrames) {
|
74
74
|
cFrame = rb_define_class_under(mStackFrames, "Frame", rb_cObject);
|
75
|
+
rb_global_variable(&cFrame);
|
76
|
+
|
75
77
|
rb_define_alloc_func(cFrame, frame_allocate);
|
76
78
|
rb_define_method(cFrame, "lineno", frame_lineno, 0);
|
77
79
|
rb_define_method(cFrame, "path", frame_path, 0);
|
@@ -2,10 +2,8 @@
|
|
2
2
|
#include "frame.h"
|
3
3
|
#include "buffer.h"
|
4
4
|
|
5
|
-
VALUE mStackFrames;
|
6
|
-
|
7
5
|
void Init_stack_frames() {
|
8
|
-
mStackFrames = rb_define_module("StackFrames");
|
6
|
+
VALUE mStackFrames = rb_define_module("StackFrames");
|
9
7
|
stack_buffer_define(mStackFrames);
|
10
8
|
stack_frame_define(mStackFrames);
|
11
9
|
}
|
data/lib/stack_frames/version.rb
CHANGED
data/stack_frames.gemspec
CHANGED
@@ -14,6 +14,8 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = "https://github.com/Shopify/stack_frames"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
18
|
+
|
17
19
|
spec.extensions = ['ext/stack_frames/extconf.rb']
|
18
20
|
# Specify which files should be added to the gem when it is released.
|
19
21
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -25,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
25
27
|
spec.require_paths = ["lib"]
|
26
28
|
|
27
29
|
spec.add_development_dependency "bundler"
|
28
|
-
spec.add_development_dependency "rake", "~>
|
30
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
29
31
|
spec.add_development_dependency 'rake-compiler', '~> 1.0'
|
30
32
|
spec.add_development_dependency "minitest", "~> 5.0"
|
31
33
|
spec.add_development_dependency "stackprof", "~> 0.2.13"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stack_frames
|
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
|
- Dylan Thacker-Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake-compiler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,8 +89,8 @@ extensions:
|
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
91
|
- ".github/probots.yml"
|
92
|
+
- ".github/workflows/ci.yml"
|
92
93
|
- ".gitignore"
|
93
|
-
- ".travis.yml"
|
94
94
|
- CODE_OF_CONDUCT.md
|
95
95
|
- CONTRIBUTING.md
|
96
96
|
- Gemfile
|
@@ -114,7 +114,8 @@ files:
|
|
114
114
|
homepage: https://github.com/Shopify/stack_frames
|
115
115
|
licenses:
|
116
116
|
- MIT
|
117
|
-
metadata:
|
117
|
+
metadata:
|
118
|
+
allowed_push_host: https://rubygems.org
|
118
119
|
post_install_message:
|
119
120
|
rdoc_options: []
|
120
121
|
require_paths:
|
@@ -130,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
131
|
- !ruby/object:Gem::Version
|
131
132
|
version: '0'
|
132
133
|
requirements: []
|
133
|
-
rubygems_version: 3.
|
134
|
+
rubygems_version: 3.2.20
|
134
135
|
signing_key:
|
135
136
|
specification_version: 4
|
136
137
|
summary: Zero allocation backtraces using MRI's profile frames API
|