Closed glensc closed 7 years ago
I thought that in Ruby 2.0 and higher, the default encoding for .rb
files is assumed to be UTF-8.
This Ruby issue explicitly says that all Ruby files are interpreted as if they have #encoding: utf-8
:
https://bugs.ruby-lang.org/issues/6679
Clearly that is not the case here. Do you know why it's not working? I hope there is a solution that doesn't require removing all non-ascii characters from the gem.
i've been using this gem code because unable to update release notes for tag that does not look like version. i have tag named snapshot
.
➔ cat bin/ci/tag-update.rb
#!/usr/bin/ruby
#
# Script using chandler gem to update title/notes of release in GitHub
#
require 'rubygems'
require 'chandler'
require 'chandler/configuration'
github_repository = ENV['TRAVIS_REPO_SLUG']
tag = ENV['TRAVIS_TAG']
version = ENV['RELEASE_TITLE']
notes = ENV['RELEASE_NOTES']
github = Chandler::GitHub.new(
:repository => github_repository,
:config => Chandler::Configuration.new
)
github.create_or_update_release(
:tag => tag,
:title => version,
:description => notes
)
blah. seems the problem is that the script was run with ruby 1.9. i couldn't figure this out in first place because the output was messed up. here's better log:
Ah, glad to hear you got it all sorted. Cheers
seems it fails to run on
C
locale because source code is not US-ASCII’
vs'