sesame-cli 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ module Sesame
2
+ class Fail < StandardError
3
+ end
4
+ end
@@ -0,0 +1,308 @@
1
+ require 'highline/import'
2
+ require 'i18n'
3
+ require 'clipboard'
4
+
5
+ module Sesame
6
+ class Jinn
7
+ def initialize(opts)
8
+ @opts = opts
9
+ _parse
10
+ _welcome
11
+ @sesame = Cave.new(@opts[:path])
12
+ I18n.load_path = Dir[File.join(File.dirname(__FILE__), 'lang', '*yml')]
13
+ rescue Fail => e
14
+ _error(e.message)
15
+ end
16
+
17
+ def process!
18
+ was_locked = false
19
+ if @sesame.exists?
20
+ @sesame.forget if @sesame.locked? && @opts.expunge?
21
+ if @sesame.locked?
22
+ _unlock
23
+ @sesame.forget
24
+ was_locked = true
25
+ else
26
+ _open
27
+ end
28
+ else
29
+ @sesame.forget if @sesame.locked?
30
+ _new
31
+ end
32
+ _process(@opts[:command])
33
+ if @opts[:command].nil? || @opts.interactive?
34
+ loop do
35
+ say("\n")
36
+ break if _prompt
37
+ end
38
+ if @opts.expunge?
39
+ @sesame.close
40
+ else
41
+ _lock(was_locked)
42
+ end
43
+ elsif was_locked
44
+ _lock(true)
45
+ else
46
+ @sesame.close
47
+ end
48
+ rescue Fail => e
49
+ _error(e.message)
50
+ end
51
+
52
+ protected
53
+
54
+ def _welcome
55
+ return if @opts[:quiet]
56
+ say(HighLine.color(<<~EOS, :bold, :yellow))
57
+ ╔═════════════════════════════════════╗
58
+ ║ ┏━━━┓ ┏━━━┓ ┏━━━┓ ┏━┓ ┏┓ ┏┓ ┏━━━┓ ║
59
+ ║ ┗━╋━┓ ┣━━┫ ┗━╋━┓ ┏┻━┻┓ ┃┗┳┛┃ ┣━━┫ ║
60
+ ║ ┗━━━┛ ┗━━━┛ ┗━━━┛ ┗ ┛ ┗ ┛ ┗━━━┛ ║
61
+ ╚═════════════════════════════════════╝
62
+ EOS
63
+ end
64
+
65
+ def _parse
66
+ _set_path
67
+ _set_command('list') if @opts.list?
68
+ _set_command('add') if @opts.add?
69
+ _set_command('get') if @opts.get?
70
+ _set_command('next') if @opts.next?
71
+ _set_command('delete') if @opts.delete?
72
+ end
73
+
74
+ def _set_path
75
+ # set @opts[:path] if nil from .sesamerc and then $SESAME_PATH and then current dir
76
+ if @opts[:path].nil?
77
+ @opts[:path] = _load_config || ENV.fetch('SESAME_PATH', '.')
78
+ end
79
+ @opts[:path] = File.expand_path(@opts[:path])
80
+ unless Dir.exist?(@opts[:path])
81
+ say("No such directory: #{@opts[:path]}")
82
+ exit 2
83
+ end
84
+ end
85
+
86
+ def _load_config(base=".")
87
+ path = File.join(base, '.sesamerc')
88
+ if File.exist?(path)
89
+ File.read(path)
90
+ elsif base == '.'
91
+ _load_config(Dir.home)
92
+ end
93
+ end
94
+
95
+ def _set_command(name)
96
+ if @opts[:command].nil?
97
+ @opts[:command] = name
98
+ else
99
+ say("Cannot execute command #{name}; #{@opts[:command]} already specified!")
100
+ exit 2
101
+ end
102
+ end
103
+
104
+ def _process(command)
105
+ return if command.nil?
106
+ case command.to_sym
107
+ when :list
108
+ _list
109
+ when :add
110
+ _add
111
+ when :get
112
+ _get
113
+ when :next
114
+ _next
115
+ when :delete
116
+ _delete
117
+ else
118
+ _error
119
+ end
120
+ end
121
+
122
+ def _prompt
123
+ done = false
124
+ _info("prompt")
125
+ choose do |menu|
126
+ menu.prompt = "\n> "
127
+ menu.shell = true
128
+ menu.choice(:list, "Display all of the services and users in your Sesame store.") do |command, args|
129
+ _set_opts(args)
130
+ _list
131
+ end
132
+ menu.choice(:add, "Add a new service and user to your Sesame store.") do |command, args|
133
+ _set_opts(args)
134
+ _add
135
+ end
136
+ menu.choice(:get, "Retrieve the pass phrase for a service and user.") do |command, args|
137
+ _set_opts(args)
138
+ _get
139
+ end
140
+ menu.choice(:next, "Generate a new passphrase for a service and user.") do |comnmand, args|
141
+ _set_opts(args)
142
+ _next
143
+ end
144
+ menu.choice(:delete, "Remove a service and user from the Sesame store.") do |command, args|
145
+ _set_opts(args)
146
+ _delete
147
+ end
148
+ menu.choice(:exit, "Close Sesame.") do
149
+ done = true
150
+ end
151
+ end
152
+ done
153
+ rescue Fail => e
154
+ _error(e.message)
155
+ end
156
+
157
+ def _error(details="An error occurred")
158
+ message =
159
+ if @opts[:quiet]
160
+ _trans("error", details: details)
161
+ else
162
+ _trans("jinn.error", details: details)
163
+ end
164
+ say(HighLine.color(message, :bold, :red))
165
+ end
166
+
167
+ def _new
168
+ words = nil
169
+ if @opts.reconstruct?
170
+ _info("reconstruct")
171
+ words = ask("🔑 ") { |q| q.echo = "*" }
172
+ end
173
+ phrase = @sesame.create!(words)
174
+ if words.nil?
175
+ _info("new")
176
+ _show(phrase)
177
+ else
178
+ _info("reconstructed")
179
+ end
180
+ end
181
+
182
+ def _open
183
+ _info("open")
184
+ words = ask("🔑 ") { |q| q.echo = "*" }
185
+ @sesame.open(words)
186
+ _info("path", path: @sesame.path)
187
+ end
188
+
189
+ def _unlock
190
+ _info("unlock")
191
+ key = ask("🔑 ") { |q| q.echo = "*" }
192
+ @sesame.unlock(key)
193
+ _info("path", path: @sesame.path)
194
+ end
195
+
196
+ def _forget
197
+ _info("forgot")
198
+ @sesame.forget
199
+ end
200
+
201
+ def _list
202
+ _info("list")
203
+ if @opts[:service].nil? || @opts[:service].length == 0
204
+ @sesame.index.each do |service, users|
205
+ next if service == 'sesame'
206
+ if users.count > 1
207
+ say("#{service} (#{users.count})")
208
+ else
209
+ say(service)
210
+ end
211
+ end
212
+ else
213
+ users = @sesame.index[@opts[:service]]
214
+ raise Fail, "No such service found, you must be thinking of some other cave" if users.nil? || @opts[:service] == "sesame"
215
+ users.each do |user, index|
216
+ say(user)
217
+ end
218
+ end
219
+ end
220
+
221
+ def _get
222
+ phrase = @sesame.get(*_question, @opts[:offset])
223
+ _info("get", @sesame.item)
224
+ _show(phrase)
225
+ end
226
+
227
+ def _add
228
+ phrase = @sesame.insert(*_question(true), @opts[:offset])
229
+ _info("add", @sesame.item)
230
+ _show(phrase)
231
+ end
232
+
233
+ def _next
234
+ phrase = @sesame.update(*_question, @opts[:offset])
235
+ if phrase.nil?
236
+ _info("next_key")
237
+ else
238
+ _info("next", @sesame.item)
239
+ _show(phrase)
240
+ end
241
+ end
242
+
243
+ def _delete
244
+ phrase = @sesame.delete(*_question)
245
+ _info("delete")
246
+ _show(phrase)
247
+ end
248
+
249
+ def _lock(silent=false)
250
+ key = @sesame.lock
251
+ return if silent
252
+ _info("lock")
253
+ _show(key)
254
+ end
255
+
256
+ def _info(message, args={})
257
+ message =
258
+ if @opts[:quiet]
259
+ _trans(message, args)
260
+ else
261
+ _trans("jinn.#{message}", args)
262
+ end
263
+ return if message.nil? || message.length == 0
264
+ say(HighLine.color(message, :bold, :green))
265
+ end
266
+
267
+ def _trans(message, args)
268
+ retval = I18n.t(message, args)
269
+ if retval =~ /^translation missing/
270
+ retval =
271
+ if @opts[:echo]
272
+ I18n.t("#{message}_echo", args)
273
+ else
274
+ I18n.t("#{message}_clip", args)
275
+ end
276
+ end
277
+ retval
278
+ end
279
+
280
+ def _show(data)
281
+ if @opts[:echo]
282
+ say(data)
283
+ else
284
+ Clipboard.copy(data)
285
+ end
286
+ end
287
+
288
+ def _set_opts(args)
289
+ args = args.split(" ").map(&:strip).map(&:downcase)
290
+ return if args.count == 0
291
+ @opts[:service] = args.first if args.count < 3
292
+ @opts[:user] = args.last if args.count == 2
293
+ end
294
+
295
+ def _question(user_required=false)
296
+ service, user = @opts[:service], @opts[:user]
297
+ if service.nil?
298
+ _info("service")
299
+ service = ask("🏷 ")
300
+ end
301
+ if user.nil? && (user_required || !@sesame.unique?(service))
302
+ _info("user")
303
+ user = ask("👤 ")
304
+ end
305
+ [service.downcase, user.nil? ? nil : user.downcase]
306
+ end
307
+ end
308
+ end
@@ -0,0 +1,50 @@
1
+ en:
2
+ error: 'Error: %{details}.'
3
+ open: 'Enter pass phrase.'
4
+ unlock: 'Enter unlock code.'
5
+ prompt: ''
6
+ new_echo: 'Store created. Your passphrase is:'
7
+ new_clip: 'Store created. Passphrase copied to clipboard.'
8
+ reconstruct: 'Enter pass phrase for new store.'
9
+ reconstructed: 'Store created with your chosen passphrase.'
10
+ path: 'Opened %{path}'
11
+ forgot: 'Lock removed.'
12
+ list: ''
13
+ get_echo: 'Password for %{service} / %{user}:'
14
+ get_clip: 'Password for %{service} / %{user} copied to clipboard.'
15
+ add_echo: 'New password:'
16
+ add_clip: 'New password copied to clipboard.'
17
+ next_key: 'Unlock code will be updated on exit.'
18
+ next_echo: 'Updated password for %{service} / %{user}:'
19
+ next_clip: 'Updated password for %{service} / %{user} copied to clipboard.'
20
+ delete_echo: 'Deleted password for %{service} / %{user}:'
21
+ delete_clip: 'Deleted password for %{service} / %{user} copied to clipboard.'
22
+ lock_echo: 'Store locked with unlock code:'
23
+ lock_clip: 'Store locked. Unlock code copied to clipboard.'
24
+ service: 'Enter service name:'
25
+ user: 'Enter user name:'
26
+ jinn:
27
+ error: '🧞 - "A thousand apologies! %{details}."'
28
+ open: '🧞 - "Open sesame! Please incant the magic words..."'
29
+ unlock: '🧞 - "Master, your cave is locked. Do you have the key?"'
30
+ prompt: '🧞 - "What is your command?"'
31
+ new_echo: '🧞 - "Your new cave is ready, master. Please commit these magic words to memory..."'
32
+ new_clip: '🧞 - "Your new cave is ready, master. The magic words are in your clipboard."'
33
+ reconstruct: '🧞 - "Master, what are the magic words you wish to use?"'
34
+ reconstructed: '🧞 - "Your new cave is ready, master."'
35
+ path: '🧞 - "The cave is open: %{path}"'
36
+ forgot: '🧞 - "My pleasure, master. I seem to have misplaced the lock."'
37
+ list: '🧞 - "Behold! Tremble in awe at the greatness of these heroes!"'
38
+ get_echo: '🧞 - "Master, the magic words for %{user} of %{service} are..."'
39
+ get_clip: '🧞 - "Master, the magic words for %{user} of %{service} are in your clipboard."'
40
+ add_echo: '🧞 - "Your new magic words are..."'
41
+ add_clip: '🧞 - "Your new magic words are in your clipboard."'
42
+ next_key: '🧞 - "I shall forge you a new key for locking your cave."'
43
+ next_echo: '🧞 - "I have recast the magic words for %{user} of %{service}..."'
44
+ next_clip: '🧞 - "The recast magic words for %{user} of %{service} are in your clipboard."'
45
+ delete_echo: '🧞 - "These magic words for %{user} of %{service} are no more..."'
46
+ delete_clip: '🧞 - "The magic words for %{user} of %{service} are no more, but are still in your clipboard."'
47
+ lock_echo: '🧞 - "I have secured your treasure with this key..."'
48
+ lock_clip: '🧞 - "I have secured your treasure. The key is in your clipboard."'
49
+ service: '🧞 - "What be the name of the service?"'
50
+ user: '🧞 - "And what be the name of the user?"'
data/lib/sesame.rb ADDED
@@ -0,0 +1,4 @@
1
+ require 'sesame/cave'
2
+ require 'sesame/dict'
3
+ require 'sesame/fail'
4
+ require 'sesame/jinn'
@@ -0,0 +1,100 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+ # stub: sesame-cli 0.1.0 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "sesame-cli".freeze
9
+ s.version = "0.1.0"
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["Jason Hutchens".freeze, "Jack Casey".freeze]
14
+ s.date = "2018-04-20"
15
+ s.description = "Sesame is a simple password manager for the command-line.".freeze
16
+ s.email = "jasonhutchens@gmail.com".freeze
17
+ s.executables = ["sesame".freeze]
18
+ s.extra_rdoc_files = [
19
+ "README.md"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "README.md",
26
+ "Rakefile",
27
+ "UNLICENSE",
28
+ "VERSION",
29
+ "bin/sesame",
30
+ "lib/sesame.rb",
31
+ "lib/sesame/cave.rb",
32
+ "lib/sesame/dict.rb",
33
+ "lib/sesame/fail.rb",
34
+ "lib/sesame/jinn.rb",
35
+ "lib/sesame/lang/en.yml",
36
+ "sesame-cli.gemspec",
37
+ "sesame.gemspec",
38
+ "spec/spec_helper.rb"
39
+ ]
40
+ s.homepage = "http://github.com/kranzky/sesame-cli".freeze
41
+ s.licenses = ["UNLICENSE".freeze]
42
+ s.required_ruby_version = Gem::Requirement.new("~> 2.1".freeze)
43
+ s.rubygems_version = "2.7.3".freeze
44
+ s.summary = "Sesame is a simple password manager for the command-line.".freeze
45
+
46
+ if s.respond_to? :specification_version then
47
+ s.specification_version = 4
48
+
49
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
50
+ s.add_runtime_dependency(%q<bases>.freeze, ["~> 1.0"])
51
+ s.add_runtime_dependency(%q<clipboard>.freeze, ["~> 1.1"])
52
+ s.add_runtime_dependency(%q<digest-crc>.freeze, ["~> 0.4"])
53
+ s.add_runtime_dependency(%q<highline>.freeze, ["~> 1.7"])
54
+ s.add_runtime_dependency(%q<i18n>.freeze, ["~> 1.0"])
55
+ s.add_runtime_dependency(%q<rbnacl>.freeze, ["~> 5.0"])
56
+ s.add_runtime_dependency(%q<rbnacl-libsodium>.freeze, ["~> 1.0"])
57
+ s.add_runtime_dependency(%q<slop>.freeze, ["~> 4.6"])
58
+ s.add_development_dependency(%q<awesome_print>.freeze, ["~> 1.8.0"])
59
+ s.add_development_dependency(%q<byebug>.freeze, ["~> 10.0.1"])
60
+ s.add_development_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
61
+ s.add_development_dependency(%q<rdoc>.freeze, ["~> 6.0"])
62
+ s.add_development_dependency(%q<rspec>.freeze, ["~> 3.7"])
63
+ s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.15"])
64
+ s.add_development_dependency(%q<yard>.freeze, ["~> 0.9"])
65
+ else
66
+ s.add_dependency(%q<bases>.freeze, ["~> 1.0"])
67
+ s.add_dependency(%q<clipboard>.freeze, ["~> 1.1"])
68
+ s.add_dependency(%q<digest-crc>.freeze, ["~> 0.4"])
69
+ s.add_dependency(%q<highline>.freeze, ["~> 1.7"])
70
+ s.add_dependency(%q<i18n>.freeze, ["~> 1.0"])
71
+ s.add_dependency(%q<rbnacl>.freeze, ["~> 5.0"])
72
+ s.add_dependency(%q<rbnacl-libsodium>.freeze, ["~> 1.0"])
73
+ s.add_dependency(%q<slop>.freeze, ["~> 4.6"])
74
+ s.add_dependency(%q<awesome_print>.freeze, ["~> 1.8.0"])
75
+ s.add_dependency(%q<byebug>.freeze, ["~> 10.0.1"])
76
+ s.add_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
77
+ s.add_dependency(%q<rdoc>.freeze, ["~> 6.0"])
78
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.7"])
79
+ s.add_dependency(%q<simplecov>.freeze, ["~> 0.15"])
80
+ s.add_dependency(%q<yard>.freeze, ["~> 0.9"])
81
+ end
82
+ else
83
+ s.add_dependency(%q<bases>.freeze, ["~> 1.0"])
84
+ s.add_dependency(%q<clipboard>.freeze, ["~> 1.1"])
85
+ s.add_dependency(%q<digest-crc>.freeze, ["~> 0.4"])
86
+ s.add_dependency(%q<highline>.freeze, ["~> 1.7"])
87
+ s.add_dependency(%q<i18n>.freeze, ["~> 1.0"])
88
+ s.add_dependency(%q<rbnacl>.freeze, ["~> 5.0"])
89
+ s.add_dependency(%q<rbnacl-libsodium>.freeze, ["~> 1.0"])
90
+ s.add_dependency(%q<slop>.freeze, ["~> 4.6"])
91
+ s.add_dependency(%q<awesome_print>.freeze, ["~> 1.8.0"])
92
+ s.add_dependency(%q<byebug>.freeze, ["~> 10.0.1"])
93
+ s.add_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
94
+ s.add_dependency(%q<rdoc>.freeze, ["~> 6.0"])
95
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.7"])
96
+ s.add_dependency(%q<simplecov>.freeze, ["~> 0.15"])
97
+ s.add_dependency(%q<yard>.freeze, ["~> 0.9"])
98
+ end
99
+ end
100
+
data/sesame.gemspec ADDED
@@ -0,0 +1,99 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+ # stub: sesame 0.1.0 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "sesame".freeze
9
+ s.version = "0.1.0"
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["Jason Hutchens".freeze, "Jack Casey".freeze]
14
+ s.date = "2018-04-20"
15
+ s.description = "Sesame is a simple password manager for the command-line.".freeze
16
+ s.email = "jasonhutchens@gmail.com".freeze
17
+ s.executables = ["sesame".freeze]
18
+ s.extra_rdoc_files = [
19
+ "README.md"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "README.md",
26
+ "Rakefile",
27
+ "UNLICENSE",
28
+ "VERSION",
29
+ "bin/sesame",
30
+ "lib/sesame.rb",
31
+ "lib/sesame/cave.rb",
32
+ "lib/sesame/dict.rb",
33
+ "lib/sesame/fail.rb",
34
+ "lib/sesame/jinn.rb",
35
+ "lib/sesame/lang/en.yml",
36
+ "sesame.gemspec",
37
+ "spec/spec_helper.rb"
38
+ ]
39
+ s.homepage = "http://github.com/kranzky/sesame-cli".freeze
40
+ s.licenses = ["UNLICENSE".freeze]
41
+ s.required_ruby_version = Gem::Requirement.new("~> 2.1".freeze)
42
+ s.rubygems_version = "2.7.3".freeze
43
+ s.summary = "Sesame is a simple password manager for the command-line.".freeze
44
+
45
+ if s.respond_to? :specification_version then
46
+ s.specification_version = 4
47
+
48
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
+ s.add_runtime_dependency(%q<bases>.freeze, ["~> 1.0"])
50
+ s.add_runtime_dependency(%q<clipboard>.freeze, ["~> 1.1"])
51
+ s.add_runtime_dependency(%q<digest-crc>.freeze, ["~> 0.4"])
52
+ s.add_runtime_dependency(%q<highline>.freeze, ["~> 1.7"])
53
+ s.add_runtime_dependency(%q<i18n>.freeze, ["~> 1.0"])
54
+ s.add_runtime_dependency(%q<rbnacl>.freeze, ["~> 5.0"])
55
+ s.add_runtime_dependency(%q<rbnacl-libsodium>.freeze, ["~> 1.0"])
56
+ s.add_runtime_dependency(%q<slop>.freeze, ["~> 4.6"])
57
+ s.add_development_dependency(%q<awesome_print>.freeze, ["~> 1.8.0"])
58
+ s.add_development_dependency(%q<byebug>.freeze, ["~> 10.0.1"])
59
+ s.add_development_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
60
+ s.add_development_dependency(%q<rdoc>.freeze, ["~> 6.0"])
61
+ s.add_development_dependency(%q<rspec>.freeze, ["~> 3.7"])
62
+ s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.15"])
63
+ s.add_development_dependency(%q<yard>.freeze, ["~> 0.9"])
64
+ else
65
+ s.add_dependency(%q<bases>.freeze, ["~> 1.0"])
66
+ s.add_dependency(%q<clipboard>.freeze, ["~> 1.1"])
67
+ s.add_dependency(%q<digest-crc>.freeze, ["~> 0.4"])
68
+ s.add_dependency(%q<highline>.freeze, ["~> 1.7"])
69
+ s.add_dependency(%q<i18n>.freeze, ["~> 1.0"])
70
+ s.add_dependency(%q<rbnacl>.freeze, ["~> 5.0"])
71
+ s.add_dependency(%q<rbnacl-libsodium>.freeze, ["~> 1.0"])
72
+ s.add_dependency(%q<slop>.freeze, ["~> 4.6"])
73
+ s.add_dependency(%q<awesome_print>.freeze, ["~> 1.8.0"])
74
+ s.add_dependency(%q<byebug>.freeze, ["~> 10.0.1"])
75
+ s.add_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
76
+ s.add_dependency(%q<rdoc>.freeze, ["~> 6.0"])
77
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.7"])
78
+ s.add_dependency(%q<simplecov>.freeze, ["~> 0.15"])
79
+ s.add_dependency(%q<yard>.freeze, ["~> 0.9"])
80
+ end
81
+ else
82
+ s.add_dependency(%q<bases>.freeze, ["~> 1.0"])
83
+ s.add_dependency(%q<clipboard>.freeze, ["~> 1.1"])
84
+ s.add_dependency(%q<digest-crc>.freeze, ["~> 0.4"])
85
+ s.add_dependency(%q<highline>.freeze, ["~> 1.7"])
86
+ s.add_dependency(%q<i18n>.freeze, ["~> 1.0"])
87
+ s.add_dependency(%q<rbnacl>.freeze, ["~> 5.0"])
88
+ s.add_dependency(%q<rbnacl-libsodium>.freeze, ["~> 1.0"])
89
+ s.add_dependency(%q<slop>.freeze, ["~> 4.6"])
90
+ s.add_dependency(%q<awesome_print>.freeze, ["~> 1.8.0"])
91
+ s.add_dependency(%q<byebug>.freeze, ["~> 10.0.1"])
92
+ s.add_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
93
+ s.add_dependency(%q<rdoc>.freeze, ["~> 6.0"])
94
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.7"])
95
+ s.add_dependency(%q<simplecov>.freeze, ["~> 0.15"])
96
+ s.add_dependency(%q<yard>.freeze, ["~> 0.9"])
97
+ end
98
+ end
99
+
@@ -0,0 +1,30 @@
1
+ require 'simplecov'
2
+
3
+ module SimpleCov::Configuration
4
+ def clean_filters
5
+ @filters = []
6
+ end
7
+ end
8
+
9
+ SimpleCov.configure do
10
+ clean_filters
11
+ load_profile 'test_frameworks'
12
+ end
13
+
14
+ ENV["COVERAGE"] && SimpleCov.start do
15
+ add_filter "/.rvm/"
16
+ end
17
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
18
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
19
+
20
+ require 'rspec'
21
+
22
+ require 'sesame'
23
+
24
+ # Requires supporting files with custom matchers and macros, etc,
25
+ # in ./support/ and its subdirectories.
26
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
27
+
28
+ RSpec.configure do |config|
29
+
30
+ end