Skip to content

Instantly share code, notes, and snippets.

$ sudo vagrant provision
==> default: Running provisioner: shell...
default: Running: /HOME/gnome/metacpan/metacpan-developer/vagrant-shell20150324-24775-1twsk5w.sh
==> default: stdin: is not a tty
==> default: # /vagrant/provision/before/dir_perms.sh
==> default: # /vagrant/provision/before/hostname.sh
==> default: # /vagrant/provision/before/resolv_conf.sh
==> default: Assuming node metacpan-dev
==> default: Supply a node arg to override
==> default: parser=future enabled, carry on...
vagrant@metacpan-dev:~/metacpan-api$ ./bin/prove t
t/00_setup.t .....
ok 1 - var/tmp exists for testing
1..1
ok
t/fakecpan.t .....
ok 1 - got ElasticSearch object
[NoNodes] ** No nodes are available: [http://127.0.0.1:9900], called from sub Search::Elasticsearch::Transport::try {...} at /home/vagrant/carton/metacpan-api/lib/perl5/Try/Tiny.pm line 81.# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 111 just after 1.
Dubious, test returned 111 (wstat 28416, 0x6f00)
vagrant@metacpan-dev:~/metacpan-api$ curl -XGET 'http://localhost:9200'
{
"status" : 503,
"name" : "metacpan-dev-es-01",
"cluster_name" : "bm",
"version" : {
"number" : "1.4.4",
"build_hash" : "c88f77ffc81301dfa9dfd81ca2232f09588bd512",
"build_timestamp" : "2015-02-19T13:05:36Z",
"build_snapshot" : false,
vagrant@metacpan-dev:~/metacpan-api$ METACPAN_ES_TEST_PORT=9200 ./bin/prove
t/00_setup.t .....
ok 1 - var/tmp exists for testing
1..1
ok
t/fakecpan.t .....
ok 1 - got ElasticSearch object
# \ {
# active_primary_shards 6,
# active_shards 6,
#!/usr/bin/ruby
n = 0;
puts "Tastati numarul de elemente introduse in vector ( > 5 ): "
loop do
print "n = "
n = gets.chomp.to_i
if n < 5
puts "Introduceti un numar > 5!"
else