tidelift 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/check +42 -0
- data/lib/tidelift/version.rb +1 -1
- data/tidelift.gemspec +4 -4
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca0568243306f95a03db8211a75700a69c686f71
|
4
|
+
data.tar.gz: a7f4878c923a796af624332abe43bf028ccd862e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed47fd24c37a105fe6aafdf126e1a1809eb32e856c600af12a336bf1216a0d148b3f8cb884fae372df5162f45f583fe6487b3ac404ca6d2c2c8accf9da155974
|
7
|
+
data.tar.gz: 2b6197c949e6a8d12a850ddbf907654c76fb4283c64e4145bd36db29f77afb83773b9c20a2084f5d1cfe9575843b81ced6430d5f55ae67c2fd90f06850652696
|
data/bin/check
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require 'open-uri'
|
5
|
+
require 'net/http'
|
6
|
+
require 'json'
|
7
|
+
|
8
|
+
options = {}
|
9
|
+
OptionParser.new do |opts|
|
10
|
+
opts.banner = "Usage: tidelift [options]"
|
11
|
+
|
12
|
+
opts.on("-f", "--file [FILE_PATH]", String, "dependency file") do |file|
|
13
|
+
options[:file] = file
|
14
|
+
end
|
15
|
+
end.parse!
|
16
|
+
|
17
|
+
if options[:file]
|
18
|
+
options[:contents] = File.open(options[:file]).read
|
19
|
+
STDOUT.print "Uploading dependency data to Tidelift"
|
20
|
+
|
21
|
+
location = nil
|
22
|
+
t = Thread.new do
|
23
|
+
uri = URI('http://localhost:3000/checks')
|
24
|
+
body = {'check': { 'file_name' => options[:file], 'file_contents' => options[:contents] }}
|
25
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
26
|
+
http.use_ssl = false
|
27
|
+
request = Net::HTTP::Post.new(uri.path, {'Content-Type' =>'application/json'})
|
28
|
+
request.body = body.to_json
|
29
|
+
response = http.request(request)
|
30
|
+
location = response['location']
|
31
|
+
end
|
32
|
+
|
33
|
+
while t.status do
|
34
|
+
STDOUT.print "."
|
35
|
+
sleep 0.5
|
36
|
+
end
|
37
|
+
|
38
|
+
STDOUT.print "\r\r"
|
39
|
+
puts "Upload complete, visit: #{location}"
|
40
|
+
else
|
41
|
+
puts "We need a dependency file to analyse"
|
42
|
+
end
|
data/lib/tidelift/version.rb
CHANGED
data/tidelift.gemspec
CHANGED
@@ -6,8 +6,8 @@ require "tidelift/version"
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "tidelift"
|
8
8
|
spec.version = Tidelift::VERSION
|
9
|
-
spec.authors = ["Andrew Nesbitt"]
|
10
|
-
spec.email = ["
|
9
|
+
spec.authors = ["Andrew Nesbitt", "Benjamin Nickolls"]
|
10
|
+
spec.email = ["info@tidelift.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Making open source software work better for developers and users.}
|
13
13
|
spec.homepage = "https://tidelift.com"
|
@@ -15,8 +15,8 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
16
16
|
f.match(%r{^(test|spec|features)/})
|
17
17
|
end
|
18
|
-
spec.bindir = "
|
19
|
-
spec.executables =
|
18
|
+
spec.bindir = "bin"
|
19
|
+
spec.executables = ["check"]
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.15"
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tidelift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
|
+
- Benjamin Nickolls
|
8
9
|
autorequire:
|
9
|
-
bindir:
|
10
|
+
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
12
|
+
date: 2017-12-07 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
@@ -54,8 +55,9 @@ dependencies:
|
|
54
55
|
version: '3.0'
|
55
56
|
description:
|
56
57
|
email:
|
57
|
-
-
|
58
|
-
executables:
|
58
|
+
- info@tidelift.com
|
59
|
+
executables:
|
60
|
+
- check
|
59
61
|
extensions: []
|
60
62
|
extra_rdoc_files: []
|
61
63
|
files:
|
@@ -67,6 +69,7 @@ files:
|
|
67
69
|
- LICENSE.txt
|
68
70
|
- README.md
|
69
71
|
- Rakefile
|
72
|
+
- bin/check
|
70
73
|
- bin/console
|
71
74
|
- bin/setup
|
72
75
|
- lib/tidelift.rb
|
@@ -91,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
94
|
version: '0'
|
92
95
|
requirements: []
|
93
96
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.6.
|
97
|
+
rubygems_version: 2.6.13
|
95
98
|
signing_key:
|
96
99
|
specification_version: 4
|
97
100
|
summary: Making open source software work better for developers and users.
|