New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match plugin names with dashes #2025

merged 1 commit into from May 1, 2016


None yet
2 participants

wikimatze commented May 1, 2016

I was cleaning up the plugins under and found that the twitter-login plugin is not listed when running listing all plugins:

wm@wm ~ » padrino g plugin -l
Available plugins:
  - ["960"]
  - ["access"]
  - ["ar_permalink_i18n"]
  - ["ar_permalink"]
  - ["ar_textile"]
  - ["ar_translate"]
  - ["auto_locale"]
  - ["barista"]
  - ["better_errors"]
  - ["blueprint"]
  - ["bootstrap"]
  - ["bug"]
  - ["camorra"]
  - ["carrierwave"]
  - ["codehighlighter"]
  - ["coderay"]
  - ["coffee"]
  - ["deflect"]
  - ["disqus"]
  - ["dreamhost"]
  - ["exception_notifier"]
  - ["factory_girl"]
  - ["flash_session"]
  - ["fontawesome"]
  - ["googleanalytics"]
  - ["heroku"]
  - ["hoptoad"]
  - ["jammit"]
  - ["letter_opener"]
  - ["maintenance"]
  - ["omniauth"]
  - ["openid"]
  - ["payment"]
  - ["pry_byebug"]
  - ["pry_debugger"]
  - ["raphaeljs"]
  - ["raphy_charts"]
  - ["recaptcha"]
  - ["resque"]
  - ["rewrite"]
  - ["secure_only"]
  - ["tripoli"]
  - ["vcr"]
  - ["watchr"]
  - ["will_paginate"]

It turns out, that the regex getting the plugin names is not allowing dashes in names:

Here is what I mean:

Behavior before:

=> []

Behavior now:

>> "tree/master/plugins/twitter-login_plugin.rb".scan(%r{/plugins/(\w+-\w+)_plugin.rb})
=> [["twitter-login"]]

I tried to write a test for this issue, but found in too hard to test thor actions.

Cheers Matthias

@wikimatze wikimatze changed the title from Match plugin names with dashes in their names to Match plugin names with dashes May 1, 2016


This comment has been minimized.

Show comment
Hide comment

nesquena May 1, 2016




nesquena commented May 1, 2016


@nesquena nesquena merged commit f6af376 into padrino:master May 1, 2016

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment