warner 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: a3df2a74f0878e796a1c179137b7a60f44912428
4
- data.tar.gz: e4fe6e23e80346abb149e303387286aba9f0580c
3
+ metadata.gz: 0ceede9c3e8dc1130b0439eb00abd5e453d7c7ad
4
+ data.tar.gz: 1b1121e81131e995ac86b44d3f79b2c325328795
5
5
  SHA512:
6
- metadata.gz: bc59109a46c17552664124bb1948fc387dc5b2f1da7b9b501770290b44e203a2e77ee17becf9f2f927c8c538f57b94b6ab39471ad0095cccb46b0a2b643e4f0b
7
- data.tar.gz: 12e81743c15438a1111a01e44a0b441009e5017f7b9d1b79a3c861de78a4964e1f53254342650d7d4964fe63cf802e6fe16965449da16b072214ea72b1729335
6
+ metadata.gz: 8cd0cca9eecf3b1a00dfa4f9d31421d12466f0a68db6adeb3aa21b111cb0b3e46e312795da19a2e06091f30b2a0973ad2b6ab20e6d95662d9992cdcc66434dc0
7
+ data.tar.gz: 2a96186f30aac6b50fbc189d587c5a4bfdb30a1a2e5026527dab4c71ebdfe596a307138ccf7d0ed9618267181c9531adf49a7d1ee6cc727c203dfe3a23014eb8
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Warner
2
2
 
3
- [ ![Codeship Status for LeipeLeon/warner](https://app.codeship.com/projects/951314e0-806a-0135-5d58-6a64ad6118ad/status?branch=master)](https://app.codeship.com/projects/246699)
3
+ [![Gem Version](https://badge.fury.io/rb/warner.svg)](https://badge.fury.io/rb/warner) [![Codeship Status for LeipeLeon/warner](https://app.codeship.com/projects/951314e0-806a-0135-5d58-6a64ad6118ad/status?branch=master)](https://app.codeship.com/projects/246699)
4
4
 
5
- Display warnings w/ a red color to the `$stderr` when a newer version of rails or a gem is installed
5
+ Annotate your code w/ custom deprecation warnings to the `$stderr` when a newer version of a gem or rails is installed. Especially useful for monkeypatching.
6
6
 
7
7
  ## Installation
8
8
 
@@ -24,65 +24,51 @@ Or install it yourself as:
24
24
 
25
25
  ### `Warner.gem_version_warning`
26
26
 
27
- Display a message when specified is updated and needs a change
28
- e.g. when monkeypatching a gem: put the code into the monkey patch
27
+ Display a message when specified is updated and needs a change.
29
28
 
30
29
  ```ruby
31
30
  # app/monkeypatches/bootstrap_form.rb
32
- Warner.gem_version_warning('bootstrap_form', "1.2", "REMOVE monkeypatches/bootstrap_form: upgrade to latest version")
33
-
34
- module BootstrapForm
35
- ...
36
- end
31
+ Warner.gem_version_warning('bootstrap_form', "1.2", "upgrade to latest version")
37
32
  ```
38
33
 
39
- will output
34
+ will output:
40
35
 
41
- ```shell
42
- \e[41;37;1mDEPRECATION WARNING: [gem:bootstrap_form] 2.7.0 > 1.2 : REMOVE monkeypatches/bootstrap_form: upgrade to latest version (called from <class:HTTP> at /Users/berl/Clients/bwh/core/config/initializers/fix_ssl.rb:11\e[0m
36
+ ```log
37
+ DEPRECATION WARNING: [gem:bootstrap_form] 2.7.0 > 1.2 : upgrade to latest version (called from <top (required)> at /Users/berl/Clients/bwh/core/app/monkeypatches/bootstrap_form.rb:1)
43
38
  ```
44
-
39
+ ---
45
40
 
46
41
  ### `Warner.rails_version_warning`
47
42
 
48
- Display a message when rails is updated and needs a change
49
- e.g. when monkeypatching a gem put the code into the monkey patch
43
+ Display a message when rails is updated and needs a change.
50
44
 
51
45
  ```ruby
52
46
  # app/monkeypatches/bootstrap_form.rb
53
- Warner.rails_version_warning("3.2", "REMOVE monkeypatches/bootstrap_form: upgrade to latest version")
54
-
55
- module BootstrapForm
56
- ...
57
- end
47
+ Warner.rails_version_warning("5.0", "Remove this monkeypatch b/c it's fixed in 5.1 (see issue #99999)")
58
48
  ```
59
49
 
60
- will output
50
+ will output:
61
51
 
62
- ```shell
63
- \e[41;37;1mDEPRECATION WARNING: [RAILS] 5.1.6 > 3.2 : REMOVE monkeypatches/bootstrap_form: upgrade to latest version (called from <class:HTTP> at /Users/berl/Clients/bwh/core/config/initializers/fix_ssl.rb:10)\e[0m
52
+ ```log
53
+ DEPRECATION WARNING: [RAILS] 5.1.6 > 5.0 : Remove this monkeypatch b/c it's fixed in 5.1 (see issue #99999) (called from <top (required)> at /Users/berl/Clients/bwh/core/app/monkeypatches/bootstrap_form.rb:1)
64
54
  ```
65
55
 
66
- ```ruby
67
- # app/mailers/my_mailer.rb
68
- class MyMailer < ActionMailer::Base
69
-
70
- Warner.rails_version_warning("3.2", "REMOVE: MyMailer#default_i18n_subject is a copy of 4.0 implementations")
56
+ ---
57
+ ### `Warner.colored_warning`
71
58
 
72
- def default_i18n_subject(interpolations = {})
73
- ...
74
- end
59
+ Just display a message w/o any checking of versions
75
60
 
76
- end
61
+ ```ruby
62
+ # app/monkeypatches/bootstrap_form.rb
63
+ Warner.colored_warning("Somebody look at this piece of code please!")
77
64
  ```
78
65
 
79
- will output
66
+ will output:
80
67
 
81
- ```shell
82
- \e[41;37;1m[RAILS] 4.0.0 > 3.2 : REMOVE: MyMailer#default_i18n_subject is a copy of 4.0 implementations\e[0m
68
+ ```log
69
+ DEPRECATION WARNING: Somebody look at this piece of code please! (called from <top (required)> at /Users/berl/Clients/bwh/core/app/monkeypatches/bootstrap_form.rb:1)
83
70
  ```
84
71
 
85
-
86
72
  ## Development
87
73
 
88
74
  To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
@@ -1,3 +1,3 @@
1
1
  class Warner
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/warner.gemspec CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Leon Berenschot"]
10
10
  spec.email = ["leipeleon@gmail.com"]
11
11
 
12
- spec.summary = %q{Create warner methods to be used in Rails applications}
13
- spec.description = %q{For example to higlite code that needs to be changes/deprecated at certain version}
12
+ spec.summary = %q{Annotate your code w/ custom deprecation warnings}
13
+ spec.description = %q{for exampele when a newer version of a gem or rails is installed. Especially useful for monkeypatching.}
14
14
  spec.homepage = "https://github.com/LeipeLeon/warner"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leon Berenschot
@@ -108,8 +108,8 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- description: For example to higlite code that needs to be changes/deprecated at certain
112
- version
111
+ description: for exampele when a newer version of a gem or rails is installed. Especially
112
+ useful for monkeypatching.
113
113
  email:
114
114
  - leipeleon@gmail.com
115
115
  executables: []
@@ -154,5 +154,5 @@ rubyforge_project:
154
154
  rubygems_version: 2.6.13
155
155
  signing_key:
156
156
  specification_version: 4
157
- summary: Create warner methods to be used in Rails applications
157
+ summary: Annotate your code w/ custom deprecation warnings
158
158
  test_files: []