Skip to content

Commit

Permalink
[#1725] Rename IDataStore -> IDatastore
Browse files Browse the repository at this point in the history
This makes it consistent with the plugin name (DatastorePlugin).
  • Loading branch information
vitorbaptista committed May 29, 2014
1 parent 059a24b commit d884b6d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions ckanext/datastore/db.py
Expand Up @@ -799,7 +799,7 @@ def delete_data(context, data_dict):
'where': []
}

for plugin in p.PluginImplementations(interfaces.IDataStore):
for plugin in p.PluginImplementations(interfaces.IDatastore):
query_dict = plugin.delete_data(context, data_dict,
query_dict, field_ids)

Expand All @@ -826,7 +826,7 @@ def validate_query(context, data_dict):
fields = datastore_helpers.get_list(data_dict_copy['fields'])
data_dict_copy['fields'] = fields

for plugin in p.PluginImplementations(interfaces.IDataStore):
for plugin in p.PluginImplementations(interfaces.IDatastore):
data_dict_copy = plugin.validate_query(context, data_dict_copy,
all_field_ids)

Expand Down Expand Up @@ -862,7 +862,7 @@ def search_data(context, data_dict):
'where': []
}

for plugin in p.PluginImplementations(interfaces.IDataStore):
for plugin in p.PluginImplementations(interfaces.IDatastore):
query_dict = plugin.search_data(context, data_dict,
query_dict, all_field_ids)

Expand Down
4 changes: 2 additions & 2 deletions ckanext/datastore/interfaces.py
@@ -1,8 +1,8 @@
import ckan.plugins.interfaces as interfaces


class IDataStore(interfaces.Interface):
'''Allow changing DataStore queries'''
class IDatastore(interfaces.Interface):
'''Allow changing Datastore queries'''

def search_data(self, context, data_dict, query_dict, all_field_ids):
return query_dict
Expand Down
2 changes: 1 addition & 1 deletion ckanext/datastore/plugin.py
Expand Up @@ -34,7 +34,7 @@ class DatastorePlugin(p.SingletonPlugin):
p.implements(p.IDomainObjectModification, inherit=True)
p.implements(p.IRoutes, inherit=True)
p.implements(p.IResourceController, inherit=True)
p.implements(interfaces.IDataStore, inherit=True)
p.implements(interfaces.IDatastore, inherit=True)

legacy_mode = False
resource_show_action = None
Expand Down
2 changes: 1 addition & 1 deletion ckanext/datastore/tests/sample_datastore_plugin.py
Expand Up @@ -4,7 +4,7 @@


class SampleDataStorePlugin(p.SingletonPlugin):
p.implements(interfaces.IDataStore, inherit=True)
p.implements(interfaces.IDatastore, inherit=True)

def validate_query(self, context, data_dict, all_field_ids):
valid_filters = ('age_between', 'age_not_between')
Expand Down

0 comments on commit d884b6d

Please sign in to comment.