Skip to content

Commit 3536dbf

Browse files
committed
initial commit
0 parents  commit 3536dbf

26 files changed

+1055
-0
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/.bundle/
2+
/.yardoc
3+
/Gemfile.lock
4+
/_yardoc/
5+
/coverage/
6+
/doc/
7+
/pkg/
8+
/spec/reports/
9+
/tmp/
10+
*.bundle
11+
*.so
12+
*.o
13+
*.a
14+
mkmf.log

.rspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--color
2+
--require spec_helper
3+
--format documentation

Gemfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec
4+
5+
group :development do
6+
gem 'rspec', '~> 3.1'
7+
gem 'guard-rspec'
8+
end

Guardfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# A sample Guardfile
2+
# More info at https://github.com/guard/guard#readme
3+
4+
## Uncomment and set this to only include directories you want to watch
5+
# directories %(app lib config test spec feature)
6+
7+
## Uncomment to clear the screen before every task
8+
# clearing :on
9+
10+
11+
12+
# Note: The cmd option is now required due to the increasing number of ways
13+
# rspec may be run, below are examples of the most common uses.
14+
# * bundler: 'bundle exec rspec'
15+
# * bundler binstubs: 'bin/rspec'
16+
# * spring: 'bin/rspec' (This will use spring if running and you have
17+
# installed the spring binstubs per the docs)
18+
# * zeus: 'zeus rspec' (requires the server to be started separately)
19+
# * 'just' rspec: 'rspec'
20+
21+
guard :rspec, cmd: "bundle exec rspec" do
22+
require "ostruct"
23+
24+
# Generic Ruby apps
25+
rspec = OpenStruct.new
26+
rspec.spec = ->(m) { "spec/#{m}_spec.rb" }
27+
rspec.spec_dir = "spec"
28+
rspec.spec_helper = "spec/spec_helper.rb"
29+
30+
watch(%r{^spec/.+_spec\.rb$})
31+
watch(%r{^lib/(.+)\.rb$}) { |m| rspec.spec.("lib/#{m[1]}") }
32+
watch(rspec.spec_helper) { rspec.spec_dir }
33+
34+
hound = OpenStruct.new
35+
hound.libspec = ->(m) { "spec/lib/hound/tools/#{m}_spec.rb" }
36+
hound.libspecs = ->(m) { m.map {|name| hound.libspec.(name) } }
37+
hound.template_r = ->(m) { /^#{Regexp.quote("lib/hound/tools/templates/_#{m}")}$/ }
38+
39+
watch('lib/hound/tools/template.rb') { hound.libspecs.(%w(cli hound_yml hound_defaults)) }
40+
watch(hound.template_r.('.hound.yml')) { hound.libspecs.(%w(cli hound_yml)) }
41+
watch(hound.template_r.('.rubocop.hound_defaults.yml')) { hound.libspecs.(%w(cli hound_defaults)) }
42+
end

LICENSE.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2014 Cezary Baginski
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Hound::Tools
2+
3+
Tools and configuration to locally simulate HoundCi checks
4+
5+
## Installation
6+
7+
Add this line to your application's Gemfile:
8+
9+
```ruby
10+
group :development do
11+
gem 'hound-tools', require: false
12+
end
13+
```
14+
15+
Run this to setup your config files so that Hound will produce the same results
16+
as running Rubocop locally:
17+
18+
```bash
19+
$ hound-tools init
20+
```
21+
22+
23+
## Usage
24+
25+
You can locally simulate a HoundCi check using:
26+
27+
```bash
28+
$ hound-tools
29+
```
30+
31+
32+
## Contributing
33+
34+
1. Fork it ( https://github.com/[my-github-username]/hound-tools/fork )
35+
2. Create your feature branch (`git checkout -b my-new-feature`)
36+
3. Commit your changes (`git commit -am 'Add some feature'`)
37+
4. Push to the branch (`git push origin my-new-feature`)
38+
5. Create a new Pull Request

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require "bundler/gem_tasks"

bin/hound-tools

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env ruby
2+
3+
require 'hound/tools/cli'
4+
5+
Hound::Tools::Cli.start

hound-tools.gemspec

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# coding: utf-8
2+
lib = File.expand_path('../lib', __FILE__)
3+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4+
require 'hound/tools/version'
5+
6+
Gem::Specification.new do |spec|
7+
spec.name = "hound-tools"
8+
spec.version = Hound::Tools::VERSION
9+
spec.authors = ["Cezary Baginski"]
10+
spec.email = ["[email protected]"]
11+
spec.summary = %q{Tools for configuring and using HoundCI}
12+
spec.description = %q{Matches your project config to give the same errors as HoundCi}
13+
spec.homepage = ""
14+
spec.license = "MIT"
15+
16+
spec.files = `git ls-files -z`.split("\x0")
17+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19+
spec.require_paths = ["lib"]
20+
21+
spec.add_dependency "rubocop", "0.25.0"
22+
spec.add_dependency "thor"
23+
24+
spec.add_development_dependency "bundler", "~> 1.7"
25+
spec.add_development_dependency "rake", "~> 10.0"
26+
end

lib/hound/tools.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require "hound/tools/version"
2+
3+
module Hound
4+
module Tools
5+
# Your code goes here...
6+
end
7+
end

0 commit comments

Comments
 (0)