libddprof 0.2.0.beta2 → 0.2.0.1.0.beta3

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
  SHA256:
3
- metadata.gz: ab2d397b008650be1995c56f28fcf085e355fa4609c91669027f592715c04419
4
- data.tar.gz: 11eb276ac1dc89cbf9d4e11fa618104f0307016a5010463ece61454a2cdac565
3
+ metadata.gz: 5d9bb3c14c273e270cb43d493b4259fd7f9950762dea55d63d3a97032b70448c
4
+ data.tar.gz: '092644440dd9ca231b5871230639f8b5c705cb6a55f85ff6022335d4547d9db4'
5
5
  SHA512:
6
- metadata.gz: 8b4a4aa558f57d4b4ebf9002e93619e076b81b0bfed62eb149faf0d10c39c20bdde5b13e53218558a9213c8f4ca6928d45fa7a9683581e0a13386f64528e0c68
7
- data.tar.gz: 0f4ec30dcf6401f5e55e7297162a17c36ab83ec47f70f91a8c55ce6414b80ad021f04f8d0434b277c6dc6f3dc0c5124977b8dc1e78910dc7c7a64e80e634415a
6
+ metadata.gz: 667a095c8f6591fb153e7b46dea4d84cea052658c48dbc39dc6f96eb64257eb75f7997c14120562ba3afc620ebaae12e48e5ea0d7a852a218d9caac72230e225
7
+ data.tar.gz: 1963e924cc0cf814a7d106c3cf2666a44a414931b926331bfb365fab99f3b06ba210efcd3610b6c1aa0ab76d623d1a12a5e948342b37ed4906fc6098dee4db71
data/Rakefile CHANGED
@@ -38,11 +38,13 @@ task :fetch do
38
38
  target_url = "https://github.com/DataDog/libddprof/releases/download/v#{Libddprof::LIB_VERSION}/#{file}"
39
39
 
40
40
  if File.exist?(target_file)
41
- if Digest::SHA256.hexdigest(File.read(target_file)) == sha256
41
+ target_file_hash = Digest::SHA256.hexdigest(File.read(target_file))
42
+
43
+ if target_file_hash == sha256
42
44
  puts "Found #{target_file} matching the expected sha256, skipping download"
43
45
  next
44
46
  else
45
- puts "Found #{target_file} BUT IT DID NOT MATCH THE EXPECTED sha256, skipping download"
47
+ puts "Found #{target_file} with hash (#{target_file_hash}) BUT IT DID NOT MATCH THE EXPECTED sha256 (#{sha256}), downloading it again..."
46
48
  end
47
49
  end
48
50
 
@@ -4,6 +4,14 @@ module Libddprof
4
4
  # Current libddprof version
5
5
  LIB_VERSION = "0.2.0"
6
6
 
7
- # This is the Ruby gem version -- often it will match LIB_VERSION, but sometimes it may not
8
- VERSION = "#{LIB_VERSION}.beta2"
7
+ GEM_MAJOR_VERSION = "1"
8
+ GEM_MINOR_VERSION = "0"
9
+ GEM_PRERELEASE_VERSION = ".beta3"
10
+ private_constant :GEM_MAJOR_VERSION, :GEM_MINOR_VERSION, :GEM_PRERELEASE_VERSION
11
+
12
+ # The gem version scheme is lib_version.gem_major.gem_minor[.prerelease].
13
+ # This allows a version constraint such as ~> 0.2.0.1.0 in the consumer (ddtrace), in essence pinning the libddprof to
14
+ # a specific version like = 0.2.0, but still allow a) introduction of a gem-level breaking change by bumping gem_major
15
+ # and b) allow to push automatically picked up bugfixes by bumping gem_minor.
16
+ VERSION = "#{LIB_VERSION}.#{GEM_MAJOR_VERSION}.#{GEM_MINOR_VERSION}#{GEM_PRERELEASE_VERSION}"
9
17
  end
data/lib/libddprof.rb CHANGED
@@ -3,11 +3,12 @@
3
3
  require_relative "libddprof/version"
4
4
 
5
5
  module Libddprof
6
- # Is this a no-op libddprof release without binaries?
7
- def self.no_binaries?
8
- available_binaries.empty?
6
+ # Does this libddprof release include any binaries?
7
+ def self.binaries?
8
+ available_binaries.any?
9
9
  end
10
10
 
11
+ # This should only be used for debugging/logging
11
12
  def self.available_binaries
12
13
  File.directory?(vendor_directory) ? Dir.children(vendor_directory) : []
13
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libddprof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.beta2
4
+ version: 0.2.0.1.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.