Skip to content

Commit

Permalink
injector 1.0.9 supported (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
gyrdym committed Aug 28, 2020
1 parent e4c395b commit 92ff0b0
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,5 +1,5 @@
language: dart
dart:
- "2.4.0"
- "2.7.0"
script: pub run grinder start
after_success: pub run grinder finish
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,8 @@
# Changelog

## 0.0.9
- injector lib update supported

## 0.0.8
- `integers`: `lowerClosed` and `upperClosed` arguments added

Expand Down
2 changes: 1 addition & 1 deletion lib/src/generators/integers.dart
Expand Up @@ -7,7 +7,7 @@ Iterable<int> integers(int lower, int upper, {
bool upperClosed = true,
}) {
final rangeFactory = getDependencies()
.getDependency<NumRangeFactory>();
.get<NumRangeFactory>();
final range = rangeFactory.create(
lower: lower,
upper: upper,
Expand Down
3 changes: 1 addition & 2 deletions lib/src/injector.dart
Expand Up @@ -6,5 +6,4 @@ Injector injector;

Injector getDependencies() =>
injector ??= Injector()
..registerSingleton<NumRangeFactory>(
(injector) => const NumRangeFactoryImpl());
..registerSingleton<NumRangeFactory>(() => const NumRangeFactoryImpl());
6 changes: 3 additions & 3 deletions pubspec.lock
Expand Up @@ -252,7 +252,7 @@ packages:
name: injector
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.8"
version: "1.0.9"
io:
dependency: transitive
description:
Expand Down Expand Up @@ -308,7 +308,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.7"
version: "1.2.2"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -576,4 +576,4 @@ packages:
source: hosted
version: "2.2.0"
sdks:
dart: ">=2.4.0 <3.0.0"
dart: ">=2.6.0 <3.0.0"
9 changes: 3 additions & 6 deletions pubspec.yaml
@@ -1,16 +1,13 @@
name: xrange
version: 0.0.8
authors:
- Ilia Gyrdymov <ilgyrd@gmail.com>
- Sean Eagan <seaneagan1@gmail.com>
version: 0.0.9
description: Provides classes and methods allowing to work with ranges
homepage: https://github.com/gyrdym/xrange

environment:
sdk: '>=2.2.0 <3.0.0'
sdk: '>=2.7.0 <3.0.0'

dependencies:
injector: ^1.0.8
injector: ^1.0.9

dev_dependencies:
build_runner: ^1.1.2
Expand Down
2 changes: 1 addition & 1 deletion test/integers_test.dart
Expand Up @@ -46,7 +46,7 @@ void main() {
.thenReturn(returnedIndices);

injector
.registerSingleton<NumRangeFactory>((_) => numRangeFactoryMock);
.registerSingleton<NumRangeFactory>(() => numRangeFactoryMock);

final actualIndices = integers(-5, 5,
lowerClosed: lowerClosed,
Expand Down

0 comments on commit 92ff0b0

Please sign in to comment.