bcdatabase 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.markdown +5 -0
- data/bin/bcdatabase +2 -1
- data/lib/bcdatabase/commands.rb +7 -4
- data/lib/bcdatabase/version.rb +1 -1
- data/lib/bcdatabase.rb +3 -0
- metadata +21 -7
data/CHANGELOG.markdown
CHANGED
data/bin/bcdatabase
CHANGED
data/lib/bcdatabase/commands.rb
CHANGED
@@ -2,6 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'fileutils'
|
3
3
|
require 'highline'
|
4
4
|
require 'active_support'
|
5
|
+
require 'active_support/core_ext/string/inflections'
|
5
6
|
require 'bcdatabase'
|
6
7
|
|
7
8
|
HL = HighLine.new
|
@@ -51,6 +52,7 @@ module Bcdatabase::Commands
|
|
51
52
|
$stdin.readlines.each do |line|
|
52
53
|
puts Bcdatabase.encrypt(line.chomp)
|
53
54
|
end
|
55
|
+
0
|
54
56
|
end
|
55
57
|
|
56
58
|
def interactive
|
@@ -63,8 +65,8 @@ module Bcdatabase::Commands
|
|
63
65
|
end
|
64
66
|
rescue Interrupt
|
65
67
|
puts "\nQuit"
|
66
|
-
exit(0)
|
67
68
|
end
|
69
|
+
0
|
68
70
|
end
|
69
71
|
end
|
70
72
|
|
@@ -115,6 +117,7 @@ module Bcdatabase::Commands
|
|
115
117
|
end
|
116
118
|
outio.write(contents)
|
117
119
|
outio.close
|
120
|
+
0
|
118
121
|
end
|
119
122
|
end
|
120
123
|
|
@@ -137,15 +140,14 @@ module Bcdatabase::Commands
|
|
137
140
|
if klass
|
138
141
|
msg = klass.respond_to?(:help) ? klass.help : klass.summary
|
139
142
|
$stderr.puts msg
|
140
|
-
exit(0)
|
141
143
|
else
|
142
144
|
$stderr.puts "Unknown command #{@cmd}"
|
143
|
-
|
145
|
+
return 1
|
144
146
|
end
|
145
147
|
else
|
146
148
|
$stderr.puts Bcdatabase::Commands.help
|
147
|
-
exit(0)
|
148
149
|
end
|
150
|
+
0
|
149
151
|
end
|
150
152
|
end
|
151
153
|
|
@@ -190,6 +192,7 @@ module Bcdatabase::Commands
|
|
190
192
|
end
|
191
193
|
outio.write key
|
192
194
|
outio.close
|
195
|
+
0
|
193
196
|
end
|
194
197
|
|
195
198
|
private
|
data/lib/bcdatabase/version.rb
CHANGED
data/lib/bcdatabase.rb
CHANGED
@@ -4,6 +4,9 @@ require 'digest/sha2'
|
|
4
4
|
require 'base64'
|
5
5
|
|
6
6
|
module Bcdatabase
|
7
|
+
autoload :VERSION, 'bcdatabase/version'
|
8
|
+
autoload :Commands, 'bcdatabase/commands'
|
9
|
+
|
7
10
|
DEFAULT_BASE_PATH = File.join('/', 'etc', 'nubic', 'db')
|
8
11
|
DEFAULT_PASS_FILE = File.join('/', 'var', 'lib', 'nubic', 'db.pass')
|
9
12
|
CIPHER = 'aes-256-ecb'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcdatabase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 4
|
10
|
+
version: 1.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rhett Sutphin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-17 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -49,9 +49,23 @@ dependencies:
|
|
49
49
|
type: :runtime
|
50
50
|
version_requirements: *id002
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
|
-
name:
|
52
|
+
name: i18n
|
53
53
|
prerelease: false
|
54
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
63
|
+
type: :runtime
|
64
|
+
version_requirements: *id003
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: rspec
|
67
|
+
prerelease: false
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
55
69
|
none: false
|
56
70
|
requirements:
|
57
71
|
- - ~>
|
@@ -62,7 +76,7 @@ dependencies:
|
|
62
76
|
- 2
|
63
77
|
version: "1.2"
|
64
78
|
type: :development
|
65
|
-
version_requirements: *
|
79
|
+
version_requirements: *id004
|
66
80
|
description: bcdatabase is a tool for storing passwords and other database configuration information outside of your application source tree.
|
67
81
|
email: rhett@detailedbalance.net
|
68
82
|
executables:
|
@@ -109,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
123
|
requirements: []
|
110
124
|
|
111
125
|
rubyforge_project:
|
112
|
-
rubygems_version: 1.5.
|
126
|
+
rubygems_version: 1.5.2
|
113
127
|
signing_key:
|
114
128
|
specification_version: 3
|
115
129
|
summary: Server-central database configuration for rails and other ruby apps
|