asherah 0.4.0 → 0.4.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
  SHA256:
3
- metadata.gz: e488eb972195bbc3f37253f2d71b54ad89d069c24260e7800de4602df9277ca5
4
- data.tar.gz: c865721c410b6a887cbb89b425d64dd17bae9ceda8c2796ca68ff67537750bb9
3
+ metadata.gz: 2d4f9b143e7306eba568f49f25ba360f1500aa31279f62d50f02f021129c3027
4
+ data.tar.gz: 462ac2c6f71abc2975ae0db4059f89e298e195274fb9f7dd466d1ecc983c6392
5
5
  SHA512:
6
- metadata.gz: 141ef3ec23e647f077372e3026dc68539609fec19b05b4ce683d06b30ba8d7b9253ec62beb38a2edec4adfe63e62d1596ed5694e9ffa6822bd37a4a231b220e6
7
- data.tar.gz: d8ca23008b6146270b4d13cbc0a1d0c8d84d798fe4a45b54cddacefc351040b7667823c19321aef09f8b142b628b84b8b27f0ae8840e16db59eeb4f99266426e
6
+ metadata.gz: b8bcef6399ad44911ba97ec1703e9a3c235737505920bfac652929d75e1699c5720267bcd6614755fa486c60210a33ffd1b33969e5319c89346c7729ad65d7c3
7
+ data.tar.gz: 469c7069936dd2f70ca105a3ee8dded2aa5465d2c7511a36f701fe7f0d69d2c0c61f0aec1461c363dcb8d3af32a626d6012f6cb5f8951bd39f7660df1c4e4a82
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.4.1] - 2022-03-25
4
+
5
+ - Build and release platform gems
6
+
3
7
  ## [0.4.0] - 2022-03-25
4
8
 
5
9
  - Download native file during gem install and verify checksum
data/Rakefile CHANGED
@@ -25,3 +25,5 @@ desc 'Print current version'
25
25
  task :version do
26
26
  puts Asherah::VERSION
27
27
  end
28
+
29
+ Rake.add_rakelib 'tasks'
data/asherah.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
28
28
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
29
29
  `git ls-files -z`.split("\x0").reject do |f|
30
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
30
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features|tasks)/|\.(?:git|travis|circleci)|appveyor)})
31
31
  end
32
32
  end
33
33
  spec.bindir = 'exe'
@@ -17,16 +17,15 @@ class NativeFile
17
17
  RETRY_DELAY = 1
18
18
 
19
19
  class << self
20
- def download
21
- file_name = Class.new.extend(Cobhan).library_file_name(LIB_NAME)
22
- lib_dir = File.join(ROOT_DIR, 'lib/asherah')
23
- abort "#{lib_dir} does not exist" unless File.exist?(lib_dir)
24
-
25
- native_dir = "#{lib_dir}/native"
26
- FileUtils.mkdir_p(native_dir)
27
-
28
- file_path = File.join(native_dir, file_name)
29
- abort "#{file_path} already exists" if File.exist?(file_path)
20
+ def download(
21
+ file_name: Class.new.extend(Cobhan).library_file_name(LIB_NAME),
22
+ dir: File.join(ROOT_DIR, 'lib/asherah/native')
23
+ )
24
+ file_path = File.join(dir, file_name)
25
+ if File.exist?(file_path)
26
+ puts "#{file_path} already exists ... skipping download"
27
+ return
28
+ end
30
29
 
31
30
  checksum = CHECKSUMS.fetch(file_name) do
32
31
  abort "Unsupported platform #{RUBY_PLATFORM}"
@@ -37,6 +36,7 @@ class NativeFile
37
36
  sha256 = Digest::SHA256.hexdigest(content)
38
37
  abort "Could not verify checksum of #{file_name}" if sha256 != checksum
39
38
 
39
+ FileUtils.mkdir_p(dir)
40
40
  File.binwrite(file_path, content)
41
41
  end
42
42
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Asherah
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asherah
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoDaddy