uncruft 0.0.1 → 0.0.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
- SHA1:
3
- metadata.gz: fdb195d4b08809aa2c07c8496fcc908f11fcc990
4
- data.tar.gz: 5790bc811ae97d8d3de5a851c26cd707b452b530
2
+ SHA256:
3
+ metadata.gz: 3ced48d12c51461c2bb713dcfce5b86b592f839f88effc936dace865badbcd0a
4
+ data.tar.gz: d917c8000e483c30cc0cb4a94049416c88b5eadcd5ba959ed855c64d765c212d
5
5
  SHA512:
6
- metadata.gz: 766cefcb5c8b903953292269ad4ae8e451c4f1dd5f6f2b01d2c3f3283aefead950614b7354f9f28022ede6749aacfc042751c6cd9e9145b79b92bf5bb04d3df5
7
- data.tar.gz: ace1be673782194643ffb5fe4b931fb7e7f947083084cb6c1c1af62deec03ef76ba44fb36c41384de516f97aaf2386b4957431f57d0c0f803bad8598bec4c243
6
+ metadata.gz: daf0967137adbd0c821f8237b9419cb672be5b12d2ab6b69a2d4d15d5763312de31591424fcbebf97686515ecb69327179a0b3a225145eb04af93ab727a52d0d
7
+ data.tar.gz: f2839f2318ead9bbe0bf454a7d22237b19d4ab6ea94566f3837952587cb6769ad31baf4cd9f86c4b295805a065d203cbebe544c6e29ab7e6dbf98ef487e8aacc
@@ -1,3 +1,3 @@
1
1
  module Uncruft
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
@@ -2,7 +2,7 @@ module Uncruft
2
2
  module Warning
3
3
  DEPRECATION_PATTERN = /(deprecation|deprecated)/i
4
4
 
5
- def warn(str)
5
+ def warn(str, *args)
6
6
  if str =~ DEPRECATION_PATTERN # rubocop:disable Performance/RegexpMatch
7
7
  message = strip_caller_info(str, caller_locations(1..1).first).strip
8
8
  ActiveSupport::Deprecation.warn(message)
data/spec/examples.txt CHANGED
@@ -1,24 +1,25 @@
1
1
  example_id | status | run_time |
2
2
  ------------------------------------------------------- | ------ | --------------- |
3
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:1] | passed | 0.00321 seconds |
4
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:2:1] | passed | 0.01779 seconds |
5
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:2:2:1] | passed | 0.00596 seconds |
6
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:3:1] | passed | 0.00079 seconds |
7
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:4:1] | passed | 0.00071 seconds |
8
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:5:1] | passed | 0.00247 seconds |
9
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:6:1] | passed | 0.0026 seconds |
10
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:6:2:1] | passed | 0.0029 seconds |
11
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:6:3:1] | passed | 0.00142 seconds |
12
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:6:3:2:1] | passed | 0.00168 seconds |
13
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:7:1] | passed | 0.00052 seconds |
14
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:8:1] | passed | 0.00211 seconds |
15
- ./spec/uncruft/deprecation_handler_spec.rb[1:1:8:2:1] | passed | 0.00335 seconds |
16
- ./spec/uncruft/railtie_spec.rb[1:1] | passed | 0.06556 seconds |
17
- ./spec/uncruft/railtie_spec.rb[1:2:1] | passed | 0.00156 seconds |
18
- ./spec/uncruft/railtie_spec.rb[1:3:1] | passed | 0.00133 seconds |
19
- ./spec/uncruft/warning_spec.rb[1:1] | passed | 0.00076 seconds |
20
- ./spec/uncruft/warning_spec.rb[1:2:1] | passed | 0.00158 seconds |
21
- ./spec/uncruft/warning_spec.rb[1:2:2:1] | passed | 0.00142 seconds |
22
- ./spec/uncruft_spec.rb[1:1:1] | passed | 0.00533 seconds |
23
- ./spec/uncruft_spec.rb[1:2:1] | passed | 0.00091 seconds |
24
- ./spec/uncruft_spec.rb[1:2:2:1] | passed | 0.00151 seconds |
3
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:1] | passed | 0.00273 seconds |
4
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:2:1] | passed | 0.01668 seconds |
5
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:2:2:1] | passed | 0.00367 seconds |
6
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:3:1] | passed | 0.00155 seconds |
7
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:4:1] | passed | 0.00321 seconds |
8
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:5:1] | passed | 0.00102 seconds |
9
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:6:1] | passed | 0.00113 seconds |
10
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:6:2:1] | passed | 0.00101 seconds |
11
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:6:3:1] | passed | 0.00149 seconds |
12
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:6:3:2:1] | passed | 0.00167 seconds |
13
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:7:1] | passed | 0.00084 seconds |
14
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:8:1] | passed | 0.004 seconds |
15
+ ./spec/uncruft/deprecation_handler_spec.rb[1:1:8:2:1] | passed | 0.00316 seconds |
16
+ ./spec/uncruft/railtie_spec.rb[1:1] | passed | 0.05893 seconds |
17
+ ./spec/uncruft/railtie_spec.rb[1:2:1] | passed | 0.00132 seconds |
18
+ ./spec/uncruft/railtie_spec.rb[1:3:1] | passed | 0.00124 seconds |
19
+ ./spec/uncruft/warning_spec.rb[1:1] | passed | 0.00042 seconds |
20
+ ./spec/uncruft/warning_spec.rb[1:2] | passed | 0.00014 seconds |
21
+ ./spec/uncruft/warning_spec.rb[1:3:1] | passed | 0.00077 seconds |
22
+ ./spec/uncruft/warning_spec.rb[1:3:2:1] | passed | 0.00059 seconds |
23
+ ./spec/uncruft_spec.rb[1:1:1] | passed | 0.00281 seconds |
24
+ ./spec/uncruft_spec.rb[1:2:1] | passed | 0.00027 seconds |
25
+ ./spec/uncruft_spec.rb[1:2:2:1] | passed | 0.0003 seconds |
@@ -12,6 +12,11 @@ describe Uncruft::Warning do
12
12
  Warning.warn('oh no, you should worry')
13
13
  end
14
14
 
15
+ it "accepts kwargs from Kernel.warn" do
16
+ warn('oh no, you should worry', uplevel: 1)
17
+ Kernel.warn('oh no, you should worry', uplevel: 1)
18
+ end
19
+
15
20
  context 'when warning includes the word "deprecation" or "deprecated"' do
16
21
  it 'treats it as a deprecation warning' do
17
22
  expect(ActiveSupport::Deprecation).to receive(:warn).and_return('banana').exactly(6).times
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uncruft
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Griffith
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-30 00:00:00.000000000 Z
12
+ date: 2019-06-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -113,7 +113,6 @@ files:
113
113
  - lib/uncruft/warning.rb
114
114
  - spec/dummy/config/application.rb
115
115
  - spec/dummy/config/deprecations.ignore
116
- - spec/dummy/log/test.log
117
116
  - spec/examples.txt
118
117
  - spec/spec_helper.rb
119
118
  - spec/support/rails_root.rb
@@ -140,8 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
139
  - !ruby/object:Gem::Version
141
140
  version: '0'
142
141
  requirements: []
143
- rubyforge_project:
144
- rubygems_version: 2.6.13
142
+ rubygems_version: 3.0.3
145
143
  signing_key:
146
144
  specification_version: 4
147
145
  summary: A library to assist with Rails upgrades
@@ -149,7 +147,6 @@ test_files:
149
147
  - spec/spec_helper.rb
150
148
  - spec/dummy/config/deprecations.ignore
151
149
  - spec/dummy/config/application.rb
152
- - spec/dummy/log/test.log
153
150
  - spec/examples.txt
154
151
  - spec/uncruft/railtie_spec.rb
155
152
  - spec/uncruft/warning_spec.rb
File without changes