distincter2 1.3.2 → 1.4.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +7 -11
  4. data/lib/distincter2.rb +10 -2
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7356757437f888b0a6ab4054086150075337e10a56bd32c970bd2bd1e6c5687
4
- data.tar.gz: 385dddc273aab58dad6002c533feeb72002f886fdb82ef45ce35f12a8d7179f3
3
+ metadata.gz: 0a6cd807f2f889320a66b76f7f787b1caac82139d48026c9840966e36a06a20a
4
+ data.tar.gz: 4240110004fb807cad542c872e03b952fbcbbc2c09b8d98295703e3074ff5148
5
5
  SHA512:
6
- metadata.gz: 20c5b2ea990ec92ead8e5b0808ab0ce1cb75f2dc3bc0075c3945e1f40e5cfb5cc5fc17cfbe13368d34817841455d81c799103a615746665a0fa472c3759fa867
7
- data.tar.gz: a8d452f076387b8087486e251adfdf9d43033213da477f8ff3ddacfceee6c212d70f3717ecb40369a9a5e0d3e25eeee62738788c6be162a00473b2c80a4f1e5e
6
+ metadata.gz: c0869afab0fbe87c5cb6daa71aa6dd6c8ca0b123e86623031acbe857ddebad38dfe8b143e08b406e88f4ae81e72963b34153be216f40121f2fc53af2fb92ad9f
7
+ data.tar.gz: 133222727ec67744206a168e09aa52cbbea1a25fd8dfc36f3ae502000c04145dec2545271d4f95b244045c4fccc908641b1f07afd95b3d0a6340b4ef808119bd
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Artem Fomchenkov
3
+ Copyright (c) 2023-2025 Artem Fomchenkov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -10,22 +10,20 @@ A tool that can check lists in Markdown files and find duplicates.
10
10
 
11
11
  ## How to use
12
12
 
13
- ### Global installation
13
+ You need to install `distincter2` from [RubyGems](https://rubygems.org/gems/distincter2) by next command:
14
14
 
15
15
  ```shell
16
16
  $ gem i distincter2
17
- $ distincter2 ./path_to_directory_with_markdown_files
18
17
  ```
19
-
20
- ### Local installation
18
+ After that, run `distincter2` from any place with a path to your markdown files as parameter:
21
19
 
22
20
  ```shell
23
- $ ./bin/local_distincter2 ./path_to_directory_with_markdown_files
21
+ $ distincter2 ./path_to_directory_with_markdown_files
24
22
  ```
25
23
 
26
24
  ### Config
27
25
 
28
- Add `distincter2_config.d2c` to root of your project and add excluded files line by line. Below you can find examples.
26
+ Add `.d2_config.d2c` to root of your project and add excluded files line by line. Below you can find examples.
29
27
 
30
28
  #### v1
31
29
 
@@ -47,17 +45,15 @@ BOOKS.md
47
45
  DONE.md
48
46
  ```
49
47
 
50
- ## How to contribute
51
-
52
- ### Documentation
48
+ ## Documentation
53
49
 
54
- Just run:
50
+ You can generate documentation locally by next command from root of the project:
55
51
 
56
52
  ```shell
57
53
  $ rdoc
58
54
  ```
59
55
 
60
- ### Contribution
56
+ ## How to contribute
61
57
 
62
58
  Read [Commit Convention](./COMMIT_CONVENTION.md). Make sure your build is green before you contribute your pull request.
63
59
  Then:
data/lib/distincter2.rb CHANGED
@@ -19,8 +19,16 @@ module Distincter2
19
19
  # # Start the validation process for a project located at '/path/to/project'
20
20
  # distincter.start('/path/to/project')
21
21
  def start(path)
22
- # Construct the path to the distincter2_config.d2c file
23
- config_path = "#{path}/distincter2_config.d2c"
22
+ # Construct the path to the .d2_config.d2c file
23
+ new_config_path = "#{path}/.d2_config.d2c"
24
+ old_config_path =
25
+ if ::File.exist?(new_config_path)
26
+ nil
27
+ else
28
+ "#{path}/distincter2_config.d2c"
29
+ end
30
+
31
+ config_path = old_config_path.nil? ? new_config_path : old_config_path
24
32
 
25
33
  # Create a new D2Checker instance with the appropriate configuration
26
34
  checker = ::Distincter2::D2Checker.new(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: distincter2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Fomchenkov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-06 00:00:00.000000000 Z
11
+ date: 2025-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubygems_version: 3.4.10
117
+ rubygems_version: 3.5.23
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: A tool that can check lists in Markdown files and find duplicates