Clone for State where P::Value: Send + Sync {
+ fn clone(&self) -> State
{
+ State { data: self.data.clone() }
+ }
+}
+
+impl Clone for Write where P::Value: Send {
+ fn clone(&self) -> Write
{
+ Write { data: self.data.clone() }
+ }
+}
+
+impl Key for State where P::Value: 'static {
+ type Value = Arc>;
+}
+
+impl Key for Read where P::Value: 'static {
+ type Value = Arc;
+}
+
+impl Key for Write where P::Value: 'static {
+ type Value = Arc>;
+}
+
+impl Plugin for State where P::Value: Send + Sync {
+ type Error = PersistentError;
+ fn eval(req: &mut Request) -> Result>, PersistentError> {
+ req.extensions.get::>().cloned().ok_or(PersistentError::NotFound)
+ }
+}
+
+impl Plugin for Read where P::Value: Send + Sync {
+ type Error = PersistentError;
+ fn eval(req: &mut Request) -> Result, PersistentError> {
+ req.extensions.get::>().cloned().ok_or(PersistentError::NotFound)
+ }
+}
+
+impl Plugin for Write where P::Value: Send {
+ type Error = PersistentError;
+ fn eval(req: &mut Request) -> Result>, PersistentError> {
+ req.extensions.get::>().cloned().ok_or(PersistentError::NotFound)
+ }
+}
+
+impl BeforeMiddleware for State where P::Value: Send + Sync {
+ fn before(&self, req: &mut Request) -> IronResult<()> {
+ req.extensions.insert::>(self.data.clone());
+ Ok(())
+ }
+}
+
+impl BeforeMiddleware for Read where P::Value: Send + Sync {
+ fn before(&self, req: &mut Request) -> IronResult<()> {
+ req.extensions.insert::>(self.data.clone());
+ Ok(())
+ }
+}
+
+impl BeforeMiddleware for Write where P::Value: Send {
+ fn before(&self, req: &mut Request) -> IronResult<()> {
+ req.extensions.insert::>(self.data.clone());
+ Ok(())
+ }
+}
+
+impl AfterMiddleware for State where P::Value: Send + Sync {
+ fn after(&self, _: &mut Request, mut res: Response) -> IronResult {
+ res.extensions.insert::>(self.data.clone());
+ Ok(res)
+ }
+}
+
+impl AfterMiddleware for Read where P::Value: Send + Sync {
+ fn after(&self, _: &mut Request, mut res: Response) -> IronResult {
+ res.extensions.insert::>(self.data.clone());
+ Ok(res)
+ }
+}
+
+impl AfterMiddleware for Write where P::Value: Send {
+ fn after(&self, _: &mut Request, mut res: Response) -> IronResult {
+ res.extensions.insert::>(self.data.clone());
+ Ok(res)
+ }
+}
+
+impl State where P::Value: Send + Sync {
+ /// Construct a new pair of `State` that can be passed directly to `Chain::link`.
+ ///
+ /// The data is initialized with the passed-in value.
+ pub fn both(start: T) -> (State, State
) where T: PersistentInto>> {
+ let x = State { data: start.persistent_into() };
+ (x.clone(), x)
+ }
+
+ /// Construct a new `State` that can be passed directly to
+ /// `Chain::link_before` or `Chain::link_after`.
+ ///
+ /// The data is initialized with the passed-in value.
+ pub fn one(start: T) -> State where T: PersistentInto>> {
+ State { data: start.persistent_into() }
+ }
+}
+
+impl Read where P::Value: Send + Sync {
+ /// Construct a new pair of `Read` that can be passed directly to `Chain::link`.
+ ///
+ /// The data is initialized with the passed-in value.
+ pub fn both(start: T) -> (Read, Read
) where T: PersistentInto> {
+ let x = Read { data: start.persistent_into() };
+ (x.clone(), x)
+ }
+
+ /// Construct a new `Read` that can be passed directly to
+ /// `Chain::link_before` or `Chain::link_after`.
+ ///
+ /// The data is initialized with the passed-in value.
+ pub fn one(start: T) -> Read where T: PersistentInto> {
+ Read { data: start.persistent_into() }
+ }
+}
+
+impl Write where P::Value: Send {
+ /// Construct a new pair of `Write` that can be passed directly to `Chain::link`.
+ ///
+ /// The data is initialized with the passed-in value.
+ pub fn both(start: T) -> (Write, Write
) where T: PersistentInto>> {
+ let x = Write { data: start.persistent_into() };
+ (x.clone(), x)
+ }
+
+ /// Construct a new `Write` that can be passed directly to
+ /// `Chain::link_before` or `Chain::link_after`.
+ ///
+ /// The data is initialized with the passed-in value.
+ pub fn one(start: T) -> Write where T: PersistentInto>> {
+ Write { data: start.persistent_into() }
+ }
+}
diff --git a/tests/packagedcode/data/package_summary/rust/router/Cargo.toml b/tests/packagedcode/data/package_summary/rust/router/Cargo.toml
new file mode 100644
index 00000000000..2bb106cae8b
--- /dev/null
+++ b/tests/packagedcode/data/package_summary/rust/router/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+
+name = "router"
+authors = ["Jonathan Reem "]
+license = "MIT"
+version = "0.6.0"
+description = "A router for the Iron framework."
+repository = "https://github.com/iron/router"
+documentation = "https://docs.rs/router"
+keywords = ["iron", "web", "http", "routing", "router"]
+
+[dependencies]
+route-recognizer = "0.1"
+iron = { path = "../iron", version = "0.6" }
+url = "1.1"
diff --git a/tests/packagedcode/data/package_summary/rust/router/README.md b/tests/packagedcode/data/package_summary/rust/router/README.md
new file mode 100644
index 00000000000..b28f562c5fa
--- /dev/null
+++ b/tests/packagedcode/data/package_summary/rust/router/README.md
@@ -0,0 +1,64 @@
+Router [![Build Status](https://secure.travis-ci.org/iron/router.png?branch=master)](https://travis-ci.org/iron/router) [![Crates.io Status](https://meritbadge.herokuapp.com/router)](https://crates.io/crates/router)
+====
+
+> Routing handler for the [Iron](https://github.com/iron/iron) web framework.
+
+Router is a fast, convenient, and flexible routing middleware for Iron. It
+allows complex glob patterns and named url parameters and also allows handlers
+to be any Handler, including all Chains.
+
+## Example
+
+```rust
+extern crate iron;
+extern crate router;
+
+use iron::prelude::*;
+use iron::status;
+use router::Router;
+
+fn main() {
+ let mut router = Router::new(); // Alternative syntax:
+ router.get("/", handler, "index"); // let router = router!(index: get "/" => handler,
+ router.get("/:query", handler, "query"); // query: get "/:query" => handler);
+
+ Iron::new(router).http("localhost:3000").unwrap();
+
+ fn handler(req: &mut Request) -> IronResult {
+ let ref query = req.extensions.get::().unwrap().find("query").unwrap_or("/");
+ Ok(Response::with((status::Ok, *query)))
+ }
+}
+```
+
+## Overview
+
+Router is a part of Iron's [core bundle](https://github.com/iron/core).
+
+- Route client requests based on their paths
+- Parse parameters and provide them to other middleware/handlers
+
+## Installation
+
+If you're using cargo, just add router to your `Cargo.toml`.
+
+```toml
+[dependencies]
+
+router = "*"
+```
+
+Otherwise, `cargo build`, and the rlib will be in your `target` directory.
+
+## [Documentation](https://docs.rs/router)
+
+Along with the [online documentation](https://docs.rs/router),
+you can build a local copy with `make doc`.
+
+## [Examples](/examples)
+
+## Get Help
+
+One of us is usually on `#iron` on the mozilla irc.
+Come say hi and ask any questions you might have.
+We are also usually on `#rust` and `#rust-webdev`.
diff --git a/tests/packagedcode/data/package_summary/rust/router/src/router.rs b/tests/packagedcode/data/package_summary/rust/router/src/router.rs
new file mode 100644
index 00000000000..3fb5736384f
--- /dev/null
+++ b/tests/packagedcode/data/package_summary/rust/router/src/router.rs
@@ -0,0 +1,355 @@
+use std::collections::HashMap;
+use std::error::Error;
+use std::fmt;
+use std::sync::Arc;
+
+use iron::{Request, Response, Handler, IronResult, IronError};
+use iron::{StatusCode, method, Method, headers};
+use iron::typemap::Key;
+use iron::modifiers::Redirect;
+
+use recognizer::Router as Recognizer;
+use recognizer::{Match, Params};
+
+
+pub struct RouterInner {
+ // The routers, specialized by method.
+ pub routers: HashMap>>,
+ // Routes that accept any method.
+ pub wildcard: Recognizer>,
+ // Used in URL generation.
+ pub route_ids: HashMap
+}
+
+/// `Router` provides an interface for creating complex routes as middleware
+/// for the Iron framework.
+pub struct Router {
+ inner: Arc
+}
+
+impl Router {
+ /// Construct a new, empty `Router`.
+ ///
+ /// ```
+ /// # use router::Router;
+ /// let router = Router::new();
+ /// ```
+ pub fn new() -> Router {
+ Router {
+ inner: Arc::new(RouterInner {
+ routers: HashMap::new(),
+ wildcard: Recognizer::new(),
+ route_ids: HashMap::new()
+ })
+ }
+ }
+
+ fn mut_inner(&mut self) -> &mut RouterInner {
+ Arc::get_mut(&mut self.inner).expect("Cannot modify router at this point.")
+ }
+
+ /// Add a new route to a `Router`, matching both a method and glob pattern.
+ ///
+ /// `route` supports glob patterns: `*` for a single wildcard segment and
+ /// `:param` for matching storing that segment of the request url in the `Params`
+ /// object, which is stored in the request `extensions`.
+ ///
+ /// For instance, to route `Get` requests on any route matching
+ /// `/users/:userid/:friend` and store `userid` and `friend` in
+ /// the exposed Params object:
+ ///
+ /// ```ignore
+ /// let mut router = Router::new();
+ /// router.route(method::Get, "/users/:userid/:friendid", controller, "user_friend");
+ /// ```
+ ///
+ /// `route_id` is a unique name for your route, and is used when generating an URL with
+ /// `url_for`.
+ ///
+ /// The controller provided to route can be any `Handler`, which allows
+ /// extreme flexibility when handling routes. For instance, you could provide
+ /// a `Chain`, a `Handler`, which contains an authorization middleware and
+ /// a controller function, so that you can confirm that the request is
+ /// authorized for this route before handling it.
+ pub fn route, H: Handler, I: AsRef>(&mut self, method: method::Method, glob: S, handler: H, route_id: I) -> &mut Router {
+ self.mut_inner().routers
+ .entry(method)
+ .or_insert(Recognizer::new())
+ .add(glob.as_ref(), Box::new(handler));
+ self.route_id(route_id.as_ref(), glob.as_ref());
+ self
+ }
+
+ fn route_id(&mut self, id: &str, glob: &str) {
+ let inner = self.mut_inner();
+ let ref mut route_ids = inner.route_ids;
+
+ match route_ids.get(id) {
+ Some(other_glob) if glob != other_glob => panic!("Duplicate route_id: {}", id),
+ _ => ()
+ };
+
+ route_ids.insert(id.to_owned(), glob.to_owned());
+ }
+
+ /// Like route, but specialized to the `Get` method.
+ pub fn get, H: Handler, I: AsRef>(&mut self, glob: S, handler: H, route_id: I) -> &mut Router {
+ self.route(Method::GET, glob, handler, route_id)
+ }
+
+ /// Like route, but specialized to the `Post` method.
+ pub fn post, H: Handler, I: AsRef>(&mut self, glob: S, handler: H, route_id: I) -> &mut Router {
+ self.route(Method::POST, glob, handler, route_id)
+ }
+
+ /// Like route, but specialized to the `Put` method.
+ pub fn put, H: Handler, I: AsRef>(&mut self, glob: S, handler: H, route_id: I) -> &mut Router {
+ self.route(Method::PUT, glob, handler, route_id)
+ }
+
+ /// Like route, but specialized to the `Delete` method.
+ pub fn delete, H: Handler, I: AsRef>(&mut self, glob: S, handler: H, route_id: I) -> &mut Router {
+ self.route(Method::DELETE, glob, handler, route_id)
+ }
+
+ /// Like route, but specialized to the `Head` method.
+ pub fn head, H: Handler, I: AsRef>(&mut self, glob: S, handler: H, route_id: I) -> &mut Router {
+ self.route(Method::HEAD, glob, handler, route_id)
+ }
+
+ /// Like route, but specialized to the `Patch` method.
+ pub fn patch, H: Handler, I: AsRef>(&mut self, glob: S, handler: H, route_id: I) -> &mut Router {
+ self.route(Method::PATCH, glob, handler, route_id)
+ }
+
+ /// Like route, but specialized to the `Options` method.
+ pub fn options, H: Handler, I: AsRef>(&mut self, glob: S, handler: H, route_id: I) -> &mut Router {
+ self.route(Method::OPTIONS, glob, handler, route_id)
+ }
+
+ /// Route will match any method, including gibberish.
+ /// In case of ambiguity, handlers specific to methods will be preferred.
+ pub fn any, H: Handler, I: AsRef>(&mut self, glob: S, handler: H, route_id: I) -> &mut Router {
+ self.mut_inner().wildcard.add(glob.as_ref(), Box::new(handler));
+ self.route_id(route_id.as_ref(), glob.as_ref());
+ self
+ }
+
+ fn recognize(&self, method: &method::Method, path: &str)
+ -> Option>> {
+ self.inner.routers.get(method).and_then(|router| router.recognize(path).ok())
+ .or(self.inner.wildcard.recognize(path).ok())
+ }
+
+ fn handle_options(&self, path: &str) -> Response {
+ static METHODS: &'static [method::Method] =
+ &[Method::GET, Method::POST, Method::PUT,
+ Method::DELETE, Method::HEAD, Method::PATCH];
+
+ // Get all the available methods and return them.
+ let mut options = vec![];
+
+ for method in METHODS.iter() {
+ self.inner.routers.get(method).map(|router| {
+ if let Some(_) = router.recognize(path).ok() {
+ options.push(method.clone());
+ }
+ });
+ }
+ // If GET is there, HEAD is also there.
+ if options.contains(&Method::GET) && !options.contains(&Method::HEAD) {
+ options.push(Method::HEAD);
+ }
+
+ let mut res = Response::with(StatusCode::OK);
+ for option in options {
+ res.headers.append(headers::ALLOW, option.as_str().parse().unwrap());
+ }
+ res
+ }
+
+ // Tests for a match by adding or removing a trailing slash.
+ fn redirect_slash(&self, req : &Request) -> Option {
+ let mut url = req.url.clone();
+ let mut path = url.path().join("/");
+
+ if let Some(last_char) = path.chars().last() {
+ {
+ let mut path_segments = url.as_mut().path_segments_mut().unwrap();
+ if last_char == '/' {
+ // We didn't recognize anything without a trailing slash; try again with one appended.
+ path.pop();
+ path_segments.pop();
+ } else {
+ // We didn't recognize anything with a trailing slash; try again without it.
+ path.push('/');
+ path_segments.push("");
+ }
+ }
+ }
+
+ self.recognize(&req.method, &path).and(
+ Some(IronError::new(TrailingSlash,
+ (StatusCode::MOVED_PERMANENTLY, Redirect(url))))
+ )
+ }
+
+ fn handle_method(&self, req: &mut Request, path: &str) -> Option> {
+ if let Some(matched) = self.recognize(&req.method, path) {
+ req.extensions.insert::(matched.params);
+ req.extensions.insert::(self.inner.clone());
+ Some(matched.handler.handle(req))
+ } else { self.redirect_slash(req).and_then(|redirect| Some(Err(redirect))) }
+ }
+}
+
+impl Key for Router { type Value = Params; }
+
+impl Key for RouterInner { type Value = Arc; }
+
+impl Handler for Router {
+ fn handle(&self, req: &mut Request) -> IronResult {
+ let path = req.url.path().join("/");
+
+ self.handle_method(req, &path).unwrap_or_else(||
+ match req.method {
+ Method::OPTIONS => Ok(self.handle_options(&path)),
+ // For HEAD, fall back to GET. Hyper ensures no response body is written.
+ Method::HEAD => {
+ req.method = Method::GET;
+ self.handle_method(req, &path).unwrap_or(
+ Err(IronError::new(NoRoute, StatusCode::NOT_FOUND))
+ )
+ }
+ _ => Err(IronError::new(NoRoute, StatusCode::NOT_FOUND))
+ }
+ )
+ }
+}
+
+/// The error thrown by router if there is no matching route,
+/// it is always accompanied by a NotFound response.
+#[derive(Debug, PartialEq, Eq)]
+pub struct NoRoute;
+
+impl fmt::Display for NoRoute {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ f.write_str("No matching route found.")
+ }
+}
+
+impl Error for NoRoute {
+ fn description(&self) -> &str { "No Route" }
+}
+
+/// The error thrown by router if a request was redirected
+/// by adding or removing a trailing slash.
+#[derive(Debug, PartialEq, Eq)]
+pub struct TrailingSlash;
+
+impl fmt::Display for TrailingSlash {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ f.write_str("The request had a trailing slash.")
+ }
+}
+
+impl Error for TrailingSlash {
+ fn description(&self) -> &str { "Trailing Slash" }
+}
+
+#[cfg(test)]
+mod test {
+ use super::Router;
+ use iron::{headers, method, Method, StatusCode, Request, Response};
+
+ #[test]
+ fn test_handle_options_post() {
+ let mut router = Router::new();
+ router.post("/", |_: &mut Request| {
+ Ok(Response::with((StatusCode::OK, "")))
+ }, "");
+ let resp = router.handle_options("/");
+ let headers : Vec = resp.headers.get_all(headers::ALLOW).into_iter().map(|s| s.to_str().unwrap().parse().unwrap()).collect();
+ let expected = vec![Method::POST];
+ assert_eq!(expected, headers);
+ }
+
+ #[test]
+ fn test_handle_options_get_head() {
+ let mut router = Router::new();
+ router.get("/", |_: &mut Request| {
+ Ok(Response::with((StatusCode::OK, "")))
+ }, "");
+ let resp = router.handle_options("/");
+ let headers : Vec = resp.headers.get_all(headers::ALLOW).into_iter().map(|s| s.to_str().unwrap().parse().unwrap()).collect();
+ let expected = vec![method::Method::GET, method::Method::HEAD];
+ assert_eq!(expected, headers);
+ }
+
+ #[test]
+ fn test_handle_any_ok() {
+ let mut router = Router::new();
+ router.post("/post", |_: &mut Request| {
+ Ok(Response::with((StatusCode::OK, "")))
+ }, "");
+ router.any("/post", |_: &mut Request| {
+ Ok(Response::with((StatusCode::OK, "")))
+ }, "");
+ router.put("/post", |_: &mut Request| {
+ Ok(Response::with((StatusCode::OK, "")))
+ }, "");
+ router.any("/get", |_: &mut Request| {
+ Ok(Response::with((StatusCode::OK, "")))
+ }, "any");
+
+ assert!(router.recognize(&Method::GET, "/post").is_some());
+ assert!(router.recognize(&Method::GET, "/get").is_some());
+ }
+
+ #[test]
+ fn test_request() {
+ let mut router = Router::new();
+ router.post("/post", |_: &mut Request| {
+ Ok(Response::with((StatusCode::OK, "")))
+ }, "");
+ router.get("/post", |_: &mut Request| {
+ Ok(Response::with((StatusCode::OK, "")))
+ }, "");
+
+ assert!(router.recognize(&Method::POST, "/post").is_some());
+ assert!(router.recognize(&Method::GET, "/post").is_some());
+ assert!(router.recognize(&Method::PUT, "/post").is_none());
+ assert!(router.recognize(&Method::GET, "/post/").is_none());
+ }
+
+ #[test]
+ fn test_not_found() {
+ let mut router = Router::new();
+ router.put("/put", |_: &mut Request| {
+ Ok(Response::with((StatusCode::OK, "")))
+ }, "");
+ assert!(router.recognize(&Method::PATCH, "/patch").is_none());
+ }
+
+ #[test]
+ #[should_panic]
+ fn test_same_route_id() {
+ let mut router = Router::new();
+ router.put("/put", |_: &mut Request| {
+ Ok(Response::with((StatusCode::OK, "")))
+ }, "my_route_id");
+ router.get("/get", |_: &mut Request| {
+ Ok(Response::with((StatusCode::OK, "")))
+ }, "my_route_id");
+ }
+
+ #[test]
+ fn test_wildcard_regression() {
+ let mut router = Router::new();
+ router.options("*", |_: &mut Request| Ok(Response::with((StatusCode::OK, ""))), "id1");
+ router.put("/upload/*filename", |_: &mut Request| Ok(Response::with((StatusCode::OK, ""))), "id2");
+ assert!(router.recognize(&Method::OPTIONS, "/foo").is_some());
+ assert!(router.recognize(&Method::PUT, "/foo").is_none());
+ assert!(router.recognize(&Method::PUT, "/upload/foo").is_some());
+ }
+}
diff --git a/tests/packagedcode/test_package_summary.py b/tests/packagedcode/test_package_summary.py
new file mode 100644
index 00000000000..9fc7b0450e9
--- /dev/null
+++ b/tests/packagedcode/test_package_summary.py
@@ -0,0 +1,58 @@
+import os
+from packages_test_utils import PackageTester
+from scancode.cli_test_utils import check_json_scan
+from scancode.cli_test_utils import run_scan_click
+from scancode_config import REGEN_TEST_FIXTURES
+
+class TestPackageSummary(PackageTester):
+ test_data_dir = os.path.join(os.path.dirname(__file__), 'data')
+
+ def test_if_package_summary_plugin_working(self):
+ test_dir = self.get_test_loc('package_summary/plugin_package_summary')
+ result_file = self.get_temp_file('json')
+ expected_file = self.get_test_loc('package_summary/plugin_package_summary-expected.json')
+
+ run_scan_click(['--package', '--classify', '--package-summary', test_dir, '--json', result_file])
+ check_json_scan(expected_file, result_file, remove_uuid=True, regen=REGEN_TEST_FIXTURES)
+
+ def test_package_summary_for_python_whl(self):
+ test_dir = self.get_test_loc('package_summary/python_whl')
+ result_file = self.get_temp_file('json')
+ expected_file = self.get_test_loc('package_summary/python_whl-expected.json')
+
+ run_scan_click(['--package','--license','--copyright', '--strip-root', '--processes', '-1', '--package-summary', '--summary' , '--classify', '--json-pp', result_file, test_dir])
+ check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES)
+
+ def test_package_summary_for_npm(self):
+ test_dir = self.get_test_loc('package_summary/npm')
+ result_file = self.get_temp_file('json')
+ expected_file = self.get_test_loc('package_summary/npm-expected.json')
+
+ run_scan_click(['--package','--license','--copyright', '--strip-root', '--processes', '-1', '--package-summary', '--summary' , '--classify', '--json-pp', result_file, test_dir])
+ check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES)
+
+ def test_package_summary_for_rubygems(self):
+ test_dir = self.get_test_loc('package_summary/rubygems')
+ result_file = self.get_temp_file('json')
+ expected_file = self.get_test_loc('package_summary/rubygems-expected.json')
+
+ run_scan_click(['--package','--license','--copyright', '--strip-root', '--processes', '-1', '--package-summary', '--summary' , '--classify', '--json-pp', result_file, test_dir])
+ check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES)
+
+ def test_package_summary_for_rust(self):
+ test_dir = self.get_test_loc('package_summary/rust')
+ result_file = self.get_temp_file('json')
+ expected_file = self.get_test_loc('package_summary/rust-expected.json')
+
+ run_scan_click(['--package','--license','--copyright', '--strip-root', '--processes', '-1', '--package-summary', '--summary' , '--classify', '--json-pp', result_file, test_dir])
+ check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES)
+
+ # # Package Attribute tests
+ # def test_package_summary__does_summarize_npm_copyright(self):
+ # test_dir = self.get_test_loc('package_summary/npm_copyright')
+ # result_file = self.get_temp_file('json')
+ # expected_file = self.get_test_loc('package_summary/npm_copyrightexpected.json')
+
+ # run_scan_click(['--package','--license','--copyright', '--strip-root', '--processes', '-1', '--package-summary', '--classify', '--json-pp', result_file, test_dir])
+ # check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES)
+
\ No newline at end of file
diff --git a/tests/packagedcode/test_plugin_package.py b/tests/packagedcode/test_plugin_package.py
index 2594b4fbd64..b5912dcf50c 100644
--- a/tests/packagedcode/test_plugin_package.py
+++ b/tests/packagedcode/test_plugin_package.py
@@ -126,7 +126,7 @@ def test_package_command_scan_phpcomposer(self):
expected_file = self.get_test_loc('plugin/phpcomposer-package-expected.json')
run_scan_click(['--package', '--strip-root', '--processes', '-1', test_dir, '--json', result_file])
check_json_scan(expected_file, result_file, remove_uuid=True, regen=REGEN_TEST_FIXTURES)
-
+
@skipIf(on_windows, 'somehow this fails on Windows')
def test_package_command_scan_python(self):
test_dir = self.get_test_loc('recon/pypi')
diff --git a/tests/scancode/data/help/help.txt b/tests/scancode/data/help/help.txt
index 6def63b8893..9bcb3ebe8f7 100644
--- a/tests/scancode/data/help/help.txt
+++ b/tests/scancode/data/help/help.txt
@@ -114,6 +114,10 @@ Options:
contain over 90% of source files as children and
descendants. Count the number of source files in a
directory as a new source_file_counts attribute
+ --package-summary Summarize scans by providing License Clarity Score
+ and populating other license/copyright attributes for
+ package instances from their key files and other
+ files.
--summary Summarize scans by providing declared origin
information and other detected origin info at the
codebase attribute level.