polariscope 0.5.0 → 0.6.0

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: 70b3d555c09bbe2378d8771d0975b34427f089700b9e7852917ffe80e6a79259
4
- data.tar.gz: 1e87403b8f56622b02b11b5aab0439d503ae6410c88dcb4fa7213464be2e7ffe
3
+ metadata.gz: fa6748ee78bb4864e2fd43578ace97744d5c8b6715411a37eba3ec892c007e2f
4
+ data.tar.gz: 30c08d7ea128f3199bff818d9e9f1901dc84c12df1bdf216d23295d9877c2865
5
5
  SHA512:
6
- metadata.gz: 19874d31ca4475d6f3976935270d7c80816f12094b5fc31f25fa80571ddc161ca61a3645b250d91ce8b8bed4b6fbb73e057c90fc2fc15c6b8c99bce4e34b0dda
7
- data.tar.gz: 8e71615763f0a844074a2b8c214b6c2b7698344d238774c9c2245fe118808cdeed9be611e54c2d723678a03208f6a5c1e77497cb7962e2dc281fea9a71beefa0
6
+ metadata.gz: 70a3d67c6ab45d48c496b842bacadfbb7515f2a645a7880fd9142cd2688bc4fbbe9ad31be1d82f6f3d2d5770b9f1057c7ebb20876cb67888d0d3b679688d8a7c
7
+ data.tar.gz: 6eed24acbc6e9aaa74095a252d5fb5fb57c8cf01cffa58d5f2a267967bd4ae66253cf363a4f90618c47d305609c1fd789fe77f0be9a7bb89f61330bcd5931fa4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.6.0] - 2024-11-11
4
+
5
+ - Add `update_audit_database` option to `Polariscope.scan` to control whether to update the audit DB
6
+
3
7
  ## [0.5.0] - 2024-10-30
4
8
 
5
9
  - Fix regression for standalone installation
data/README.md CHANGED
@@ -53,6 +53,7 @@ Polariscope.scan(
53
53
  new_versions_severity: 1.09, # number >= 1
54
54
  segment_severities: [1.7, 1.15, 1.01], # ordered by segments: [major, minor, patch]
55
55
  fallback_segment_severity: 1.01, # in case dependency versions have more segments than in segment_severities
56
+ update_audit_database: false, # Polariscope by default updates audit DB if it's older more than one day
56
57
  )
57
58
  ```
58
59
 
@@ -13,7 +13,7 @@ module Polariscope
13
13
  @dependency_context = DependencyContext.new(**opts)
14
14
  @calculation_context = CalculationContext.new(**opts)
15
15
 
16
- AuditDatabase.update_if_necessary
16
+ AuditDatabase.update_if_necessary if opts.fetch(:update_audit_database, true)
17
17
  end
18
18
 
19
19
  def health_score
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Polariscope
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
data/lib/polariscope.rb CHANGED
@@ -12,11 +12,12 @@ module Polariscope
12
12
 
13
13
  class << self
14
14
  def scan(**opts)
15
- Scanner::GemfileHealthScore.new(**opts.merge(
15
+ Scanner::GemfileHealthScore.new(
16
+ **opts,
16
17
  gemfile_content: opts.fetch(:gemfile_content, FileContent.for('Gemfile')),
17
18
  gemfile_lock_content: opts.fetch(:gemfile_lock_content, FileContent.for('Gemfile.lock')),
18
19
  bundler_audit_config_content: opts.fetch(:bundler_audit_config_content, FileContent.for('.bundler-audit.yml'))
19
- )).health_score
20
+ ).health_score
20
21
  end
21
22
 
22
23
  def gem_versions(dependency_names, spec_type: Scanner::DependencyContext::DEFAULT_SPEC_TYPE)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polariscope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rails team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-30 00:00:00.000000000 Z
11
+ date: 2024-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler