sanctify 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b197dcfe1ccb2d196897c1756a2955f2b8ba032a
4
- data.tar.gz: 4dd3bf16fe6185ecd421de2afb7ae3402f878fc2
3
+ metadata.gz: bf59b1007b7caeecd87c0ddd8e7ba24f161d7b09
4
+ data.tar.gz: 1761816197a0ff15372dfa777494b1dad5e63189
5
5
  SHA512:
6
- metadata.gz: 8a6f071b93e6ef42bcceb0c9f3339d37fc4845216836fd20ef31dfe3da234344395ea51a166062d19e2924e68f8fe4c60eeef423e222a73ff19da9252493d348
7
- data.tar.gz: f0e366b4acd7b509a942af69c3b1b6364bfc376e6fbcbe47be6ba2ec2f3d62a8a4eb23ff62ea87a9a7d849df0cd60970278c70a362ff0baf29ba1cd10dba6210
6
+ metadata.gz: 78b2a2a600785a4937480755ab7a14b615a03e6e9509ad863ea537d44756ad88a9a704dac9a958aca826f4c7735f8a33ed19764e32b44cdff2f84e0700f16d4b
7
+ data.tar.gz: 21ed93a8d1c341bf2d8c673fc754e03939e0dabece00f42de0077efaa5bb134a103106f29971a1f22ddcb34b7ea059c66ab83c8080d1b6b42f7e28d7d17569fb
@@ -3,3 +3,4 @@
3
3
  description: This hook scans for common secrets before commit
4
4
  entry: sanctify
5
5
  language: ruby
6
+ files: .
data/README.md CHANGED
@@ -29,6 +29,7 @@ Usage: sanctify [-r REPO_PATH] [-c CONFIG_PATH] [-d FROM_COMMIT..TO_COMMIT | -d
29
29
  -r, --repo REPO Repo to test
30
30
  -c, --config CONFIG Configuration file in YAML
31
31
  -d, --diff DIFF Specify a diff or commit from which to check secrets
32
+ -v, --version Prints the version and exits
32
33
  -h, --help Prints this help
33
34
  ```
34
35
 
@@ -37,7 +38,7 @@ To integrate with pre-commit, add the following to your `pre-commit-config.yaml`
37
38
  ```
38
39
  repos:
39
40
  - repo: https://github.com/onetwopunch/sanctify
40
- sha: v0.2.2
41
+ sha: v0.2.5
41
42
  hooks:
42
43
  - id: sanctify
43
44
  args:
@@ -81,12 +82,51 @@ The list of current default matchers are located in `lib/sanctify/matcher_list.
81
82
 
82
83
  If you see any problem with a default matcher list or would like to add another to the default list, please feel free to make a pull request.
83
84
 
85
+ ## Troubleshooting
86
+
87
+ - If you are facing an issue with integration with a Rail project, where you are using rbenv, and get the following error:
88
+ ```
89
+ An unexpected error has occurred: CalledProcessError: Command: (u'/bin/bash', u'/Users/ryan/.rbenv/shims/gem', 'build', 'sanctify.gemspec')
90
+ Return code: 1
91
+ Expected return code: 0
92
+ Output: (none)
93
+ Errors:
94
+ WARNING: See http://guides.rubygems.org/specification-reference/ for help
95
+ ERROR: While executing gem ... (Gem::InvalidSpecificationException)
96
+ ["travis.yml", "literally every file in your Rails repo", ...]
97
+ ```
98
+
99
+ This is an issue with pre-commit since they build their own version of rbenv that conflicts under certain circumstances I have yet to fully grok. The best way to get around this is to install sanctify external to the pre-commit repo.
100
+
101
+ In your pre-commit-config.yaml:
102
+
103
+ ```yaml
104
+ - repo: local
105
+ hooks:
106
+ - id: secret-check-hook
107
+ name: "Sanctify Secret Scanner"
108
+ entry: ./bin/secret-check
109
+ language: script
110
+ files: .
111
+ ```
112
+
113
+ And then in the `./bin/secret-check` file just install and run sanctify:
114
+
115
+ ```bash
116
+ #!/bin/bash
117
+
118
+ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
119
+ if [[ ! $(which sanctify) ]]; then
120
+ gem install sanctify
121
+ fi
122
+
123
+ sanctify -c $DIR/sanctify.yml
124
+ ```
125
+
84
126
  ## Development
85
127
 
86
128
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
87
129
 
88
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
89
-
90
130
  ## Contributing
91
131
 
92
132
  Bug reports and pull requests are welcome on GitHub at https://github.com/onetwopunch/sanctify. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -97,4 +137,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
97
137
 
98
138
  ## Code of Conduct
99
139
 
100
- Everyone interacting in the Sanctify project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/sanctify/blob/master/CODE_OF_CONDUCT.md).
140
+ Everyone interacting in the Sanctify project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/onetwopunch/sanctify/blob/master/CODE_OF_CONDUCT.md).
@@ -1,3 +1,3 @@
1
1
  module Sanctify
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sanctify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Canty
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-12 00:00:00.000000000 Z
11
+ date: 2018-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler