Skip to content

Commit

Permalink
add rake
Browse files Browse the repository at this point in the history
  • Loading branch information
MatzFan committed Aug 9, 2024
1 parent 020f2d6 commit 655b684
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,4 @@ jobs:
- name: Run tests
run: |
bundle exec ruby test/test_socksify.rb
bundle exec rubocop
bundle exec rake
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
require: 'rubocop-minitest'
require:
- rubocop-minitest
- rubocop-performance
- rubocop-rake

AllCops:
NewCops: enable
Expand Down
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ SOCKSify Ruby 1.7.2
unreleased
SOCKSify Ruby 1.7.3
===================
* add Rakefile
* fix missing :timeout kwarg in TCPSocket class (thanks @lizzypy)
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ group :test do
end

group :development, :test do
gem 'rake', '~> 13.2'
gem 'rubocop', '~> 1.31'
gem 'rubocop-minitest', '~> 0.20'
gem 'rubocop-performance', '~> 1.21'
gem 'rubocop-rake', '~> 0.6'
end
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GEM
racc
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.2)
rexml (3.3.4)
strscan
Expand All @@ -33,6 +34,8 @@ GEM
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
strscan (3.1.0)
unicode-display_width (2.5.0)
Expand All @@ -43,9 +46,11 @@ PLATFORMS

DEPENDENCIES
minitest (~> 5.16)
rake (~> 13.2)
rubocop (~> 1.31)
rubocop-minitest (~> 0.20)
rubocop-performance (~> 1.21)
rubocop-rake (~> 0.6)

BUNDLED WITH
2.5.17
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Socksify.resolve("spaceboyz.net")

A tor proxy is required before running the tests. Install tor from your usual package manager, check it is running with `pidof tor` then run the tests with:

`ruby test/test_socksify.rb` (uses minitest, `gem install minitest` if you don't have it)
`bundle exec rake`

Colorful diagnostic messages are enabled by default via:
```rb
Expand All @@ -85,7 +85,7 @@ The [repository](https://github.com/astro/socksify-ruby/) can be checked out wit

`$ git-clone [email protected]:astro/socksify-ruby.git`

Send patches via pull requests. Please run `rubcop` & correct any errors first.
Send patches via pull requests.

### Further ideas

Expand Down
15 changes: 15 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'bundler/gem_tasks'
require 'rake/testtask'

Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/**/test_*.rb']
# t.warning = false
end

require 'rubocop/rake_task'

RuboCop::RakeTask.new

task default: %i[test rubocop]

0 comments on commit 655b684

Please sign in to comment.