Coder Social home page Coder Social logo

doherty / dist-zilla-plugin-twitter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dagolden/dist-zilla-plugin-twitter

1.0 1.0 0.0 286 KB

Twitter when you release with Dist::Zilla

Home Page: http://metacpan.org/release/Dist-Zilla-Plugin-Twitter/

Perl 100.00%

dist-zilla-plugin-twitter's People

Contributors

doherty avatar harleypig avatar kentfredric avatar mschout avatar worr avatar xdg avatar yanick avatar

Stargazers

 avatar

Watchers

 avatar  avatar

dist-zilla-plugin-twitter's Issues

00-compile.t hangs on Windows

00-compile.t hangs on Windows in case dependency is missing. Updating Dist::Zilla::Plugin::Test::Compile to version 2.033 should fix this issue.

tests fail in require: Can't load Metamark

Copy from cpan testers:

t/00-compile.t ........ ok

#   Failed test 'dzil release would have exited 0'
#   at t/choose_shortener.t line 20.
#          got: '-1'
#     expected: '0'

#   Failed test 'we logged the Twitter message'
#   at t/choose_shortener.t line 27.
# STDOUT:
# [DZ] beginning to build DZ2
# [DZ] guessing dist's main_module is lib/DZ2.pm
# [DZ] extracting distribution abstract from lib/DZ2.pm
# [@Filter/ExtraTests] rewriting release test xt/release/pod-coverage.t
# [@Filter/ExtraTests] rewriting release test xt/release/pod-syntax.t
# [DZ] writing DZ2 in DZ2-0.001
# [DZ] building archive with Archive::Tar; install Archive::Tar::Wrapper 0.15 or newer for improved speed
# [DZ] writing archive to DZ2-0.001.tar.gz
# [FakeUploader] Fake release happening (nothing was really done)
# STDERR:
# Can't load Metamark: 
# This WWW::Shorten service is inactive.
# Please use a different one.
# 
# Compilation failed in require at /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.3/165a/lib/site_perl/5.21.3/WWW/Shorten/Metamark.pm line 27.
# Compilation failed in require at /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.3/165a/lib/site_perl/5.21.3/WWW/Shorten/Simple.pm line 19.
#  at /tmp/loop_over_bdir-11951-M3Zrja/Dist-Zilla-Plugin-Twitter-0.025-tZykow/blib/lib/Dist/Zilla/Plugin/Twitter.pm line 231.

#   Failed test 'Log claims we tried to use WWW::Shorten::Metamark'
#   at t/choose_shortener.t line 32.
# STDOUT:
# [DZ] beginning to build DZ2
# [DZ] guessing dist's main_module is lib/DZ2.pm
# [DZ] extracting distribution abstract from lib/DZ2.pm
# [@Filter/ExtraTests] rewriting release test xt/release/pod-coverage.t
# [@Filter/ExtraTests] rewriting release test xt/release/pod-syntax.t
# [DZ] writing DZ2 in DZ2-0.001
# [DZ] building archive with Archive::Tar; install Archive::Tar::Wrapper 0.15 or newer for improved speed
# [DZ] writing archive to DZ2-0.001.tar.gz
# [FakeUploader] Fake release happening (nothing was really done)
# STDERR:
# Can't load Metamark: 
# This WWW::Shorten service is inactive.
# Please use a different one.
# 
# Compilation failed in require at /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.3/165a/lib/site_perl/5.21.3/WWW/Shorten/Metamark.pm line 27.
# Compilation failed in require at /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.3/165a/lib/site_perl/5.21.3/WWW/Shorten/Simple.pm line 19.
#  at /tmp/loop_over_bdir-11951-M3Zrja/Dist-Zilla-Plugin-Twitter-0.025-tZykow/blib/lib/Dist/Zilla/Plugin/Twitter.pm line 231.
# Looks like you failed 3 tests of 3.
t/choose_shortener.t .. 
Dubious, test returned 3 (wstat 768, 0x300)

But I've seen this locally as well.

Its a change in WWW::Shorten 3.06:

https://metacpan.org/source/DAVECROSS/WWW-Shorten-3.06/Changes#L5

* bin/shorten, lib/WWW/Shorten.pm, lib/WWW/Shorten/Metamark.pm,
    t/00load_a.t, t/00load_b.t, t/00noexp.t, t/metamark.t,
    t/newnames.t: Metamark is dead :-(

Create required directory to contain the twitter.ini file

[@Author::DOHERTY/Twitter] Go to https://api.twitter.com/oauth/authorize?oauth_token=... to authorize this application
Enter the PIN: ...
[@Author::DOHERTY/Twitter] Couldn't tweet: couldn't write to file '/home/mike/.dzil/twitter.ini': No such file or directory at /home/mike/perl5/perlbrew/perls/perl-5.16.1-threads/lib/site_perl/5.16.1/Dist/Zilla/Plugin/Twitter.pm line 103.

[@Author::DOHERTY/Twitter] Tweet would have been: Released Plucene-SearchEngine-Index-MSOffice-0.001 http://goo.gl/g7Mmn #perl #cpan

SSL Required

This is not a direct problem with DZP::Twitter, but something will have to be done about it, and this bug is more information to other people who have started to have the problem I started having today:

[@Author::KENTNL/Twitter] Couldn't tweet: 403 Forbidden at /home/kent/perl5/perlbrew/perls/perl-5.19.7/lib/site_perl/5.19.7/Dist/Zilla/Plugin/Twitter.pm line 209

The issue is described here: semifor/Net-Twitter#37

So either DZP:Twitter will want to pass the ssl flag, or Net::Twitter will have to make that a standard feature ( likely the latter ), and then DZP:Twitter should depend on that as a minimum

REST API v1 Deprecated by Twitter

Trying to tweet a release now does:

[@Author::KENTNL/Twitter] Couldn't tweet: The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview. at /home/kent/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/Dist/Zilla/Plugin/Twitter.pm line 196

Which at very least means that

traits => [qw/ API::REST OAuth /],

my $nt = Net::Twitter->new(
  useragent_class => $ENV{DZ_TWITTER_USERAGENT} || 'LWP::UserAgent',
  traits => [qw/ API::REST OAuth /], ##
  %{ $self->consumer_tokens },
);

must include API::RESTv1_1, as per Net::Twitter::Manual::MigratingToV1_1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.