    echo "$gem_sha1"
    gem_chng_log=$(echo "`date +"%a %b %d %Y"` `git config user.name` <`git config user.email`> $new_ver-1")

    sed -i '/^Version:/ s/[0-9].[0-9]*.[0-9]*..$/'$new_ver'/' $file
    sed -i '/^Release:/ s/[0-9]*%/1%/' $file
    sed -i '/^%define sha1\s*'"$gem_name"'/ s/=[0-9a-f]*$/='$gem_sha1'/' $file
    sed -i '/^%changelog/a*   '"$gem_chng_log"'\n-   Update to version '"$new_ver"'' $file

  else

    echo "Gem $gem_name is up to date $new_ver"