fixme 6.0.0 → 6.1.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
- SHA1:
3
- metadata.gz: 50eba448b6368b404c7303844a56adb0dc283e5c
4
- data.tar.gz: 1bc4d4729eaf1f041c2ba51fc851f1552dca879e
2
+ SHA256:
3
+ metadata.gz: 24a8df0ed4191847cd7aecd39f9de96855ba751989cd621d23e4bb2f9c67a878
4
+ data.tar.gz: 5d4d12fdff0076e36a48c7af44232f54ca7cb245e9095c62a486635912273279
5
5
  SHA512:
6
- metadata.gz: feec415f5bcc57485e7c93b7fe3985dc5bbfca736fc5713b1f7ef55e402ee78e9a3d143b19b04d883480da15659fc86f70b53792805f35f2efc813d58e4ff856
7
- data.tar.gz: cc8158246e5e91fab8153d604f5c882593527ec411065e9240d03947c263ce05eeea454fca980f466bedcfdbbe1a3cd9306341b3778a039250dacce18f11d1d1
6
+ metadata.gz: d74ddad10cbee0922f2371a97a00d6b0a5361f2ceb0c0f5b7a425d09e277c4d4b2e61991d932aa7f8d7839811e7a0c7cc62889174b64b4ca1f29d7737cb010a7
7
+ data.tar.gz: fa16ba3b894eed22cd4566ce0d191efd03faab16365802ee3c5ba3375db500cb6fd01e2e6dc77ea065984c12a08055bfe0c9d1c113d2c4d56d460dec664dc103
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.1.0
4
+
5
+ * Checks `APP_ENV`, not just `RACK_ENV`, as this is [what Sinatra now encourages using](https://github.com/sinatra/sinatra/blob/master/CHANGELOG.md#200--2017-04-10).
6
+
3
7
  ## 6.0.0
4
8
 
5
9
  * Require zero-padded month and day, i.e. disallow `2019-1-2`. This enforced consistency makes it easier to grep for an exploded FIXME.
data/README.md CHANGED
@@ -22,7 +22,7 @@ For simplicity, the date comparison uses machine-local time (not e.g. the Rails
22
22
 
23
23
  ### Environment awareness
24
24
 
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.
25
+ If `Rails.env` (Ruby on Rails), `ENV["APP_ENV"]` 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.
26
26
 
27
27
  ### Do something other than raise
28
28
 
@@ -58,8 +58,8 @@ If you e.g. don't want your CI server to raise, make it set the environment vari
58
58
 
59
59
  ### Pro-tips
60
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.
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 FIXME will remember what you're meant to change.
62
+ * If a FIXME raises right in a class/module, rather than inside a 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
63
 
64
64
 
65
65
  ## Installation
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_development_dependency "bundler", "~> 1.5"
20
+ spec.add_development_dependency "bundler"
21
21
  spec.add_development_dependency "rake"
22
22
  spec.add_development_dependency "rspec"
23
23
  spec.add_development_dependency "timecop"
@@ -64,7 +64,11 @@ module Fixme
64
64
  private
65
65
 
66
66
  def framework_env
67
- defined?(Rails) ? Rails.env : ENV["RACK_ENV"]
67
+ if defined?(Rails)
68
+ Rails.env
69
+ else
70
+ ENV["RACK_ENV"] || ENV["APP_ENV"]
71
+ end
68
72
  end
69
73
 
70
74
  def disallow_timecop(&block)
@@ -1,3 +1,3 @@
1
1
  module Fixme
2
- VERSION = "6.0.0"
2
+ VERSION = "6.1.0"
3
3
  end
@@ -101,7 +101,28 @@ describe Fixme, "#FIXME" do
101
101
  end
102
102
  end
103
103
 
104
- context "when a Rack environment is detected" do
104
+ context "when an APP_ENV is detected" do
105
+ before do
106
+ stub_env "DISABLE_FIXME_LIB", nil
107
+ end
108
+
109
+ it "raises in the 'test' environment" do
110
+ stub_env "APP_ENV", "test"
111
+ expect_to_raise
112
+ end
113
+
114
+ it "raises in the 'development' environment" do
115
+ stub_env "APP_ENV", "development"
116
+ expect_to_raise
117
+ end
118
+
119
+ it "does not raise in other environments" do
120
+ stub_env "APP_ENV", "production"
121
+ expect_not_to_raise
122
+ end
123
+ end
124
+
125
+ context "when a RACK_ENV is detected" do
105
126
  before do
106
127
  stub_env "DISABLE_FIXME_LIB", nil
107
128
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fixme
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.1.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: 2019-05-20 00:00:00.000000000 Z
11
+ date: 2020-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.5'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.5'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -101,8 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubyforge_project:
105
- rubygems_version: 2.6.11
104
+ rubygems_version: 3.0.3
106
105
  signing_key:
107
106
  specification_version: 4
108
107
  summary: Comments that raise after a certain point in time.