gem-silencer 0.1.0 → 0.2.0

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: e026caf0bbb80c47e003dce6cbb3673111b1dbe34758b04b132df77215984bf9
4
- data.tar.gz: b5c0af92a6ca5aa0526781d374507cfa4cb5c33b146eb13f540a4d2f405ad270
3
+ metadata.gz: 17f7029db2a10c2f45edf0f9b9cad1310e55a77a4d1fcab65bc9a5e8c82ec893
4
+ data.tar.gz: 8aba86090a18cce0ba2495625cc18e672945c15114452a4d62e714d0e1c32199
5
5
  SHA512:
6
- metadata.gz: 6765316f1827df072bdd83bff491adbf8265ee52af61461adfa497497138517aac0ddfc45d258d1eb17066992344796e4ca7c7ba6ab01074edb9330c44698331
7
- data.tar.gz: ee2ed37a1525c6ba412670c4ff786368d260ccde4b53e8445678dbe9fd54a502a2e064341aca60ae77e6134070c0a253c13d3401e7999c118799af438657b87f
6
+ metadata.gz: 94c8b8a319e89488c27ffe7f4672cd121e504450b8fd23e18cf33e76d864ecaf096c7d9b63b135937639b605f9348c23c08ba6ba7b4ebc796abb964e044d4080
7
+ data.tar.gz: a60ef1bdacc8ff6158c7f4c4608dc2e0818acf79fbdb3f91259fc9c4cee8a08f41afd4d30bbfe048d2dbc5d2e8366993aad35d915a574cbc3ff0e438d8576f4c
data/.idea/silencer.iml CHANGED
@@ -26,21 +26,21 @@
26
26
  <option name="myRootTask">
27
27
  <RakeTaskImpl id="rake">
28
28
  <subtasks>
29
- <RakeTaskImpl description="Build silencer-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
29
+ <RakeTaskImpl description="Build gem-silencer-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
30
30
  <RakeTaskImpl id="build">
31
31
  <subtasks>
32
- <RakeTaskImpl description="Generate SHA512 checksum of silencer-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
32
+ <RakeTaskImpl description="Generate SHA512 checksum of gem-silencer-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
33
33
  </subtasks>
34
34
  </RakeTaskImpl>
35
35
  <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
36
36
  <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
37
- <RakeTaskImpl description="Build and install silencer-0.1.0.gem into system gems" fullCommand="install" id="install" />
37
+ <RakeTaskImpl description="Build and install gem-silencer-0.1.0.gem into system gems" fullCommand="install" id="install" />
38
38
  <RakeTaskImpl id="install">
39
39
  <subtasks>
40
- <RakeTaskImpl description="Build and install silencer-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
40
+ <RakeTaskImpl description="Build and install gem-silencer-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
41
41
  </subtasks>
42
42
  </RakeTaskImpl>
43
- <RakeTaskImpl description="Create tag v0.1.0 and build and push silencer-0.1.0.gem to TODO: Set to your gem server 'https://example.com'" fullCommand="release[remote]" id="release[remote]" />
43
+ <RakeTaskImpl description="Create tag v0.1.0 and build and push gem-silencer-0.1.0.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
44
44
  <RakeTaskImpl description="Run RSpec code examples" fullCommand="spec" id="spec" />
45
45
  <RakeTaskImpl description="" fullCommand="default" id="default" />
46
46
  <RakeTaskImpl description="" fullCommand="release" id="release" />
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Silencer
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
data/lib/silencer.rb CHANGED
@@ -12,7 +12,7 @@ module Silencer
12
12
  end
13
13
 
14
14
  def self.ignore_warnings(file = '.silencer.yml')
15
- YAML.load_file(file).each do |name, attrs|
15
+ YAML.load_file(config_file_path(file)).each do |name, attrs|
16
16
  version = attrs['version']
17
17
  spec = Gem::Specification.find_by_name(name)
18
18
  raise Error.new(name, version, spec.version.to_s) unless version == spec.version.to_s
@@ -21,4 +21,14 @@ module Silencer
21
21
  end
22
22
  end
23
23
  end
24
+
25
+ def self.config_file_path(file)
26
+ if defined? ::Rails
27
+ ::Rails.root.join(file).to_s
28
+ elsif defined? ::Bundler
29
+ ::Bundler.root.join(file).to_s
30
+ else
31
+ file
32
+ end
33
+ end
24
34
  end
data/sig/silencer.rbs CHANGED
@@ -1,5 +1,6 @@
1
1
  module Silencer
2
2
  VERSION: String
3
3
  # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ def self.config_file_path: -> String
4
5
  def self.ignore_warnings: -> untyped
5
6
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-silencer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hamed Asghari
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-02-06 00:00:00.000000000 Z
10
+ date: 2025-02-09 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: warning