These classes (plus Ruby primitives) have replaced all instances of
Hashie::Mash. This allows us to remove the gem's dependency on hashie and
eliminate a layer in the middleware stack.

This should have the effect of making object instantiation and method
invocation faster and less susceptible to typos. For example, if you typed
Twitter.user("sferik").loctaion, a Hashie::Mash would return nil instead
of raising a NoMethodError.

Another benefit of these new objects is instance methods like created_at now
return a Time instead of a String. This should make the objects easier to
work with and better fulfills the promise of this library as a Ruby wrapper for
the Twitter API.

Any instance method that returns a boolean can now be called with a trailing
question mark, for example:

Twitter.user("sferik").protected?

The Twitter::Search class has been replaced by the Twitter::Client#search
method. This unifies the library's interfaces and will make the code easier to
maintain over time. As a result, you can no longer build queries by chaining
methods (ARel-style). The new syntax is more consistent and concise.

This version also introduces object equivalence, so objects that are logically
equivalent are considered equal, even if they don't occupy the same address in
memory, for example:

In previous versions of this gem, both of the above statements would have
returned false. We've stopped short of implementing a true identity map, such
that:

Twitter.user("sferik").object_id == Twitter.user("sferik").object_id

A true identity map may be implemented in future versions of this library.

Additional Notes

All deprecated methods have been removed.

Twitter::Client#totals has been removed. Use Twitter::Client#user
instead.

Twitter.faraday_options has been renamed to Twitter.connection_options.

Twitter::Client#friendships now takes up to 3 arguments instead of 1.

Support for the XML response format has been removed. This decision was
guided largely by Twitter, which has started removing XML responses available
for some resources. This allows us to remove the gem's dependency
on multi_xml. Using JSON is faster than XML, both in terms of parsing
speed and time over the wire.

All error classes have been moved inside the Twitter::Error namespace. If
you were previously rescuing Twitter::NotFound you'll need to change that
to Twitter::Error::NotFound.

Performance

You can improve performance by preloading a faster JSON parsing library. By
default, JSON will be parsed with okjson. For faster JSON parsing, we
recommend Oj.

All contributors will be added to the history and will receive the respect
and gratitude of the community.

Submitting an Issue

We use the GitHub issue tracker to track bugs and features. Before
submitting a bug report or feature request, check to make sure it hasn't
already been submitted. You can indicate support for an existing issue by
voting it up. When submitting a bug report, please include a gist that
includes a stack trace and any details that may be necessary to reproduce the
bug, including your gem version, Ruby version, and operating system. Ideally, a
bug report should include a pull request with failing specs.

Submitting a Pull Request

Fork the project.

Create a topic branch.

Implement your feature or bug fix.

Add documentation for your feature or bug fix.

Run bundle exec rake yard. If your changes are not 100% documented, go
back to step 4.

Add specs for your feature or bug fix.

Run bundle exec rake spec. If your changes are not 100% covered, go back
to step 6.

Commit and push your changes.

Submit a pull request. Please do not include changes to the gemspec,
version, or history file. (If you want to create your own version for some
reason, please do so in a separate commit.)

Supported Ruby Versions

This library aims to support and is tested against the following Ruby
implementations:

If something doesn't work on one of these interpreters, it should be considered
a bug.

This library may inadvertently work (or seem to work) on other Ruby
implementations, however support will only be provided for the versions listed
above.

If you would like this library to support another Ruby version, you may
volunteer to be a maintainer. Being a maintainer entails making sure all tests
run and pass on that implementation. When something breaks on your
implementation, you will be personally responsible for providing patches in a
timely fashion. If critical issues for a particular implementation exist at the
time of a major release, support for that Ruby version may be dropped.