Skip to content

Commit 564b84f

Browse files
committed
Fixed #335
* Add support for `checksum_sha256` Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 41fcf34 commit 564b84f

File tree

7 files changed

+14
-8
lines changed

7 files changed

+14
-8
lines changed

docs/CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Release 3.1.2
44

55
* New `--vartext` option
6+
* Add support for `checksum_sha256`
67
* `check` command will not counted INFO message as error when `--verbose` is set
78

89
2018-6-25

src/attributecode/model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,7 @@ def create_fields(self):
707707

708708
('checksum_md5', SingleLineField()),
709709
('checksum_sha1', SingleLineField()),
710+
('checksum_sha256', SingleLineField()),
710711
('spec_version', SingleLineField()),
711712
])
712713

tests/test_model.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ def test_About_dumps_does_not_transform_strings_in_lists(self):
622622
vcs_revision:
623623
checksum_md5:
624624
checksum_sha1:
625+
checksum_sha256:
625626
spec_version:
626627
'''
627628
assert expected == a.dumps(with_absent=True)
@@ -697,6 +698,7 @@ def test_field_names(self):
697698
'vcs_revision',
698699
'checksum_md5',
699700
'checksum_sha1',
701+
'checksum_sha256',
700702
'spec_version',
701703
'f',
702704
'g']
@@ -797,6 +799,7 @@ def test_About_dumps_all_fields_if_not_present_with_absent_True(self):
797799
vcs_revision:
798800
checksum_md5:
799801
checksum_sha1:
802+
checksum_sha256:
800803
spec_version:
801804
'''
802805
result = a.dumps(with_absent=True)
@@ -879,6 +882,7 @@ def test_About_as_dict_with_present(self):
879882
'changelog_file': u'',
880883
'checksum_md5': u'',
881884
'checksum_sha1': u'',
885+
'checksum_sha256': u'',
882886
'contact': u'',
883887
'copyright': u'Copyright (c) 2013-2014 nexB Inc.',
884888
'description': u'AboutCode is a tool\nfor files.',
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
about_file_path,about_resource_path,about_resource,name,version,download_url,description,homepage_url,notes,license,license_expression,license_name,license_file,license_url,copyright,notice_file,notice_url,redistribute,attribute,track_change,modified,changelog_file,owner,owner_url,contact,author,vcs_tool,vcs_repository,vcs_path,vcs_tag,vcs_branch,vcs_revision,checksum_md5,checksum_sha1,spec_version
2-
/about/about.ABOUT,.,.,AboutCode,0.11.0,,AboutCode is a tool to process ABOUT files. An ABOUT file is a file.,http://dejacode.org,,apache-2.0,apache-2.0,,apache-2.0.LICENSE,,Copyright (c) 2013-2014 nexB Inc.,NOTICE,,,,,,,nexB Inc.,,,"Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez",git,https://github.com/dejacode/about-code-tool.git,,,,,,,
1+
about_file_path,about_resource_path,about_resource,name,version,download_url,description,homepage_url,notes,license,license_expression,license_name,license_file,license_url,copyright,notice_file,notice_url,redistribute,attribute,track_change,modified,changelog_file,owner,owner_url,contact,author,vcs_tool,vcs_repository,vcs_path,vcs_tag,vcs_branch,vcs_revision,checksum_md5,checksum_sha1,checksum_sha256,spec_version
2+
/about/about.ABOUT,.,.,AboutCode,0.11.0,,AboutCode is a tool to process ABOUT files. An ABOUT file is a file.,http://dejacode.org,,apache-2.0,apache-2.0,,apache-2.0.LICENSE,,Copyright (c) 2013-2014 nexB Inc.,NOTICE,,,,,,,nexB Inc.,,,"Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez",git,https://github.com/dejacode/about-code-tool.git,,,,,,,,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
about_file_path,about_resource_path,about_resource,name,version,download_url,description,homepage_url,notes,license,license_expression,license_name,license_file,license_url,copyright,notice_file,notice_url,redistribute,attribute,track_change,modified,changelog_file,owner,owner_url,contact,author,vcs_tool,vcs_repository,vcs_path,vcs_tag,vcs_branch,vcs_revision,checksum_md5,checksum_sha1,spec_version
1+
about_file_path,about_resource_path,about_resource,name,version,download_url,description,homepage_url,notes,license,license_expression,license_name,license_file,license_url,copyright,notice_file,notice_url,redistribute,attribute,track_change,modified,changelog_file,owner,owner_url,contact,author,vcs_tool,vcs_repository,vcs_path,vcs_tag,vcs_branch,vcs_revision,checksum_md5,checksum_sha1,checksum_sha256,spec_version
22
/about/about_with_about_resource_path.ABOUT,"./apache-2.0.LICENSE
3-
../../complex/about/apache-2.0.LICENSE",apache-2.0.LICENSE,Apache License 2.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3+
../../complex/about/apache-2.0.LICENSE",apache-2.0.LICENSE,Apache License 2.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
about_file_path,about_resource_path,about_resource,name,version,download_url,description,homepage_url,notes,license,license_expression,license_name,license_file,license_url,copyright,notice_file,notice_url,redistribute,attribute,track_change,modified,changelog_file,owner,owner_url,contact,author,vcs_tool,vcs_repository,vcs_path,vcs_tag,vcs_branch,vcs_revision,checksum_md5,checksum_sha1,spec_version
2-
/about/about.ABOUT,,,AboutCode,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1+
about_file_path,about_resource_path,about_resource,name,version,download_url,description,homepage_url,notes,license,license_expression,license_name,license_file,license_url,copyright,notice_file,notice_url,redistribute,attribute,track_change,modified,changelog_file,owner,owner_url,contact,author,vcs_tool,vcs_repository,vcs_path,vcs_tag,vcs_branch,vcs_revision,checksum_md5,checksum_sha1,checksum_sha256,spec_version
2+
/about/about.ABOUT,,,AboutCode,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

tests/testdata/load/expected.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
about_file_path,about_resource_path,about_resource,name,version,download_url,description,homepage_url,notes,license,license_expression,license_name,license_file,license_url,copyright,notice_file,notice_url,redistribute,attribute,track_change,modified,changelog_file,owner,owner_url,contact,author,vcs_tool,vcs_repository,vcs_path,vcs_tag,vcs_branch,vcs_revision,checksum_md5,checksum_sha1,spec_version
2-
/load/this.ABOUT,.,.,AboutCode,0.11.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1+
about_file_path,about_resource_path,about_resource,name,version,download_url,description,homepage_url,notes,license,license_expression,license_name,license_file,license_url,copyright,notice_file,notice_url,redistribute,attribute,track_change,modified,changelog_file,owner,owner_url,contact,author,vcs_tool,vcs_repository,vcs_path,vcs_tag,vcs_branch,vcs_revision,checksum_md5,checksum_sha1,checksum_sha256,spec_version
2+
/load/this.ABOUT,.,.,AboutCode,0.11.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

0 commit comments

Comments
 (0)