keyth 0.1.0 → 0.2.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.
Files changed (3) hide show
  1. data/bin/keyth_admin +1 -1
  2. data/bin/keyth_check_file +26 -0
  3. metadata +4 -2
data/bin/keyth_admin CHANGED
@@ -1,4 +1,4 @@
1
- #! /usr/bin/ruby
1
+ #! /usr/bin/env ruby
2
2
  # encoding: utf-8
3
3
  require 'keyth'
4
4
 
@@ -0,0 +1,26 @@
1
+ #! /usr/bin/env ruby
2
+ # encoding: utf-8
3
+ require 'keyth'
4
+
5
+ unless ARGV[0]
6
+ puts 'Usage: keyth_check_file <file>'
7
+ exit 1
8
+ end
9
+
10
+ unless File.file?(ARGV[0])
11
+ puts "ERROR: #{ARGV[0]} not found"
12
+ exit 1
13
+ end
14
+
15
+ errors = []
16
+ file_contents = File.read(ARGV[0])
17
+ Keyth.keys.each do |k, v|
18
+ if file_contents.include?(v)
19
+ errors << "Found: #{v} replace with keyth:#{k}"
20
+ end
21
+ end
22
+
23
+ exit 0 if errors.empty?
24
+
25
+ errors.each { |e| puts e }
26
+ exit 1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keyth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,13 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-16 00:00:00.000000000 Z
12
+ date: 2014-08-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Handles named keys for use in config files
15
15
  email: keith@kludge.co
16
16
  executables:
17
17
  - keyth_admin
18
+ - keyth_check_file
18
19
  extensions: []
19
20
  extra_rdoc_files: []
20
21
  files:
@@ -22,6 +23,7 @@ files:
22
23
  - lib/keyth/yaml.rb
23
24
  - lib/keyth/dotenv.rb
24
25
  - bin/keyth_admin
26
+ - bin/keyth_check_file
25
27
  homepage: http://rubygems.org/gems/keyth
26
28
  licenses:
27
29
  - MIT