updater_gf 0.1.4 → 0.1.6
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 +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +4 -0
- data/lib/updater_gf/version.rb +1 -1
- data/lib/updater_gf.rb +30 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b80a2ae5a965744d9300d5af9bee48b0d6fcc09752de8a6c43f816219ee7b4be
|
4
|
+
data.tar.gz: f65bdc68c16817ea3befc2e0bafc2f827ba580dc49e1647d942b33850b304b3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6408ad65fa2cec775f28e3fd086dec38fdef125eb5af0fa84224a963dcc9a9759ac138f4dc9765a000309f0fd491185ce33a68d02524f7b7fb48b92b35583f34
|
7
|
+
data.tar.gz: 938094b5d0ad74dca409b494b976a1ce535a96bb2d072523e8ad08fc4e5942b25cb00f48f0a32ae89917aaf25ec27427a8b775fd2a9a2d1d75e6f81ce1f928cc
|
data/CHANGELOG.md
CHANGED
@@ -3,3 +3,26 @@
|
|
3
3
|
## [0.1.0] - 2024-10-23
|
4
4
|
|
5
5
|
- Initial release
|
6
|
+
|
7
|
+
## [0.1.1] - 2024-10-23
|
8
|
+
|
9
|
+
- Update fix bug
|
10
|
+
## [0.1.2] - 2024-10-23
|
11
|
+
|
12
|
+
- Update fix bug
|
13
|
+
|
14
|
+
## [0.1.3] - 2024-10-23
|
15
|
+
|
16
|
+
- Update fix bug
|
17
|
+
|
18
|
+
## [0.1.4] - 2024-10-23
|
19
|
+
|
20
|
+
- Update add gem to use additional properties in command: updater_gf -a
|
21
|
+
- Update common .rubocop.yml file with command: updater_gf -a -r
|
22
|
+
|
23
|
+
## [0.1.5] - 2024-10-23
|
24
|
+
|
25
|
+
-Update customizable parameters
|
26
|
+
- updater_gf -a or
|
27
|
+
- updater_gf -r or
|
28
|
+
- updater_gf -a -r
|
data/README.md
CHANGED
@@ -29,6 +29,10 @@ after install gem
|
|
29
29
|
open Terminal and go to directory of project run:
|
30
30
|
$ updater_gf
|
31
31
|
|
32
|
+
options: '-a and -r'
|
33
|
+
"'-a' will add commonly used gems";
|
34
|
+
"'-r' will update rubocop file"
|
35
|
+
|
32
36
|
## Contributing
|
33
37
|
|
34
38
|
Bug reports and pull requests are welcome on GitHub at https://github.com/devhoanglv92/updater_gf. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/devhoanglv92/updater_gf/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/updater_gf/version.rb
CHANGED
data/lib/updater_gf.rb
CHANGED
@@ -9,7 +9,36 @@ module UpdaterGf
|
|
9
9
|
class Updater
|
10
10
|
class << self
|
11
11
|
def run(add_gem = '', add_robocop = '')
|
12
|
-
|
12
|
+
if check_argv_error?(add_gem, add_robocop)
|
13
|
+
show_message_argv_error
|
14
|
+
return
|
15
|
+
end
|
16
|
+
|
17
|
+
is_add_gem = add_gem?(add_gem)
|
18
|
+
is_add_robocop = add_robocop?(add_gem, add_robocop)
|
19
|
+
HandleUpdate.new(is_add_gem, is_add_robocop).process
|
20
|
+
end
|
21
|
+
|
22
|
+
def add_gem?(add_gem)
|
23
|
+
add_gem == '-a'
|
24
|
+
end
|
25
|
+
|
26
|
+
def add_robocop?(add_gem, add_robocop)
|
27
|
+
add_robocop == '-r' || add_gem == '-r'
|
28
|
+
end
|
29
|
+
|
30
|
+
def check_argv_error?(add_gem, add_robocop)
|
31
|
+
return true if add_gem != '-a' || add_gem != '-r'
|
32
|
+
return true if add_robocop != '-r'
|
33
|
+
|
34
|
+
false
|
35
|
+
end
|
36
|
+
|
37
|
+
def show_message_argv_error
|
38
|
+
puts 'Invalid arguments'
|
39
|
+
puts 'Usage: updater_gf [-a] [-r]'
|
40
|
+
puts ' -a: Add gems from list_gems_add to Gemfile'
|
41
|
+
puts ' -r: Add .rubocop.yml to project root'
|
13
42
|
end
|
14
43
|
end
|
15
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: updater_gf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- devhoanglv92
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: update Gemfile and clean code file by updater_gf
|
14
14
|
email:
|