githookify 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ed27752f2abc7ec234f28ddb9026c4794b66fd9e517df5b1968e83d241d5694
4
- data.tar.gz: f45e2deb1ac951b57b7efcce57117d9116a6e82eedcbc62d621ab89aca78fe77
3
+ metadata.gz: ce70bdf3209a37ff23b70a3cbb5525ee28a7048ade4f7a176b1b71eba20fd28c
4
+ data.tar.gz: 99e5761f1f39d5034670ce270a2dc4c7a1b4a9d1ed8bbaec87b3d5dd7d3ebbc8
5
5
  SHA512:
6
- metadata.gz: 1fa6a0f4b154ee349be6b4d12493431cae298383582578de3afe43df1356b92ab577bc2d87a44a4d6238fb59088d41700e4ef1ebba9424ae9e0dde6b83b354aa
7
- data.tar.gz: 1a6177e170ed1917f2e0080731ef35b13060e14e01d6210d5d616f3a9f29d566dd8404000c27ced23cd1eeeba2a56e59fcfbc6817f6ba2020ed9fcdd46bc08c5
6
+ metadata.gz: cd853c8614af515b80980418a02177b9ded0ec49899283a0fc921a69815cc226b0b967dbb5b4ac3f3d36977bc322902c31101b0af7a2e88049adb039d0756fca
7
+ data.tar.gz: c5559a64ba3dacd843d99a6282b8c36f66cbd20d5fc97d4d0ce821d8ff7fcae2776b5ff9acd69b5ce6ff7b2dfdbe087d6949a9441a047a36e208f8a74fd1a8c3
data/justfile ADDED
@@ -0,0 +1,11 @@
1
+ # this list
2
+ default:
3
+ @just --list --unsorted
4
+
5
+ # build and install gem
6
+ install:
7
+ bundle exec rake install
8
+
9
+ # push the gem to rubygems.org
10
+ release:
11
+ bundle exec rake release
@@ -3,10 +3,18 @@ module Githookify
3
3
  HOOKS = %w[applypatch-msg commit-msg fsmonitor-watchman post-update pre-applypatch pre-commit pre-merge-commit pre-push pre-rebase pre-receive prepare-commit-msg update]
4
4
 
5
5
  def self.install
6
+ create_rakefile
6
7
  create_directories
7
8
  remove_sample_hooks
8
9
  end
9
10
 
11
+ def self.create_rakefile
12
+ unless File.exist?('Rakefile')
13
+ rakefile_content = "task :default\n"
14
+ File.write('Rakefile', rakefile_content)
15
+ end
16
+ end
17
+
10
18
  def self.create_directories
11
19
  Dir.mkdir('.githooks') unless Dir.exist?('.githooks')
12
20
  Dir.mkdir('.githooks/tasks') unless Dir.exist?('.githooks/tasks')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Githookify
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: githookify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antonio Nardini
@@ -53,6 +53,7 @@ files:
53
53
  - README.md
54
54
  - Rakefile
55
55
  - bin/githookify
56
+ - justfile
56
57
  - lib/githookify.rb
57
58
  - lib/githookify/cli.rb
58
59
  - lib/githookify/setup.rb