Commit Graph

19 Commits

Author SHA1 Message Date
Peter Goldstein 3e57eb531f
Add Ruby 3.1 to CI (#558)
* Add Ruby 3.1 to CI

Update Rubocop for recent Rubies
Disable Rubocop run for Rubies before Ruby 2.4
Quote '3.0' in the CI configuration to ensure it loads a 3.0.x Ruby
Set RUBYOPT="--disable_error_highlight" so Ruby 3.1 error matchers pass

* Add CHANGELOG.md entry

* Re-add deleted line from CHANGELOG.md

* Set minimum supported Ruby version to 2.4.

Remove a number of code bits designed to support Rubies below version 2.4

* Bump version.  Remove unneeded require from Gemfile.  Add require to spec/support file
2022-01-27 18:59:24 -08:00
dblock 04cc178135
Fix: lock elasticsearch version in integration specs.
Signed-off-by: dblock <dblock@dblock.org>
2021-11-07 22:10:45 -05:00
Michael Herold 509865dfc2
Track Omniauth official releases
This was always meant to be a temporary fix. Let's track actual releases
because GitHub Actions is choking on it.
2021-06-27 22:48:16 -05:00
Jitendra Rajpurohit c066135a4b
Elasticsearch integration spec fix (#520) 2020-04-12 17:10:32 -04:00
Bobby McDonald 25fe2f747e Fix except use in Mash#load (#508) 2020-01-14 08:50:43 -05:00
Bobby McDonald 2846ea63a9 Update github urls to hashie/hashie (#497)
* Update github urls to hashie/hashie

* Point omniauth in integration tests at master.

Until omniauth releases the changes merged from
https://github.com/omniauth/omniauth/pull/977 , we must point at
master branch.

* revert incorrect change of gem email

Co-Authored-By: Michael Herold <github@michaeljherold.com>

* Reference open issue for release
2019-11-17 11:35:30 -06:00
Bobby McDonald 6a96527384
Change rubocop to allow 100 character lines.
For accessibility reasons, we should limit our lines to 100 chars max.
https://github.com/slack-ruby/slack-ruby-client/pull/293#discussion_r309472083
2019-10-17 23:55:45 -04:00
Bobby McDonald ca3604516b Make Hashie play nice with Rails 6 Hash#except method (#479) 2019-10-02 10:48:19 -04:00
Michael Herold 5a6ffc7e2d
Update Rubocop and address the addressable todos
This is a big step forward in our Rubocop setup. I addressed all of the todos
from the current version of Rubocop that made sense to. The only things that
remain are metrics and one cop that relies on the line length metric to work.

I made some judgment calls on disabling a few cops:

1. The `Layout/IndentHeredoc` cop wants you to either use the squiggly heredoc
   from Ruby 2.3 or introduce a library. Since we are a low-level library that
   is used as a transitive dependency, we cannot introduce another library as a
   dependence, so that option is out. Also, we support Rubies back to 2.0
   currently, so using the squiggly heredoc isn't an option. Once we remove
   support for Rubies older than 2.3, we can switch to the squiggly heredoc cop.
2. The `Naming/FileName` cop was reporting false positives for a few files in
   the repository, so I disabled it on those files.
3. The `Style/DoubleNegation` cop reports lints on a few cases where we use
   double negation. Given the very generic nature of Hashie, the double-negation
   is the easiest, clearest way to express that we want an item to be a Boolean.
   I disabled the cop because we exist in the gray area where this makes sense.
2018-06-17 11:04:56 -05:00
Michael Herold 7b1e375b53
Add an integration spec for Elasticsearch
The Elasticsearch gems heavily integrate with Hashie. This leads people to want
to use a Mash as the backer for an Elasticsearch model, but the behavior is
different than they expect. By having this integration spec, we're covering two
things:

1. It might help ensure that we don't break the Elasticsearch ecosystem with
   changes in Hashie as has happened in the past.
2. It communicates some gotchas that happen with using a Mash as the backer for
   an Elasticsearch model.
2018-02-06 19:02:54 -06:00
Michael Herold 9f77380ddb
Add performance benchmarks for Mash 2017-02-24 07:11:34 -06:00
Michael Herold de7c56a8c8
Squelch an RSpec warning on an integration test 2017-02-22 06:42:06 -06:00
Callum Dryden a2c94aa6de
Ensure Railties available when loading Railtie
In some circumstances when a project has the Rails constant defined we
may still not be able to require the rails/railtie dependency. Before this
change this would raise an exception. This change seeks to add better
detection of the railtie dependency and add logging that this dependency
is missing but still allow execution to continue.
2017-02-16 13:41:29 +00:00
Michael Herold 7742133ffe Clean up integration specs to test for STDOUT log
This standardizes the way we're loading the example applications for the
integration tests so we're actually testing the behavior of the
application in each case. They're also structured in such a way to test
that the Hashie logger doesn't accidentally write to the STDOUT during
the initialization process of the applications.
2017-02-10 19:36:20 -06:00
Matthew Rudy Jacobs c269a1cc98 Fix #401: use a Railtie to set Hashie.logger on rails boot. 2017-02-10 18:26:31 -05:00
dblock 74b3bd6ab6 Added integration spec for omniauth-oauth2. 2017-02-10 18:18:48 -05:00
Michael Herold ca34d28a84 In Rails, set `Hashie.logger` to `Rails.logger` 2017-02-10 10:12:00 -06:00
Michael Herold f50cf8e6bb Bring integration tests into main test harness
We have a nice integration spec harness, so let's make sure we use it
when we're working on the gem. I'm making the following changes:

* Make `bundle exec rake` run integration specs, except on Travis.
* Silence a warning in the OmniAuth integration spec that has nothing to
  do with Hashie.
* Make Guard run integration specs when appropriate. Now, when you run
  all tasks you will run integration specs. Also, if you modify an
  integration spec, it will run. Lastly, if you modify anything in `lib`
  the integration specs will run.
* Keeps the extra Travis build that only runs integration specs. Travis
  didn't like the Rake task that included it and there's extra signal by
  doing it this way anyway.
2017-02-03 15:20:21 -06:00
dblock 9cc952f607 Added omniauth integration spec for #391. 2017-01-31 12:57:18 -05:00