fixme 5.0.0 → 6.0.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 +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +5 -2
- data/lib/fixme.rb +2 -2
- data/lib/fixme/version.rb +1 -1
- data/spec/fixme_spec.rb +8 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50eba448b6368b404c7303844a56adb0dc283e5c
|
4
|
+
data.tar.gz: 1bc4d4729eaf1f041c2ba51fc851f1552dca879e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: feec415f5bcc57485e7c93b7fe3985dc5bbfca736fc5713b1f7ef55e402ee78e9a3d143b19b04d883480da15659fc86f70b53792805f35f2efc813d58e4ff856
|
7
|
+
data.tar.gz: cc8158246e5e91fab8153d604f5c882593527ec411065e9240d03947c263ce05eeea454fca980f466bedcfdbbe1a3cd9306341b3778a039250dacce18f11d1d1
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 6.0.0
|
4
|
+
|
5
|
+
* Require zero-padded month and day, i.e. disallow `2019-1-2`. This enforced consistency makes it easier to grep for an exploded FIXME.
|
6
|
+
|
7
|
+
## 5.0.0 and earlier
|
8
|
+
|
9
|
+
* Please see commit history, or make a pull request to update this file.
|
data/README.md
CHANGED
@@ -20,8 +20,6 @@ You may want to use these bad boys next to:
|
|
20
20
|
|
21
21
|
For simplicity, the date comparison uses machine-local time (not e.g. the Rails configured time zone).
|
22
22
|
|
23
|
-
Protip: make sure it's clear from the exception or from a separate comment just what should be done – sometimes not even the person who wrote the quickfix will remember what you're meant to change.
|
24
|
-
|
25
23
|
### Environment awareness
|
26
24
|
|
27
25
|
If `Rails.env` (Ruby on Rails) or `ENV["RACK_ENV"]` (e.g. Sinatra) is present, it will only ever raise in the `"test"` and `"development"` environments. That is, the production app will never raise these exceptions.
|
@@ -58,6 +56,11 @@ end
|
|
58
56
|
|
59
57
|
If you e.g. don't want your CI server to raise, make it set the environment variable `DISABLE_FIXME_LIB`.
|
60
58
|
|
59
|
+
### Pro-tips
|
60
|
+
|
61
|
+
* Make sure it's clear from the exception or from a separate comment just what should be done – sometimes not even the person who wrote the quickfix will remember what you're meant to change.
|
62
|
+
* If a FIXME raises right in a class/module, rather than inside an instance method, there may be follow-on errors (about missing methods and such) since the rest of that file won't execute. Being aware of this can help understand otherwise confusing CI failures.
|
63
|
+
|
61
64
|
|
62
65
|
## Installation
|
63
66
|
|
data/lib/fixme.rb
CHANGED
@@ -76,10 +76,10 @@ module Fixme
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def parse
|
79
|
-
match = @date_and_message.match(/\A(\d\d\d\d-\d\d
|
79
|
+
match = @date_and_message.match(/\A(\d\d\d\d-\d\d-\d\d): (.+)\z/)
|
80
80
|
|
81
81
|
unless match
|
82
|
-
raise %{FIXME does not follow the "2015-01-
|
82
|
+
raise %{FIXME does not follow the "2015-01-31: Foo" format: #{@date_and_message.inspect}}
|
83
83
|
end
|
84
84
|
|
85
85
|
raw_date, message = match.captures
|
data/lib/fixme/version.rb
CHANGED
data/spec/fixme_spec.rb
CHANGED
@@ -41,10 +41,16 @@ describe Fixme, "#FIXME" do
|
|
41
41
|
}.to raise_error("Fix by 2013-12-31: Remove this: and this.")
|
42
42
|
end
|
43
43
|
|
44
|
-
it "complains if the desired format is not adhered to" do
|
44
|
+
it "complains if the desired message format is not adhered to" do
|
45
45
|
expect {
|
46
46
|
FIXME "9999-01-01, Learn to: type"
|
47
|
-
}.to raise_error(%{FIXME does not follow the "2015-01-
|
47
|
+
}.to raise_error(%{FIXME does not follow the "2015-01-31: Foo" format: "9999-01-01, Learn to: type"})
|
48
|
+
end
|
49
|
+
|
50
|
+
it "complains if the extended ISO 8601 date format is not adhered to" do
|
51
|
+
expect {
|
52
|
+
FIXME "9999-01-1: Foo"
|
53
|
+
}.to raise_error(%{FIXME does not follow the "2015-01-31: Foo" format: "9999-01-1: Foo"})
|
48
54
|
end
|
49
55
|
|
50
56
|
it "is available everywhere" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fixme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrik Nyh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -74,6 +74,7 @@ extensions: []
|
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
76
|
- ".gitignore"
|
77
|
+
- CHANGELOG.md
|
77
78
|
- Gemfile
|
78
79
|
- README.md
|
79
80
|
- Rakefile
|
@@ -101,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
102
|
version: '0'
|
102
103
|
requirements: []
|
103
104
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.
|
105
|
+
rubygems_version: 2.6.11
|
105
106
|
signing_key:
|
106
107
|
specification_version: 4
|
107
108
|
summary: Comments that raise after a certain point in time.
|