Skip to content

Commit 7a9ea7d

Browse files
committed
setup sentry hive library
1 parent 2211a40 commit 7a9ea7d

12 files changed

+133
-0
lines changed

hive/.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Omit committing pubspec.lock for library packages; see
2+
# https://dart.dev/guides/libraries/private-files#pubspeclock.
3+
pubspec.lock
4+
5+
# Flutter/Dart/Pub related
6+
**/doc/api/
7+
**/ios/Flutter/.last_build_id
8+
.dart_tool/
9+
.flutter-plugins
10+
.flutter-plugins-dependencies
11+
.packages
12+
.pub-cache/
13+
.pub/
14+
/build/

hive/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Sentry
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

hive/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<p align="center">
2+
<a href="https://sentry.io" target="_blank" align="center">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
4+
</a>
5+
<br />
6+
</p>
7+
8+
Sentry integration for `hive` package
9+
===========

hive/analysis_options.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
include: package:lints/recommended.yaml
2+
3+
analyzer:
4+
language:
5+
strict-casts: true
6+
strict-inference: true
7+
strict-raw-types: true
8+
errors:
9+
# treat missing required parameters as a warning (not a hint)
10+
missing_required_param: error
11+
# treat missing returns as a warning (not a hint)
12+
missing_return: error
13+
# allow having TODOs in the code
14+
todo: ignore
15+
# allow self-reference to deprecated members (we do this because otherwise we have
16+
# to annotate every member in every test, assert, etc, when we deprecate something)
17+
deprecated_member_use_from_same_package: warning
18+
# ignore sentry/path on pubspec as we change it on deployment
19+
invalid_dependency: ignore
20+
unnecessary_import: ignore
21+
exclude:
22+
- example/**
23+
24+
linter:
25+
rules:
26+
- prefer_final_locals
27+
- public_member_api_docs
28+
- prefer_single_quotes
29+
- prefer_relative_imports
30+
- unnecessary_brace_in_string_interps
31+
- implementation_imports
32+
- require_trailing_commas
33+
- unawaited_futures

hive/dartdoc_options.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dartdoc:
2+
errors:
3+
- unresolved-doc-reference

hive/example/hive_example.dart

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import 'package:hive/sentry_hive.dart';
2+
3+
void main() {
4+
var awesome = Awesome();
5+
print('awesome: ${awesome.isAwesome}');
6+
}

hive/lib/sentry_hive.dart

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
library;
2+
3+
export 'src/sentry_hive.dart';
4+
export 'src/sentry_box.dart';

hive/lib/src/sentry_box.dart

Whitespace-only changes.

hive/lib/src/sentry_hive.dart

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// TODO: Put public facing types in this file.
2+
3+
/// Checks if you are awesome. Spoiler: you are.
4+
class Awesome {
5+
bool get isAwesome => true;
6+
}

hive/pubspec.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: sentry_hive
2+
description: An integration which adds support for performance tracing for the hive package.
3+
version: 7.10.1
4+
homepage: https://docs.sentry.io/platforms/flutter/
5+
repository: https://github.com/getsentry/sentry-dart
6+
issue_tracker: https://github.com/getsentry/sentry-dart/issues
7+
8+
environment:
9+
sdk: '>=2.17.0 <4.0.0'
10+
11+
dependencies:
12+
sentry: 7.10.1
13+
hive: ^2.2.3
14+
15+
dev_dependencies:
16+
lints: ^2.0.0
17+
test: ^1.21.0
18+
yaml: ^3.1.0 # needed for version match (code and pubspec)

hive/pubspec_overrides.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependency_overrides:
2+
sentry:
3+
path: ../dart

hive/test/sentry_hive_test.dart

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import 'package:hive/sentry_hive.dart';
2+
import 'package:test/test.dart';
3+
4+
void main() {
5+
group('A group of tests', () {
6+
final awesome = Awesome();
7+
8+
setUp(() {
9+
// Additional setup goes here.
10+
});
11+
12+
test('First Test', () {
13+
expect(awesome.isAwesome, isTrue);
14+
});
15+
});
16+
}

0 commit comments

Comments
 (0)