Skip to content

Commit

Permalink
bumping min requirments, prepping release, drop rubocop, update Appra…
Browse files Browse the repository at this point in the history
…isal
  • Loading branch information
matthutchinson committed Oct 3, 2024
1 parent 1ff9e00 commit 1dc92a7
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 1,302 deletions.
1,165 changes: 0 additions & 1,165 deletions .rubocop.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .travis.yml

This file was deleted.

18 changes: 4 additions & 14 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
appraise "rails-4" do
gem "rails", "4.2.11.3"
gem "sqlite3", "~> 1.3.5"
end

appraise "rails-5" do
gem "rails", "5.2.4.4"
gem "sqlite3", "~> 1.4.2"
end

appraise "rails-6" do
gem "rails", "6.0.3.4"
gem "sqlite3", "~> 1.4.2"
gem "rails", "6.1.7.8"
gem "sqlite3", "~> 2.1.0"
end

appraise "rails-7" do
gem "rails", "7.0.2.2"
gem "sqlite3", "~> 1.4.2"
gem "rails", "7.2.0"
gem "sqlite3", "~> 2.1.0"
end
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
## ActAsTextcaptcha

[![Build](https://img.shields.io/github/actions/workflow/status/matthutchinson/acts_as_textcaptcha/build.yml?branch=main&style=flat)](https://github.com/matthutchinson/acts_as_textcaptcha/actions/workflows/build.yml)
[![Gem](https://img.shields.io/gem/v/acts_as_textcaptcha.svg?style=flat)](http://rubygems.org/gems/acts_as_textcaptcha)
[![Travis](https://img.shields.io/travis/com/matthutchinson/acts_as_textcaptcha/master.svg?style=flat)](https://travis-ci.com/matthutchinson/acts_as_textcaptcha)
[![Depfu](https://img.shields.io/depfu/matthutchinson/acts_as_textcaptcha.svg?style=flat)](https://depfu.com/github/matthutchinson/acts_as_textcaptcha)
[![Maintainability](https://api.codeclimate.com/v1/badges/c67969dd7b921477bdcc/maintainability)](https://codeclimate.com/github/matthutchinson/acts_as_textcaptcha/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/c67969dd7b921477bdcc/test_coverage)](https://codeclimate.com/github/matthutchinson/acts_as_textcaptcha/test_coverage)

ActsAsTextcaptcha provides spam protection for Rails models with text-based
logic question captchas. Questions are fetched from [Rob
Expand All @@ -18,8 +16,8 @@ are a good idea visit [textcaptcha.com](https://textcaptcha.com).

## Requirements

* [Ruby](http://ruby-lang.org/) >= 2.5
* [Rails](http://github.com/rails/rails) >= 4
* [Ruby](http://ruby-lang.org/) >= 3.1
* [Rails](http://github.com/rails/rails) >= 6.1
* A valid [Rails.cache](http://guides.rubyonrails.org/caching_with_rails.html#cache-stores) (not `:null_store`)

## Demo
Expand Down Expand Up @@ -207,8 +205,7 @@ The API may be unresponsive or return an unexpected response. If you've set
## Development

Check out this repo and run `bin/setup`, this will install gem dependencies and
generate docs. Use `bundle exec rake` to run tests and generate a coverage
report.
generate docs. Use `bundle exec rake` to run tests.

You can also run `bin/console` for an interactive prompt to experiment with the
code.
Expand Down Expand Up @@ -254,10 +251,11 @@ Covenant](http://contributor-covenant.org) code of conduct. See
[here](https://github.com/matthutchinson/acts_as_textcaptcha/blob/master/CODE_OF_CONDUCT.md)
for more details.

## Todo
## Ideas

* Check if AI models can beat this approach
* Allow translatable user supplied questions and answers in config
* Allow `Net::HTTP` to be swapped out for any another HTTP client.
* Allow `Net::HTTP` to be swapped out for any HTTP client.

## License

Expand All @@ -271,10 +269,8 @@ The code is available as open source under the terms of

## Links

* [CI](https://github.com/matthutchinson/acts_as_textcaptcha/actions/workflows/build.yml)
* [Demo](https://acts-as-textcaptcha.hiddenloop.dev)
* [Travis CI](http://travis-ci.com/matthutchinson/acts_as_textcaptcha)
* [Maintainability](https://codeclimate.com/github/matthutchinson/acts_as_textcaptcha/maintainability)
* [Test Coverage](https://codeclimate.com/github/matthutchinson/acts_as_textcaptcha/test_coverage)
* [RDoc](http://rdoc.info/projects/matthutchinson/acts_as_textcaptcha)
* [Wiki](http://wiki.github.com/matthutchinson/acts_as_textcaptcha/)
* [Issues](http://github.com/matthutchinson/acts_as_textcaptcha/issues)
Expand Down
18 changes: 1 addition & 17 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
require "bundler/gem_tasks"
require "rake/testtask"
require "rdoc/task"
require "rubocop/rake_task"

# generate docs
RDoc::Task.new do |rd|
Expand All @@ -21,19 +20,4 @@ Rake::TestTask.new(:test) do |t|
t.test_files = FileList["test/**/*_test.rb"]
end

# run lint
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = ["--display-cop-names"]
end

# run tests with code coverage (default)
namespace :test do
desc "Run all tests and features and generate a code coverage report"
task :coverage do
ENV["COVERAGE"] = "true"
Rake::Task["test"].execute
Rake::Task["rubocop"].execute
end
end

task default: [:rubocop, "test:coverage"]
task default: ["test"]
9 changes: 2 additions & 7 deletions acts_as_textcaptcha.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,19 @@ Gem::Specification.new do |spec|
spec.rdoc_options << "--title" << "ActAsTextcaptcha" << "--main" << "README.md" << "-ri"

# non-gem dependecies
spec.required_ruby_version = ">= 2.5"
spec.required_ruby_version = ">= 3.1"

# dev gems
spec.add_development_dependency("bundler")
spec.add_development_dependency("pry-byebug")
spec.add_development_dependency "rake"

# Lint
spec.add_development_dependency("rubocop")

# docs
spec.add_development_dependency("rdoc")

# testing
spec.add_development_dependency("appraisal")
spec.add_development_dependency("minitest")
spec.add_development_dependency("rails", "~> 7.0.2.2")
spec.add_development_dependency("simplecov", "~> 0.19.1")
spec.add_development_dependency("rails", "~> 7.2.1")
spec.add_development_dependency("sqlite3")
spec.add_development_dependency("webmock")
end
8 changes: 0 additions & 8 deletions gemfiles/rails_3.gemfile

This file was deleted.

8 changes: 0 additions & 8 deletions gemfiles/rails_4.gemfile

This file was deleted.

8 changes: 0 additions & 8 deletions gemfiles/rails_5.gemfile

This file was deleted.

4 changes: 2 additions & 2 deletions gemfiles/rails_6.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "rails", "6.0.3.4"
gem "sqlite3", "~> 1.4.2"
gem "rails", "6.1.7.8"
gem "sqlite3", "~> 2.1.0"

gemspec path: "../"
4 changes: 2 additions & 2 deletions gemfiles/rails_7.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "rails", "7.0.2.2"
gem "sqlite3", "~> 1.4.2"
gem "rails", "7.2.0"
gem "sqlite3", "~> 2.1.0"

gemspec path: "../"
2 changes: 1 addition & 1 deletion lib/acts_as_textcaptcha/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ActsAsTextcaptcha
VERSION = "4.6.0"
VERSION = "4.7.0"
end
1 change: 0 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
$LOAD_PATH.unshift(File.expand_path("#{File.dirname(__FILE__)}/../lib/acts_as_textcaptcha"))

# testing libs
require "simplecov" if ENV["COVERAGE"]
require "minitest/autorun"
require "webmock/minitest"
require "./test/helpers/rails"
Expand Down

0 comments on commit 1dc92a7

Please sign in to comment.