Commit graph

408 commits

Author SHA1 Message Date
Gonzalo Rodriguez
12710e5a07
Merge pull request #297 from grzuy/acceptance_test_store_config
Acceptance test cache store config for throttle without Rails
2018-03-14 19:23:44 -03:00
Gonzalo Rodriguez
02908ce5ca
Acceptance test cache store config for throttle without Rails 2018-03-14 17:40:30 -03:00
Gonzalo Rodriguez
5e14b63d73
Merge pull request #294 from grzuy/acceptance_test_track
Acceptance test Rack::Attack#track
2018-03-13 18:49:56 -03:00
Gonzalo Rodriguez
564cbedb36
Acceptance test that tracking throttles doesn't actually throttle requests 2018-03-13 18:27:19 -03:00
Gonzalo Rodriguez
d7d5ab04da
Merge pull request #291 from lmansur/backport-changelog
Backport releases to CHANGELOG.md
2018-03-13 14:54:22 -03:00
Gonzalo Rodriguez
066434973f
Acceptance test Rack::Attack#track for throttle 2018-03-13 14:43:37 -03:00
Gonzalo Rodriguez
569ecec7c7
Acceptance test Rack::Attack#track 2018-03-13 14:19:22 -03:00
Lucas Mansur
3deb14a27c Fix v5.0.0 release date 2018-03-13 12:09:25 -03:00
Lucas Mansur
84d282c510 Backport releases to CHANGELOG.md 2018-03-12 22:03:23 -03:00
Gonzalo Rodriguez
ef9a47d19d
Merge pull request #290 from grzuy/jruby-9.1.16
Test against latest jruby 9.1.16.0
2018-03-12 19:32:36 -03:00
Gonzalo Rodriguez
d647e388b8
Test against latest jruby 9.1.16.0 2018-03-12 19:13:20 -03:00
Gonzalo Rodriguez
8cddc3c7b8
Merge pull request #289 from grzuy/ruby_2-6
Let TravisCI give early feedback about ruby 2.6.0-preview1
2018-03-12 15:36:46 -03:00
Gonzalo Rodriguez
0200ec419c
Let TravisCI give early feedback about ruby 2.6.0-preview1 2018-03-12 13:38:40 -03:00
Gonzalo Rodriguez
43eec3ab78
Merge pull request #248 from amirshadaab/add-requires-to-README
add require lines in README.md file
2018-03-12 11:47:50 -03:00
Gonzalo Rodriguez
608e3b20d1
Merge pull request #277 from grzuy/byebug
Ability to use byebug easily while developing/testing
2018-03-12 11:46:49 -03:00
Gonzalo Rodriguez
df287be0f4
Merge pull request #286 from grzuy/optimize_travis_build_time
Make TravisCI builds quicker by caching 'bundle install'
2018-03-12 11:32:13 -03:00
Amir Shadaab Mohammed
83ac0f7b0d add require lines in README.md file 2018-03-09 15:04:27 -06:00
Gonzalo Rodriguez
c119186134
bump version to v5.1.0 2018-03-09 15:23:46 -03:00
Gonzalo Rodriguez
3cc5c92ff2
Make TravisCI builds quicker by caching 'bundle install' 2018-03-09 14:21:15 -03:00
Gonzalo Rodriguez
2406435663
Ability to use byebug easily while developing/testing 2018-03-09 13:52:06 -03:00
Gonzalo Rodriguez
c9cd0239a4
Merge pull request #278 from grzuy/move_all_deps_to_gemspec
Move all dependencies to gemspec out of Gemfile
2018-03-09 11:38:31 -03:00
Gonzalo Rodriguez
922917d5a4
Merge pull request #274 from grzuy/help_debug_cache_issues
Help users understand more clearly when the store is misconfigured
2018-03-09 10:28:08 -03:00
Gonzalo Rodriguez
bed046ee75
Merge pull request #271 from grzuy/ruby_2-5
[Fixes #253] Avoid 'defined?' buggy behavior in ruby 2.5.0
2018-03-09 10:20:22 -03:00
Gonzalo Rodriguez
859c212058 Merge branch 'master' into move_all_deps_to_gemspec 2018-03-09 10:19:25 -03:00
Gonzalo Rodriguez
53b0561e7f
Merge pull request #272 from grzuy/rack_lint
Use Rack::Lint in tests to check any change continues to comply with the rack spec
2018-03-09 10:11:05 -03:00
Gonzalo Rodriguez
8603a3e056
Merge pull request #266 from grzuy/test_understandability
Attempt to make it easier to understand that the method is making assertions
2018-03-09 10:10:48 -03:00
Gonzalo Rodriguez
42cd957f2f
Merge pull request #276 from grzuy/rails_5-2
Test against rails 5.2.0.rc to get early feedback
2018-03-09 10:07:06 -03:00
Gonzalo Rodriguez
66909c6419
Merge pull request #269 from grzuy/acceptance_tests
Adds acceptance-oriented tests
2018-03-08 18:17:35 -03:00
Gonzalo Rodriguez
71c10d1ebe
Merge pull request #279 from tjnet/surpress_rubocop_complains_about_initalizer_file_name
fix rubocop complains about initializer file name (use snake_case)
2018-03-07 20:27:41 -03:00
Gonzalo Rodriguez
c1777e0f63
Merge pull request #285 from alextaylor000/patch-1
Mention 'match_discriminator' in README.md
2018-03-07 20:17:35 -03:00
Alex Taylor
993d724b64
Mention 'match_discriminator' in README.md 2018-03-05 17:21:36 -08:00
jun_tanaka555
70a4c1f933 fix rubocop complains about initializer file name 2018-02-04 16:18:54 +09:00
Gonzalo Rodriguez
d6d471fea5 Move all dependencies to gemspec 2018-02-02 16:05:04 -03:00
Gonzalo Rodriguez
53095231cc Test against rails 5.2.0.rc to get early feedback without causing TravisCI build failures 2018-02-02 13:14:21 -03:00
Gonzalo Rodriguez
7bb7a05987 Help users understand more clearly when the store is misconfigured 2018-02-01 10:06:39 -03:00
Corey Farwell
39c04b311f
Merge pull request #273 from grzuy/readme_dont_depend_activesupport
Don't make README examples depend on activesupport
2018-01-31 18:16:38 -05:00
Gonzalo Rodriguez
16af283d28 Don't make README examples depend on activesupport 2018-01-31 19:12:52 -03:00
Gonzalo Rodriguez
f27432df91 Use Rack::Lint in tests to check any change continues complying with the rack spec 2018-01-30 10:08:20 -03:00
Corey Farwell
9f79ab272e
Merge pull request #265 from grzuy/test_remove_dup
Remove request duplication in rack_attack_spec.rb
2018-01-29 11:31:01 -05:00
Gonzalo Rodriguez
6af29fb44e Avoid 'defined?' buggy behavior in ruby 2.5.0. Fixes #253
'defined?' is buggy in ruby 2.5.0, which under certain circumstances
users using rack-attack can hit. See issue #253.

I reported (https://bugs.ruby-lang.org/issues/14407) and
fixed (https://github.com/ruby/ruby/pull/1800) the issue in
ruby already, but i guess i would take some time before there's
a new ruby release including that fix.

So for now we would need to circumvent this bug by using
'const_defined?' instead of 'defined?' for this particular case.

More details:

Anyone using:
  * ruby 2.5.0
  * redis
  * rack-attack without redis-store and using at least one throttle
  * having a toplevel class named Store

will hit this ruby 2.5.0 bug https://bugs.ruby-lang.org/issues/14407

That's because of the following buggy behavior of 'defined?' under ruby
2.5:

```
$ ruby -v
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]

$ irb
> class Redis
> end
=> nil
> class Store
> end
=> nil
> defined?(::Redis::Store)
=> "constant"
> ::Redis::Store
  NameError (uninitialized constant Redis::Store
    Did you mean?  Store)
```
2018-01-29 12:25:18 -03:00
Gonzalo Rodriguez
980633e1a9 Adds acceptance-oriented tests 2018-01-25 18:21:29 -03:00
Tieg Zaharia
d7cc49117f
Merge pull request #267 from grzuy/freeze_constants
Do not allow mutating constants
2018-01-25 14:51:06 -05:00
Tieg Zaharia
7048599054
Merge pull request #268 from grzuy/cleanup_self
Cleanup unnecessary self references
2018-01-25 14:49:58 -05:00
Gonzalo Rodriguez
b7eb7851cf Cleanup unnecessary self references 2018-01-25 15:52:20 -03:00
Gonzalo Rodriguez
7286517c2f Do not allow mutating constants 2018-01-25 12:22:40 -03:00
Gonzalo Rodriguez
73e267782b Remove request duplication in rack_attack_spec.rb 2018-01-25 10:54:19 -03:00
Gonzalo Rodriguez
ca739946ce Attempt to make it easier to understand that the method is making assertions 2018-01-25 10:53:47 -03:00
Corey Farwell
6f545e2665
Merge pull request #262 from grzuy/legibility
Attempt to improve legibility
2018-01-23 17:46:03 -05:00
Corey Farwell
f91f3a403c
Merge pull request #264 from grzuy/drop_support_for_rails_3
Drop support for unmaintaned Rails 3
2018-01-23 17:45:29 -05:00
Corey Farwell
66bb16e97a
Merge pull request #263 from grzuy/remove_warnings
Fixes warnings in test output
2018-01-23 17:24:11 -05:00