devlogs 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/main.yml +18 -0
- data/.gitignore +12 -0
- data/.rubocop.yml +28 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +64 -0
- data/LICENSE.txt +21 -0
- data/README.md +83 -0
- data/Rakefile +7 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/devlogs.gemspec +35 -0
- data/docs/mirroring.png +0 -0
- data/exe/devlogs +6 -0
- data/lib/devlogs/repository.rb +187 -0
- data/lib/devlogs/version.rb +5 -0
- data/lib/devlogs.rb +56 -0
- metadata +126 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b99f8b324427d042c22df13670cd362387c29d2392d3c5ac5b4dc3933e7a6350
|
4
|
+
data.tar.gz: 10e884ccc05ab8f967ef1b12eb8b28bb728d0642510e9279c76f2c696929cbb8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 41736e5c49fae07395e3da06f9aba779a48d14b5ded23ba0a062ff9de1a176050fee2208a959417846e9029166c4deb59eb93114dc93c67e3c7c55415b0be550
|
7
|
+
data.tar.gz: e9854ed3e849a7208a8c9e3c82410973945c99a9a2e488a9f153f8612bcb80ed5f3a66f6a45f2d8cfe4945bb66b6abad3738b2df339a429bf5b7d9e7d31945cb
|
@@ -0,0 +1,18 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push,pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v2
|
10
|
+
- name: Set up Ruby
|
11
|
+
uses: ruby/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
ruby-version: 3.0.0
|
14
|
+
- name: Run the default task
|
15
|
+
run: |
|
16
|
+
gem install bundler -v 2.2.3
|
17
|
+
bundle install
|
18
|
+
bundle exec rake
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
Style/StringLiterals:
|
2
|
+
Enabled: true
|
3
|
+
EnforcedStyle: double_quotes
|
4
|
+
|
5
|
+
Style/StringLiteralsInInterpolation:
|
6
|
+
Enabled: true
|
7
|
+
EnforcedStyle: double_quotes
|
8
|
+
|
9
|
+
Layout/LineLength:
|
10
|
+
Max: 150
|
11
|
+
|
12
|
+
Metrics/ModuleLength:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Metrics/MethodLength:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Metrics/AbcSize:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
Style/GuardClause:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Naming/MethodParameterName:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
Gemspec/RequiredRubyVersion:
|
28
|
+
Enabled: false
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
devlogs (0.1.4)
|
5
|
+
rsync (~> 1.0, >= 1.0.9)
|
6
|
+
thor (~> 1.2.1)
|
7
|
+
tty-prompt (~> 0.23.1)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
ast (2.4.2)
|
13
|
+
coderay (1.1.3)
|
14
|
+
method_source (1.0.0)
|
15
|
+
parallel (1.22.1)
|
16
|
+
parser (3.1.2.0)
|
17
|
+
ast (~> 2.4.1)
|
18
|
+
pastel (0.8.0)
|
19
|
+
tty-color (~> 0.5)
|
20
|
+
pry (0.14.1)
|
21
|
+
coderay (~> 1.1)
|
22
|
+
method_source (~> 1.0)
|
23
|
+
rainbow (3.1.1)
|
24
|
+
rake (13.0.6)
|
25
|
+
regexp_parser (2.3.0)
|
26
|
+
rexml (3.2.5)
|
27
|
+
rsync (1.0.9)
|
28
|
+
rubocop (0.93.1)
|
29
|
+
parallel (~> 1.10)
|
30
|
+
parser (>= 2.7.1.5)
|
31
|
+
rainbow (>= 2.2.2, < 4.0)
|
32
|
+
regexp_parser (>= 1.8)
|
33
|
+
rexml
|
34
|
+
rubocop-ast (>= 0.6.0)
|
35
|
+
ruby-progressbar (~> 1.7)
|
36
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
37
|
+
rubocop-ast (1.17.0)
|
38
|
+
parser (>= 3.1.1.0)
|
39
|
+
ruby-progressbar (1.11.0)
|
40
|
+
thor (1.2.1)
|
41
|
+
tty-color (0.6.0)
|
42
|
+
tty-cursor (0.7.1)
|
43
|
+
tty-prompt (0.23.1)
|
44
|
+
pastel (~> 0.8)
|
45
|
+
tty-reader (~> 0.8)
|
46
|
+
tty-reader (0.9.0)
|
47
|
+
tty-cursor (~> 0.7)
|
48
|
+
tty-screen (~> 0.8)
|
49
|
+
wisper (~> 2.0)
|
50
|
+
tty-screen (0.8.1)
|
51
|
+
unicode-display_width (1.8.0)
|
52
|
+
wisper (2.0.1)
|
53
|
+
|
54
|
+
PLATFORMS
|
55
|
+
arm64-darwin-21
|
56
|
+
|
57
|
+
DEPENDENCIES
|
58
|
+
devlogs!
|
59
|
+
pry (~> 0.14.0)
|
60
|
+
rake (~> 13.0)
|
61
|
+
rubocop (~> 0.80)
|
62
|
+
|
63
|
+
BUNDLED WITH
|
64
|
+
2.2.3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2022 aquaflamingo
|
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,83 @@
|
|
1
|
+
# devlogs
|
2
|
+
![Version](https://img.shields.io/badge/version-0.1.0-green)
|
3
|
+
|
4
|
+
Project based session logging for solo-developers with the option to mirror changes to another directory.
|
5
|
+
|
6
|
+
https://stacktrace.one/blog/avoid-project-management-solo-dev/
|
7
|
+
|
8
|
+
![Maintain non-source controlled logs across various projects with mirroring to a single](./docs/mirroring.png)
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem 'devlogs'
|
16
|
+
```
|
17
|
+
|
18
|
+
And then execute:
|
19
|
+
|
20
|
+
$ bundle install
|
21
|
+
|
22
|
+
Or install it yourself as:
|
23
|
+
|
24
|
+
$ gem install devlogs
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
### Initialize
|
28
|
+
Inside your project initialize the `__devlogs` repository:
|
29
|
+
```bash
|
30
|
+
$ devlogs init
|
31
|
+
```
|
32
|
+
|
33
|
+
Follow the prompts to setup the project configuration located in `__devlogs/.devlogs.config`.
|
34
|
+
|
35
|
+
You can setup a mirror directory path in the configuration stage to sync changes to another directory on your machine, for example to Obsidian.md.
|
36
|
+
|
37
|
+
Example:
|
38
|
+
|
39
|
+
```
|
40
|
+
myproject
|
41
|
+
__devlogs
|
42
|
+
>> content
|
43
|
+
```
|
44
|
+
|
45
|
+
```
|
46
|
+
obsidianvault
|
47
|
+
project
|
48
|
+
mirror_logs
|
49
|
+
>> content mirrored here
|
50
|
+
```
|
51
|
+
|
52
|
+
### Creating entries
|
53
|
+
Once you are done for the day or session run the `entry` command:
|
54
|
+
|
55
|
+
```bash
|
56
|
+
devlogs entry
|
57
|
+
```
|
58
|
+
|
59
|
+
Your editor will pop up and you can fill in cliff notes.
|
60
|
+
|
61
|
+
```
|
62
|
+
# <DATE HERE>
|
63
|
+
|
64
|
+
* Setup Postgresql Database
|
65
|
+
* Created the Post and User models
|
66
|
+
* Can't figure out how to connect devise + omniauth yet - need to figure that out
|
67
|
+
```
|
68
|
+
|
69
|
+
Save and if you set a mirror it will sync over!
|
70
|
+
|
71
|
+
## Development
|
72
|
+
|
73
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
74
|
+
|
75
|
+
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
76
|
+
|
77
|
+
## Contributing
|
78
|
+
|
79
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/devlogs.
|
80
|
+
|
81
|
+
## License
|
82
|
+
|
83
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "devlogs"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/devlogs.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/devlogs/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "devlogs"
|
7
|
+
spec.version = Devlogs::VERSION
|
8
|
+
spec.authors = ["aquaflamingo"]
|
9
|
+
spec.email = ["16901597+aquaflamingo@users.noreply.github.com"]
|
10
|
+
|
11
|
+
spec.summary = "A command line utility to create and manage project management with a logs repository."
|
12
|
+
spec.description = "Create, manage and sync developer project logs"
|
13
|
+
spec.homepage = "http://github.com/aquaflamingo/devlogs"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
16
|
+
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/aquaflamingo/devlogs"
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/aquaflamingo/releases"
|
20
|
+
|
21
|
+
# Specify which files should be added to the gem when it is released.
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
25
|
+
end
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
spec.add_dependency "rsync", "~> 1.0", ">= 1.0.9"
|
31
|
+
spec.add_dependency "thor", "~> 1.2.1"
|
32
|
+
spec.add_dependency "tty-prompt", "~> 0.23.1"
|
33
|
+
|
34
|
+
spec.add_development_dependency "pry", "~> 0.14.0"
|
35
|
+
end
|
data/docs/mirroring.png
ADDED
Binary file
|
data/exe/devlogs
ADDED
@@ -0,0 +1,187 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "fileutils"
|
4
|
+
require "tty-prompt"
|
5
|
+
require "yaml"
|
6
|
+
require "rsync"
|
7
|
+
require "pry"
|
8
|
+
|
9
|
+
# Repostiroy is an accessor object for the devlogs directory
|
10
|
+
class Repository
|
11
|
+
CONFIG_FILE = ".devlogs.config.yml"
|
12
|
+
|
13
|
+
# TODO: should be part of configuration
|
14
|
+
DEFAULT_LOG_SUFFIX = "devlogs.md"
|
15
|
+
DEFAULT_DIRECTORY_PATH = "."
|
16
|
+
DEFAULT_DIRECTORY_NAME = "__devlogs"
|
17
|
+
|
18
|
+
# Example: 11-22-2022_1343
|
19
|
+
DEFAULT_TIME_FORMAT_FILE_PREFIX = "%m-%d-%Y__%kh%Mm"
|
20
|
+
DEFAULT_TIME_FORMAT_TEXT_ENTRY = "%m-%d-%Y %k:%M"
|
21
|
+
|
22
|
+
# Initializes a __devlogs repository with the supplied configuration
|
23
|
+
# @param repo_config [Repository::Config]
|
24
|
+
#
|
25
|
+
def initialize(repo_config)
|
26
|
+
@config = repo_config
|
27
|
+
end
|
28
|
+
|
29
|
+
# Creates a new __devlogs entry for recording session completion
|
30
|
+
#
|
31
|
+
# @returns nil
|
32
|
+
def create
|
33
|
+
time = Time.new
|
34
|
+
prefix = time.strftime(DEFAULT_TIME_FORMAT_FILE_PREFIX)
|
35
|
+
|
36
|
+
entry_file_name = "#{prefix}_#{DEFAULT_LOG_SUFFIX}"
|
37
|
+
|
38
|
+
entry_file_path = File.join(@config.path, entry_file_name)
|
39
|
+
|
40
|
+
unless File.exist?(entry_file_path)
|
41
|
+
# Add default boiler plate if the file does not exist yet
|
42
|
+
File.open(entry_file_path, "w") do |f|
|
43
|
+
f.write <<~ENDOFFILE
|
44
|
+
# #{time.strftime(DEFAULT_TIME_FORMAT_TEXT_ENTRY)}
|
45
|
+
|
46
|
+
What did you do today?
|
47
|
+
|
48
|
+
ENDOFFILE
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
editor_program = ENV["EDITOR"]
|
53
|
+
|
54
|
+
system("#{editor_program} #{entry_file_path}")
|
55
|
+
|
56
|
+
puts "Writing entry to #{entry_file_path}.."
|
57
|
+
end
|
58
|
+
|
59
|
+
# Syncs the directory changes to the (optional) mirror repository
|
60
|
+
# specified in the configuration.
|
61
|
+
#
|
62
|
+
# @returns nil
|
63
|
+
def sync
|
64
|
+
if @config.mirror?
|
65
|
+
# Run rsync with -a to copy directories recursively
|
66
|
+
|
67
|
+
# Use trailing slash to avoid sub-directory
|
68
|
+
# See rsync manual page
|
69
|
+
path = @config.path[-1] == "/" ? @config.path : @config.path + "/"
|
70
|
+
|
71
|
+
Rsync.run("-av", path, @config.mirror.path) do |result|
|
72
|
+
if result.success?
|
73
|
+
puts "Mirror sync complete."
|
74
|
+
result.changes.each do |change|
|
75
|
+
puts "#{change.filename} (#{change.summary})"
|
76
|
+
end
|
77
|
+
else
|
78
|
+
raise "Failed to sync: #{result.error}"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
class << self
|
85
|
+
# Loads a repository from the provided path
|
86
|
+
#
|
87
|
+
# @returns [Repository]
|
88
|
+
#
|
89
|
+
def load(path = File.join(DEFAULT_DIRECTORY_PATH, DEFAULT_DIRECTORY_NAME))
|
90
|
+
exists = File.exist?(path)
|
91
|
+
|
92
|
+
raise "no repository found #{path}" unless exists
|
93
|
+
|
94
|
+
cfg = YAML.load_file(File.join(path, CONFIG_FILE))
|
95
|
+
|
96
|
+
cfg[:path] = path
|
97
|
+
|
98
|
+
repo_config = Config.hydrate(cfg)
|
99
|
+
|
100
|
+
new(repo_config)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
# Config is a configuration data object for storing Repository configuration
|
105
|
+
# in memory for access.
|
106
|
+
class Config
|
107
|
+
attr_reader :name, :description, :mirror, :path
|
108
|
+
|
109
|
+
MirrorConfig = Struct.new(:use_mirror, :path, keyword_init: true)
|
110
|
+
|
111
|
+
def initialize(name, desc, mirror, p)
|
112
|
+
@name = name
|
113
|
+
@description = desc
|
114
|
+
@mirror = MirrorConfig.new(mirror)
|
115
|
+
@path = p
|
116
|
+
end
|
117
|
+
|
118
|
+
# Returns whether or not the devlogs repository is configured to mirror
|
119
|
+
#
|
120
|
+
# @returns [Boolean]
|
121
|
+
def mirror?
|
122
|
+
@mirror.use_mirror
|
123
|
+
end
|
124
|
+
|
125
|
+
# Utility method to build a configuration from a Hash
|
126
|
+
#
|
127
|
+
# @returns [Repository::Config]
|
128
|
+
def self.hydrate(cfg)
|
129
|
+
new(cfg[:name], cfg[:description], cfg[:mirror], cfg[:path])
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# Initialize is an execution object which initializes a Repository on the
|
134
|
+
# filesystem
|
135
|
+
class Initialize
|
136
|
+
# Creates a new devlogs repository at the provided path
|
137
|
+
def self.run(opts = {}, path = File.join(DEFAULT_DIRECTORY_PATH, DEFAULT_DIRECTORY_NAME))
|
138
|
+
exists = File.exist?(path)
|
139
|
+
|
140
|
+
if exists && !opts[:force]
|
141
|
+
puts "Log repository already exists in #{path}. Aborting..."
|
142
|
+
raise RuntimeError
|
143
|
+
end
|
144
|
+
|
145
|
+
results = prompt_for_info
|
146
|
+
|
147
|
+
FileUtils.mkdir_p(path)
|
148
|
+
config_file = File.join(path, CONFIG_FILE)
|
149
|
+
info_file_name = "#{results[:name].gsub(/ /, "_")}_devlogs.info"
|
150
|
+
info_file = File.join(path, info_file_name)
|
151
|
+
|
152
|
+
# Create config file
|
153
|
+
File.open(config_file, "w") do |f|
|
154
|
+
f.write results.to_yaml
|
155
|
+
end
|
156
|
+
|
157
|
+
File.open(info_file, "w") do |f|
|
158
|
+
f.puts "# #{results[:name]}"
|
159
|
+
f.puts (results[:desc]).to_s
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
# Creates an interactive prompt for user input
|
164
|
+
#
|
165
|
+
# @returns [Hash]
|
166
|
+
def self.prompt_for_info
|
167
|
+
prompt = TTY::Prompt.new
|
168
|
+
|
169
|
+
prompt.collect do |_p|
|
170
|
+
# Project name
|
171
|
+
key(:name).ask("What is the project name?") do |q|
|
172
|
+
q.required true
|
173
|
+
end
|
174
|
+
|
175
|
+
# Project description
|
176
|
+
key(:desc).ask("What is the project description?") do |q|
|
177
|
+
q.required true
|
178
|
+
end
|
179
|
+
|
180
|
+
key(:mirror) do
|
181
|
+
key(:use_mirror).ask("Do you want to mirror these logs?", convert: :boolean)
|
182
|
+
key(:path).ask("Path to mirror directory: ")
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
data/lib/devlogs.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "devlogs/version"
|
4
|
+
require_relative "devlogs/repository"
|
5
|
+
|
6
|
+
require "thor"
|
7
|
+
|
8
|
+
module Devlogs
|
9
|
+
#
|
10
|
+
# The CLI devlogs App
|
11
|
+
#
|
12
|
+
class App < Thor
|
13
|
+
package_name "devlogs"
|
14
|
+
|
15
|
+
# Returns exit with non zero status when an exception occurs
|
16
|
+
def self.exit_on_failure?
|
17
|
+
true
|
18
|
+
end
|
19
|
+
|
20
|
+
#
|
21
|
+
# Initializes a +devlogs+ repository with a configuration
|
22
|
+
#
|
23
|
+
desc "init", "Initialize a developer logs for project"
|
24
|
+
method_options force: :boolean, alias: :string
|
25
|
+
def init
|
26
|
+
puts "Creating devlogs repository"
|
27
|
+
|
28
|
+
Repository::Initialize.run(
|
29
|
+
{ force: options.force? },
|
30
|
+
File.join(".", "__devlogs")
|
31
|
+
)
|
32
|
+
|
33
|
+
puts "Created devlogs"
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# Creates a devlogs entry in the repository and syncs changes
|
38
|
+
# to the mirrored directory if set
|
39
|
+
#
|
40
|
+
desc "entry", "Create a new devlogs entry" # [4]
|
41
|
+
def entry
|
42
|
+
puts "Creating new entry..."
|
43
|
+
repo.create
|
44
|
+
|
45
|
+
repo.sync
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
# Helper method for repository loading
|
51
|
+
#
|
52
|
+
def repo
|
53
|
+
@repo ||= Repository.load
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
metadata
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: devlogs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- aquaflamingo
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-04-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rsync
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.0.9
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.0'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.0.9
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: thor
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 1.2.1
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.2.1
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: tty-prompt
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.23.1
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.23.1
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: pry
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 0.14.0
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 0.14.0
|
75
|
+
description: Create, manage and sync developer project logs
|
76
|
+
email:
|
77
|
+
- 16901597+aquaflamingo@users.noreply.github.com
|
78
|
+
executables:
|
79
|
+
- devlogs
|
80
|
+
extensions: []
|
81
|
+
extra_rdoc_files: []
|
82
|
+
files:
|
83
|
+
- ".github/workflows/main.yml"
|
84
|
+
- ".gitignore"
|
85
|
+
- ".rubocop.yml"
|
86
|
+
- Gemfile
|
87
|
+
- Gemfile.lock
|
88
|
+
- LICENSE.txt
|
89
|
+
- README.md
|
90
|
+
- Rakefile
|
91
|
+
- bin/console
|
92
|
+
- bin/setup
|
93
|
+
- devlogs.gemspec
|
94
|
+
- docs/mirroring.png
|
95
|
+
- exe/devlogs
|
96
|
+
- lib/devlogs.rb
|
97
|
+
- lib/devlogs/repository.rb
|
98
|
+
- lib/devlogs/version.rb
|
99
|
+
homepage: http://github.com/aquaflamingo/devlogs
|
100
|
+
licenses:
|
101
|
+
- MIT
|
102
|
+
metadata:
|
103
|
+
homepage_uri: http://github.com/aquaflamingo/devlogs
|
104
|
+
source_code_uri: https://github.com/aquaflamingo/devlogs
|
105
|
+
changelog_uri: https://github.com/aquaflamingo/releases
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options: []
|
108
|
+
require_paths:
|
109
|
+
- lib
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: 2.3.0
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
requirements: []
|
121
|
+
rubygems_version: 3.2.3
|
122
|
+
signing_key:
|
123
|
+
specification_version: 4
|
124
|
+
summary: A command line utility to create and manage project management with a logs
|
125
|
+
repository.
|
126
|
+
test_files: []
|