Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Commit c284f9c

Browse files
author
Jonathan Claudius
committed
More clean up and prep for split
1 parent caf8c53 commit c284f9c

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

lib/ssh_scan_api/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module SSHScan
2-
API_VERSION = '0.0.1.pre'
2+
API_VERSION = '0.0.1.pre2'
33
end

spec/ssh_scan_api/api_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def app
1616
expect(last_response.status).to eql(200)
1717
expect(last_response.body).to eql(
1818
"See API documentation here: \
19-
https://github.com/mozilla/ssh_scan/wiki/ssh_scan-Web-API\n"
19+
https://github.com/mozilla/ssh_scan_api/wiki/ssh_scan-Web-API\n"
2020
)
2121
end
2222

spec/ssh_scan_api/version_spec.rb

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,22 @@
77
expect(SSHScan::API_VERSION).to be_kind_of(::String)
88
end
99

10-
it "SSHScan::API_VERSION should have 1 level" do
11-
expect(SSHScan::API_VERSION.split('.').size).to eql(1)
12-
end
10+
it "SSHScan::API_VERSION should have appropriate version" do
11+
tokens = SSHScan::API_VERSION.split(".")
12+
13+
expect(tokens.size).to be_between(3,4).inclusive
1314

14-
it "SSHScan::API_VERSION should have a number between 1-20 for each octet" do
15-
expect(SSHScan::API_VERSION).to eql("1")
15+
if tokens.size == 3
16+
tokens.each do |token|
17+
expect(token).to be_kind_of(::String)
18+
expect(token.to_i).to be_between(0,50).inclusive
19+
end
20+
else tokens.size == 4
21+
expect(tokens[-1]).to match(/pre/)
22+
tokens[0,3].each do |token|
23+
expect(token).to be_kind_of(::String)
24+
expect(token.to_i).to be_between(0,50).inclusive
25+
end
26+
end
1627
end
1728
end

ssh_scan_api.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Gem::Specification.new do |s|
3232
s.add_dependency('sinatra')
3333
s.add_dependency('sinatra-contrib')
3434
s.add_dependency('thin')
35+
s.add_dependency('haml')
36+
s.add_dependency('secure_headers')
3537
s.add_development_dependency('rack-test')
3638
s.add_development_dependency('pry')
3739
s.add_development_dependency('rspec', '~> 3.0')

0 commit comments

Comments
 (0)