Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update Interface commit messages

  • Loading branch information...
commit b2b3a181cd117c3a266d8aa52d15f84079d8bbd1 1 parent ab17bb7
Ryan Cook authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  lib/regulate/git/interface.rb
  2. +2 −2 lib/regulate/git/model/base.rb
View
2  lib/regulate/git/interface.rb
@@ -208,7 +208,7 @@ def build_commit( commit_message , author_name , author_email , mode )
{
:name => author_name.nil? ? "Anonymous" : author_name,
:email => author_email ||= "anon@anonymous.com",
- :message => commit_message ||= mode.eql?(:create) ? "Creating new page." : "Updating page."
+ :message => commit_message ||= mode.eql?(:create) ? "Committing resource changes." : "Deleting resource."
}
end
View
4 lib/regulate/git/model/base.rb
@@ -31,7 +31,7 @@ def destroy
clear_cached_vars
Regulate::Git::Interface.delete({
:id => id,
- :commit_message => commit_message,
+ :commit_message => commit_message || "Deleting resource #{title}",
:author_name => author_name,
:author_email => author_email
})
@@ -81,7 +81,7 @@ def save
clear_cached_vars
Regulate::Git::Interface.save({
:id => id,
- :commit_message => commit_message,
+ :commit_message => commit_message || "#{ ( persisted? ) ? "Updating" : "Creating" } resource #{title}",
:author_name => author_name,
:author_email => author_email,
:attributes => attributes.to_json(:except => ['author_email', 'author_name', 'commit_message']),
Please sign in to comment.
Something went wrong with that request. Please try again.