-
Notifications
You must be signed in to change notification settings - Fork 311
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
Use require_with_fallback in WordPress. #60
Conversation
I have to quote here, that both WordPress importers are working with |
|
||
module JekyllImport | ||
# This importer takes a wordpress.xml file, which can be exported from your | ||
# wordpress.com blog (/wp-admin/export.php). | ||
module WordpressDotCom | ||
def self.process(filename = {:source => "wordpress.xml"}) | ||
def self.process(options={}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change in this method seems unrelated. Could you provide a bit more info about why this is needed?
I changed that for consistency. The other wordpress.rb file is written like that, so I thought it was ok to keep consistency. Also, when you export a WordPress blog its never called wordpress.xml, so that default would not work any more, thats all. If you prefer to keep it like that I'll revert that. |
Revert self.process parameter to its original value.
wordpress.rb is the only importer that uses mysql2 gem, and the dependency is missing.
require File.join(File.dirname(__FILE__), "..", "..", "jekyll-import.rb") | ||
|
||
required_gems = %w[rubygems sequel mysql2 fileutils safe_yaml] | ||
JekyllImport.require_with_fallback(required_gems) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on
JekyllImport.require_with_fallback(%w[
rubygems
sequel
mysql2
fileutils
safe_yaml
])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this may be better, it looks more like a natural require!
This is a fantastic first pass! |
Thanks!... I will correct it ASAP. In other words the |
My attempt to use #59 (a nicer
LoadError
messages) and apply them to both WordPress importers to solve #58.