lastpass 1.3.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,10 +6,22 @@ require "test_data"
6
6
 
7
7
  describe LastPass::Vault do
8
8
  let(:vault) {
9
- LastPass::Vault.new LastPass::Blob.new(TEST_BLOB, TEST_KEY_ITERATION_COUNT),
9
+ LastPass::Vault.new LastPass::Blob.new(TEST_BLOB, TEST_KEY_ITERATION_COUNT, nil),
10
10
  TEST_ENCRYPTION_KEY
11
11
  }
12
12
 
13
+ describe ".new" do
14
+ it "raises an exception on trucated blob" do
15
+ [1, 2, 3, 4, 5, 10, 100, 1000].each do |i|
16
+ expect {
17
+ blob = TEST_BLOB[0..(-1 - i)]
18
+ LastPass::Vault.new LastPass::Blob.new(blob, TEST_KEY_ITERATION_COUNT, nil),
19
+ TEST_ENCRYPTION_KEY
20
+ }.to raise_error LastPass::InvalidResponseError, "Blob is truncated"
21
+ end
22
+ end
23
+ end
24
+
13
25
  describe "#accounts" do
14
26
  context "returned accounts" do
15
27
  it { expect(vault.accounts).to be_instance_of Array }
@@ -17,6 +29,30 @@ describe LastPass::Vault do
17
29
  it "should have correct IDs" do
18
30
  expect(vault.accounts.map &:id).to eq TEST_ACCOUNTS.map &:id
19
31
  end
32
+
33
+ it "should have correct names" do
34
+ expect(vault.accounts.map &:name).to eq TEST_ACCOUNTS.map &:name
35
+ end
36
+
37
+ it "should have correct usernames" do
38
+ expect(vault.accounts.map &:username).to eq TEST_ACCOUNTS.map &:username
39
+ end
40
+
41
+ it "should have correct passwords" do
42
+ expect(vault.accounts.map &:password).to eq TEST_ACCOUNTS.map &:password
43
+ end
44
+
45
+ it "should have correct urls" do
46
+ expect(vault.accounts.map &:url).to eq TEST_ACCOUNTS.map &:url
47
+ end
48
+
49
+ it "should have correct notes" do
50
+ expect(vault.accounts.map &:notes).to eq TEST_ACCOUNTS.map &:notes
51
+ end
52
+
53
+ it "should have correct groups" do
54
+ expect(vault.accounts.map &:group).to eq TEST_ACCOUNTS.map &:group
55
+ end
20
56
  end
21
57
  end
22
58
  end
metadata CHANGED
@@ -1,121 +1,94 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lastpass
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
5
- prerelease:
4
+ version: 1.7.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dmitry Yakimenko
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-12-03 00:00:00.000000000 Z
11
+ date: 2020-10-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: httparty
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: 0.13.0
19
+ version: 0.14.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: 0.13.0
30
- - !ruby/object:Gem::Dependency
31
- name: pbkdf2-ruby
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: 0.2.0
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 0.2.0
26
+ version: 0.14.0
46
27
  - !ruby/object:Gem::Dependency
47
28
  name: rake
48
29
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
30
  requirements:
51
- - - ~>
31
+ - - "~>"
52
32
  - !ruby/object:Gem::Version
53
- version: 10.4.0
33
+ version: '12.0'
54
34
  type: :development
55
35
  prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
37
  requirements:
59
- - - ~>
38
+ - - "~>"
60
39
  - !ruby/object:Gem::Version
61
- version: 10.4.0
40
+ version: '12.0'
62
41
  - !ruby/object:Gem::Dependency
63
42
  name: rspec
64
43
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
44
  requirements:
67
- - - ~>
45
+ - - "~>"
68
46
  - !ruby/object:Gem::Version
69
- version: 3.1.0
47
+ version: '3.5'
70
48
  type: :development
71
49
  prerelease: false
72
50
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
51
  requirements:
75
- - - ~>
52
+ - - "~>"
76
53
  - !ruby/object:Gem::Version
77
- version: 3.1.0
54
+ version: '3.5'
78
55
  - !ruby/object:Gem::Dependency
79
56
  name: rspec-its
80
57
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
58
  requirements:
83
- - - ~>
59
+ - - "~>"
84
60
  - !ruby/object:Gem::Version
85
- version: 1.1.0
61
+ version: '1.2'
86
62
  type: :development
87
63
  prerelease: false
88
64
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
65
  requirements:
91
- - - ~>
66
+ - - "~>"
92
67
  - !ruby/object:Gem::Version
93
- version: 1.1.0
68
+ version: '1.2'
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: coveralls
96
71
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
72
  requirements:
99
- - - ~>
73
+ - - "~>"
100
74
  - !ruby/object:Gem::Version
101
- version: 0.7.0
75
+ version: 0.8.19
102
76
  type: :development
103
77
  prerelease: false
104
78
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
79
  requirements:
107
- - - ~>
80
+ - - "~>"
108
81
  - !ruby/object:Gem::Version
109
- version: 0.7.0
110
- description: Unofficial LastPass API
82
+ version: 0.8.19
83
+ description: Read only access to the online LastPass vault
111
84
  email: detunized@gmail.com
112
85
  executables: []
113
86
  extensions: []
114
87
  extra_rdoc_files: []
115
88
  files:
116
- - .gitignore
117
- - .ruby-version
118
- - .travis.yml
89
+ - ".github/workflows/ruby.yml"
90
+ - ".gitignore"
91
+ - ".travis.yml"
119
92
  - CHANGELOG.md
120
93
  - Gemfile
121
94
  - LICENSE
@@ -133,6 +106,7 @@ files:
133
106
  - lib/lastpass/exceptions.rb
134
107
  - lib/lastpass/fetcher.rb
135
108
  - lib/lastpass/http.rb
109
+ - lib/lastpass/note.rb
136
110
  - lib/lastpass/parser.rb
137
111
  - lib/lastpass/session.rb
138
112
  - lib/lastpass/vault.rb
@@ -150,27 +124,25 @@ files:
150
124
  homepage: https://github.com/detunized/lastpass-ruby
151
125
  licenses:
152
126
  - MIT
153
- post_install_message:
127
+ metadata: {}
128
+ post_install_message:
154
129
  rdoc_options: []
155
130
  require_paths:
156
131
  - lib
157
132
  required_ruby_version: !ruby/object:Gem::Requirement
158
- none: false
159
133
  requirements:
160
- - - ! '>='
134
+ - - ">="
161
135
  - !ruby/object:Gem::Version
162
- version: 1.9.3
136
+ version: 2.0.0
163
137
  required_rubygems_version: !ruby/object:Gem::Requirement
164
- none: false
165
138
  requirements:
166
- - - ! '>='
139
+ - - ">="
167
140
  - !ruby/object:Gem::Version
168
141
  version: '0'
169
142
  requirements: []
170
- rubyforge_project:
171
- rubygems_version: 1.8.23.2
172
- signing_key:
173
- specification_version: 3
143
+ rubygems_version: 3.1.4
144
+ signing_key:
145
+ specification_version: 4
174
146
  summary: Unofficial LastPass API
175
147
  test_files:
176
148
  - spec/account_spec.rb
@@ -1 +0,0 @@
1
- 1.9.3-p551