veye 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f45186a4f142aaa95f9703081e1fa425c2220ad
4
- data.tar.gz: 12035f5aeac5103658fb06615e24a39e97b338eb
3
+ metadata.gz: d1c8e81d60786c93f39167022d55e9a1b0a5ffe3
4
+ data.tar.gz: e3dc6d32d2d16d74cc24249a87857bae02758d22
5
5
  SHA512:
6
- metadata.gz: 87e37785c818f5ec229fe307e5e0d30bea2f21b69c0c1289c7f8a3e163c133dc165e1cd81d63a5158d01fd037d37d2aa7263c31235e9ff3db0d43963f3df6dff
7
- data.tar.gz: eef7eea3776520c7cce980e71e24595b4f532df8ac167a1b3141453519021bed5c5fe2601fb6adc49be53b55c92bdedb6341926426615ebc73bdfc078992ffa0
6
+ metadata.gz: 6a2cc358c03d34a3b2d54b8956c6806363c541e1163ce4d96087652625c027b95a04b59dbe82a752f8ae3b98dc8b51ffef0ae1ed95f520c8887b680d2008f4e2
7
+ data.tar.gz: 564ae0a1e2a74117a824434779616801f4af3b8dda4b9efed3a60b4107eb822ec9ba51ceb2efab2da7e7cdc5dc9545022df5306d761b19b169a326c7822c4c32
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- veye (0.3.1)
4
+ veye (0.3.2)
5
5
  awesome_print (~> 1.7)
6
6
  gli (~> 2.14)
7
7
  naturalsorter (~> 3.0)
@@ -3,6 +3,12 @@
3
3
 
4
4
  ## Next release
5
5
 
6
+ ## 0.3.2 - 2016-10-29
7
+
8
+ * **BUG** - open_timeout parameter wasnt defaulted when using veye as library; [#52](https://github.com/versioneye/veye/issues/52)
9
+
10
+ * **BUG** -markdown formatter missed license information after refactoring; [#53](https://github.com/versioneye/veye/issues/53)
11
+
6
12
  ## 0.3.1 - 2016-09-05
7
13
 
8
14
  * **FIX** - function signature mismatch in the `project check` command
@@ -13,7 +13,8 @@ $global_options = {
13
13
  server: 'www.versioneye.com',
14
14
  path: 'api/v2',
15
15
  port: nil,
16
- timeout: 30
16
+ timeout: 90,
17
+ open_timeout: 10
17
18
  }
18
19
  $global_options[:url] = Veye::API::Resource.build_url($global_options)
19
20
 
@@ -6,10 +6,11 @@ module Veye
6
6
  class Resource < BaseResource
7
7
  def initialize(path = nil)
8
8
  super(path)
9
- timeout_val = $global_options[:timeout].to_i
10
- timeout = timeout_val if timeout_val > 0
11
- timeout ||= 90
12
- open_timeout = $global_options[:open_timeout].to_i || 10
9
+ #hardcoded values come from api.rb file
10
+ timeout_val = safe_to_i( $global_options[:timeout] )
11
+ timeout = ( timeout_val > 0 ) ? timeout_val : 90 # dont allow 0
12
+ open_timeout_val = safe_to_i( $global_options[:open_timeout] )
13
+ open_timeout = ( open_timeout_val > 0 ) ? open_timeout_val : 10 #dont allow 0
13
14
 
14
15
  @resource = RestClient::Resource.new(
15
16
  @full_path,
@@ -17,6 +18,13 @@ module Veye
17
18
  open_timeout: open_timeout,
18
19
  )
19
20
  end
21
+
22
+ def safe_to_i(val)
23
+ val.to_i
24
+ rescue
25
+ return 0
26
+ end
27
+
20
28
  end
21
29
  end
22
30
  end
@@ -1,5 +1,5 @@
1
1
  module Veye
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  BIGEYE = %q{
4
4
 
5
5
  _ __ _ ______
@@ -4,7 +4,7 @@ module Veye
4
4
  module Project
5
5
  class DependencyMarkdown < BaseMarkdown
6
6
  def initialize
7
- headings = %w{index name prod_key outdated version_current version_requested stable license}
7
+ headings = %w{index name prod_key outdated version_current version_requested stable license, upgrade_cost}
8
8
  super("Project dependencies", headings)
9
9
  end
10
10
 
@@ -13,6 +13,12 @@ module Veye
13
13
  results = [results] if results.is_a?(Hash)
14
14
 
15
15
  results.each_with_index do |result, index|
16
+
17
+ upgrade_cost = if result.has_key?(:upgrade)
18
+ "#{result[:upgrade][:difficulty]}(#{result[:upgrade][:dv_score]})"
19
+ else
20
+ ''
21
+ end
16
22
  @table << [
17
23
  (index + 1).to_s,
18
24
  result["name"],
@@ -21,7 +27,8 @@ module Veye
21
27
  result["version_current"],
22
28
  result["version_requested"],
23
29
  result["stable"] ? "stable": "unstable",
24
- result["license"]
30
+ result["licenses"].to_a.map {|x| x['name']}.join(','),
31
+ upgrade_cost
25
32
  ]
26
33
  end
27
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veye
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - VersionEye GMBH
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-09-05 00:00:00.000000000 Z
13
+ date: 2016-10-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake