drupid 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.bundle/config +3 -0
- data/.gitignore +10 -0
- data/.rbenv-version +1 -0
- data/Gemfile +3 -0
- data/README.md +56 -0
- data/Rakefile +26 -0
- data/bin/drupid +1 -3
- data/drupid.gemspec +31 -0
- data/lib/drupid/project_version.rb +276 -0
- data/lib/drupid/utils.rb +1 -1
- data/lib/drupid/version.rb +3 -275
- data/lib/drupid.rb +2 -7
- data/test/fixtures/drupal-example.make +89 -0
- data/test/fixtures/drupal-fake-site/modules/aggregator/aggregator.info +14 -0
- data/test/fixtures/drupal-fake-site/modules/aggregator/aggregator.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/aggregator/tests/aggregator_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/aggregator/tests/aggregator_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/block/block.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/block/block.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/block/tests/block_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/block/tests/block_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/blog/blog.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/blog/blog.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/book/book.info +14 -0
- data/test/fixtures/drupal-fake-site/modules/book/book.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/color/color.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/color/color.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/comment/comment.info +16 -0
- data/test/fixtures/drupal-fake-site/modules/comment/comment.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/contact/contact.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/contact/contact.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/contextual/contextual.info +11 -0
- data/test/fixtures/drupal-fake-site/modules/contextual/contextual.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/dashboard/dashboard.info +14 -0
- data/test/fixtures/drupal-fake-site/modules/dashboard/dashboard.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/dblog/dblog.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/dblog/dblog.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/field/field.info +17 -0
- data/test/fixtures/drupal-fake-site/modules/field/field.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/field_sql_storage/field_sql_storage.info +14 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/field_sql_storage/field_sql_storage.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/list/list.info +14 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/list/list.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/list/tests/list_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/list/tests/list_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/number/number.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/number/number.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/options/options.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/options/options.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/text/text.info +14 -0
- data/test/fixtures/drupal-fake-site/modules/field/modules/text/text.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/field/tests/field_test.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/field/tests/field_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/field_ui/field_ui.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/field_ui/field_ui.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/file/file.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/file/file.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/file/tests/file_module_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/file/tests/file_module_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/filter/filter.info +14 -0
- data/test/fixtures/drupal-fake-site/modules/filter/filter.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/forum/forum.info +16 -0
- data/test/fixtures/drupal-fake-site/modules/forum/forum.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/help/help.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/help/help.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/image/image.info +14 -0
- data/test/fixtures/drupal-fake-site/modules/image/image.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/image/tests/image_module_test.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/image/tests/image_module_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/locale/locale.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/locale/locale.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/locale/tests/locale_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/locale/tests/locale_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/menu/menu.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/menu/menu.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/node/node.info +16 -0
- data/test/fixtures/drupal-fake-site/modules/node/node.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/node/tests/node_access_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/node/tests/node_access_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/node/tests/node_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/node/tests/node_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/node/tests/node_test_exception.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/node/tests/node_test_exception.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/openid/openid.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/openid/openid.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/openid/tests/openid_test.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/openid/tests/openid_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/overlay/overlay.info +11 -0
- data/test/fixtures/drupal-fake-site/modules/overlay/overlay.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/path/path.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/path/path.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/php/php.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/php/php.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/poll/poll.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/poll/poll.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/profile/profile.info +18 -0
- data/test/fixtures/drupal-fake-site/modules/profile/profile.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/rdf/rdf.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/rdf/rdf.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/rdf/tests/rdf_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/rdf/tests/rdf_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/search/search.info +15 -0
- data/test/fixtures/drupal-fake-site/modules/search/search.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/search/tests/search_embedded_form.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/search/tests/search_embedded_form.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/search/tests/search_extra_type.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/search/tests/search_extra_type.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/shortcut/shortcut.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/shortcut/shortcut.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/simpletest.info +56 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/simpletest.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/actions_loop_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/actions_loop_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/ajax_forms_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/ajax_forms_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/ajax_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/ajax_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/batch_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/batch_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/common_test.info +14 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/common_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/common_test_cron_helper.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/common_test_cron_helper.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/database_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/database_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/entity_cache_test.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/entity_cache_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/entity_cache_test_dependency.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/entity_cache_test_dependency.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/entity_crud_hook_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/entity_crud_hook_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/error_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/error_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/file_test.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/file_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/filter_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/filter_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/form_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/form_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/image_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/image_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/menu_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/menu_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/module_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/module_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/requirements1_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/requirements1_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/requirements2_test.info +14 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/requirements2_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/session_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/session_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_dependencies_test.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_dependencies_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_incompatible_core_version_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_incompatible_core_version_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info +14 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_incompatible_module_version_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_incompatible_module_version_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_test.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/system_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/taxonomy_test.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/taxonomy_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/theme_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/theme_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/update_script_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/update_script_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/update_test_1.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/update_test_1.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/update_test_2.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/update_test_2.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/update_test_3.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/update_test_3.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/url_alter_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/url_alter_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/xmlrpc_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/simpletest/tests/xmlrpc_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/statistics/statistics.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/statistics/statistics.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/syslog/syslog.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/syslog/syslog.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/system/system.info +19 -0
- data/test/fixtures/drupal-fake-site/modules/system/system.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/taxonomy/taxonomy.info +15 -0
- data/test/fixtures/drupal-fake-site/modules/taxonomy/taxonomy.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/toolbar/toolbar.info +11 -0
- data/test/fixtures/drupal-fake-site/modules/toolbar/toolbar.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/tracker/tracker.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/tracker/tracker.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/translation/tests/translation_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/translation/tests/translation_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/translation/translation.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/translation/translation.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/trigger/tests/trigger_test.info +11 -0
- data/test/fixtures/drupal-fake-site/modules/trigger/tests/trigger_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/trigger/trigger.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/trigger/trigger.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/update/tests/aaa_update_test.info +11 -0
- data/test/fixtures/drupal-fake-site/modules/update/tests/aaa_update_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/update/tests/bbb_update_test.info +11 -0
- data/test/fixtures/drupal-fake-site/modules/update/tests/bbb_update_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/update/tests/ccc_update_test.info +11 -0
- data/test/fixtures/drupal-fake-site/modules/update/tests/ccc_update_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/update/tests/update_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/update/tests/update_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/update/update.info +13 -0
- data/test/fixtures/drupal-fake-site/modules/update/update.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/user/tests/user_form_test.info +12 -0
- data/test/fixtures/drupal-fake-site/modules/user/tests/user_form_test.module +0 -0
- data/test/fixtures/drupal-fake-site/modules/user/user.info +16 -0
- data/test/fixtures/drupal-fake-site/modules/user/user.module +0 -0
- data/test/fixtures/drupal-fake-site/profiles/minimal/minimal.info +13 -0
- data/test/fixtures/drupal-fake-site/profiles/minimal/minimal.profile +0 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/modules/custom/combineblocks/combineblocks.info +11 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/modules/custom/openpublic_api/openpublic_api.info +12 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/modules/custom/openpublic_splash/openpublic_splash.info +16 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/modules/custom/phase2_blog/phase2_blog.info +32 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/modules/custom/phase2_document/phase2_document.info +38 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/modules/custom/phase2_profile/phase2_profile.info +45 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/openpublic.info +137 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/openpublic.make +149 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/openpublic.profile +0 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/themes/openomega/openomega.info +434 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/themes/openpublic_theme/.project +11 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/themes/openpublic_theme/openpublic_theme.info +51 -0
- data/test/fixtures/drupal-fake-site/profiles/openpublic/themes/spartan/spartan.info +434 -0
- data/test/fixtures/drupal-fake-site/profiles/standard/standard.info +32 -0
- data/test/fixtures/drupal-fake-site/profiles/standard/standard.profile +0 -0
- data/test/fixtures/drupal-fake-site/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info +12 -0
- data/test/fixtures/drupal-fake-site/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info +15 -0
- data/test/fixtures/drupal-fake-site/profiles/testing/testing.info +11 -0
- data/test/fixtures/drupal-fake-site/profiles/testing/testing.profile +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/entity/entity.info +31 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/entity/entity.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/entity/entity_token.info +13 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/entity/entity_token.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/entity/tests/entity_feature.info +14 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/entity/tests/entity_feature.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/entity/tests/entity_test.info +15 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/entity/tests/entity_test.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/featured_news_feature/featured_news.info +23 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/featured_news_feature/featured_news.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/google_analytics/googleanalytics.info +13 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/google_analytics/googleanalytics.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/media/media.info +26 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/media/media.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/migrate/migrate.info +47 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/migrate/migrate.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/migrate/migrate_example/migrate_example.info +27 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/migrate/migrate_example/migrate_example.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/migrate/migrate_example_baseball/migrate_example_baseball.info +32 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/migrate/migrate_example_baseball/migrate_example_baseball.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/migrate/migrate_ui/migrate_ui.info +15 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/migrate/migrate_ui/migrate_ui.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/bulk_export/bulk_export.info +12 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/bulk_export/bulk_export.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/ctools.info +14 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/ctools.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/ctools_access_ruleset/ctools_access_ruleset.info +12 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/ctools_access_ruleset/ctools_access_ruleset.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/ctools_ajax_sample/ctools_ajax_sample.info +12 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/ctools_ajax_sample/ctools_ajax_sample.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/ctools_custom_content/ctools_custom_content.info +12 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/ctools_custom_content/ctools_custom_content.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/ctools_plugin_example/ctools_plugin_example.info +15 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/ctools_plugin_example/ctools_plugin_example.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/page_manager/page_manager.info +12 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/page_manager/page_manager.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/stylizer/stylizer.info +13 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/stylizer/stylizer.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/tests/ctools_plugin_test.info +15 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/tests/ctools_plugin_test.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/views_content/views_content.info +17 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/subdir/ctools/views_content/views_content.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/views/tests/views_test.info +13 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/views/tests/views_test.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/views/views.info +297 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/views/views.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/views/views_ui.info +15 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/views/views_ui.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/wysiwyg/tests/wysiwyg_test.info +14 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/wysiwyg/tests/wysiwyg_test.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/wysiwyg/wysiwyg.info +17 -0
- data/test/fixtures/drupal-fake-site/sites/all/modules/wysiwyg/wysiwyg.module +0 -0
- data/test/fixtures/drupal-fake-site/sites/all/themes/fusion/fusion_core/fusion_core.info +102 -0
- data/test/fixtures/drupal-fake-site/sites/all/themes/fusion/fusion_starter/fusion_starter.info +190 -0
- data/test/fixtures/drupal-fake-site/sites/all/themes/fusion/fusion_starter_lite/fusion_starter_lite.info +170 -0
- data/test/fixtures/drupal-fake-site/sites/all/themes/subdir/mothership/.gitignore +3 -0
- data/test/fixtures/drupal-fake-site/sites/all/themes/subdir/mothership/NEWTHEME/NEWTHEME.info +124 -0
- data/test/fixtures/drupal-fake-site/sites/all/themes/subdir/mothership/mothership/mothership.info +126 -0
- data/test/fixtures/drupal-fake-site/sites/all/themes/subdir/mothership/mothershipstark/mothershipstark.info +15 -0
- data/test/fixtures/drupal-fake-site/sites/all/themes/subdir/mothership/tema/tema.info +58 -0
- data/test/fixtures/drupal-fake-site/sites/all/themes/tao/tao.info +49 -0
- data/test/fixtures/drupal-fake-site/sites/default/settings.php +0 -0
- data/test/fixtures/drupal-fake-site/sites/www.bar.org/settings.php +0 -0
- data/test/fixtures/drupal-fake-site/sites/www.foo.org/settings.php +0 -0
- data/test/fixtures/drupal-fake-site/themes/bartik/bartik.info +41 -0
- data/test/fixtures/drupal-fake-site/themes/garland/garland.info +14 -0
- data/test/fixtures/drupal-fake-site/themes/seven/seven.info +20 -0
- data/test/fixtures/drupal-fake-site/themes/stark/stark.info +12 -0
- data/test/fixtures/drupal-fake-site/themes/tests/block_test_theme/block_test_theme.info +20 -0
- data/test/fixtures/drupal-fake-site/themes/tests/test_theme/test_theme.info +22 -0
- data/test/fixtures/drupal-fake-site/themes/tests/update_test_basetheme/update_test_basetheme.info +10 -0
- data/test/fixtures/drupal-fake-site/themes/tests/update_test_subtheme/update_test_subtheme.info +11 -0
- data/test/fixtures/fake_library.tar.gz +0 -0
- data/test/fixtures/rootcandy/rootcandy.info +52 -0
- data/test/fixtures/views-info.diff +11 -0
- data/test/fixtures/views.tar.gz +0 -0
- data/test/helper.rb +7 -0
- data/test/makefiles/test1.make +20 -0
- data/test/makefiles/test2.make +14 -0
- data/test/makefiles/test3.make +8 -0
- data/test/test_drupid_component.rb +120 -0
- data/test/test_drupid_download_strategy.rb +112 -0
- data/test/test_drupid_drush.rb +32 -0
- data/test/test_drupid_extend_pathname.rb +33 -0
- data/test/test_drupid_library.rb +62 -0
- data/test/test_drupid_makefile.rb +181 -0
- data/test/test_drupid_patch.rb +53 -0
- data/test/test_drupid_platform.rb +207 -0
- data/test/test_drupid_platform_project.rb +206 -0
- data/test/test_drupid_project.rb +650 -0
- data/test/test_drupid_updater.rb +76 -0
- data/test/test_drupid_version.rb +295 -0
- data/test/test_pathname.rb +67 -0
- metadata +696 -5
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2012-2013 Lifepillar
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
require 'helper'
|
|
24
|
+
|
|
25
|
+
class TestDrupidPlatform < Minitest::Test
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def setup
|
|
29
|
+
@platform = Drupid::Platform.new(TESTSITE)
|
|
30
|
+
@num_projects = @platform.analyze_projects
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def test_platform_properties
|
|
34
|
+
assert_instance_of Pathname, @platform.local_path
|
|
35
|
+
assert @platform.local_path.exist?
|
|
36
|
+
assert_instance_of Pathname, @platform.sites_dir
|
|
37
|
+
assert_equal 'sites', @platform.sites_dir.to_s
|
|
38
|
+
assert_instance_of Pathname, @platform.contrib_path
|
|
39
|
+
assert_equal 'sites/all', @platform.contrib_path.to_s
|
|
40
|
+
assert_equal @platform.local_path + @platform.sites_dir, @platform.sites_path
|
|
41
|
+
assert_instance_of Array, @platform.site_names
|
|
42
|
+
assert_equal 3, @platform.site_names.size
|
|
43
|
+
assert_includes @platform.site_names, 'default'
|
|
44
|
+
assert_includes @platform.site_names, 'www.foo.org'
|
|
45
|
+
assert_includes @platform.site_names, 'www.bar.org'
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def test_contrib_path
|
|
49
|
+
assert_equal 'sites/all', @platform.contrib_path.to_s
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def test_dest_path
|
|
53
|
+
components = {
|
|
54
|
+
'views' => 'sites/all/modules/views',
|
|
55
|
+
'ctools' => 'sites/all/modules/subdir/ctools',
|
|
56
|
+
'openpublic' => 'profiles/openpublic',
|
|
57
|
+
'forum' => 'modules/forum',
|
|
58
|
+
'bartik' => 'themes/bartik',
|
|
59
|
+
'tao' => 'sites/all/themes/tao',
|
|
60
|
+
'mothership' => 'sites/all/themes/subdir/mothership',
|
|
61
|
+
'google_analytics' => 'sites/all/modules/google_analytics',
|
|
62
|
+
'featured_news_feature' => 'sites/all/modules/featured_news_feature'
|
|
63
|
+
}
|
|
64
|
+
components.each do |name, path|
|
|
65
|
+
comp = @platform.get_project(name)
|
|
66
|
+
assert_instance_of Pathname, @platform.dest_path(name)
|
|
67
|
+
assert_equal path, @platform.dest_path(name).to_s
|
|
68
|
+
assert_equal path, @platform.dest_path(comp).to_s
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def test_profiles
|
|
73
|
+
profiles = @platform.profiles
|
|
74
|
+
assert_instance_of Array, profiles
|
|
75
|
+
assert_equal 4, profiles.size
|
|
76
|
+
assert profiles.include?('standard')
|
|
77
|
+
assert profiles.include?('minimal')
|
|
78
|
+
assert profiles.include?('testing')
|
|
79
|
+
assert profiles.include?('openpublic')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def test_project_type
|
|
83
|
+
assert_instance_of Drupid::PlatformProject, @platform.get_project('user')
|
|
84
|
+
assert_equal 'module', @platform.get_project('user').proj_type, 'user project'
|
|
85
|
+
assert_equal 'module', @platform.get_project('aggregator').proj_type, 'aggregator project'
|
|
86
|
+
assert_equal 'module', @platform.get_project('list').proj_type, 'list (sub)project (of field)'
|
|
87
|
+
assert_equal 'module', @platform.get_project('views').proj_type, 'views project'
|
|
88
|
+
assert_equal 'module', @platform.get_project('ctools').proj_type, 'ctools project'
|
|
89
|
+
assert_equal 'theme', @platform.get_project('bartik').proj_type, 'bartik theme'
|
|
90
|
+
assert_equal 'theme', @platform.get_project('block_test_theme').proj_type, 'block_test_theme'
|
|
91
|
+
assert_equal 'theme', @platform.get_project('tao').proj_type, 'tao theme'
|
|
92
|
+
assert_equal 'theme', @platform.get_project('mothership').proj_type, 'mothership theme'
|
|
93
|
+
assert_equal 'theme', @platform.get_project('mothershipstark').proj_type, 'mothershipstark (sub)theme'
|
|
94
|
+
assert_equal 'profile', @platform.get_project('minimal').proj_type, 'minimal profile'
|
|
95
|
+
assert_equal 'profile', @platform.get_project('standard').proj_type, 'standard profile'
|
|
96
|
+
assert_equal 'profile', @platform.get_project('testing').proj_type, 'testing profile'
|
|
97
|
+
assert_equal 'profile', @platform.get_project('openpublic').proj_type, 'openpublic profile'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def test_core_project
|
|
101
|
+
assert @platform.get_project('user').core_project?
|
|
102
|
+
assert @platform.get_project('aggregator').core_project?
|
|
103
|
+
assert @platform.get_project('list').core_project?
|
|
104
|
+
assert @platform.get_project('bartik').core_project?
|
|
105
|
+
assert @platform.get_project('block_test_theme').core_project?
|
|
106
|
+
assert @platform.get_project('minimal').core_project?
|
|
107
|
+
assert @platform.get_project('standard').core_project?
|
|
108
|
+
assert @platform.get_project('testing').core_project?
|
|
109
|
+
refute @platform.get_project('views').core_project?
|
|
110
|
+
refute @platform.get_project('ctools').core_project?
|
|
111
|
+
refute @platform.get_project('tao').core_project?
|
|
112
|
+
refute @platform.get_project('mothership').core_project?
|
|
113
|
+
refute @platform.get_project('mothershipstark').core_project?
|
|
114
|
+
refute @platform.get_project('openpublic').core_project?
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def test_has_project
|
|
118
|
+
assert_nil @platform.drupal_project
|
|
119
|
+
assert_nil @platform.version
|
|
120
|
+
assert @platform.has_project?('wysiwyg'), 'Platform should have wysiwyg'
|
|
121
|
+
assert @platform.has_project?('ctools'), 'Platform should have ctools'
|
|
122
|
+
refute @platform.has_project?('zigzag'), 'Platform should not have zigzag'
|
|
123
|
+
assert @platform.has_project?('aggregator'), 'Platform should have aggregator'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def test_parse_projects
|
|
127
|
+
num_info_files = Pathname.glob(@platform.local_path + '**/*.info').size
|
|
128
|
+
# Modules and themes inside profiles should not be parsed
|
|
129
|
+
excluded = Pathname.glob(@platform.local_path + 'profiles/*/*/**/*.info')
|
|
130
|
+
# Projects whose name is different from the name of their parent directories should not be parsed
|
|
131
|
+
#excluded2 = Dir[File.join(@platform.path, '**', '*.info')].reject { |p| File.basename(p, '.info') == File.basename(File.dirname(p)) }
|
|
132
|
+
excluded2 = []
|
|
133
|
+
assert_equal num_info_files - excluded.size - excluded2.size, @num_projects
|
|
134
|
+
assert_instance_of Drupid::PlatformProject, @platform.get_project('wysiwyg'), 'wysiwyg should be a Drupid::PlatformProject'
|
|
135
|
+
assert_instance_of Drupid::PlatformProject, @platform.get_project('node'), 'node should be a Drupid::PlatformProject'
|
|
136
|
+
Pathname.glob(@platform.local_path + '**/*.info').reject { |p| excluded.include?(p) or excluded2.include?(p) }.each do |p|
|
|
137
|
+
name = p.basename('.info').to_s
|
|
138
|
+
# In some cases, the name of the .info file does not correspond to the project's name.
|
|
139
|
+
# Why::Are::Drupal.specs.so_sloppy? :/
|
|
140
|
+
name = 'google_analytics' if 'googleanalytics' == name
|
|
141
|
+
name = 'featured_news_feature' if 'featured_news' == name
|
|
142
|
+
assert @platform.has_project?(name), "#{name} not parsed."
|
|
143
|
+
assert_instance_of Drupid::PlatformProject, @platform.get_project(name), "#{name} is not a Drupid::PlatformProject"
|
|
144
|
+
if name != 'tao' # Tao has no version
|
|
145
|
+
assert_instance_of Drupid::Version, @platform.get_project(name).version, "#{name} has not been assigned a version"
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
assert_equal '7.x-1.0-rc1', @platform.get_project('ctools').version.long
|
|
149
|
+
assert_nil @platform.get_project('tao').version
|
|
150
|
+
assert_equal '7.x-7.10', @platform.get_project('minimal').version.long
|
|
151
|
+
assert_equal '7.x-2.2', @platform.get_project('mothership').version.long
|
|
152
|
+
refute @platform.has_project?('openpublic_splash'), 'openpublic_splash should not be parsed'
|
|
153
|
+
refute @platform.has_project?('openomega'), 'openomega should not be parsed'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
def test_is_core_project
|
|
157
|
+
assert @platform.get_project('node').core_project?, 'node is a core project'
|
|
158
|
+
assert @platform.get_project('field_sql_storage').core_project?, 'field_sql_storage is a core project'
|
|
159
|
+
assert @platform.get_project('garland').core_project?, 'garland is a core project'
|
|
160
|
+
refute @platform.get_project('wysiwyg').core_project?, 'wysiwyg is not a core project'
|
|
161
|
+
refute @platform.get_project('ctools').core_project?, 'ctools is not a core project'
|
|
162
|
+
refute @platform.get_project('tao').core_project?, 'tao is not a core project'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
def test_each_project
|
|
166
|
+
l = []
|
|
167
|
+
@platform.each_project { |p| l << p.name }
|
|
168
|
+
refute l.include?('drupal'), 'drupal should not be included'
|
|
169
|
+
assert l.include?('ctools'), 'ctools missing'
|
|
170
|
+
assert l.include?('wysiwyg'), 'wysiwyg missing'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
def test_each_core_project
|
|
174
|
+
l = []
|
|
175
|
+
@platform.each_core_project { |p| l << p.name }
|
|
176
|
+
refute l.include?('drupal')
|
|
177
|
+
refute l.include?('ctools')
|
|
178
|
+
refute l.include?('wysiwyg')
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
def test_project_names
|
|
182
|
+
l = @platform.project_names
|
|
183
|
+
refute l.include?('drupal'), 'drupal should not be included'
|
|
184
|
+
assert l.include?('ctools'), 'ctools should be included'
|
|
185
|
+
assert l.include?('wysiwyg'), 'wysiwyg should be included'
|
|
186
|
+
refute l.include?('node')
|
|
187
|
+
refute l.include?('menu')
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
def test_core_project_names
|
|
191
|
+
l = @platform.core_project_names
|
|
192
|
+
refute l.include?('drupal'), 'drupal should not be included'
|
|
193
|
+
refute l.include?('ctools'), 'ctools is not core'
|
|
194
|
+
refute l.include?('wysiwyg'), 'wysiwyg is not core'
|
|
195
|
+
assert l.include?('node'), 'node is missing'
|
|
196
|
+
assert l.include?('menu'), 'menu is missing'
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
def test_platform_site_names
|
|
200
|
+
sites = @platform.site_names
|
|
201
|
+
assert_equal 3, sites.size, "Got #{sites.to_s}"
|
|
202
|
+
assert sites.include?('default')
|
|
203
|
+
assert sites.include?('www.foo.org')
|
|
204
|
+
assert sites.include?('www.bar.org')
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
end # TestDrupidPlatform
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2012-2013 Lifepillar
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
require 'helper'
|
|
24
|
+
|
|
25
|
+
class TestDrupidPlatformProject < Minitest::Test
|
|
26
|
+
|
|
27
|
+
def setup
|
|
28
|
+
@platform = Drupid::Platform.new(TESTSITE)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def test_platform_project_creation
|
|
32
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'sites/all/modules/entity')
|
|
33
|
+
assert_instance_of Drupid::PlatformProject, p
|
|
34
|
+
assert_kind_of Drupid::Project, p
|
|
35
|
+
assert_kind_of Drupid::Component, p
|
|
36
|
+
assert_equal 'entity', p.name
|
|
37
|
+
assert_equal 7, p.core.to_i
|
|
38
|
+
assert_equal '7.x-1.0-rc1', p.version.long
|
|
39
|
+
assert_equal 'module', p.proj_type
|
|
40
|
+
assert_equal @platform, p.platform
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def test_relative_path
|
|
44
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'sites/all/modules/entity')
|
|
45
|
+
assert_instance_of Pathname, p.relative_path
|
|
46
|
+
assert_equal 'sites/all/modules/entity', p.relative_path.to_s
|
|
47
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'sites/all/modules/subdir/ctools')
|
|
48
|
+
assert_instance_of Pathname, p.relative_path
|
|
49
|
+
assert_equal 'sites/all/modules/subdir/ctools', p.relative_path.to_s
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def test_subdir
|
|
53
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'sites/all/modules/entity')
|
|
54
|
+
assert_instance_of Pathname, p.subdir
|
|
55
|
+
assert_equal '.', p.subdir.to_s
|
|
56
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'sites/all/modules/subdir/ctools')
|
|
57
|
+
assert_instance_of Pathname, p.subdir
|
|
58
|
+
assert_equal 'subdir', p.subdir.to_s
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def test_core_project_color
|
|
62
|
+
module_path = @platform.local_path+'modules/color'
|
|
63
|
+
p = Drupid::PlatformProject.new(@platform, module_path)
|
|
64
|
+
assert_equal 'color', p.name
|
|
65
|
+
assert p.core_project?, 'color should be a core project'
|
|
66
|
+
assert_equal '7.x-7.10', p.version.long
|
|
67
|
+
assert_equal 'module', p.proj_type
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def test_project_featured_news_feature
|
|
71
|
+
module_path = @platform.local_path+'sites/all/modules/featured_news_feature'
|
|
72
|
+
p = Drupid::PlatformProject.new(@platform, module_path)
|
|
73
|
+
assert_equal 'featured_news_feature', p.name
|
|
74
|
+
refute p.core_project?, 'featured_news_feature is not a core project'
|
|
75
|
+
assert_equal '7.x-1.0', p.version.long
|
|
76
|
+
assert_equal 'module', p.proj_type
|
|
77
|
+
info_path = @platform.local_path+'sites/all/modules/featured_news_feature/featured_news.info'
|
|
78
|
+
p = Drupid::PlatformProject.new(@platform, info_path)
|
|
79
|
+
assert_equal 'featured_news_feature', p.name
|
|
80
|
+
refute p.core_project?, 'featured_news_feature is not a core project'
|
|
81
|
+
assert_equal '7.x-1.0', p.version.long
|
|
82
|
+
assert_equal 'module', p.proj_type
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def test_project_google_analytics
|
|
86
|
+
module_path = @platform.local_path+'sites/all/modules/google_analytics'
|
|
87
|
+
p = Drupid::PlatformProject.new(@platform, module_path)
|
|
88
|
+
assert_equal 'google_analytics', p.name
|
|
89
|
+
refute p.core_project?, 'google_analytics is not a core project'
|
|
90
|
+
assert_equal '7.x-1.2', p.version.long
|
|
91
|
+
assert_equal 'module', p.proj_type
|
|
92
|
+
info_path = @platform.local_path+'sites/all/modules/google_analytics/googleanalytics.info'
|
|
93
|
+
p = Drupid::PlatformProject.new(@platform, info_path)
|
|
94
|
+
assert_equal 'google_analytics', p.name
|
|
95
|
+
refute p.core_project?, 'google_analytics is not a core project'
|
|
96
|
+
assert_equal '7.x-1.2', p.version.long
|
|
97
|
+
assert_equal 'module', p.proj_type
|
|
98
|
+
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def test_project_entity
|
|
102
|
+
module_path = @platform.local_path+'sites/all/modules/entity'
|
|
103
|
+
p = Drupid::PlatformProject.new(@platform, module_path)
|
|
104
|
+
assert_equal 'entity', p.name
|
|
105
|
+
refute p.core_project?, 'entity is not a core project'
|
|
106
|
+
assert_equal '7.x-1.0-rc1', p.version.long
|
|
107
|
+
assert_equal 'module', p.proj_type
|
|
108
|
+
info_path = @platform.local_path+'sites/all/modules/entity/entity.info'
|
|
109
|
+
p = Drupid::PlatformProject.new(@platform, info_path)
|
|
110
|
+
assert_equal 'entity', p.name
|
|
111
|
+
refute p.core_project?, 'entity is not a core project'
|
|
112
|
+
assert_equal '7.x-1.0-rc1', p.version.long
|
|
113
|
+
assert_equal 'module', p.proj_type
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
def test_project_entity_token
|
|
117
|
+
info_path = @platform.local_path+'sites/all/modules/entity/entity_token.info'
|
|
118
|
+
p = Drupid::PlatformProject.new(@platform, info_path)
|
|
119
|
+
assert_equal 'entity_token', p.name
|
|
120
|
+
refute p.core_project?, 'entity_token is not a core project'
|
|
121
|
+
assert_equal '7.x-1.0-rc1', p.version.long
|
|
122
|
+
assert_equal 'module', p.proj_type
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def test_extensions_for_entity_project
|
|
126
|
+
info_path = @platform.local_path+'sites/all/modules/entity/entity.info'
|
|
127
|
+
p = Drupid::PlatformProject.new(@platform, info_path)
|
|
128
|
+
exts = p.extensions
|
|
129
|
+
assert_equal 4, exts.size
|
|
130
|
+
assert exts.include?('entity')
|
|
131
|
+
assert exts.include?('entity_token')
|
|
132
|
+
assert exts.include?('entity_feature')
|
|
133
|
+
assert exts.include?('entity_test')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def test_project_mothership
|
|
137
|
+
info_path = @platform.local_path+'sites/all/themes/subdir/mothership/mothership/mothership.info'
|
|
138
|
+
p = Drupid::PlatformProject.new(@platform, info_path)
|
|
139
|
+
refute p.core_project?, 'mothership is not a core project'
|
|
140
|
+
assert_equal info_path.parent.parent, p.local_path
|
|
141
|
+
assert_equal '7.x-2.2', p.version.long
|
|
142
|
+
assert_equal 'theme', p.proj_type
|
|
143
|
+
exts = p.extensions
|
|
144
|
+
assert_equal 4, exts.size
|
|
145
|
+
assert exts.include?('mothership')
|
|
146
|
+
assert exts.include?('mothershipstark')
|
|
147
|
+
assert exts.include?('NEWTHEME')
|
|
148
|
+
assert exts.include?('tema')
|
|
149
|
+
assert_equal 'sites/all/themes/subdir/mothership', p.relative_path.to_s
|
|
150
|
+
assert_equal 'subdir', p.subdir.to_s
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def test_project_fusion
|
|
154
|
+
info_path = @platform.local_path+'sites/all/themes/fusion'
|
|
155
|
+
p = Drupid::PlatformProject.new(@platform, info_path)
|
|
156
|
+
assert_equal info_path, p.local_path
|
|
157
|
+
assert_equal 'fusion', p.name
|
|
158
|
+
assert_equal '7.x-2.0-beta2', p.version.long
|
|
159
|
+
assert_equal 'theme', p.proj_type
|
|
160
|
+
exts = p.extensions
|
|
161
|
+
assert_equal 4, exts.size
|
|
162
|
+
assert exts.include?('fusion')
|
|
163
|
+
assert exts.include?('fusion_core')
|
|
164
|
+
assert exts.include?('fusion_starter')
|
|
165
|
+
assert exts.include?('fusion_starter_lite')
|
|
166
|
+
assert_equal 'sites/all/themes/fusion', p.relative_path.to_s
|
|
167
|
+
assert_equal 'sites/all/themes/fusion', @platform.dest_path(p).to_s
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
def test_subproject_node_tests
|
|
171
|
+
info_path = @platform.local_path+'modules/node/tests/node_access_test.info'
|
|
172
|
+
p = Drupid::PlatformProject.new(@platform, info_path)
|
|
173
|
+
assert p.core_project?
|
|
174
|
+
assert_equal 'module', p.proj_type
|
|
175
|
+
assert_equal 'node_access_test', p.name
|
|
176
|
+
assert_equal info_path.parent, p.local_path
|
|
177
|
+
assert_equal 'tests', p.directory_name
|
|
178
|
+
assert_equal 'modules/node/tests', p.relative_path.to_s
|
|
179
|
+
assert_equal 'node', p.subdir.to_s
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# For a platform project, the target path should be a suffix of the
|
|
183
|
+
# platform path. If that is not the case, it probably means that the
|
|
184
|
+
# project is misplaced (e.g., a module in the 'themes' folder).
|
|
185
|
+
def test_target_path_is_consistent_with_local_path
|
|
186
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'sites/all/modules/entity')
|
|
187
|
+
assert p.local_path.fnmatch('*' + p.target_path.to_s), "Wrong target_path: #{p.target_path}"
|
|
188
|
+
assert_equal @platform.local_path+@platform.contrib_path+p.target_path, p.local_path
|
|
189
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'sites/all/modules/featured_news_feature')
|
|
190
|
+
assert p.local_path.fnmatch('*' + p.target_path.to_s), "Wrong target_path: #{p.target_path}"
|
|
191
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'sites/all/modules/google_analytics')
|
|
192
|
+
assert p.local_path.fnmatch('*' + p.target_path.to_s), "Wrong target_path: #{p.target_path}"
|
|
193
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'sites/all/modules/entity/entity_token.info')
|
|
194
|
+
assert p.local_path.fnmatch('*' + p.target_path.to_s), "Wrong target_path: #{p.target_path}"
|
|
195
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'sites/all/themes/subdir/mothership/mothership/mothership.info')
|
|
196
|
+
assert p.local_path.fnmatch('*' + p.target_path.to_s), "Wrong target_path: #{p.target_path}"
|
|
197
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'profiles/openpublic/openpublic.info')
|
|
198
|
+
assert_equal '.', p.subdir.to_s
|
|
199
|
+
assert_equal 'profiles/openpublic', p.target_path.to_s
|
|
200
|
+
assert p.local_path.fnmatch('*' + p.target_path.to_s), "Wrong target_path: #{p.target_path}"
|
|
201
|
+
p = Drupid::PlatformProject.new(@platform, TESTSITE+'profiles/standard')
|
|
202
|
+
assert_equal 'profiles/standard', p.target_path.to_s
|
|
203
|
+
assert p.local_path.fnmatch('*' + p.target_path.to_s), "Wrong target_path: #{p.target_path} vs #{p.local_path}"
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
end # TestDrupidPlatformProject
|