Artifactory-Client
view release on metacpan or search on metacpan
0.3.0 2014/6/2
Added build_artifacts_search, get_users, get_user_details, create_or_replace_user, update_user
0.2.4 2014/5/30
Added artifact_latest_version_search_based_on_layout, artifact_latest_version_search_based_on_properties
0.2.3 2014/5/29
Added artifacts_created_in_range, pattern_search, builds_for_dependency, license_search, artifact_version_search
0.2.2 2014/5/28
Added gavc_search, property_search, checksum_search, bad_checksum_search, artifacts_not_downloaded_since
0.2.1 2014/5/27
Added archive_entry_search API call
0.2.0 2014/5/27
Added delete_repository_replication_configuration, push_pull_replication, file_list, artifact_search
0.1.22 2014/5/22
Added update_repository_replication_configuration API call
lib/Artifactory/Client.pm view on Meta::CPAN
Find all artifacts that have a bad or missing client checksum values (md5 or
sha1)
=cut
sub bad_checksum_search {
my ( $self, %args ) = @_;
return $self->_handle_search_props( 'badChecksum', %args );
}
=head2 artifacts_not_downloaded_since( notUsedSince => 12345, createdBefore => 12345, repos => [ 'repo1', 'repo2' ] )
Retrieve all artifacts not downloaded since the specified Java epoch in msec.
=cut
sub artifacts_not_downloaded_since {
my ( $self, %args ) = @_;
return $self->_handle_search_props( 'usage', %args );
}
=head2 artifacts_with_date_in_date_range( from => 12345, repos => [ 'repo1', 'repo2' ], dateFields => [ 'created' ] )
Get all artifacts with specified dates within the given range. Search can be limited to specific repositories (local or
caches).
=cut
t/01_unit.t view on Meta::CPAN
)
},
'HTTP::Response'
);
};
my $resp = $client->bad_checksum_search(%args);
my $url_in_response = $resp->request->uri;
like( $url_in_response, qr|/api/search/badChecksum|, 'requsted URL looks sane' );
};
subtest 'artifacts_not_downloaded_since', sub {
my $client = setup();
my %args = (
notUsedSince => 12345,
createdBefore => 12345,
repos => [ 'repo', 'abc' ],
);
local *{'LWP::UserAgent::get'} = sub {
return bless(
{
t/01_unit.t view on Meta::CPAN
'_uri' => bless(
do { \( my $o = "http://example.com:7777/artifactory/api/search/usage" ) }, 'URI::http'
),
},
'HTTP::Request'
)
},
'HTTP::Response'
);
};
my $resp = $client->artifacts_not_downloaded_since(%args);
my $url_in_response = $resp->request->uri;
like( $url_in_response, qr|/api/search/usage|, 'requsted URL looks sane' );
};
subtest 'artifacts_with_date_in_date_range', sub {
my $client = setup();
my %args = (
from => 12345,
repos => [ 'repo1', 'repo2' ],
dateFields => [ 'created', 'lastModified', 'lastDownloaded' ],
( run in 1.220 second using v1.01-cache-2.11-cpan-cc502c75498 )