Skip to content

Commit

Permalink
Merge pull request #222 from atsign-foundation/publish_at_commons_3.0.23
Browse files Browse the repository at this point in the history
release: update CHANGELOG and pubspec for release 3.0.23
  • Loading branch information
gkc authored Aug 11, 2022
2 parents 5212067 + a6f3a02 commit 3e336cf
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 30 deletions.
5 changes: 5 additions & 0 deletions at_commons/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 3.0.23
* fix: bug fixes to AtKey.fromString static method and various toString instance methods
* feat: When validating AtKeys, allow _namespace_ to be optional, for legacy app code which depends on keys without namespaces
* feat: Added _getKeyType_ to AtKey

## 3.0.22
- Add ENCODING to update verb regex, update verb builder and Metadata to support encoding of new line character
- Add AtKeyNotFoundException for non-existent keys in secondary
Expand Down
36 changes: 18 additions & 18 deletions at_commons/lib/src/at_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,41 @@ enum AtMessage {

extension AtMessageExtension on AtMessage {
String get text {
const _notFoundMsg = 'No message found';
const _wrongVerbMsg =
const notFoundMsg = 'No message found';
const wrongVerbMsg =
'Available verbs are: lookup:, from:, pol:, llookup:, plookup:, update:, delete:, scan and exit. ';
const _closingConnectionMsg = 'Closing the connection. ';
const _cleanExitMsg = 'Exited cleanly, closing the connection. ';
const _moreThanOneAt =
const closingConnectionMsg = 'Closing the connection. ';
const cleanExitMsg = 'Exited cleanly, closing the connection. ';
const moreThanOneAt =
'invalid @sign: Cannot Contain more than one @ character';
const _whiteSpaceNotAllowed =
const whiteSpaceNotAllowed =
'invalid @sign: Cannot Contain whitespace characters';
const _reservedCharacterUsed =
const reservedCharacterUsed =
'invalid @sign: Cannot contain \!\*\'`\(\)\;\:\&\=\+\$\,\/\?\#\[\]\{\} characters';
const _noAtSign =
const noAtSign =
'invalid @sign: must include one @ character and at least one character on the right';
const _controlCharacter =
const controlCharacter =
'invalid @sign: must not include control characters';

switch (this) {
case AtMessage.wrongVerb:
return _wrongVerbMsg;
return wrongVerbMsg;
case AtMessage.closingConnection:
return _closingConnectionMsg;
return closingConnectionMsg;
case AtMessage.cleanExit:
return _cleanExitMsg;
return cleanExitMsg;
case AtMessage.moreThanOneAt:
return _moreThanOneAt;
return moreThanOneAt;
case AtMessage.whiteSpaceNotAllowed:
return _whiteSpaceNotAllowed;
return whiteSpaceNotAllowed;
case AtMessage.reservedCharacterUsed:
return _reservedCharacterUsed;
return reservedCharacterUsed;
case AtMessage.noAtSign:
return _noAtSign;
return noAtSign;
case AtMessage.controlCharacter:
return _controlCharacter;
return controlCharacter;
default:
return _notFoundMsg;
return notFoundMsg;
}
}
}
3 changes: 2 additions & 1 deletion at_commons/lib/src/keystore/at_key.dart
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ class Metadata {
metaData.pubKeyCS = json[SHARED_WITH_PUBLIC_KEY_CHECK_SUM];
metaData.encoding = json[ENCODING];
} catch (error) {
print('AtMetaData.fromJson error: ' + error.toString());
// TODO swallowing the error does not seem like the right thing to do
print('AtMetaData.fromJson error: ${error.toString()}');
}
return metaData;
}
Expand Down
1 change: 0 additions & 1 deletion at_commons/lib/src/validators/at_key_validation_impl.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:at_commons/at_commons.dart';
import 'package:at_commons/src/keystore/key_type.dart';
import 'package:at_commons/src/utils/at_key_regex_utils.dart';

/// Returns an instance of [AtKeyValidator]
Expand Down
5 changes: 2 additions & 3 deletions at_commons/lib/src/verb/config_verb_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ class ConfigVerbBuilder implements VerbBuilder {
command += '${VerbUtil.formatAtSign(atSign)}';
}
}
command = command.trim();
command = command + '\n';
return command;

return '${command.trim()}\n';
}

@override
Expand Down
10 changes: 5 additions & 5 deletions at_commons/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: at_commons
description: A library of Dart and Flutter utility classes that are used across other components of the @‎platform.
version: 3.0.22
version: 3.0.23
repository: https://github.com/atsign-foundation/at_tools
homepage: https://atsign.dev

environment:
sdk: '>=2.12.0 <3.0.0'

dependencies:
uuid: ^3.0.4
uuid: ^3.0.6

dev_dependencies:
lints: ^1.0.1
test: ^1.17.0
test_process: ^2.0.0
lints: ^2.0.0
test: ^1.21.4
test_process: ^2.0.2
1 change: 0 additions & 1 deletion at_commons/test/at_key_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:at_commons/at_commons.dart';
import 'package:at_commons/src/keystore/at_key_builder_impl.dart';
import 'package:at_commons/src/keystore/key_type.dart';
import 'package:test/test.dart';

void main() {
Expand Down
1 change: 0 additions & 1 deletion at_commons/test/at_key_type_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:at_commons/at_commons.dart';
import 'package:at_commons/src/keystore/key_type.dart';
import 'package:test/test.dart';

void main() {
Expand Down

0 comments on commit 3e336cf

Please sign in to comment.