batteries 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/lib/batteries/tasks/notes.rb +36 -0
- data/lib/batteries/version.rb +3 -0
- data/lib/batteries.rb +4 -0
- metadata +63 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: aa1be53e7b891ccc7e1bb8b12946e50ef5851d98
|
4
|
+
data.tar.gz: 1e41078471446335b139f6ab8a5cb7246c836f52
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b556058e760e7591e44060b6adbd68c7afdf06c69f4d452a2bfcc05b71ca45f170e1c9ea5c2c7161642732dff5fb291390013f9cd1b64496c0ce6de931434f12
|
7
|
+
data.tar.gz: e7c8f9043c9d0d553b7b535f1648399807f5ae9c35885443ae7e680fe87d9901918ecfa427542b7f7185156aaff6f63b33dfe3fb891890686febebbdd641f43e
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Adam Daniels
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Batteries (included)
|
2
|
+
|
3
|
+
Tired of copying the same Rake tasks to every single Roda/Sinatra project you
|
4
|
+
start? Me too.
|
5
|
+
|
6
|
+
Use batteries to get a head start.
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'batteries'
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
$ gem install batteries
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
Incorporate the Batteries Rake tasks into your Rakefile
|
27
|
+
|
28
|
+
Batteries::Tasks.new
|
29
|
+
|
30
|
+
## Contributing
|
31
|
+
|
32
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/adam12/batteries.
|
33
|
+
|
34
|
+
I love pull requests! If you fork this project and modify it, please ping me to see
|
35
|
+
if your changes can be incorporated back into this project.
|
36
|
+
|
37
|
+
That said, if your feature idea is nontrivial, you should probably open an issue to
|
38
|
+
[discuss it](http://www.igvita.com/2011/12/19/dont-push-your-pull-requests/)
|
39
|
+
before attempting a pull request.
|
40
|
+
|
41
|
+
## License
|
42
|
+
|
43
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require "rake"
|
3
|
+
require "rake/tasklib"
|
4
|
+
|
5
|
+
module Batteries
|
6
|
+
module Tasks
|
7
|
+
class Notes < ::Rake::TaskLib
|
8
|
+
attr_accessor :name, :description, :excluded_dirs, :matchers
|
9
|
+
|
10
|
+
def initialize(name = :notes)
|
11
|
+
@name = name
|
12
|
+
@description = "Notes"
|
13
|
+
@excluded_dirs = %w(node_modules public)
|
14
|
+
@matchers = %w(FIXME TODO)
|
15
|
+
|
16
|
+
yield self if block_given?
|
17
|
+
|
18
|
+
define
|
19
|
+
end
|
20
|
+
|
21
|
+
def define
|
22
|
+
desc @description
|
23
|
+
task name do
|
24
|
+
excludes = @excluded_dirs
|
25
|
+
.map { |dir| "--exclude-dir '#{dir}'" }.join(" ")
|
26
|
+
|
27
|
+
matchers = @matchers.map { |matcher| "-e '#{matcher}'" }.join(" ")
|
28
|
+
|
29
|
+
sh "grep #{excludes} -n -R --color #{matchers} *"
|
30
|
+
end
|
31
|
+
|
32
|
+
self
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/batteries.rb
ADDED
metadata
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: batteries
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Adam Daniels
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-03-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubygems-tasks
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.2'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.2'
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- adam@mediadrive.ca
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- LICENSE.txt
|
35
|
+
- README.md
|
36
|
+
- lib/batteries.rb
|
37
|
+
- lib/batteries/tasks/notes.rb
|
38
|
+
- lib/batteries/version.rb
|
39
|
+
homepage: https://github.com/adam12/batteries
|
40
|
+
licenses:
|
41
|
+
- MIT
|
42
|
+
metadata: {}
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
requirements: []
|
58
|
+
rubyforge_project:
|
59
|
+
rubygems_version: 2.6.8
|
60
|
+
signing_key:
|
61
|
+
specification_version: 4
|
62
|
+
summary: Powering your Roda/Sinatra applications
|
63
|
+
test_files: []
|