commiter 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +67 -0
- data/lib/commiter.rb +6 -1
- data/lib/commiter/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e50b250306f4cee789b61370110a9b7a41c20eb4c911c51f4f3179749295f776
|
4
|
+
data.tar.gz: 4a2fc18c1dd8ee9cb630d646e14688831e7a29433fcb11359fdbf145c8769680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9b1ead28508a0aa372880160cb3c200fb87d56361ec8733b9e501273962c2bddf9911dd417b346517036a12fce6df89619a8c0d313ceaca802aac586ee92fef
|
7
|
+
data.tar.gz: c66eeded47e3dba564cb08d36128695b054fdbac8e197ff50c27e94dba50cc3b1fd09e67915a23c1eb0ae5cb5db8ff60e824d302fb037c34e2239eb97de15cd3
|
data/README.md
CHANGED
@@ -1,7 +1,27 @@
|
|
1
1
|
# Commiter
|
2
2
|
|
3
|
+
# Description
|
3
4
|
Commiter is a Cli Written in Ruby To Ask some Questions about how you want to write the commit message validation before write any commit and if this commit is not matching the commiter configuration file it will reject the commit and kill the process
|
4
5
|
|
6
|
+
### Project Development
|
7
|
+
This Project Designed Like this to Match any Project or language i will work on for this reason it has External files should be inside Hooks Manually to match any type of Projects and it's not connected to a specific language configuration
|
8
|
+
|
9
|
+
# The Problem
|
10
|
+
In each git Repository when you initialize the Project you dont have Rules to make All Developers inside this Project Follow same way in Commit Messages and in the Future if you cant find any key inside the messages to see the history you will never know how this feature implemented like this until you deep dive into it because you dont have the main reason about this area you just found the commit message (fix) and this is not a commit message :D so with this configuration all the team will have same commit rules and if someone is not following this rules the commit will be rejected
|
11
|
+
|
12
|
+
# Screenshots for Validation
|
13
|
+
1. Ticket Number Validation
|
14
|
+
|
15
|
+
![Capture](https://user-images.githubusercontent.com/29167110/113469102-8df87980-9453-11eb-9727-2240e6914c59.PNG)
|
16
|
+
|
17
|
+
2. Black list Validation
|
18
|
+
|
19
|
+
![Capture](https://user-images.githubusercontent.com/29167110/113469122-bda78180-9453-11eb-9360-710185340f55.PNG)
|
20
|
+
|
21
|
+
3. Regex Expression Validation
|
22
|
+
|
23
|
+
![Capture](https://user-images.githubusercontent.com/29167110/113469144-f6475b00-9453-11eb-8952-c30d34784c56.PNG)
|
24
|
+
|
5
25
|
# Validations Supported
|
6
26
|
1. Ticket Number
|
7
27
|
2. Black List Words
|
@@ -10,3 +30,50 @@ Commiter is a Cli Written in Ruby To Ask some Questions about how you want to wr
|
|
10
30
|
# Installation
|
11
31
|
1. Ruby Required
|
12
32
|
2. Bundler To Fetch Gem
|
33
|
+
|
34
|
+
### Include in Another Supported Ruby Project
|
35
|
+
1. Create File in your Root Directory inside The Project (Gemfile)
|
36
|
+
2. Add This Line at the First
|
37
|
+
|
38
|
+
```ruby19regexp
|
39
|
+
source 'https://rubygems.org'
|
40
|
+
```
|
41
|
+
|
42
|
+
3. Add this Line inside This File
|
43
|
+
|
44
|
+
```ruby19regexp
|
45
|
+
gem 'commiter', '~> 0.0.1'
|
46
|
+
```
|
47
|
+
|
48
|
+
4. Run this Commands
|
49
|
+
|
50
|
+
```ruby19regexp
|
51
|
+
gem install commiter
|
52
|
+
bundle install
|
53
|
+
bundle package
|
54
|
+
```
|
55
|
+
|
56
|
+
6. Copy commiter gem file From Vendor Directory to your Project
|
57
|
+
|
58
|
+
# Quick Installation
|
59
|
+
If you dont wanna use gem file you can copy the files and Edit the Config json File from result folder into you .git/hooks folder inside your git repository you will find variables described in table section
|
60
|
+
|
61
|
+
| Key Name | Description |
|
62
|
+
| ----------- | ----------- |
|
63
|
+
| is_enabled | Decide if commit command will check the validation or not |
|
64
|
+
| ticket_number_example | What is the Ticket Number Key like SW-{#} The {#} is the Dynamic Number Value |
|
65
|
+
| generated_style | You Have 3 Options To Validation (t -> Ticket Number) / (b -> Black List Words) / (r -> Regex Expression) |
|
66
|
+
| regex_input | The Regex String to match Message with it if the generated style (r) is Selected |
|
67
|
+
| black_list_words | The Black list words Blocked |
|
68
|
+
|
69
|
+
# Cli
|
70
|
+
This Project is a Command line Interface to Generate this File inside your git file If you want to Install the Cli Clone this Repo then install ruby and run this command inside the Project
|
71
|
+
|
72
|
+
```ruby19regexp
|
73
|
+
rake install -g
|
74
|
+
```
|
75
|
+
|
76
|
+
The Cli should be started
|
77
|
+
|
78
|
+
![Capture](https://user-images.githubusercontent.com/29167110/113469182-53431100-9454-11eb-863a-3d14b0eb45dd.PNG)
|
79
|
+
|
data/lib/commiter.rb
CHANGED
data/lib/commiter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commiter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yazan Tarifi
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description:
|
70
84
|
email: yazantarifi98@gmail.com
|
71
85
|
executables: []
|