Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
344 commits
Select commit Hold shift + click to select a range
99f92b3
Create a doc directory for, you know, docs.
oalders Apr 20, 2015
7af5e9e
Move file from doc to docs folder.
oalders Apr 20, 2015
7da6224
Replace quotes in find_download_url()
oalders Apr 20, 2015
3adf84f
Partially fix download_url tests.
oalders Apr 20, 2015
34f5bfb
Run download tests as part of fakepan tests.
oalders Apr 20, 2015
1f88770
SKIP download tests for now.
oalders Apr 20, 2015
fa2d496
Bumps ElasticSearchX::Model to 0.2.1
oalders Apr 25, 2015
b15e2c6
Don't clobber the imported run_tests() function.
oalders Apr 25, 2015
f914128
Remove accidentally committed debugging info.
oalders Apr 25, 2015
80269c1
Use Devel::Confess to try to troubleshoot Travis errors.
oalders Apr 25, 2015
8571b5b
Switch mirror.contact from ArrayRef to Dict.
oalders May 2, 2015
33fa10a
s/refresh_index/refresh/
oalders May 2, 2015
bbd2107
Optionally refresh cpantesters even if file hasn't changed.
oalders May 2, 2015
a672dd1
Don't redefine in CPANTesters script.
oalders May 2, 2015
04505a2
s/force_refresh/skip_download/
oalders May 2, 2015
01e706f
Mostly working cpantesters import.
oalders May 3, 2015
2a7f882
Adds index_cpantesters() to MetaCPAN::TestServer.
oalders Aug 19, 2015
ae81240
Set minimum version of Search::Elasticsearch to 2.00
oalders Nov 9, 2015
68719b5
Update Catalyst, Data::Printer, Email::Valid
oalders Nov 11, 2015
8482957
Update es_client's isa in MetaCPAN::TestServer.
oalders Nov 11, 2015
aab1b75
Fix rebase error in release/badpod.t
oalders Nov 11, 2015
9b8fb0e
Temporarily comment out some stash interactions.
oalders Nov 11, 2015
9e0145d
s/JSON::XS/Cpanel::JSON::XS/
oalders Nov 11, 2015
3e358f6
Tidy
oalders Nov 11, 2015
590a01f
Revert "s/JSON::XS/Cpanel::JSON::XS/"
oalders Nov 11, 2015
60ba726
s/JSON::XS/Cpanel::JSON::XS/ in View::JSON
oalders Nov 11, 2015
720b9c2
Try to install ES 2.0 on Travis.
oalders Nov 11, 2015
7097777
Updates cpanfile.snapshot
oalders Feb 18, 2016
ff0b211
cleanup MetaCPAN::Script::Author
mickeyn Mar 15, 2016
b93d272
cleanup unused method
mickeyn Mar 15, 2016
18b2e15
fix warning
mickeyn Mar 15, 2016
0d65dc7
cpanfile: matching versions with 'master'
mickeyn Mar 17, 2016
7cb391c
ua: allow proxy use if set in env
mickeyn Mar 30, 2016
d05523b
Adapt PUT info for compatability.
mickeyn Mar 31, 2016
f95d1f6
ES2.3 updates
mickeyn Apr 4, 2016
2eb7a77
`scroll_helper`: wrap `query` in `body`
mickeyn Apr 8, 2016
97c61e0
fix scripts injection
mickeyn Apr 11, 2016
992cb30
move scripts to server-side files
mickeyn Apr 13, 2016
a91bf58
point cpanfile to latest ElasticSearchX::Model version
mickeyn Apr 13, 2016
acb20b5
Merge pull request #445 from mickeyn/mickey/es_2_3
oalders Apr 14, 2016
d2c3010
Merge branch 'master' into mi/es2
oalders Apr 16, 2016
40c6843
Adds t/lib to path in bin/prove.
oalders Apr 16, 2016
99e49ec
Updates deps.
oalders Apr 16, 2016
eaf2eba
Replace lazy_build in release model.
oalders Apr 17, 2016
6ab3be4
Fix some ordering issues (deep recursion) in Release model.
oalders Apr 17, 2016
3dd4d7b
Tidy.
oalders Apr 17, 2016
afa6dd4
Debug Travis module installs.
oalders Apr 17, 2016
8d17d46
Downgrades ExtUtils::HasCompiler to 0.012
oalders Apr 17, 2016
258989c
attribute not used since #d9d9bdb6
mickeyn Apr 15, 2016
46edaea
esx_model is used in BUILD... can be default
mickeyn Apr 15, 2016
3ddea80
lazy_build --> lazy + builder (+ tidy)
mickeyn Apr 15, 2016
d4499c2
slop: a WIP solution
mickeyn Apr 15, 2016
c6bdefa
don't seem to be used
mickeyn Apr 16, 2016
bb2971e
cleanup
mickeyn Apr 17, 2016
1a7a689
Revert "esx_model is used in BUILD... can be default"
mickeyn Apr 17, 2016
259f6ef
esx_model: lazy + builder
mickeyn Apr 17, 2016
9e491b8
use MetaCPAN::Types
mickeyn Apr 18, 2016
281b31f
Merge pull request #451 from CPAN-API/mickey/es2_no_lazy_build
oalders Apr 18, 2016
1309584
s/after_script/after_failure/
oalders Apr 17, 2016
ba80a80
fix provides data in snapshot
haarg Apr 18, 2016
deb2ee3
Adds basic docs on logger config.
oalders Apr 1, 2016
1fde2f7
Adds a role for building a config.
oalders Apr 18, 2016
6d61005
Get minion DSN from config file.
oalders Apr 18, 2016
57dc4f2
Use HasConfig role in Script role.
oalders Apr 18, 2016
a451b95
Tidy
oalders Apr 21, 2016
1661592
Adds Test::Vars to cpanfile.
oalders Apr 21, 2016
c22ac05
Upgrades Search::Elasticsearch to 2.02
oalders Apr 21, 2016
615af97
Wrap call to _es_home with try/catch block.
oalders Apr 21, 2016
51327c6
Tweak es_client building in test suite.
oalders Apr 21, 2016
e431f05
WIP: Types cleanup
mickeyn Apr 19, 2016
3869113
removed redundant `required => 0`
mickeyn Apr 19, 2016
11e2ab3
unused predicates
mickeyn Apr 19, 2016
8154088
no rw attributes
mickeyn Apr 19, 2016
8a913f3
added missing module for test
mickeyn Apr 21, 2016
1a7e606
Merge pull request #453 from CPAN-API/mickey/es2_types_cleanup
mickeyn Apr 21, 2016
6077bf3
few more fixes for problems exposed by tests
mickeyn Apr 21, 2016
86543a4
Default prove wrapper to use test ES port.
oalders Apr 21, 2016
4c18905
Adds setup method to TestServer.pm
oalders Apr 21, 2016
809227f
Updates cpanfile.snapshot
oalders Apr 21, 2016
a337324
missing 1
mickeyn Apr 21, 2016
cb78d01
Adds docs for dependency management.
oalders Apr 21, 2016
b5d7ecd
Allow explicit undef in return.
oalders Apr 21, 2016
21cf54a
Move MetaCPAN::Document::File::Set out of inner package.
oalders Apr 21, 2016
cf7e497
Adds basic docs about user authentication.
oalders Apr 21, 2016
383efec
Comment out after_failure in Travis config.
oalders Apr 21, 2016
bfffc9d
Tidy
oalders Apr 21, 2016
98c240c
s/carton-exec/run/
oalders Apr 21, 2016
24b9215
bulk_index no work, use bulk_helper instead
ranguard Apr 21, 2016
f971482
Merge pull request #454 from CPAN-API/leo/switch_builk_to_new_es
oalders Apr 21, 2016
792c441
Upgrades ESX::Model to 1.0.1
oalders Apr 21, 2016
709cfc5
fixup tickets script, skip SSL verify and add pod
ranguard Apr 21, 2016
5f3d4fc
fix test for parsing POD errors
mickeyn Apr 21, 2016
4134c89
make perlcritic config less... critical
ranguard Apr 21, 2016
93ae2cf
convert ratings to bulk_helper
ranguard Apr 21, 2016
44fb92d
Merge pull request #456 from CPAN-API/leo/make_scripts_work
oalders Apr 21, 2016
0452ae9
switch sesson script to new ES bulk_helper
ranguard Apr 22, 2016
f95d58c
Merge pull request #457 from CPAN-API/leo/convert_session
oalders Apr 22, 2016
43551cf
strip out invalid lat/lon values
ranguard Apr 22, 2016
618607e
Merge pull request #459 from CPAN-API/leo/cleanup_auth_data
oalders Apr 22, 2016
366764c
removed content_cb: not really used, no point in having lazy content
mickeyn Apr 22, 2016
0e28172
some attributes should be 'required' to get indexed
mickeyn Apr 22, 2016
e6043f7
test fixes
mickeyn Apr 22, 2016
f57b47b
names and types cleanup
mickeyn Apr 23, 2016
53dd022
refactoring import_archive
mickeyn Apr 23, 2016
6859a16
fix test: release/packages
mickeyn Apr 23, 2016
2a5c76e
Upgrade ESX::Model.
oalders Apr 23, 2016
dbc1a71
untangle `abstract` and `document` builders.
mickeyn Apr 23, 2016
9cf86b3
Fixes some quotes.
oalders Apr 23, 2016
f20a101
Use ternary rather than 2 returns.
oalders Apr 23, 2016
7b2c1ee
test fix: document setting logic is correct
mickeyn Apr 23, 2016
35b6ba5
attribute corrections for documents
mickeyn Apr 23, 2016
61ca678
set_associated_pod() no longer wants a $file
oalders Apr 23, 2016
6da9aa9
ValuesAndExpressions::ProhibitAccessOfPrivateData has false positives.
oalders Apr 23, 2016
b2264f7
we suspect this is just wrong
mickeyn Apr 23, 2016
37fa67e
only use Cpanel::JSON::XS
mickeyn Apr 23, 2016
309718e
fix test document/module
mickeyn Apr 23, 2016
1b1d79d
fix test release/badpod
mickeyn Apr 23, 2016
9ff78d7
fix test release/packages-unclaimable
mickeyn Apr 23, 2016
40e129c
fix test release/no-modules
mickeyn Apr 23, 2016
3d91364
fix test release/no-packages
mickeyn Apr 23, 2016
04f4733
fixes few tests
mickeyn Apr 23, 2016
e0d2e9d
some missed changes to Cpanel::JSON::XS
mickeyn Apr 23, 2016
3e38047
Document how to get Minion job and worker stats.
oalders Apr 23, 2016
873522e
Added script which fetches and indexes river data
jberger Apr 23, 2016
2015015
Merge pull request #462 from CPAN-API/import_river_data
oalders Apr 24, 2016
05b54c4
Adds MetaCPAN::Moose to cpanfile
oalders Apr 23, 2016
52a83c9
fix test release/binary-data
mickeyn Apr 23, 2016
cd44d6a
query fixes
mickeyn Apr 24, 2016
cc3e519
underlying module needs this ENV setting
mickeyn Apr 24, 2016
8a839eb
correct 'indexed' field for all files in archive
mickeyn Apr 24, 2016
76ef8f2
Try to have Travis use Elasticsearch 2.3.0
oalders Apr 24, 2016
56901b5
Adds minimal docs about indexing.
oalders Apr 24, 2016
84f2ae2
Revert "Try to have Travis use Elasticsearch 2.3.0"
oalders Apr 24, 2016
12ad29e
Revert "Revert "Try to have Travis use Elasticsearch 2.3.0""
oalders Apr 24, 2016
cc74ce6
Follow redirects when having Travis download Elasticsearch deb.
oalders Apr 24, 2016
3d9c499
fix test release/file-duplicates
mickeyn Apr 24, 2016
8d81773
do not index files in 'no_index' directories
mickeyn Apr 24, 2016
04c1c80
Stop Elasticsearch on Travis before trying to install a deb.
oalders Apr 24, 2016
e0f09d6
fix test release/documentation-hide
mickeyn Apr 24, 2016
e0362f2
cleanup a TODO related to indexing a first release
jberger Apr 24, 2016
38380e6
Revert "cleanup a TODO related to indexing a first release"
mickeyn Apr 24, 2016
ef67526
Adds Ref::Util to cpanfile.
oalders Apr 24, 2016
0e06af0
document tests() attribute.
oalders Apr 24, 2016
aaa0f71
Use checkout_root() to find home dir.
oalders Apr 24, 2016
55dd140
Fix CPANTesters database importing under test.
oalders Apr 24, 2016
d8bfb3c
No longer any need for forking in release indexer.
oalders Apr 24, 2016
823ed38
Ensure tests always try to index CPANTesters data.
oalders Apr 24, 2016
685be59
Tidy p-1 test.
oalders Apr 24, 2016
cabe27a
Stop using Test::Aggregate
oalders Apr 24, 2016
6fc0e45
I don't think we need t/helpers.t anymore.
oalders Apr 24, 2016
045cd33
More post Test::Aggregate tweaks.
oalders Apr 24, 2016
41ec7c1
don't index packages in no_index
mickeyn Apr 24, 2016
f4f66e4
WIP: few fixes to tests
mickeyn Apr 24, 2016
9d24cc2
Tidy
oalders Apr 24, 2016
94798eb
Keep test data out of t directory.
oalders Apr 25, 2016
c57b6ec
Run tests recursively.
oalders Apr 25, 2016
01252b7
Use /tmp for temp files under Travis.
oalders Apr 25, 2016
e2f1703
Have Travis add t/lib to @INC
oalders Apr 25, 2016
9643c87
fix warnings for some author json files
mickeyn Apr 25, 2016
52d4df2
improved documentation fetching logic + fixed test
mickeyn Apr 25, 2016
0d96c27
fix test release/file-changes
mickeyn Apr 26, 2016
f99af5a
fix test release/pod-with-data-token
mickeyn Apr 26, 2016
5be65b4
fix test release/pod-with-generator
mickeyn Apr 26, 2016
fddb2d2
fix test release/prefer-meta-json
mickeyn Apr 26, 2016
9af01ef
Removes reference to unused module.
oalders Apr 26, 2016
3e1b2f2
force mime builder to have it put correctly in ES (debugging WIP)
mickeyn Apr 26, 2016
fd27271
Cleanup PC policy, fix mirrors to delete first #463
ranguard Apr 26, 2016
20ea9e2
fixed typo
mickeyn Apr 26, 2016
5ded775
fix test release/text-tabs-wrap
mickeyn Apr 26, 2016
dd45f61
set indexed for modules in explicit 'provides' list
mickeyn Apr 26, 2016
f669650
fix test release/file-duplicates
mickeyn Apr 26, 2016
549d2d3
fix test query (bool filter was replaced with bool query)
mickeyn Apr 26, 2016
c34ae31
use scratch disk if it exists
ranguard Apr 27, 2016
463a18d
Merge pull request #465 from CPAN-API/leo/use_scratch
oalders Apr 28, 2016
acf8fc3
Stop special-casing Travis tmp dir.
oalders Apr 28, 2016
c17d9e3
Use different path for release script under test harness.
oalders Apr 28, 2016
cb35849
Fixes hardcoded path used in test env.
oalders Apr 28, 2016
264dcf0
Tidies Document::File::Set
oalders Apr 28, 2016
541fb7f
s/file\.date/date/
oalders Apr 28, 2016
f524050
Fix test path for opening cpantesters.db
oalders Apr 29, 2016
4d357e4
Fixes truth test in t/release/weblint++-1.15.t
oalders Apr 29, 2016
171368c
Fix truth tests in t/release/www-tumblr-0.t
oalders Apr 29, 2016
266f5ae
fix some more queries + tidy
mickeyn Apr 29, 2016
68f291a
fix test server/controller/search/reverse_dependencies
mickeyn Apr 29, 2016
82dbd65
set indexed for provided modules (as checked), not the file
mickeyn Apr 29, 2016
6087f98
corrected queries
mickeyn Apr 29, 2016
8a7d9c5
Ensure METACPAN_SERVER_CONFIG_LOCAL_SUFFIX is set on Travis and in lo…
oalders Apr 29, 2016
fc12b19
Fixes path to fixture cpantesters data.
oalders Apr 30, 2016
ca63dab
query cleanups
mickeyn Apr 29, 2016
e4af04d
Destroy and recreate tmp dir on each test setup run.
oalders May 1, 2016
6f01dfb
Remove some debugging from CPANTesters test.
oalders May 1, 2016
a46c49b
tidy
mickeyn Apr 30, 2016
e972150
fix query
mickeyn May 1, 2016
516d679
accept gzipped river data
jberger Apr 30, 2016
4b168df
use neilb's actual url for river data
jberger May 1, 2016
bf1028a
a couple of test fixes
mickeyn May 3, 2016
5f8005e
Moves MetaCPAN::Server::Test to t/lib
oalders May 4, 2016
9226ca2
Be specific about imports in river.t
oalders May 4, 2016
2ff9758
Rework river test logic.
oalders May 4, 2016
e4c856e
Don't use q{} in Path component of Catalyst routes. haarg++
oalders May 4, 2016
6d8a097
correct the autocomplete query + test (WIP, see #470)
mickeyn May 4, 2016
bed83eb
fixed missing 'level' value + test t/server/controller/changes.t
mickeyn May 4, 2016
4e8982f
fix test t/script/queue.t
mickeyn May 4, 2016
e03447d
Add more test descriptions to Util tests.
oalders May 5, 2016
dc9c05f
Import extract_section in Util tests.
oalders May 5, 2016
4c41513
numify_version already returns 0 if version isn't a true value.
oalders May 5, 2016
8631fa1
Explicitly import catch/try.
oalders May 5, 2016
7dcdf8c
Make version default more succinct.
oalders May 5, 2016
fcf3166
Move version_numified from builder to default.
oalders May 5, 2016
47349eb
Merge pull request #464 from CPAN-API/leo/cleanup_mirrors
oalders May 5, 2016
9513146
Merge pull request #468 from CPAN-API/encoded_river
oalders May 5, 2016
5e86fe1
Bumps version of Code::TidyAll.
oalders May 5, 2016
892cebf
fix 'first' setting
mickeyn May 5, 2016
f7fd585
use match_phrase. fix test release/moose
mickeyn May 5, 2016
502525a
fix test t/server/controller/author.t
mickeyn May 5, 2016
d92ad01
Possibly temporary fix to versions in CPANTesters import.
oalders May 5, 2016
3c0c4eb
Revert "Possibly temporary fix to versions in CPANTesters import."
oalders May 5, 2016
7bd8d01
drop invalid author lat/lon info
ranguard May 5, 2016
a41f506
Merge pull request #472 from CPAN-API/leo/drop_duff_author_geo_info
oalders May 5, 2016
810a462
Validate author info is correct format
ranguard May 5, 2016
05d7afe
Merge pull request #473 from CPAN-API/leo/make_author_stricter
oalders May 5, 2016
44f146a
Revert "Revert "Possibly temporary fix to versions in CPANTesters imp…
oalders May 5, 2016
2031c63
Don't perform regex on undef value.
oalders May 5, 2016
0aa1b74
Minor cleanup.
oalders May 5, 2016
9fe8662
CPANTesters script needs to search on the release type, not _every_ t…
oalders May 6, 2016
8fe1967
Don't alter the version when checking it.
oalders May 6, 2016
c47dad6
s/bulk/insert_ok/
oalders May 6, 2016
1488c64
You can now index a single release when testing.
oalders May 6, 2016
a72cd2f
Not every user is an author.
oalders May 6, 2016
a832cf8
Only prepare user test data once.
oalders May 6, 2016
2793c67
Remove debugging.
oalders May 6, 2016
08ba3b8
add asciiname to the author index
mickeyn May 6, 2016
340bac6
allow empty asciiname for author so all records get into ES
mickeyn May 6, 2016
5d617ae
prevent race-condition for 'first' setting in testing mode
mickeyn May 6, 2016
8e55db0
make it less warny
mickeyn May 6, 2016
e87aca6
rework set_first_release + add first script to tests
mickeyn May 6, 2016
da9118c
Merge pull request #474 from CPAN-API/mickey/rework_set_first
oalders May 6, 2016
de142a2
Add a UA string to river script so that NEILB's web server doesn't re…
oalders May 6, 2016
f00fc15
version restriction is not needed
mickeyn May 8, 2016
a047d09
CPANTesters db returns an empty string rather than 0 for versions.
oalders May 10, 2016
a7b0856
Strip some characters from versions before looking up dists for CPANT…
oalders May 10, 2016
5e07e65
SKIP testers data check in ipsonar-0.29.t
oalders May 11, 2016
0cb3978
call prepare_user_test_data directly from the setup test
mickeyn May 11, 2016
669630f
Account: fix queries
mickeyn May 11, 2016
161c986
fix test server/controller/user/favorite
mickeyn May 11, 2016
5f0142b
add missing writer
mickeyn May 11, 2016
6c384f1
looks_human -> required (to force build when creating the user object)
mickeyn May 11, 2016
fc3666b
fix warning
mickeyn May 12, 2016
d63af5b
add a script for munin to use to monitor the queue
ranguard May 13, 2016
d418ccb
add warnings to queue results
mickeyn May 13, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*.sqlite*
/var
/t/var/tmp/
/t/var/darkpan/
/t/var/log/
/etc/metacpan_local.pl
metacpan_server_local.conf

Expand Down
6 changes: 4 additions & 2 deletions .perlcriticrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ verbose = 11
[-RegularExpressions::RequireDotMatchAnything]
[-RegularExpressions::RequireExtendedFormatting]
[-RegularExpressions::RequireLineBoundaryMatching]
[-Subroutines::ProhibitExplicitReturnUndef]
[-ValuesAndExpressions::ProhibitNoisyQuotes]
[-Variables::ProhibitPunctuationVars]

[CodeLayout::RequireTrailingCommas]
severity = 4

[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Test::Routine Mojo::Base
equivalent_modules = MetaCPAN::Moose Mojo::Base Test::Routine

[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Test::Routine Mojo::Base
equivalent_modules = MetaCPAN::Moose Mojo::Base Test::Routine

[ValuesAndExpressions::ProhibitEmptyQuotes]
severity = 4
Expand Down
53 changes: 53 additions & 0 deletions .tidyallrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,56 @@ select = bin/daemon-control.pl
select = app.psgi
ignore = t/var/**/*
argv = --profile=$ROOT/.perltidyrc

[PerlCritic]
select = {lib,t}/**/*.{pl,pm,t,psgi}
ignore = t/var/**/*
ignore = bin/build_test_CPAN_dir.pl
ignore = bin/check_json.pl
ignore = bin/convert_authors.pl
ignore = bin/get_fields.pl
ignore = bin/mirror_cpan_for_developers.pl
ignore = bin/unlisted_prereqs.pl
ignore = bin/write_config_json
ignore = lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm
ignore = lib/Catalyst/Authentication/Store/Proxy.pm
ignore = lib/Catalyst/Plugin/OAuth2/Provider.pm
ignore = lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm
ignore = lib/MetaCPAN/Document/Distribution.pm
ignore = lib/MetaCPAN/Document/File.pm
ignore = lib/MetaCPAN/Document/Rating.pm
ignore = lib/MetaCPAN/Document/Release.pm
ignore = lib/MetaCPAN/Model.pm
ignore = lib/MetaCPAN/Pod/XHTML.pm
ignore = lib/MetaCPAN/Role/Common.pm
ignore = lib/MetaCPAN/Script/Author.pm
ignore = lib/MetaCPAN/Script/Backup.pm
ignore = lib/MetaCPAN/Script/CPANTesters.pm
ignore = lib/MetaCPAN/Script/Check.pm
ignore = lib/MetaCPAN/Script/First.pm
ignore = lib/MetaCPAN/Script/Latest.pm
ignore = lib/MetaCPAN/Script/Mapping.pm
ignore = lib/MetaCPAN/Script/Pagerank.pm
ignore = lib/MetaCPAN/Script/PerlMongers.pm
ignore = lib/MetaCPAN/Script/Query.pm
ignore = lib/MetaCPAN/Script/ReindexDist.pm
ignore = lib/MetaCPAN/Script/Release.pm
ignore = lib/MetaCPAN/Script/Runner.pm
ignore = lib/MetaCPAN/Script/Tickets.pm
ignore = lib/MetaCPAN/Script/Watcher.pm
ignore = lib/MetaCPAN/Server/Controller.pm
ignore = lib/MetaCPAN/Server/Controller/Changes.pm
ignore = lib/MetaCPAN/Server/Controller/File.pm
ignore = lib/MetaCPAN/Server/Controller/Login.pm
ignore = lib/MetaCPAN/Server/Controller/Login/PAUSE.pm
ignore = lib/MetaCPAN/Server/Controller/Login/Twitter.pm
ignore = lib/MetaCPAN/Server/Controller/Root.pm
ignore = lib/MetaCPAN/Server/Controller/Search/Autocomplete.pm
ignore = lib/MetaCPAN/Server/Controller/Source.pm
ignore = lib/MetaCPAN/Server/Controller/User/Favorite.pm
ignore = lib/MetaCPAN/Server/Model/CPAN.pm
ignore = lib/MetaCPAN/Server/Model/Source.pm
ignore = lib/MetaCPAN/Server/View/JSON.pm
ignore = lib/MetaCPAN/Server/View/Pod.pm
ignore = lib/MetaCPAN/Util.pm
ignore = lib/Plack/Session/Store/ElasticSearch.pm
21 changes: 11 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,28 @@ notifications:
on_failure: always
irc: "irc.perl.org#metacpan-travis"


env:
global:
# We use a non-standard port to avoid trashing production
# but travis will have it running on the standard port.
- METACPAN_ES_TEST_PORT=9200
- ES=localhost:9200
# Carton --deployment only works on the same version of perl
# that the snapshot was built from.
- DEPLOYMENT_PERL_VERSION=5.18

# Instantiate Catalyst models using metacpan_server_testing.conf
- METACPAN_SERVER_CONFIG_LOCAL_SUFFIX=testing


before_install:
- sudo service elasticsearch stop && curl -O -L https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-2.3.0.deb && sudo dpkg -i --force-confnew elasticsearch-2.3.0.deb && sudo service elasticsearch start

# Run update to make libgmp-dev findable (Required by Net::OpenID::Consumer)
# postgresql-server-dev-all is required by DBD::Pg
- sudo apt-get update
- sudo apt-get install libgmp-dev postgresql-server-dev-all

# We need to run a pre-1.0 instance of ES until we update everything.
- wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.13.deb
- sudo dpkg -i --force-confdef elasticsearch-0.90.13.deb
- sudo service elasticsearch restart
- pwd

- cpanm -n Devel::Cover::Report::Coveralls
- cpanm -n Carton
Expand All @@ -50,19 +51,19 @@ install:
- 'carton install `test "${TRAVIS_PERL_VERSION}" = "${DEPLOYMENT_PERL_VERSION}" && echo " --deployment"`'

before_script:
# Show status info for ES to verify that it's working, what version, etc.
- "curl http://localhost:${METACPAN_ES_TEST_PORT}/"
- "perl -i -pe 's/(servers :)9900/$1$ENV{METACPAN_ES_TEST_PORT}/' metacpan_server_testing.conf"
- "perl -i -pe 's/(servers :)9900/localhost:9200/' metacpan_server_testing.conf"

script:
# Devel::Cover isn't in the cpanfile
# but if it's installed into the global dirs this should work.
# NOTE: No '-r' for prove; 't/fakecpan.t' does the recursion for us.
- HARNESS_PERL_SWITCHES=-MDevel::Cover=+ignore,local carton exec prove -lv t
- HARNESS_PERL_SWITCHES=-MDevel::Cover=+ignore,local carton exec prove -It/lib -lvr t

after_success:
- cover -report coveralls

#after_failure:
# - cat ~/.cpanm/build.log

services:
- elasticsearch
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,31 +66,31 @@ The test suite has to pass all tests.
## Create the ElasticSearch Index

```sh
./bin/carton-exec bin/metacpan mapping --delete
./bin/run bin/metacpan mapping --delete
```

`--delete` will drop all indices first to clear the index from test data.

## Begin Indexing Your Modules

```sh
./bin/carton-exec bin/metacpan release /path/to/cpan/authors/id/
./bin/run bin/metacpan release /path/to/cpan/authors/id/
```
You should note that you can index either your CPAN mirror or a minicpan mirror. You can even index just parts of a mirror:
```sh
./bin/carton-exec bin/metacpan release /path/to/cpan/authors/id/{A,B}
./bin/run bin/metacpan release /path/to/cpan/authors/id/{A,B}
```

## Tag the Latest Releases

```sh
./bin/carton-exec bin/metacpan latest --cpan /path/to/cpan/
./bin/run bin/metacpan latest --cpan /path/to/cpan/
```

## Index Author Data

```sh
./bin/carton-exec bin/metacpan author --cpan /path/to/cpan/
./bin/run bin/metacpan author --cpan /path/to/cpan/
```
Note that minicpan doesn't provide the 00whois.xml file which is used to generate the index; you will have to download it manually (it is in the authors/ directory) in order to index authors.

Expand All @@ -102,15 +102,15 @@ It also doesn't include author.json files, so that data will also be missing unl

Start API server on port 5000
```sh
./bin/carton-exec plackup -p 5000 -r
./bin/run plackup -p 5000 -r
```
This will start a single-threaded test server. If you need extra performance, use `Starman` instead.

## Notes

For a full list of options:
```sh
./bin/carton-exec bin/metacpan release --help
./bin/run bin/metacpan release --help
```

Contributing:
Expand Down
1 change: 1 addition & 0 deletions app.psgi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use warnings;

use FindBin;
use lib "$FindBin::RealBin/lib";
use Catalyst::Middleware::Stash 'stash';

if ( $ENV{PLACK_ENV} eq 'development' ) {

Expand Down
4 changes: 2 additions & 2 deletions bin/check_json.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use 5.010;

use Data::Dumper;
use JSON::XS;
use Cpanel::JSON::XS;

foreach my $file ( @ARGV ) {
say "Processing $file";
Expand All @@ -15,4 +15,4 @@
};

if ( $@ ) { say "\terror in $file: $@" }
}
}
2 changes: 1 addition & 1 deletion bin/convert_authors.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use strict;
use warnings;
use JSON;
use Cpanel::JSON::XS;
use File::Find;

my @files;
Expand Down
8 changes: 4 additions & 4 deletions bin/get_fields.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
# PODNAME: get_fields.pl
use Data::Dumper;
use JSON::XS;
use Cpanel::JSON::XS;
use File::Find::Rule;
use File::Basename;
use Path::Class;
Expand All @@ -15,11 +15,11 @@
foreach my $file ( @files ) {
warn "Processing $file";
my $hash;
eval {

eval {
$hash = decode_json( do { local( @ARGV, $/ ) = $file; <> } );
} or print "\terror in $file: $@";

while ( my ($author, $info) = each %{$hash} ) {
my @local_fields = keys %{$info};
@fields{@local_fields} = @local_fields;
Expand Down
48 changes: 48 additions & 0 deletions bin/munin/monitor_minion_queue.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env perl

use strict;
use warnings;

# Munin runs this as root, need the sudo to get the Pg perms
# it's only for production so path is hard coded

my $config_mode = 0;
$config_mode = 1 if $ARGV[0] && $ARGV[0] eq 'config';

if($config_mode) {

print <<'EOF';
graph_title Minion Queue stats
graph_vlabel count
graph_category metacpan_api
graph_info What's happening in the Minion queue
EOF

}

# Get the stats
my $stats_report = `sudo -u metacpan /home/metacpan/bin/metacpan-api-carton-exec bin/queue.pl minion job -s`;

my @lines = split("\n", $stats_report);

for my $line (@lines) {
my ($label, $num) = split ':', $line;

$num =~ s/\D//g;

my $key = lc($label); # Was 'Inactive jobs'

# Swap type and status around so idle_jobs becomes jobs_idle
$key =~ s/(\w+)\s+(\w+)/$2_$1/g;

if( $config_mode ) {
# config
print "${key}.label $label\n";

} else {
# results
print "${key}.value $num\n" if $num;
}


}
6 changes: 5 additions & 1 deletion bin/prove
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/sh

`dirname "$0"`/run prove -lv "$@"
export EMAIL_SENDER_TRANSPORT=Test
export ES=localhost:9900
export METACPAN_SERVER_CONFIG_LOCAL_SUFFIX=testing

`dirname "$0"`/run prove -It/lib -lvr "$@"
4 changes: 4 additions & 0 deletions bin/queue.pl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ =head2 DESCRIPTION

carton exec -- morbo bin/queue.pl

Get status on jobs and workers:

sh /home/metacpan/bin/metacpan-api-carton-exec bin/queue.pl minion job -s

=cut

# for morbo
Expand Down
4 changes: 2 additions & 2 deletions bin/write_config_json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# PODNAME: write_config_json
#
# takes the root directory of an extracted distribution and outputs a JSON file
# suitable for CPAN::Faker to STDOUT
# suitable for CPAN::Faker to STDOUT
use strictures 1;
use JSON;
use Cpanel::JSON::XS;
use YAML;

use IO::All;
Expand Down
Loading