We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d778f5f commit 51447caCopy full SHA for 51447ca
import.rake
@@ -47,12 +47,16 @@ def import_cookbooks_with_versions_and_platforms
47
row = row.to_hash
48
category = Category.with_name(row['category_name']).first!
49
50
+ if URI(row['external_url']).is_a?(URI::Generic)
51
+ well_formed_external_url = ('http://' + row['external_url'])
52
+ end
53
+
54
cookbook = Cookbook.new(
55
name: row['name'],
56
maintainer: 'john@example.com',
57
description: row['description'],
58
category: category,
- external_url: row['external_url'],
59
+ source_url: well_formed_external_url || row['external_url'],
60
download_count: row['download_count'],
61
deprecated: row['deprecated']
62
)
0 commit comments