oplop 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5923dcc29b4f4b6afbca3f1c0e46385040152e3c
4
+ data.tar.gz: d37b05ca0e044ce15b5efedd05268a7b89b74da3
5
+ SHA512:
6
+ metadata.gz: dadf0a03d6ec98c09b2ee58a9602625423c008363f80d241cf4526e6b25525af1af1a643f4916ca18ed794db9949e8e98d21ea95d4b4a27015f5c34b8f0ee39f
7
+ data.tar.gz: ab93468e5ab4a3c4becaa9ce1060313f53325353ba01856f877cae2b4b7fdad2a7df11f7241cb0808da533855b13556895b4207e7ea3691ca896db7452758959
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in oplop.gemspec
4
4
  gemspec
data/README.md CHANGED
@@ -17,3 +17,8 @@ CLI
17
17
  ===
18
18
 
19
19
  This includes an `oplop` program. Run `oplop --help` for more information.
20
+
21
+ License
22
+ =======
23
+
24
+ MIT
data/bin/oplop CHANGED
@@ -7,6 +7,9 @@ require 'oplop/cli'
7
7
  require 'highline/import'
8
8
  require 'optparse'
9
9
 
10
+ # -- exit nicely if control-c
11
+ Signal.trap("SIGINT") { exit 2 }
12
+
10
13
  # -- options
11
14
  options = {}
12
15
  optparse = OptionParser.new do |opts|
@@ -39,15 +42,15 @@ if label.nil? or label.empty?
39
42
  exit 2
40
43
  end
41
44
 
45
+
46
+ master = ask("Enter your master password: ") { |q| q.echo = "*" }
47
+
42
48
  if options[:new]
43
- master = ask("Enter your master password: ") { |q| q.echo = "*" }
44
49
  master_confirm = ask("Enter your master password (again): ") { |q| q.echo = "*" }
45
50
  if (master != master_confirm)
46
51
  puts "!! Your master and confirm don't match!"
47
52
  exit 2
48
53
  end
49
- else
50
- master = ask("Enter your master password: ") { |q| q.echo = "*" }
51
54
  end
52
55
 
53
56
  password = Oplop.password(:label => label, :master => master)
@@ -1,3 +1,3 @@
1
1
  module Oplop
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -11,14 +11,16 @@ Gem::Specification.new do |s|
11
11
  s.homepage = "http://github.com/bkaney/oplop"
12
12
  s.summary = %q{Oplop for Ruby}
13
13
  s.description = %q{Provides a ruby library and command line tool for Oplop}
14
+ s.license = 'MIT'
14
15
 
15
16
  s.rubyforge_project = "oplop"
16
17
 
17
- s.add_dependency(%q<highline>, ["~> 1.6.1"])
18
- s.add_development_dependency(%q<ruby-debug19>)
19
- s.add_development_dependency(%q<rspec>, ["~> 2.6.0"])
20
- s.add_development_dependency(%q<yajl-ruby>, ["~> 0.8.2"])
21
-
18
+ s.add_dependency 'highline', '~> 1.6'
19
+
20
+ s.add_development_dependency 'rake', '~> 10.1'
21
+ s.add_development_dependency 'rspec', '~> 2.14'
22
+ s.add_development_dependency 'yajl-ruby', '~> 1.2'
23
+
22
24
  s.files = `git ls-files`.split("\n")
23
25
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
24
26
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -1,34 +1,27 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Oplop do
4
-
5
4
  describe ".password" do
6
-
7
5
  specify "valid arguments" do
8
- lambda{ Oplop.password(:master => "a", :label => "a") }.should_not raise_error(ArgumentError)
6
+ expect { Oplop.password(:master => "a", :label => "a") }.not_to raise_error
9
7
  end
10
8
 
11
9
  specify "invalid arguments" do
12
- lambda{ Oplop.password }.should raise_error(ArgumentError, /Master and label are required/)
10
+ expect { Oplop.password }.to raise_error(ArgumentError, /Master and label are required/)
13
11
  end
14
12
 
15
13
  specify "invalid arguments" do
16
- lambda{ Oplop.password(:master => "a", :label => "b", :foo => 'c') }.should raise_error(ArgumentError, /Unknown key/)
14
+ expect { Oplop.password(:master => "a", :label => "b", :foo => 'c') }.to raise_error(ArgumentError, /Unknown key/)
17
15
  end
18
16
 
19
17
  context "tests from testdata.json (see Python implementation at http://code.google.com/p/oplop/)" do
20
-
21
18
  # loop around each "case" in testdata.yml
22
19
  Yajl::Parser.new.parse(File.new(File.dirname(__FILE__) + "/testdata.json", 'r')).each do |testdata|
23
-
24
20
  specify testdata["why"] do
25
- Oplop.password(:master => testdata["master"], :label => testdata["label"]).should == testdata["password"]
21
+ password = Oplop.password(:master => testdata["master"], :label => testdata["label"])
22
+ expect(password).to eq testdata["password"]
26
23
  end
27
-
28
24
  end
29
-
30
25
  end
31
-
32
26
  end
33
-
34
27
  end
metadata CHANGED
@@ -1,73 +1,80 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: oplop
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.0.7
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.8
6
5
  platform: ruby
7
- authors:
6
+ authors:
8
7
  - Brian Kaney
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
-
13
- date: 2011-05-15 00:00:00 -04:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
11
+ date: 2014-03-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
17
14
  name: highline
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
20
- none: false
21
- requirements:
22
- - - ~>
23
- - !ruby/object:Gem::Version
24
- version: 1.6.1
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
25
20
  type: :runtime
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: ruby-debug19
29
21
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
31
- none: false
32
- requirements:
33
- - - ">="
34
- - !ruby/object:Gem::Version
35
- version: "0"
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.1'
36
34
  type: :development
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: rspec
40
35
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ~>
45
- - !ruby/object:Gem::Version
46
- version: 2.6.0
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.14'
47
48
  type: :development
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: yajl-ruby
51
49
  prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ~>
56
- - !ruby/object:Gem::Version
57
- version: 0.8.2
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.14'
55
+ - !ruby/object:Gem::Dependency
56
+ name: yajl-ruby
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.2'
58
62
  type: :development
59
- version_requirements: *id004
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.2'
60
69
  description: Provides a ruby library and command line tool for Oplop
61
- email:
70
+ email:
62
71
  - brian@vermonster.com
63
- executables:
72
+ executables:
64
73
  - oplop
65
74
  extensions: []
66
-
67
75
  extra_rdoc_files: []
68
-
69
- files:
70
- - .gitignore
76
+ files:
77
+ - ".gitignore"
71
78
  - Gemfile
72
79
  - README.md
73
80
  - Rakefile
@@ -79,35 +86,31 @@ files:
79
86
  - spec/oplop_spec.rb
80
87
  - spec/spec_helper.rb
81
88
  - spec/testdata.json
82
- has_rdoc: true
83
89
  homepage: http://github.com/bkaney/oplop
84
- licenses: []
85
-
90
+ licenses:
91
+ - MIT
92
+ metadata: {}
86
93
  post_install_message:
87
94
  rdoc_options: []
88
-
89
- require_paths:
95
+ require_paths:
90
96
  - lib
91
- required_ruby_version: !ruby/object:Gem::Requirement
92
- none: false
93
- requirements:
97
+ required_ruby_version: !ruby/object:Gem::Requirement
98
+ requirements:
94
99
  - - ">="
95
- - !ruby/object:Gem::Version
96
- version: "0"
97
- required_rubygems_version: !ruby/object:Gem::Requirement
98
- none: false
99
- requirements:
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ required_rubygems_version: !ruby/object:Gem::Requirement
103
+ requirements:
100
104
  - - ">="
101
- - !ruby/object:Gem::Version
102
- version: "0"
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
103
107
  requirements: []
104
-
105
108
  rubyforge_project: oplop
106
- rubygems_version: 1.6.2
109
+ rubygems_version: 2.2.0
107
110
  signing_key:
108
- specification_version: 3
111
+ specification_version: 4
109
112
  summary: Oplop for Ruby
110
- test_files:
113
+ test_files:
111
114
  - spec/oplop_spec.rb
112
115
  - spec/spec_helper.rb
113
116
  - spec/testdata.json