tagrity 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +47 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/tagrity +4 -0
- data/lib/tagrity/cli.rb +46 -0
- data/lib/tagrity/commands/restart.rb +12 -0
- data/lib/tagrity/commands/start.rb +52 -0
- data/lib/tagrity/commands/status.rb +13 -0
- data/lib/tagrity/commands/stop.rb +19 -0
- data/lib/tagrity/config_file.rb +7 -0
- data/lib/tagrity/file_callbacks.rb +21 -0
- data/lib/tagrity/pid_file.rb +88 -0
- data/lib/tagrity/process_helper.rb +18 -0
- data/lib/tagrity/tag_generator.rb +33 -0
- data/lib/tagrity/version.rb +3 -0
- data/lib/tagrity.rb +2 -0
- data/tagrity.gemspec +35 -0
- metadata +142 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2253313b7cf87be67d74b7fb7aaf4aac4f8150a22c0948bde3991d034cbd1840
|
4
|
+
data.tar.gz: 6061998ec7aca60553ada4dea8841291ea925dbf8d7a5d728a085a4b4ec5520b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c0ef31e1842dc7c257b3ac34eb1586064471073c84bbf3fda31533e965f90d2aa8617b5ce707e4cd8fddc938d61190789f338530cd5450d2bebfbc2de69f76c7
|
7
|
+
data.tar.gz: 3300fd5df494335d992d9152059c6254957fa58c34e89bd6cb82ba476cf6b42582492cf9fd39930925f3e0f6bfbb8139205b58fe96e9fa9694963cbddd76ba09
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at rethy.spud@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
tagrity (0.1.0)
|
5
|
+
listen (~> 3.0)
|
6
|
+
thor (~> 0.20)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
diff-lcs (1.3)
|
12
|
+
ffi (1.11.1)
|
13
|
+
listen (3.1.5)
|
14
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
15
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
16
|
+
ruby_dep (~> 1.2)
|
17
|
+
rake (10.5.0)
|
18
|
+
rb-fsevent (0.10.3)
|
19
|
+
rb-inotify (0.10.0)
|
20
|
+
ffi (~> 1.0)
|
21
|
+
rspec (3.9.0)
|
22
|
+
rspec-core (~> 3.9.0)
|
23
|
+
rspec-expectations (~> 3.9.0)
|
24
|
+
rspec-mocks (~> 3.9.0)
|
25
|
+
rspec-core (3.9.0)
|
26
|
+
rspec-support (~> 3.9.0)
|
27
|
+
rspec-expectations (3.9.0)
|
28
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
+
rspec-support (~> 3.9.0)
|
30
|
+
rspec-mocks (3.9.0)
|
31
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
+
rspec-support (~> 3.9.0)
|
33
|
+
rspec-support (3.9.0)
|
34
|
+
ruby_dep (1.5.0)
|
35
|
+
thor (0.20.3)
|
36
|
+
|
37
|
+
PLATFORMS
|
38
|
+
ruby
|
39
|
+
|
40
|
+
DEPENDENCIES
|
41
|
+
bundler (~> 2.0)
|
42
|
+
rake (~> 10.0)
|
43
|
+
rspec (~> 3.0)
|
44
|
+
tagrity!
|
45
|
+
|
46
|
+
BUNDLED WITH
|
47
|
+
2.0.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Adam P. Regasz-Rethy
|
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
|
+
# Tagrity
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/tagrity`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'tagrity'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install tagrity
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. 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).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tagrity. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the Tagrity project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tagrity/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "tagrity"
|
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(__FILE__)
|
data/bin/setup
ADDED
data/exe/tagrity
ADDED
data/lib/tagrity/cli.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'tagrity/commands/start'
|
3
|
+
require 'tagrity/commands/stop'
|
4
|
+
require 'tagrity/commands/restart'
|
5
|
+
require 'tagrity/commands/status'
|
6
|
+
|
7
|
+
module Tagrity
|
8
|
+
class CLI < Thor
|
9
|
+
desc "start", "Start watching pwd or DIR"
|
10
|
+
option :dir
|
11
|
+
option :fg, type: :boolean
|
12
|
+
def start()
|
13
|
+
Command::Start::call(dir, fg?)
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "stop", "Stop watching pwd or DIR"
|
17
|
+
option :dir
|
18
|
+
def stop()
|
19
|
+
Command::Stop::call(dir)
|
20
|
+
end
|
21
|
+
|
22
|
+
desc "restart", "Stop watching pwd or DIR. Start watching pwd or DIR again"
|
23
|
+
option :dir
|
24
|
+
option :fg, type: :boolean
|
25
|
+
def restart()
|
26
|
+
Command::Restart::call(dir, fg?)
|
27
|
+
end
|
28
|
+
|
29
|
+
desc "status", "status running tagrity processes watching directories"
|
30
|
+
def status
|
31
|
+
Command::Status::call
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def dir
|
37
|
+
dir = options[:dir] || Dir.pwd
|
38
|
+
raise Errno::ENOENT, "No such directory - #{dir}" unless Dir.exists?(dir)
|
39
|
+
dir
|
40
|
+
end
|
41
|
+
|
42
|
+
def fg?
|
43
|
+
options[:fg]
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'listen'
|
2
|
+
require 'tagrity/pid_file'
|
3
|
+
require 'tagrity/process_helper'
|
4
|
+
require 'tagrity/file_callbacks'
|
5
|
+
|
6
|
+
module Tagrity
|
7
|
+
module Command
|
8
|
+
class Start
|
9
|
+
class ErrorProcessAlreadyRunning < StandardError; end
|
10
|
+
|
11
|
+
class << self
|
12
|
+
def call(dir, fg)
|
13
|
+
assert_not_running(dir)
|
14
|
+
|
15
|
+
callbacks = FileCallbacks.new
|
16
|
+
|
17
|
+
Process.daemon unless fg
|
18
|
+
PidFile.write(PidFile.new(dir, Process.pid))
|
19
|
+
|
20
|
+
listener = Listen.to(
|
21
|
+
dir,
|
22
|
+
ignore: [/tags/],
|
23
|
+
relative: true,
|
24
|
+
) do |modified, added, removed|
|
25
|
+
callbacks.on_files_modified(modified)
|
26
|
+
callbacks.on_files_added(added)
|
27
|
+
callbacks.on_files_removed(removed)
|
28
|
+
puts "modified absolute paths: #{modified}"
|
29
|
+
puts "added absolute paths: #{added}"
|
30
|
+
puts "removed absolute paths: #{removed}"
|
31
|
+
end
|
32
|
+
listener.start
|
33
|
+
sleep
|
34
|
+
rescue ErrorProcessAlreadyRunning => e
|
35
|
+
puts e.message
|
36
|
+
rescue Interrupt => e
|
37
|
+
PidFile.delete(dir)
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def assert_not_running(dir)
|
43
|
+
running_processes = PidFile.alive_pid_files(dir: dir)
|
44
|
+
unless running_processes.empty?
|
45
|
+
pids = running_processes.map { |pid_file| pid_file.pid }
|
46
|
+
raise ErrorProcessAlreadyRunning, "Error: tagrity is already watching #{dir} with process #{pids}"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Tagrity
|
2
|
+
module Command
|
3
|
+
class Stop
|
4
|
+
class << self
|
5
|
+
def call(dir)
|
6
|
+
pid_files = PidFile.alive_pid_files(dir: dir)
|
7
|
+
if pid_files.empty?
|
8
|
+
puts "😕 tagrity doesn't seem to be watching #{dir}"
|
9
|
+
else
|
10
|
+
pid_files.each do |pid_file|
|
11
|
+
pid_file.delete
|
12
|
+
puts "Successfully killed #{pid_file.pid}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'tagrity/tag_generator'
|
2
|
+
|
3
|
+
module Tagrity
|
4
|
+
class FileCallbacks
|
5
|
+
def initialize
|
6
|
+
@tag_generator = TagGenerator.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def on_files_modified(files)
|
10
|
+
@tag_generator.generate(files)
|
11
|
+
end
|
12
|
+
|
13
|
+
def on_files_added(files)
|
14
|
+
@tag_generator.generate(files)
|
15
|
+
end
|
16
|
+
|
17
|
+
def on_files_removed(files)
|
18
|
+
@tag_generator.delete_files_tags(files)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
module Tagrity
|
2
|
+
class PidFile
|
3
|
+
RUN_DIR = "#{__dir__}/../../var/run"
|
4
|
+
|
5
|
+
class << self
|
6
|
+
def write(pid_file)
|
7
|
+
File.write("#{run_dir}/#{pid_file.name}", pid_file.dir)
|
8
|
+
end
|
9
|
+
|
10
|
+
def delete(dir)
|
11
|
+
pid_file_paths = Dir.glob("#{run_dir}/#{dir.split('/').last}.*.pid").select do |path|
|
12
|
+
full_dir = File.read(path)
|
13
|
+
File.realdirpath(full_dir) == File.realdirpath(dir)
|
14
|
+
end
|
15
|
+
|
16
|
+
pid_file_paths.each do |path|
|
17
|
+
File.delete(path)
|
18
|
+
ProcessHelper.kill(pid_from_path(path))
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def alive_pid_files(dir: nil)
|
23
|
+
Dir.glob("#{run_dir}/*").reduce([]) do |pid_files, path|
|
24
|
+
pid = pid_from_path(path)
|
25
|
+
pid_file_dir = File.read(path)
|
26
|
+
|
27
|
+
if dir.nil? || is_same_dirs(pid_file_dir, dir)
|
28
|
+
if ProcessHelper.alive?(pid)
|
29
|
+
pid_files << PidFile.new(pid_file_dir, pid)
|
30
|
+
else
|
31
|
+
File.delete(path)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
pid_files
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def run_dir
|
40
|
+
ensure_dirs
|
41
|
+
RUN_DIR
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def is_same_dirs(dir1, dir2)
|
47
|
+
File.realdirpath(dir1) == File.realdirpath(dir2)
|
48
|
+
end
|
49
|
+
|
50
|
+
def ensure_dirs
|
51
|
+
return if @ensure_dirs_done
|
52
|
+
FileUtils.mkdir_p(RUN_DIR)
|
53
|
+
@ensure_dirs_done = true
|
54
|
+
end
|
55
|
+
|
56
|
+
def pid_from_path(pid_file_name)
|
57
|
+
pid_file_name.split('.')[-2].to_i
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
attr_reader :pid, :dir
|
62
|
+
|
63
|
+
def initialize(dir, pid)
|
64
|
+
@dir = dir
|
65
|
+
@pid = pid
|
66
|
+
end
|
67
|
+
|
68
|
+
def ==(other)
|
69
|
+
@dir == other.dir
|
70
|
+
@pid == other.pid
|
71
|
+
end
|
72
|
+
|
73
|
+
def name
|
74
|
+
"#{@dir.split('/').last}.#{@pid}.pid"
|
75
|
+
end
|
76
|
+
|
77
|
+
def delete
|
78
|
+
File.delete(pid_file_path)
|
79
|
+
ProcessHelper.kill(pid.to_i)
|
80
|
+
end
|
81
|
+
|
82
|
+
private
|
83
|
+
|
84
|
+
def pid_file_path
|
85
|
+
"#{PidFile.run_dir}/#{name}"
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Tagrity
|
2
|
+
class ProcessHelper
|
3
|
+
class << self
|
4
|
+
def kill(pid)
|
5
|
+
Process.kill('HUP', pid)
|
6
|
+
end
|
7
|
+
|
8
|
+
def alive?(pid)
|
9
|
+
Process.kill(0, pid) # signal 0 checks if pid is alive
|
10
|
+
true
|
11
|
+
rescue Errno::ESRCH
|
12
|
+
false
|
13
|
+
rescue Errno::EPERM
|
14
|
+
true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Tagrity
|
2
|
+
class TagGenerator
|
3
|
+
class ExecutableNonExist < StandardError; end
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
assert_executables
|
7
|
+
end
|
8
|
+
|
9
|
+
def generate_all
|
10
|
+
end
|
11
|
+
|
12
|
+
def generate(files)
|
13
|
+
return if files.empty?
|
14
|
+
`ctags -f tags --append #{files.join(' ')}`
|
15
|
+
end
|
16
|
+
|
17
|
+
def delete_files_tags(files)
|
18
|
+
return if files.empty?
|
19
|
+
`cat tags | grep -v -F #{files.map { |f| " -e \"#{f}\""}.join(' ')} > .tags`
|
20
|
+
`mv .tags tags`
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def assert_executables
|
26
|
+
%w(cat grep mv).each do |exe|
|
27
|
+
if %x{command -v #{exe}}.empty?
|
28
|
+
raise ExecutableNonExist, "tagrity depends on the executable #{exe}"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/tagrity.rb
ADDED
data/tagrity.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "tagrity/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "tagrity"
|
7
|
+
spec.version = Tagrity::VERSION
|
8
|
+
spec.authors = ["Adam P. Regasz-Rethy"]
|
9
|
+
spec.email = ["rethy.spud@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = %q{Regenerate tags on file changes.}
|
12
|
+
spec.description = %q{Ditto}
|
13
|
+
spec.homepage = "https://github.com/RRethy/tagrity"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/RRethy/tagrity"
|
18
|
+
spec.metadata["changelog_uri"] = "https://github.com/RRethy/tagrity/blob/master/CHANGELOG.md"
|
19
|
+
|
20
|
+
# Specify which files should be added to the gem when it is released.
|
21
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
23
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
|
+
end
|
25
|
+
spec.bindir = "exe"
|
26
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
+
spec.require_paths = ["lib"]
|
28
|
+
|
29
|
+
spec.add_dependency 'thor', '~> 0.20'
|
30
|
+
spec.add_dependency 'listen', '~> 3.0'
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
33
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
34
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
35
|
+
end
|
metadata
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tagrity
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Adam P. Regasz-Rethy
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-12-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.20'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.20'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: listen
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.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: '2.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.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: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
description: Ditto
|
84
|
+
email:
|
85
|
+
- rethy.spud@gmail.com
|
86
|
+
executables:
|
87
|
+
- tagrity
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- ".gitignore"
|
92
|
+
- ".rspec"
|
93
|
+
- ".travis.yml"
|
94
|
+
- CODE_OF_CONDUCT.md
|
95
|
+
- Gemfile
|
96
|
+
- Gemfile.lock
|
97
|
+
- LICENSE.txt
|
98
|
+
- README.md
|
99
|
+
- Rakefile
|
100
|
+
- bin/console
|
101
|
+
- bin/setup
|
102
|
+
- exe/tagrity
|
103
|
+
- lib/tagrity.rb
|
104
|
+
- lib/tagrity/cli.rb
|
105
|
+
- lib/tagrity/commands/restart.rb
|
106
|
+
- lib/tagrity/commands/start.rb
|
107
|
+
- lib/tagrity/commands/status.rb
|
108
|
+
- lib/tagrity/commands/stop.rb
|
109
|
+
- lib/tagrity/config_file.rb
|
110
|
+
- lib/tagrity/file_callbacks.rb
|
111
|
+
- lib/tagrity/pid_file.rb
|
112
|
+
- lib/tagrity/process_helper.rb
|
113
|
+
- lib/tagrity/tag_generator.rb
|
114
|
+
- lib/tagrity/version.rb
|
115
|
+
- tagrity.gemspec
|
116
|
+
homepage: https://github.com/RRethy/tagrity
|
117
|
+
licenses:
|
118
|
+
- MIT
|
119
|
+
metadata:
|
120
|
+
homepage_uri: https://github.com/RRethy/tagrity
|
121
|
+
source_code_uri: https://github.com/RRethy/tagrity
|
122
|
+
changelog_uri: https://github.com/RRethy/tagrity/blob/master/CHANGELOG.md
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options: []
|
125
|
+
require_paths:
|
126
|
+
- lib
|
127
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
requirements: []
|
138
|
+
rubygems_version: 3.0.3
|
139
|
+
signing_key:
|
140
|
+
specification_version: 4
|
141
|
+
summary: Regenerate tags on file changes.
|
142
|
+
test_files: []
|