cch 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/.codeclimate.yml +7 -0
- data/.gitignore +35 -0
- data/.rspec +2 -0
- data/.rubocop.yml +10 -0
- data/.travis.yml +18 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/CONTRIBUTING.md +16 -0
- data/Cchfile +6 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +62 -0
- data/LICENSE.md +21 -0
- data/README.md +51 -0
- data/Rakefile +17 -0
- data/bin/cch +8 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/cch.gemspec +36 -0
- data/config/Cchfile +18 -0
- data/lib/cch/commands/shell.rb +21 -0
- data/lib/cch/extensions/string.rb +11 -0
- data/lib/cch/runner.rb +39 -0
- data/lib/cch/setup.rb +34 -0
- data/lib/cch/version.rb +3 -0
- data/lib/cch/watcher.rb +15 -0
- data/lib/cch.rb +26 -0
- metadata +155 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MTg3OWZkMGY4NjYxOGJiMzNiZTUyMzU4ZTk4MmM1NWNkNmNjMGEyNw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Yjg2NmRkMmE1YmNjMDhlMTgyNzBmM2Q1YzYzYTEzMTgwZjk3ZTk4MA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
N2MzOTA1MzAwZDkxNGY1YTY1YWMwNDI1YWY5ZjNlNmI0ZDNhYjIxMDdjZDZi
|
10
|
+
MzZmYTIyMmQ5OTdjYzU1MzdkNjAzZWExNmY4OWE5NTM0OWZlYWVmNTU2YzJj
|
11
|
+
ZmRmZWJmOWY0NDc2YzUyNDFiMTNmZTNiNWExNmEyNTZkY2UxMDE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NGNjZThmMjQ2MTJiMzQ4Mzc4MzA3MTY3ZDhjNGJmMzQ0YWZiYzYxYzY1ZGNk
|
14
|
+
ODQ3OTFiMDlmYmZkNDM0MjFiNjUxZDY2OWFkMmM0NDk4ZDQyNzU4N2YzZWU4
|
15
|
+
NzllODgwMDNmOTJjYmFmNDc5ZmQ2ZjM0MTI5OGVlN2RmYTlhZDI=
|
data/.codeclimate.yml
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/vendor/bundle
|
26
|
+
/lib/bundler/man/
|
27
|
+
|
28
|
+
# for a library or gem, you might want to ignore these files since the code is
|
29
|
+
# intended to run in multiple environments; otherwise, check them in:
|
30
|
+
# Gemfile.lock
|
31
|
+
# .ruby-version
|
32
|
+
# .ruby-gemset
|
33
|
+
|
34
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
35
|
+
.rvmrc
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
language: ruby
|
2
|
+
cache: bundler
|
3
|
+
rvm:
|
4
|
+
- 1.9.3
|
5
|
+
- 2.0.0
|
6
|
+
- 2.1.0
|
7
|
+
- 2.2.0
|
8
|
+
- 2.2.2
|
9
|
+
git:
|
10
|
+
depth: 1
|
11
|
+
before_install: gem install bundler -v 1.10.6
|
12
|
+
script:
|
13
|
+
- bundle exec yard
|
14
|
+
- bundle exec rubocop
|
15
|
+
- bundle exec rspec
|
16
|
+
deploy:
|
17
|
+
provider: rubygems
|
18
|
+
api_key: 4672b2d03693ff646f79dfb823e02a60
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Contributing to Cch
|
2
|
+
|
3
|
+
The following is a set of guidelines for contributing to Cch gem, which is hosted in the [Cch gem](https://github.com/vnegrisolo/cch) on GitHub.
|
4
|
+
These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request.
|
5
|
+
|
6
|
+
## Submitting Issues
|
7
|
+
|
8
|
+
* You can create an issue/bug [here](https://github.com/vnegrisolo/cch/issues/new)
|
9
|
+
|
10
|
+
## Git Commit Messages
|
11
|
+
|
12
|
+
* Explain why the change is for.
|
13
|
+
|
14
|
+
## Pull Requests
|
15
|
+
|
16
|
+
* Run tests before open the PR.
|
data/Cchfile
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
cch (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.1.0)
|
10
|
+
astrolabe (1.3.1)
|
11
|
+
parser (~> 2.2)
|
12
|
+
codeclimate-test-reporter (0.4.8)
|
13
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
14
|
+
diff-lcs (1.2.5)
|
15
|
+
docile (1.1.5)
|
16
|
+
json (1.8.3)
|
17
|
+
parser (2.2.2.6)
|
18
|
+
ast (>= 1.1, < 3.0)
|
19
|
+
powerpack (0.1.1)
|
20
|
+
rainbow (2.0.0)
|
21
|
+
rake (10.4.2)
|
22
|
+
rspec (3.3.0)
|
23
|
+
rspec-core (~> 3.3.0)
|
24
|
+
rspec-expectations (~> 3.3.0)
|
25
|
+
rspec-mocks (~> 3.3.0)
|
26
|
+
rspec-core (3.3.2)
|
27
|
+
rspec-support (~> 3.3.0)
|
28
|
+
rspec-expectations (3.3.1)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.3.0)
|
31
|
+
rspec-mocks (3.3.2)
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
+
rspec-support (~> 3.3.0)
|
34
|
+
rspec-support (3.3.0)
|
35
|
+
rubocop (0.34.0)
|
36
|
+
astrolabe (~> 1.3)
|
37
|
+
parser (>= 2.2.2.5, < 3.0)
|
38
|
+
powerpack (~> 0.1)
|
39
|
+
rainbow (>= 1.99.1, < 3.0)
|
40
|
+
ruby-progressbar (~> 1.4)
|
41
|
+
ruby-progressbar (1.7.5)
|
42
|
+
simplecov (0.10.0)
|
43
|
+
docile (~> 1.1.0)
|
44
|
+
json (~> 1.8)
|
45
|
+
simplecov-html (~> 0.10.0)
|
46
|
+
simplecov-html (0.10.0)
|
47
|
+
yard (0.8.7.6)
|
48
|
+
|
49
|
+
PLATFORMS
|
50
|
+
ruby
|
51
|
+
|
52
|
+
DEPENDENCIES
|
53
|
+
bundler (~> 1.10)
|
54
|
+
cch!
|
55
|
+
codeclimate-test-reporter
|
56
|
+
rake (~> 10.0)
|
57
|
+
rspec
|
58
|
+
rubocop
|
59
|
+
yard
|
60
|
+
|
61
|
+
BUNDLED WITH
|
62
|
+
1.10.6
|
data/LICENSE.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# The MIT License (MIT)
|
2
|
+
|
3
|
+
## Copyright (c) 2015 Vinicius Negrisolo
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# cch
|
2
|
+
CCH - Check on changes for ruby projects
|
3
|
+
|
4
|
+
## gem status
|
5
|
+
|
6
|
+
[](https://travis-ci.org/vnegrisolo/cch)
|
7
|
+
[](https://codeclimate.com/github/vnegrisolo/cch)
|
8
|
+
[](https://codeclimate.com/github/vnegrisolo/cch/coverage)
|
9
|
+
[](https://gemnasium.com/vnegrisolo/cch)
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
```shell
|
14
|
+
gem install cch
|
15
|
+
```
|
16
|
+
|
17
|
+
Create a `Cchfile` on your project folder:
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
Cch::Setup.tap do |setup|
|
21
|
+
setup.run :rspec
|
22
|
+
setup.run :rubocop
|
23
|
+
end
|
24
|
+
```
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
```shell
|
29
|
+
cch
|
30
|
+
```
|
31
|
+
|
32
|
+
## Development
|
33
|
+
|
34
|
+
1. checking out the repo
|
35
|
+
2. run `bin/setup` to install dependencies
|
36
|
+
3. run `bundle exec rake` to run the all necessary checks like documentation, code style and tests
|
37
|
+
|
38
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
39
|
+
|
40
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
41
|
+
|
42
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org/gems/cch).
|
43
|
+
|
44
|
+
## Contributing
|
45
|
+
|
46
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/vnegrisolo/cch. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://github.com/vnegrisolo/cch/blob/master/CONTRIBUTING.md) code of conduct.
|
47
|
+
|
48
|
+
|
49
|
+
## License
|
50
|
+
|
51
|
+
The gem is available as open source under the terms of the [MIT License](https://github.com/vnegrisolo/cch/blob/master/LICENSE.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'yard'
|
3
|
+
require 'rubocop/rake_task'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
|
6
|
+
YARD::Rake::YardocTask.new do |t|
|
7
|
+
t.files = ['lib/**/*.rb']
|
8
|
+
t.stats_options = ['--list-undoc']
|
9
|
+
end
|
10
|
+
|
11
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
12
|
+
task.formatters = ['fuubar']
|
13
|
+
end
|
14
|
+
|
15
|
+
RSpec::Core::RakeTask.new(:spec)
|
16
|
+
|
17
|
+
task default: [:yard, :rubocop, :spec]
|
data/bin/cch
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'cch'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require 'pry'
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require 'irb'
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/cch.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cch/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'cch'
|
8
|
+
spec.version = Cch::VERSION
|
9
|
+
spec.authors = ['Vinicius Ferreira Negrisolo']
|
10
|
+
spec.email = ['vinicius.negrisolo@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = 'cch - check on changes'
|
13
|
+
spec.description = 'cch - check on changes'
|
14
|
+
spec.homepage = 'https://github.com/vnegrisolo/cch'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
|
+
# delete this section to allow pushing this gem to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata['allowed_push_host'] = 'https://github.com/vnegrisolo/cch'
|
21
|
+
else
|
22
|
+
fail 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
|
23
|
+
end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
spec.bindir = 'bin'
|
27
|
+
spec.executables = %w(cch)
|
28
|
+
spec.require_paths = ['lib']
|
29
|
+
|
30
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
31
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
32
|
+
spec.add_development_dependency 'yard'
|
33
|
+
spec.add_development_dependency 'rubocop'
|
34
|
+
spec.add_development_dependency 'rspec'
|
35
|
+
spec.add_development_dependency 'codeclimate-test-reporter'
|
36
|
+
end
|
data/config/Cchfile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
Cch::Setup.tap do |setup|
|
2
|
+
setup.debug = false
|
3
|
+
|
4
|
+
setup.watcher_commands = [
|
5
|
+
'git diff --name-only',
|
6
|
+
'git diff --name-only --staged',
|
7
|
+
'git ls-files --others --exclude-standard',
|
8
|
+
'git diff --name-only ..master'
|
9
|
+
]
|
10
|
+
|
11
|
+
setup.add_runner :rubocop do |runner|
|
12
|
+
runner.watch /\.rb$/
|
13
|
+
end
|
14
|
+
|
15
|
+
setup.add_runner :rspec do |runner|
|
16
|
+
runner.watch /_spec\.rb$/
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Cch
|
2
|
+
module Commands
|
3
|
+
module Shell
|
4
|
+
def backtiq_command(command)
|
5
|
+
log_command(command)
|
6
|
+
(`#{command}` || '').split(/\n/)
|
7
|
+
end
|
8
|
+
|
9
|
+
def system_command(command)
|
10
|
+
log_command(command)
|
11
|
+
system(command)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def log_command(command)
|
17
|
+
puts "=> command='#{command}'" if Setup.debug
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class String
|
2
|
+
def color(text, background = :no_color)
|
3
|
+
"\e[3#{color_code(text)}m\e[4#{color_code(background)}m#{self}\e[0m"
|
4
|
+
end
|
5
|
+
|
6
|
+
private
|
7
|
+
|
8
|
+
def color_code(color)
|
9
|
+
[:black, :red, :green, :yellow, :blue, :pink, :cyan, :white, :no_color].find_index(color)
|
10
|
+
end
|
11
|
+
end
|
data/lib/cch/runner.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
module Cch
|
2
|
+
class Runner
|
3
|
+
include Commands::Shell
|
4
|
+
|
5
|
+
attr_reader :name, :patterns
|
6
|
+
attr_accessor :command, :on
|
7
|
+
|
8
|
+
def initialize(name)
|
9
|
+
@name = name
|
10
|
+
@command = "bundle exec #{@name} %{files}"
|
11
|
+
@on = false
|
12
|
+
@patterns = []
|
13
|
+
end
|
14
|
+
|
15
|
+
def watch(pattern)
|
16
|
+
@patterns << pattern
|
17
|
+
end
|
18
|
+
|
19
|
+
def run(files)
|
20
|
+
puts "=> running #{@name.to_s.color(:black, :green)}"
|
21
|
+
files = filter_files(files)
|
22
|
+
puts "=> #{files.size.to_s.color(:yellow)} files=#{files}"
|
23
|
+
return unless run?(files)
|
24
|
+
|
25
|
+
system_command(@command % { files: files.join(' ') })
|
26
|
+
end
|
27
|
+
|
28
|
+
def filter_files(files)
|
29
|
+
filtered_files = patterns.flat_map { |pattern| files.grep(pattern) }
|
30
|
+
puts "=> filtered_files='#{filtered_files}'" if Setup.debug
|
31
|
+
|
32
|
+
filtered_files.sort.uniq.select { |f| File.exist?(f) }
|
33
|
+
end
|
34
|
+
|
35
|
+
def run?(files)
|
36
|
+
files.size > 0
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/cch/setup.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
module Cch
|
2
|
+
class Setup
|
3
|
+
class << self
|
4
|
+
ATTRIBUTES = [:debug, :watcher_commands, :runners]
|
5
|
+
attr_accessor(*ATTRIBUTES)
|
6
|
+
|
7
|
+
def configure
|
8
|
+
load_setup_files(%w(config/Cchfile Cchfile))
|
9
|
+
puts "=> setup\n#{inspect}" if debug
|
10
|
+
self
|
11
|
+
end
|
12
|
+
|
13
|
+
def inspect
|
14
|
+
ATTRIBUTES.map { |f| " #{f} = #{send(f)}" }.join("\n")
|
15
|
+
end
|
16
|
+
|
17
|
+
def add_runner(runner)
|
18
|
+
@runners ||= {}
|
19
|
+
@runners[runner] = Runner.new(runner)
|
20
|
+
yield @runners[runner] if block_given?
|
21
|
+
end
|
22
|
+
|
23
|
+
def run(runner)
|
24
|
+
runners.fetch(runner).on = true
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def load_setup_files(files)
|
30
|
+
files.each { |f| load(f, true) if File.exist?(f) }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/cch/version.rb
ADDED
data/lib/cch/watcher.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
module Cch
|
2
|
+
class Watcher
|
3
|
+
include Commands::Shell
|
4
|
+
|
5
|
+
def initialize(commands = nil)
|
6
|
+
@commands = commands || Setup.watcher_commands
|
7
|
+
end
|
8
|
+
|
9
|
+
def files
|
10
|
+
files = @commands.flat_map { |command| backtiq_command(command) }.compact.sort.uniq
|
11
|
+
puts "=> watched files='#{files}'" if Setup.debug
|
12
|
+
files
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/cch.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
require 'cch/extensions/string'
|
4
|
+
require 'cch/version'
|
5
|
+
require 'cch/setup'
|
6
|
+
require 'cch/commands/shell'
|
7
|
+
require 'cch/watcher'
|
8
|
+
require 'cch/runner'
|
9
|
+
|
10
|
+
module Cch
|
11
|
+
class << self
|
12
|
+
def run(args)
|
13
|
+
puts "=> running cch with args='#{args}'"
|
14
|
+
Setup.configure
|
15
|
+
|
16
|
+
files = Watcher.new.files
|
17
|
+
runners.each { |runner| runner.run(files) if runner.on }
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def runners
|
23
|
+
Setup.runners.values
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,155 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cch
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vinicius Ferreira Negrisolo
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: yard
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ! '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: codeclimate-test-reporter
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: cch - check on changes
|
98
|
+
email:
|
99
|
+
- vinicius.negrisolo@gmail.com
|
100
|
+
executables:
|
101
|
+
- cch
|
102
|
+
extensions: []
|
103
|
+
extra_rdoc_files: []
|
104
|
+
files:
|
105
|
+
- .codeclimate.yml
|
106
|
+
- .gitignore
|
107
|
+
- .rspec
|
108
|
+
- .rubocop.yml
|
109
|
+
- .travis.yml
|
110
|
+
- CODE_OF_CONDUCT.md
|
111
|
+
- CONTRIBUTING.md
|
112
|
+
- Cchfile
|
113
|
+
- Gemfile
|
114
|
+
- Gemfile.lock
|
115
|
+
- LICENSE.md
|
116
|
+
- README.md
|
117
|
+
- Rakefile
|
118
|
+
- bin/cch
|
119
|
+
- bin/console
|
120
|
+
- bin/setup
|
121
|
+
- cch.gemspec
|
122
|
+
- config/Cchfile
|
123
|
+
- lib/cch.rb
|
124
|
+
- lib/cch/commands/shell.rb
|
125
|
+
- lib/cch/extensions/string.rb
|
126
|
+
- lib/cch/runner.rb
|
127
|
+
- lib/cch/setup.rb
|
128
|
+
- lib/cch/version.rb
|
129
|
+
- lib/cch/watcher.rb
|
130
|
+
homepage: https://github.com/vnegrisolo/cch
|
131
|
+
licenses:
|
132
|
+
- MIT
|
133
|
+
metadata:
|
134
|
+
allowed_push_host: https://github.com/vnegrisolo/cch
|
135
|
+
post_install_message:
|
136
|
+
rdoc_options: []
|
137
|
+
require_paths:
|
138
|
+
- lib
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - ! '>='
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
requirements: []
|
150
|
+
rubyforge_project:
|
151
|
+
rubygems_version: 2.4.5
|
152
|
+
signing_key:
|
153
|
+
specification_version: 4
|
154
|
+
summary: cch - check on changes
|
155
|
+
test_files: []
|