guard-flog 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/Guardfile +6 -0
- data/LICENSE.txt +22 -0
- data/README.md +52 -0
- data/Rakefile +1 -0
- data/guard-flog.gemspec +29 -0
- data/lib/guard/flog/flogger.rb +22 -0
- data/lib/guard/flog/templates/Guardfile +6 -0
- data/lib/guard/flog/version.rb +5 -0
- data/lib/guard/flog.rb +18 -0
- metadata +112 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MmNkNWQzY2E4NDgxZjc4NTMwYWE1OTYxYjk2N2YxYTliNWMyM2Y3NA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OTVkYmZiZGVhYmY3MTQ5ZTk4NmNmODc1M2VmOWIxYWM1ZDc3Y2Q3Mw==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YjI5NmZkODQyM2I4ODZlNjUyZDYzNGY2M2JmOGQ0Yjc2ZjNiZWUzOTZhMjMw
|
10
|
+
MTgxMzg4Njc3NGRlYzE3ZTZhM2MxNzE2Y2EwMDgzYmZmZmJmYjQ4N2U0ODk1
|
11
|
+
MDJmNmEzZThjYTBhYzVmZWI5NjBlYmYzZmUxNzNmNzIxNDU1ZWY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YTY2YzFkNWE2YWVhYWU3YjFmY2E3M2FhMzM1YTdhYmExMjE4ZjMzYjk1NGYw
|
14
|
+
YzM1YjMzMDNjZDEzOThkYzI2ZTNhM2NkNzUzNjRkYmEwNTRhOTBjY2ZmMmZk
|
15
|
+
MDE1ZTBmOGI3M2EwNzZkNDVkNWQxMDQ2MTM1YzgxNzEzZjM3ZmU=
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Péricles Dias
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Guard::Flog [![Dependency Status](https://gemnasium.com/pericles/guard-flog.png)](https://gemnasium.com/pericles/guard-flog)
|
2
|
+
|
3
|
+
Flog guard flogs every file on change.
|
4
|
+
|
5
|
+
* Compatible with Bundler 1.0.x
|
6
|
+
|
7
|
+
## Install
|
8
|
+
|
9
|
+
Please be sure to have [Guard](https://github.com/guard/guard) installed before continue.
|
10
|
+
|
11
|
+
Add it to your Gemfile (inside development group):
|
12
|
+
|
13
|
+
``` ruby
|
14
|
+
group :development do
|
15
|
+
gem 'guard-flog', git: 'git://github.com/pericles/guard-flog.git'
|
16
|
+
end
|
17
|
+
```
|
18
|
+
|
19
|
+
Add guard definition to your Guardfile by running this command:
|
20
|
+
|
21
|
+
```
|
22
|
+
$ guard init flog
|
23
|
+
```
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Please read [Guard usage doc](https://github.com/guard/guard#readme)
|
28
|
+
|
29
|
+
## Guardfile
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
guard :flog do
|
33
|
+
watch(%r{^lib/(.+)\.rb$})
|
34
|
+
|
35
|
+
# Rails example
|
36
|
+
watch(%r{^app/(.+)\.rb$})
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
Please read [Guard doc](https://github.com/guard/guard#readme) for more information about the Guardfile DSL.
|
41
|
+
|
42
|
+
## Development
|
43
|
+
|
44
|
+
* Source hosted at [GitHub](https://github.com/pericles/guard-flog)
|
45
|
+
* Report issues/Questions/Feature requests on [GitHub Issues](https://github.com/pericles/guard-flog/issues)
|
46
|
+
|
47
|
+
Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change
|
48
|
+
you make.
|
49
|
+
|
50
|
+
## Authors
|
51
|
+
|
52
|
+
[Péricles Dias](https://github.com/pericles)
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/guard-flog.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'guard/flog/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "guard-flog"
|
8
|
+
spec.version = Guard::FlogVersion::VERSION
|
9
|
+
spec.authors = ["Péricles Dias"]
|
10
|
+
spec.email = ["pericles.dias@gmail.com"]
|
11
|
+
spec.description = "Guard::Flog automatically run flog."
|
12
|
+
spec.summary = "Guard gem for Flog"
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
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.required_rubygems_version = '>= 2.0.6'
|
22
|
+
spec.rubyforge_project = 'guard-flog'
|
23
|
+
|
24
|
+
spec.add_dependency 'guard', '>= 1.8'
|
25
|
+
spec.add_dependency 'flog', '~> 4.2.0'
|
26
|
+
|
27
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
28
|
+
spec.add_development_dependency "rake"
|
29
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'flog_cli'
|
2
|
+
|
3
|
+
module Guard
|
4
|
+
class Flog
|
5
|
+
class Flogger
|
6
|
+
def initialize
|
7
|
+
::FlogCLI.load_plugins
|
8
|
+
options = ::FlogCLI.parse_options
|
9
|
+
@flogger = ::FlogCLI.new(options)
|
10
|
+
end
|
11
|
+
|
12
|
+
def flog(paths)
|
13
|
+
paths.each do |path|
|
14
|
+
UI.info "Running flog for file: '#{path}'", reset: true
|
15
|
+
@flogger.flog(path)
|
16
|
+
@flogger.report
|
17
|
+
puts
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/guard/flog.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'guard'
|
2
|
+
require 'guard/guard'
|
3
|
+
|
4
|
+
module Guard
|
5
|
+
class Flog < Guard
|
6
|
+
autoload :Flogger, 'guard/flog/flogger'
|
7
|
+
|
8
|
+
def start; end
|
9
|
+
|
10
|
+
def reload; end
|
11
|
+
|
12
|
+
def run_all; end
|
13
|
+
|
14
|
+
def run_on_changes(paths)
|
15
|
+
Flogger.new.flog paths
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: guard-flog
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Péricles Dias
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: guard
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.8'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.8'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: flog
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 4.2.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 4.2.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
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
|
+
description: Guard::Flog automatically run flog.
|
70
|
+
email:
|
71
|
+
- pericles.dias@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- .gitignore
|
77
|
+
- Gemfile
|
78
|
+
- Guardfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- guard-flog.gemspec
|
83
|
+
- lib/guard/flog.rb
|
84
|
+
- lib/guard/flog/flogger.rb
|
85
|
+
- lib/guard/flog/templates/Guardfile
|
86
|
+
- lib/guard/flog/version.rb
|
87
|
+
homepage: ''
|
88
|
+
licenses:
|
89
|
+
- MIT
|
90
|
+
metadata: {}
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ! '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ! '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 2.0.6
|
105
|
+
requirements: []
|
106
|
+
rubyforge_project: guard-flog
|
107
|
+
rubygems_version: 2.2.2
|
108
|
+
signing_key:
|
109
|
+
specification_version: 4
|
110
|
+
summary: Guard gem for Flog
|
111
|
+
test_files: []
|
112
|
+
has_rdoc:
|