Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate StripeObject#refresh_from #328

Merged
merged 4 commits into from
Oct 9, 2015
Merged

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Oct 8, 2015

As discussed in #325, this deprecates the public visibility of
#refresh_from (by renaming it). It also adds some deprecation
infrastructure to produce warnings when it's used.

As discussed in #325, this deprecates the public visibility of
`#refresh_from` (by renaming it). It also adds some deprecation
infrastructure to produce warnings when it's used.
@@ -181,5 +181,16 @@ def self.check_api_key!(key)
raise TypeError.new("api_key must be a string") unless key.is_a?(String)
key
end

def self.warn_deprecated(name, options = {})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance we could use http://ruby-doc.org/stdlib-1.9.3/libdoc/rubygems/rdoc/Gem/Deprecate.html? I know it won't work for 1.8, but we may be able to work around that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Done in 1a96d7c. And amazingly I think it did work in 1.8 ...

@brandur brandur merged commit d09093f into master Oct 9, 2015
@brandur brandur deleted the brandur-deprecate-refresh-from branch October 9, 2015 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants