From 3909ea03c74357d7e7534293689927f6cb694cf1 Mon Sep 17 00:00:00 2001 From: Miguel Herranz Date: Thu, 19 Feb 2009 22:13:17 +0100 Subject: [PATCH] Changed the following deprecated macros for the new ones: should_only_allow_numeric_values_for should_protect_attributes should_require_acceptance_of should_require_attributes should_require_unique_attributes --- ...nippet => should_not_allow_mass_assignment_of.tmSnippet} | 6 +++--- ...of.tmSnippet => should_validate_acceptance_of.tmSnippet} | 6 +++--- ....tmSnippet => should_validate_numericality_of.tmSnippet} | 6 +++--- ...utes.tmSnippet => should_validate_presence_of.tmSnippet} | 6 +++--- ...t => should_validate_uniqueness_of with scope.tmSnippet} | 6 +++--- ...es.tmSnippet => should_validate_uniqueness_of.tmSnippet} | 6 +++--- Syntaxes/Shoulda.tmLanguage | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) rename Snippets/{should_protect_attributes.tmSnippet => should_not_allow_mass_assignment_of.tmSnippet} (66%) rename Snippets/{should_require_acceptance_of.tmSnippet => should_validate_acceptance_of.tmSnippet} (73%) rename Snippets/{should_only_allow_numeric_values_for.tmSnippet => should_validate_numericality_of.tmSnippet} (71%) rename Snippets/{should_require_attributes.tmSnippet => should_validate_presence_of.tmSnippet} (69%) rename Snippets/{should_require_unique_attributes with scope.tmSnippet => should_validate_uniqueness_of with scope.tmSnippet} (63%) rename Snippets/{should_require_unique_attributes.tmSnippet => should_validate_uniqueness_of.tmSnippet} (68%) diff --git a/Snippets/should_protect_attributes.tmSnippet b/Snippets/should_not_allow_mass_assignment_of.tmSnippet similarity index 66% rename from Snippets/should_protect_attributes.tmSnippet rename to Snippets/should_not_allow_mass_assignment_of.tmSnippet index dcaf514..4785f6b 100644 --- a/Snippets/should_protect_attributes.tmSnippet +++ b/Snippets/should_not_allow_mass_assignment_of.tmSnippet @@ -3,13 +3,13 @@ content - should_protect_attributes :${1:attribute}${2:, :${3:attribute}${4:, :${5:attribute}}} + should_not_allow_mass_assignment_of :${1:attribute}${2:, :${3:attribute}${4:, :${5:attribute}}} name - should_protect_attributes + should_not_allow_mass_assignment_of scope source.ruby.rails.shoulda tabTrigger - shpa + shnamao uuid 7E8F2C3E-9490-44CA-A527-A329398064BD diff --git a/Snippets/should_require_acceptance_of.tmSnippet b/Snippets/should_validate_acceptance_of.tmSnippet similarity index 73% rename from Snippets/should_require_acceptance_of.tmSnippet rename to Snippets/should_validate_acceptance_of.tmSnippet index f4f7bd3..b1eb94d 100644 --- a/Snippets/should_require_acceptance_of.tmSnippet +++ b/Snippets/should_validate_acceptance_of.tmSnippet @@ -3,13 +3,13 @@ content - should_require_acceptance_of :${1:attribute} + should_validate_acceptance_of :${1:attribute} name - should_require_acceptance_of + should_validate_acceptance_of scope source.ruby.rails.shoulda tabTrigger - shrao + shvao uuid D6C46A2F-48F1-4D25-A763-F89D5E630809 diff --git a/Snippets/should_only_allow_numeric_values_for.tmSnippet b/Snippets/should_validate_numericality_of.tmSnippet similarity index 71% rename from Snippets/should_only_allow_numeric_values_for.tmSnippet rename to Snippets/should_validate_numericality_of.tmSnippet index 1e0b7c5..a194217 100644 --- a/Snippets/should_only_allow_numeric_values_for.tmSnippet +++ b/Snippets/should_validate_numericality_of.tmSnippet @@ -3,13 +3,13 @@ content - should_only_allow_numeric_values_for :${1:attribute} + should_validate_numericality_of :${1:attribute} name - should_only_allow_numeric_values_for + should_validate_numericality_of scope source.ruby.rails.shoulda tabTrigger - shoanvf + shvno uuid D69EC326-DE43-4757-8375-54DDFC6894ED diff --git a/Snippets/should_require_attributes.tmSnippet b/Snippets/should_validate_presence_of.tmSnippet similarity index 69% rename from Snippets/should_require_attributes.tmSnippet rename to Snippets/should_validate_presence_of.tmSnippet index 69fd8bd..8ad2af3 100644 --- a/Snippets/should_require_attributes.tmSnippet +++ b/Snippets/should_validate_presence_of.tmSnippet @@ -3,13 +3,13 @@ content - should_require_attributes :${1:method}${2:, :${3:method}${4:, :${5:method}}} + should_validate_presence_of :${1:method}${2:, :${3:method}${4:, :${5:method}}} name - should_require_attributes + should_validate_presence_of scope source.ruby.rails.shoulda tabTrigger - shra + shvpo uuid DBD55A6E-FEF4-4E5F-9F78-30D9ECC3FDB0 diff --git a/Snippets/should_require_unique_attributes with scope.tmSnippet b/Snippets/should_validate_uniqueness_of with scope.tmSnippet similarity index 63% rename from Snippets/should_require_unique_attributes with scope.tmSnippet rename to Snippets/should_validate_uniqueness_of with scope.tmSnippet index 671310f..810f8f2 100644 --- a/Snippets/should_require_unique_attributes with scope.tmSnippet +++ b/Snippets/should_validate_uniqueness_of with scope.tmSnippet @@ -3,13 +3,13 @@ content - should_require_unique_attributes :${1:method}${2:, :scoped_to => ${3:[:${4:column_id}, :${5:column_type}]}} + should_validate_uniqueness_of :${1:method}${2:, :scoped_to => ${3:[:${4:column_id}, :${5:column_type}]}} name - should_require_unique_attributes with scope + should_validate_uniqueness_of with scope scope source.ruby.rails.shoulda tabTrigger - shrua + shvuo uuid 769BADDC-DA2D-4220-BF83-C0B13E2436BE diff --git a/Snippets/should_require_unique_attributes.tmSnippet b/Snippets/should_validate_uniqueness_of.tmSnippet similarity index 68% rename from Snippets/should_require_unique_attributes.tmSnippet rename to Snippets/should_validate_uniqueness_of.tmSnippet index 03ce647..23b11a3 100644 --- a/Snippets/should_require_unique_attributes.tmSnippet +++ b/Snippets/should_validate_uniqueness_of.tmSnippet @@ -3,13 +3,13 @@ content - should_require_unique_attributes :${1:method}${2:, :${3:method}${4:, :${5:method}}} + should_validate_uniqueness_of :${1:method}${2:, :${3:method}${4:, :${5:method}}} name - should_require_unique_attributes + should_validate_uniqueness_of scope source.ruby.rails.shoulda tabTrigger - shrua + shvuo uuid B318649B-FA23-4BC3-8405-295D6E8D461C diff --git a/Syntaxes/Shoulda.tmLanguage b/Syntaxes/Shoulda.tmLanguage index 911dd36..653260f 100644 --- a/Syntaxes/Shoulda.tmLanguage +++ b/Syntaxes/Shoulda.tmLanguage @@ -121,7 +121,7 @@ macros match - \b(should_require_attributes|should_require_unique_attributes|should_protect_attributes|should_not_allow_values_for|should_allow_values_for|should_ensure_length_in_range|should_ensure_length_at_least|should_ensure_value_in_range|should_only_allow_numeric_values_for|should_have_many|should_have_and_belong_to_many|should_have_one|should_belong_to|should_be_restful|should_set_the_flash_to|should_not_set_the_flash|should_assign_to|should_not_assign_to|should_respond_with|should_render_template|should_redirect_to|should_render_a_form|setup|teardown|fixtures|load_all_fixtures|should_have_db_column|should_have_db_columns|should_have_index|should_have_indices|should_require_acceptance_of|shuold_set_the_flash_to|should_have_readonly_attributes|should_change|should_not_change|should_have_named_scope|should_ensure_length_is|should_filter_params|should_respond_with_content_type|should_route|should_return_from_session)\b + \b(should_validate_presence_of|should_validate_uniqueness_of|should_not_allow_mass_assignment_of|should_not_allow_values_for|should_allow_values_for|should_ensure_length_in_range|should_ensure_length_at_least|should_ensure_value_in_range|should_validate_numericality_of|should_have_many|should_have_and_belong_to_many|should_have_one|should_belong_to|should_be_restful|should_set_the_flash_to|should_not_set_the_flash|should_assign_to|should_not_assign_to|should_respond_with|should_render_template|should_redirect_to|should_render_a_form|setup|teardown|fixtures|load_all_fixtures|should_have_db_column|should_have_db_columns|should_have_index|should_have_indices|should_validate_acceptance_of|shuold_set_the_flash_to|should_have_readonly_attributes|should_change|should_not_change|should_have_named_scope|should_ensure_length_is|should_filter_params|should_respond_with_content_type|should_route|should_return_from_session)\b name support.shoulda.macro