overcommit_config 0.0.3 → 0.1.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 +4 -4
- data/bin/overcommit_config +1 -1
- data/lib/.overcommit_popular_config.yml +1 -1
- data/lib/{custom-script → custom-rubocop-script} +0 -0
- data/lib/overcommit_config.rb +6 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '084645eddb8b4a39cf1345af2d3f1695a55e6408'
|
4
|
+
data.tar.gz: ee7f53261ec73ed22eb8379cc7ffa647c341f84f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c215edb51c2b86f463e8db5c1333dafac4a0d08cd064f6d247eceff7af51b4ea0d22c97035bf12030b3b0ab60a9380bb16fb774e6d2d4494b82dd456a482727
|
7
|
+
data.tar.gz: f40d5ee19c634b31d45886331f5bd8c0fb7d02706c50dc89663bfaabb8bab0e9bfdd039637cc1dcc0bd5aa53d4f5ceb1e9f7a1ae86c17355991fd0620bfb2e4f
|
data/bin/overcommit_config
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
require 'overcommit_config'
|
2
|
-
OvercommitConfig.generate_config
|
2
|
+
OvercommitConfig.new.generate_config
|
File without changes
|
data/lib/overcommit_config.rb
CHANGED
@@ -3,21 +3,22 @@ require "yaml"
|
|
3
3
|
class OvercommitConfig
|
4
4
|
# Generate popular config for Overcommit.
|
5
5
|
# Run *overcommit_config* to generate .overcommit.yml file.
|
6
|
-
def
|
6
|
+
def generate_config
|
7
7
|
puts "Generating overcommit config ..."
|
8
8
|
file_name = ".overcommit.yml"
|
9
9
|
config_file = File.expand_path File.dirname(__FILE__) + '/.overcommit_popular_config.yml'
|
10
10
|
config = YAML.safe_load(ERB.new(File.read(config_file)).result)
|
11
11
|
File.open(file_name, "w") { |f| f << config.to_yaml }
|
12
|
-
|
12
|
+
generate_rubo_script
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
15
|
+
def generate_rubo_script
|
16
16
|
puts "Generating overcommit rubocop executable script ..."
|
17
|
-
file_name = "./bin/custom-script"
|
18
|
-
script_file = File.expand_path File.dirname(__FILE__) + '/custom-script'
|
17
|
+
file_name = "./bin/custom-rubocop-script"
|
18
|
+
script_file = File.expand_path File.dirname(__FILE__) + '/custom-rubocop-script'
|
19
19
|
config = ERB.new(File.read(script_file)).result
|
20
20
|
File.open(file_name, "w") { |f| f << config }
|
21
21
|
FileUtils.chmod("a+x", file_name)
|
22
|
+
exec 'overcommit --sign' rescue nil
|
22
23
|
end
|
23
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: overcommit_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thai Huynh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -76,7 +76,7 @@ files:
|
|
76
76
|
- README.md
|
77
77
|
- bin/overcommit_config
|
78
78
|
- lib/.overcommit_popular_config.yml
|
79
|
-
- lib/custom-script
|
79
|
+
- lib/custom-rubocop-script
|
80
80
|
- lib/overcommit_config.rb
|
81
81
|
homepage: http://rubygems.org/gems/overcommit_config
|
82
82
|
licenses:
|