nsrr 0.1.0.beta2 → 0.1.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nsrr/helpers/download_request.rb +5 -1
- data/lib/nsrr/helpers/json_request.rb +5 -1
- data/lib/nsrr/models/dataset.rb +1 -1
- data/lib/nsrr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 264d749d9908c859da8beac680941e7cf1d87ac3
|
4
|
+
data.tar.gz: 6bb9f5bbb9f3dd79c522fa98e7543781ef8ad87a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ce4aacec2ce0cde8cc1fb459cacb60874fe6816efcb134baa0801b916ecc047631778504255eb4edaad6767a13fc4bd54850c9d290ba6d06a5a6784da17d75a
|
7
|
+
data.tar.gz: cc22609fb152fca49f7cf8a516b5a637749cc74a4e2d9f41951780c99eb5b2e2e3e4e9d4d1388f597e620bfc2cb910228b5351a7d6ad5401ddc62e4430c1982a
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'openssl'
|
1
2
|
require 'net/http'
|
2
3
|
require 'uri'
|
3
4
|
|
@@ -17,7 +18,10 @@ module Nsrr
|
|
17
18
|
escaped_url = URI.escape(url)
|
18
19
|
@url = URI.parse(escaped_url)
|
19
20
|
@http = Net::HTTP.new(@url.host, @url.port)
|
20
|
-
|
21
|
+
if @url.scheme == 'https'
|
22
|
+
@http.use_ssl = true
|
23
|
+
@http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
24
|
+
end
|
21
25
|
@download_folder = download_folder
|
22
26
|
@file_size = 0
|
23
27
|
rescue => e
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'openssl'
|
1
2
|
require 'net/http'
|
2
3
|
require 'json'
|
3
4
|
|
@@ -15,7 +16,10 @@ module Nsrr
|
|
15
16
|
def initialize(url)
|
16
17
|
@url = URI.parse(url)
|
17
18
|
@http = Net::HTTP.new(@url.host, @url.port)
|
18
|
-
|
19
|
+
if @url.scheme == 'https'
|
20
|
+
@http.use_ssl = true
|
21
|
+
@http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
22
|
+
end
|
19
23
|
end
|
20
24
|
|
21
25
|
def get
|
data/lib/nsrr/models/dataset.rb
CHANGED
@@ -113,7 +113,7 @@ module Nsrr
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def set_download_token
|
116
|
-
puts " Get your token here: " + "https://sleepdata.org/token".colorize(:blue)
|
116
|
+
puts " Get your token here: " + "https://sleepdata.org/token".colorize( :blue ).on_white.underline
|
117
117
|
print "Please enter your download token: "
|
118
118
|
@download_token = gets.chomp
|
119
119
|
end
|
data/lib/nsrr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nsrr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.beta3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Remo Mueller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|