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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 478c9d642d030ccb6aa4e4a9e2008d0ed94349a7
4
- data.tar.gz: ad3f809d3adb563aab1fce71b63f5cd87160887f
3
+ metadata.gz: '084645eddb8b4a39cf1345af2d3f1695a55e6408'
4
+ data.tar.gz: ee7f53261ec73ed22eb8379cc7ffa647c341f84f
5
5
  SHA512:
6
- metadata.gz: 824a75664ac6c78df2e4a761fcd4b8c292665ba4d2a40f560ce14a1cb06a00d0276fd1a7460dba831367c4758ec7c2d739d165a158cb6563b914f4b67a520d5c
7
- data.tar.gz: 895341a32ce2929528b8a717ac963a6dc562b195e4c4780987ff5871e67cc25eaf6f1b5e962c53e23e4d11b985888dbfdde79fd4b88951f48badd18009939618
6
+ metadata.gz: 6c215edb51c2b86f463e8db5c1333dafac4a0d08cd064f6d247eceff7af51b4ea0d22c97035bf12030b3b0ab60a9380bb16fb774e6d2d4494b82dd456a482727
7
+ data.tar.gz: f40d5ee19c634b31d45886331f5bd8c0fb7d02706c50dc89663bfaabb8bab0e9bfdd039637cc1dcc0bd5aa53d4f5ceb1e9f7a1ae86c17355991fd0620bfb2e4f
@@ -1,2 +1,2 @@
1
1
  require 'overcommit_config'
2
- OvercommitConfig.generate_config
2
+ OvercommitConfig.new.generate_config
@@ -2,4 +2,4 @@ PreCommit:
2
2
  RuboCop:
3
3
  enabled: true
4
4
  required: false
5
- required_executable: './bin/custom-script'
5
+ required_executable: './bin/custom-rubocop-script'
File without changes
@@ -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 self.generate_config
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
- self.generate_rubo_script
12
+ generate_rubo_script
13
13
  end
14
14
 
15
- def self.generate_rubo_script
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.3
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-26 00:00:00.000000000 Z
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: