sanctify 0.2.2 → 0.2.4

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: 214571d63d5d89c0a8a4198da1769b162b99c2ef
4
- data.tar.gz: 79cc8aa7e6197c66843663fcc72d71f586519407
3
+ metadata.gz: b197dcfe1ccb2d196897c1756a2955f2b8ba032a
4
+ data.tar.gz: 4dd3bf16fe6185ecd421de2afb7ae3402f878fc2
5
5
  SHA512:
6
- metadata.gz: 62e3470ad013841ababf20bb15c39b4b7e997fa40e85b35bccdedd06bb73cea53971cf3fde22a4f1efd412c57e54d930ee9b1f963e9d81d28f16e05d8b3e35f6
7
- data.tar.gz: 9327bb2cc39e974471d4e5a681c8ee611ba48a8de868a748abde388cc7090bc2b892c155fbd126233c50559e3cbb342717974710e8858d4ce31bc7416fa41c73
6
+ metadata.gz: 8a6f071b93e6ef42bcceb0c9f3339d37fc4845216836fd20ef31dfe3da234344395ea51a166062d19e2924e68f8fe4c60eeef423e222a73ff19da9252493d348
7
+ data.tar.gz: f0e366b4acd7b509a942af69c3b1b6364bfc376e6fbcbe47be6ba2ec2f3d62a8a4eb23ff62ea87a9a7d849df0cd60970278c70a362ff0baf29ba1cd10dba6210
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sanctify (0.2.0)
5
- git
4
+ sanctify (0.2.4)
5
+ git (~> 1.3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -41,7 +41,8 @@ repos:
41
41
  hooks:
42
42
  - id: sanctify
43
43
  args:
44
- - -c sanctify.yml
44
+ - -c
45
+ - sanctify.yml
45
46
  ```
46
47
 
47
48
  ## Configuration
@@ -88,7 +89,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
88
89
 
89
90
  ## Contributing
90
91
 
91
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/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.
92
+ 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.
92
93
 
93
94
  ## License
94
95
 
data/lib/sanctify/cli.rb CHANGED
@@ -22,7 +22,10 @@ module Sanctify
22
22
  args[:from] = from
23
23
  args[:to] = to
24
24
  end
25
-
25
+ opts.on("-v", "--version", "Prints the version and exits") do
26
+ puts "sanctify #{VERSION}"
27
+ exit
28
+ end
26
29
  opts.on("-h", "--help", "Prints this help") do
27
30
  puts opts
28
31
  exit
@@ -31,10 +34,11 @@ module Sanctify
31
34
 
32
35
  opt_parser.parse!(argv)
33
36
  if args[:repo].nil?
34
- if Dir['.git'].empty?
37
+ repo = `git rev-parse --show-toplevel`.chomp
38
+ if repo.empty?
35
39
  raise Sanctify::CliError, "Repo not specified and current directory not a git repository."
36
40
  else
37
- args[:repo] = Dir.pwd
41
+ args[:repo] = repo
38
42
  end
39
43
  end
40
44
  Scanner.new(args).run
@@ -29,7 +29,7 @@ module Sanctify
29
29
  },
30
30
  {
31
31
  description: "AWS Secret Key",
32
- regex: /\b(?=.*[\w])(?=.*[\/&?=-@#$%\\^+])[\w\/&?=-@#$%\\^+]{40}\b/
32
+ regex: /\b(?<![A-Za-z0-9\/+=])(?=.*[\/&?=-@#$%\\^+])[A-Za-z0-9\/+=]{40}(?![A-Za-z0-9\/+=])\b/
33
33
  },
34
34
  {
35
35
  description: "SSH RSA Private Key",
@@ -1,3 +1,3 @@
1
1
  module Sanctify
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.4"
3
3
  end
data/sanctify.gemspec CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Ryan Canty"]
10
10
  spec.email = ["jrcanty@gmail.com"]
11
11
 
12
- spec.summary = %q{Let's you know about all the potential keys you're about to push in a Git commit}
13
- spec.description = %q{Let's you know about all the potential keys you're about to push in a Git commit}
12
+ spec.summary = %q{Keep secrets out of your Git repo with Sanctify}
13
+ spec.description = %q{Sanctify let's you know about all the potential keys you're about to push in a Git commit}
14
14
  spec.homepage = "https://github.com/onetwopunch/sanctify"
15
15
  spec.license = "MIT"
16
16
 
@@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency "rake", "~> 10.0"
35
35
  spec.add_development_dependency "rspec", "~> 3.0"
36
36
  spec.add_development_dependency "pry"
37
- spec.add_runtime_dependency "git"
37
+ spec.add_runtime_dependency "git", "~> 1.3"
38
38
  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.2
4
+ version: 0.2.4
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-10 00:00:00.000000000 Z
11
+ date: 2018-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -70,18 +70,18 @@ dependencies:
70
70
  name: git
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '1.3'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
83
- description: Let's you know about all the potential keys you're about to push in a
84
- Git commit
82
+ version: '1.3'
83
+ description: Sanctify let's you know about all the potential keys you're about to
84
+ push in a Git commit
85
85
  email:
86
86
  - jrcanty@gmail.com
87
87
  executables:
@@ -134,6 +134,5 @@ rubyforge_project:
134
134
  rubygems_version: 2.5.2
135
135
  signing_key:
136
136
  specification_version: 4
137
- summary: Let's you know about all the potential keys you're about to push in a Git
138
- commit
137
+ summary: Keep secrets out of your Git repo with Sanctify
139
138
  test_files: []