tidelift 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65418793216c8de4e5231d6b5da622128eef75aa
4
- data.tar.gz: bb8a7c0202f46381872493141c9aeec8fe7d7197
3
+ metadata.gz: ca0568243306f95a03db8211a75700a69c686f71
4
+ data.tar.gz: a7f4878c923a796af624332abe43bf028ccd862e
5
5
  SHA512:
6
- metadata.gz: 0aaf63463074a2a4ffe2380d1b035e74abc51faee48b80ee225d3705adaafe0f39571778fe0f9fe582421fba43fa16a0ed8b31ec6319b0605c5849b2469e4f17
7
- data.tar.gz: ad4c836945698c4a6a0058f7d23aea4e5371be939e189c8167428e548fa856f808b26f2439d4962717b044b767c5314326e9d9a2b8a230798c088fb67b28cbe7
6
+ metadata.gz: ed47fd24c37a105fe6aafdf126e1a1809eb32e856c600af12a336bf1216a0d148b3f8cb884fae372df5162f45f583fe6487b3ac404ca6d2c2c8accf9da155974
7
+ data.tar.gz: 2b6197c949e6a8d12a850ddbf907654c76fb4283c64e4145bd36db29f77afb83773b9c20a2084f5d1cfe9575843b81ced6430d5f55ae67c2fd90f06850652696
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Tidelift
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -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 = ["andrew@tidelift.com"]
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 = "exe"
19
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
8
+ - Benjamin Nickolls
8
9
  autorequire:
9
- bindir: exe
10
+ bindir: bin
10
11
  cert_chain: []
11
- date: 2017-12-05 00:00:00.000000000 Z
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
- - andrew@tidelift.com
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.4
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.