kinetic_cafe_error 1.10 → 1.11

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.
data/.autotest DELETED
@@ -1,35 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- require 'autotest/bundler'
4
- require 'autotest/restart'
5
- require 'autotest/timestamp'
6
-
7
- def require_plugin(resource)
8
- require resource
9
- rescue LoadError
10
- false
11
- end
12
-
13
- require_plugin 'autotest/clear'
14
-
15
- Autotest.add_hook :initialize do |at|
16
- # at.testlib = "minitest/unit"
17
- #
18
- # at.extra_files << "../some/external/dependency.rb"
19
- #
20
- # at.libs << ":../some/external"
21
- #
22
- # at.add_exception "vendor"
23
- #
24
- # at.add_mapping(/dependency.rb/) do |f, _|
25
- # at.files_matching(/test_.*rb$/)
26
- # end
27
- #
28
- # %w(TestA TestB).each do |klass|
29
- # at.extra_class_map[klass] = "test/test_misc.rb"
30
- # end
31
- end
32
-
33
- # Autotest.add_hook :run_command do |at|
34
- # system "rake build"
35
- # end
data/.gemtest DELETED
@@ -1 +0,0 @@
1
-
@@ -1,132 +0,0 @@
1
- ---
2
- # inherit_from: .rubocop_todo.yml
3
-
4
- AllCops:
5
- Include:
6
- - '**/Rakefile'
7
- - '**/config.rb'
8
- Exclude:
9
- - 'bin/**/*'
10
- - 'db/**/*'
11
- - 'config/**/*'
12
- - 'script/**/*'
13
- - 'tmp/**/*'
14
- RunRailsCops: true
15
- DisplayCopNames: true
16
-
17
- Style/AlignHash:
18
- EnforcedHashRocketStyle: key
19
- EnforcedColonStyle: key
20
- EnforcedLastArgumentHashStyle: always_ignore
21
-
22
- Style/AlignParameters:
23
- EnforcedStyle: with_first_parameter
24
-
25
- Style/AndOr:
26
- EnforcedStyle: conditionals
27
-
28
- Style/BarePercentLiterals:
29
- EnforcedStyle: percent_q
30
-
31
- Style/BracesAroundHashParameters:
32
- EnforcedStyle: context_dependent
33
-
34
- Style/Documentation:
35
- Enabled: false
36
-
37
- Style/Lambda:
38
- Enabled: false
39
-
40
- Style/TrailingComma:
41
- Enabled: false
42
-
43
- Style/ClassAndModuleChildren:
44
- Enabled: false
45
-
46
- Style/MultilineOperationIndentation:
47
- EnforcedStyle: indented
48
-
49
- Style/DotPosition:
50
- EnforcedStyle: trailing
51
-
52
- Style/AlignParameters:
53
- EnforcedStyle: with_fixed_indentation
54
-
55
- # Style/BlockDelimiters in semantic mode is the only correct choice, but it is
56
- # too finicky to use reliably.
57
- Style/BlockDelimiters:
58
- Enabled: false
59
- EnforcedStyle: semantic
60
-
61
- Style/FormatString:
62
- Enabled: false
63
-
64
- Style/NumericLiterals:
65
- Enabled: false
66
-
67
- Style/SpaceInsideBrackets:
68
- Enabled: false
69
-
70
- Style/CommentAnnotation:
71
- Enabled: false
72
-
73
- Style/AsciiComments:
74
- Enabled: false
75
-
76
- Style/ClassCheck:
77
- EnforcedStyle: kind_of?
78
-
79
- Style/RegexpLiteral:
80
- EnforcedStyle: mixed
81
-
82
- Style/CommandLiteral:
83
- EnforcedStyle: percent_x
84
-
85
- Style/UnneededPercentQ:
86
- Enabled: false
87
-
88
- Metrics/AbcSize:
89
- Enabled: false
90
-
91
- Metrics/CyclomaticComplexity:
92
- Enabled: false
93
-
94
- Metrics/MethodLength:
95
- Enabled: false
96
-
97
- Metrics/ModuleLength:
98
- Enabled: false
99
-
100
- Metrics/ClassLength:
101
- Enabled: false
102
-
103
- Metrics/PerceivedComplexity:
104
- Enabled: false
105
-
106
- Metrics/LineLength:
107
- Max: 80
108
- Exclude:
109
- - test/**/*
110
-
111
- Style/MethodDefParentheses:
112
- Exclude:
113
- - test/**/*
114
-
115
- Style/DoubleNegation:
116
- Enabled: false
117
-
118
- Style/MethodDefParentheses:
119
- Exclude:
120
- - lib/kinetic_cafe/error/minitest.rb
121
-
122
- Style/PerlBackrefs:
123
- Exclude:
124
- - lib/kinetic_cafe/error_dsl.rb
125
-
126
- Rails/Output:
127
- Exclude:
128
- - lib/**/*
129
-
130
- Style/LambdaCall:
131
- Exclude:
132
- - lib/kinetic_cafe/error_tasks.rb
@@ -1,33 +0,0 @@
1
- ---
2
- language: ruby
3
- rvm:
4
- - 2.3.0
5
- - 2.2.4
6
- - 2.1
7
- - jruby-9.0.4.0
8
- - jruby-head
9
- - ruby-head
10
- - rbx-2
11
- matrix:
12
- exclude:
13
- - rvm: 2.1
14
- gemfile: gemfiles/rack_2.gemfile
15
- allow_failures:
16
- - rvm: rbx-2
17
- - rvm: jruby-head
18
- - rvm: ruby-head
19
- gemfile:
20
- - gemfiles/rack_1.6.gemfile
21
- - gemfiles/rack_2.gemfile
22
- before_script:
23
- - |
24
- case "${TRAVIS_RUBY_VERSION}" in
25
- rbx*)
26
- gem install psych
27
- ;;
28
- esac
29
- - rake travis:before -t
30
- script: rake travis
31
- after_script:
32
- - rake travis:after -t
33
- sudo: false
data/Appraisals DELETED
@@ -1,7 +0,0 @@
1
- appraise 'rack-1.6' do
2
- gem 'rack', '~> 1.6'
3
- end
4
-
5
- appraise 'rack-2' do
6
- gem 'rack', '~> 2.0.alpha'
7
- end
@@ -1,62 +0,0 @@
1
- == Contributing
2
-
3
- I value any contribution to kinetic_cafe_error you can provide: a bug report, a
4
- feature request, or code contributions.
5
-
6
- * Changes *will* *not* be accepted without tests. The test suite is written
7
- with {Minitest}[https://github.com/seattlerb/minitest].
8
- * Match my coding style.
9
- * Use a thoughtfully-named topic branch that contains your change. Rebase your
10
- commits into logical chunks as necessary.
11
- * Use {quality commit messages}[http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html].
12
- * Do not change the version number; when your patch is accepted and a release
13
- is made, the version will be updated at that point.
14
- * Submit a GitHub pull request with your changes.
15
- * New behaviours require new or updated documentation.
16
-
17
- === Test Dependencies
18
-
19
- kinetic_cafe_error uses Ryan Davis’s {Hoe}[https://github.com/seattlerb/hoe]
20
- to manage the release process, and it adds a number of rake tasks. You will
21
- mostly be interested in:
22
-
23
- $ rake
24
-
25
- which runs the tests the same way that:
26
-
27
- $ rake test
28
- $ rake travis
29
-
30
- will do.
31
-
32
- To assist with the installation of the development dependencies for
33
- kinetic_cafe_error, I have provided the simplest possible Gemfile pointing to
34
- the (generated) +kinetic_cafe_error.gemspec+ file. This will permit you to do:
35
-
36
- $ bundle install
37
-
38
- to get the development dependencies. If you aleady have +hoe+ installed, you
39
- can accomplish the same thing with:
40
-
41
- $ rake newb
42
-
43
- This task will install any missing dependencies, run the tests/specs, and
44
- generate the RDoc.
45
-
46
- === Workflow
47
-
48
- Here's the most direct way to get your work merged into the project:
49
-
50
- * Fork the project.
51
- * Clone down your fork (<tt>git clone git://github.com/<username>/kinetic_cafe_error.git</tt>).
52
- * Create a topic branch to contain your change (<tt>git checkout -b my\_awesome\_feature</tt>).
53
- * Hack away, add tests. Not necessarily in that order.
54
- * Make sure everything still passes by running +rake+.
55
- * If necessary, rebase your commits into logical chunks, without errors.
56
- * Push the branch up (<tt>git push origin my\_awesome\_feature</tt>).
57
- * Create a pull request against halostatue/kinetic_cafe_error and describe
58
- what your change does and the why you think it should be merged.
59
-
60
- === Contributors
61
-
62
- * Austin Ziegler created kinetic_cafe_error.
data/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- # NOTE: This file is present to keep Travis CI happy. Edits to it will not
4
- # be accepted.
5
-
6
- source "https://rubygems.org/"
7
- gemspec
8
-
9
- # vim: syntax=ruby
@@ -1,203 +0,0 @@
1
- === 1.10 / 2016-03-25
2
-
3
- * 1 bug fix:
4
-
5
- * Protect against names with punctuation in them.
6
-
7
- * 1 testing change:
8
-
9
- * Add Appraisals to test against both Rack 1.6 and Rack 2.0.
10
-
11
- === 1.9 / 2015-11-30
12
-
13
- * 2 bug fixes:
14
-
15
- * The #stringify method needed to be moved to KineticCafe::ErrorModule so
16
- that hierarchies *not* built from KineticCafe::Error can properly use query
17
- parameter parsing.
18
-
19
- * kinetic_cafe_error has required Ruby 2.1 or higher since version 1.5
20
- because of the inclusion of i18n-tasks as a dependency. This is now
21
- reflected in the dependencies.
22
-
23
- === 1.8.1 / 2015-10-26
24
-
25
- * Re-release because 1.8 was yanked
26
-
27
- === 1.8 / 2015-10-26
28
-
29
- * 1 minor enhancement:
30
-
31
- * Add +kinetic_cafe_error_handle_post_error+ to allow for capturing or
32
- post-processing of errors after logging and handling.
33
-
34
- === 1.7 / 2015-08-05
35
-
36
- * 1 minor enhancement:
37
-
38
- * Add a +params+ parameter to the <tt>kcerror:defined</tt> task that
39
- will show the parameter names the exception expects.
40
-
41
- * 1 bug fix:
42
-
43
- * RubyMine does not fully initialize the project when running RSpec, meaning
44
- that while Rake is defined, Rake::DSL is not. As such, we need to prevent
45
- the Rake task from loading unless Rake::DSL is present.
46
-
47
- === 1.6 / 2015-07-30
48
-
49
- * 2 minor enhancements:
50
-
51
- * Improve the Minitest and RSpec test helpers so that they ignore the error
52
- +cause+ if it is not included as part of the assertion. The specification
53
- of the +cause+ is recommended if you have specific values you want to
54
- compare.
55
-
56
- * Improve +kinetic_cafe_error_handler+ so that if it is called with an error
57
- class instead of an instance of an error, it will construct the error
58
- instance with the provided parameters. This makes custom +rescue_from+
59
- constructions cleaner.
60
-
61
- === 1.5 / 2015-07-29
62
-
63
- * 2 bug fixes:
64
-
65
- * Handle error causes correctly for Ruby 2.1 or later, where <tt>raise
66
- Exception, cause: RuntimeError.new</tt> does not pass the +cause+ the
67
- exception constructor, but it still sets the cause correctly on the
68
- exception. These changes make this correct for both +raise+ construction
69
- and normal construction.
70
-
71
- * The RSpec helpers did not work because they spelled the class +Rspec+, not
72
- +RSpec+. This has been fixed.
73
-
74
- * 2 development changes:
75
-
76
- * Fixed some test typos.
77
-
78
- * Add i18n-tasks for CSV exports.
79
-
80
- === 1.4.1 / 2015-07-08
81
-
82
- * 1 bug fix
83
-
84
- * Fixed an error with loading error_tasks.rake from the Rails engine.
85
-
86
- === 1.4 / 2015-07-07
87
-
88
- * 2 minor enhancements
89
-
90
- * Changed how kcerror:translations generates the translation YAML for
91
- consistent comparison (it no longer uses the YAML library to do this). The
92
- file generated will always be for language +kc+ so that this can be used
93
- with i18n-tasks.
94
-
95
- * 4 bug fixes
96
-
97
- * Task kcerror:defined would error out if there were no defined descendants.
98
- * Task kcerror:translations would error out if there were no defined
99
- descendants.
100
- * Made task loading more reliable and automatic.
101
- * Removed some defaulted, unused parameters for assert_response_kc_error_html
102
- (Minitest) and bc_kc_error_html (RSpec).
103
-
104
- * Notes:
105
-
106
- * Applied Rubocop to enforce the KineticCafe house style.
107
-
108
- === 1.3 / 2015-06-18
109
-
110
- * 3 minor enhancements
111
-
112
- * Added a controller method, kinetic_cafe_error_handler_log_error, in
113
- KineticCafe::ErrorHandler that will log the given error in the default
114
- logging language, and its cause, if any.
115
-
116
- * Added a controller class method to change the default logging language for
117
- kinetic_cafe_error_handler_log_error. A locale may be provided with
118
- kinetic_cafe_error_handler_log_locale. Fixes
119
- [#2]{https://github.com/KineticCafe/kinetic_cafe_error/issues/2}.
120
-
121
- * Added an optional +locale+ parameter to KineticCafe::ErrorModule#message
122
- and KineticCafe::ErrorModule::#i18n_message. If I18n is present and
123
- +locale+ is provided, the translation will *not* be cached and the
124
- translation will be performed using the provided locale.
125
-
126
- * 1 bug fixed
127
-
128
- * The Minitest assertion, assert_kc_error, could not work because it was
129
- looking for descendants of KineticCafe::ErrorDSL, not
130
- KineticCafe::ErrorModule. Reported by @richardsondx as
131
- [#3]{https://github.com/KineticCafe/kinetic_cafe_error/issues/3} during a
132
- pairing session.
133
-
134
- === 1.2 / 2015-06-08
135
-
136
- * 1 major enhancement
137
-
138
- * Changed the preferred way of creating an error hierarchy from just
139
- extending the error class with KineticCafe::ErrorDSL to calling
140
- KineticCafe.create_hierarchy. Among other options this provides, the
141
- automatic creation of helper methods and errors based on Rack::Utils status
142
- codes can be controlled.
143
-
144
- * 5 minor enhancements
145
-
146
- * Renamed KineticCafe#header_only? to KineticCafe#header? The old version is
147
- still present but deprecated. Similarly, the option to
148
- KineticCafe::ErrorDSL#define_error is now called +header+, but
149
- +header_only+ also works.
150
-
151
- * Added an option, +i18n_params+ to KineticCafe::ErrorDSL#define_error, used
152
- to describe the I18n parameters that are expected to be provided to the
153
- error for translations. This gets defined as a class method on the new
154
- error. This should be passed as an array.
155
-
156
- * Extracted most of the 'magic' functionality to KineticCafe::ErrorModule so
157
- that useful hierarchies can be generated without inheriting directly from
158
- KineticCafe::Error.
159
-
160
- * Added a class method to the Rails controller concern to generate a new
161
- rescue_from for a non-KineticCafe::Error-derived exception.
162
-
163
- * Added a pair of rake tasks, kcerror:defined (shows defined errors) and
164
- kcerror:translations (generates a sample translation key file).
165
- Automatically inserted for Rails applications.
166
-
167
- === 1.1 / 2015-06-05
168
-
169
- * 7 minor enhancements
170
-
171
- * Added Minitest assertions and expectations.
172
- * Added Rspec expectation matchers.
173
- * Changed the error table to be a partial and renamed keys to support this
174
- change (kinetic_cafe_error/_table.html.*). Removed the previous key. Now
175
- an error is nominally embeddable in your own views without being a full
176
- page.
177
- * Added HAML templates.
178
- * Added Slim templates.
179
- * Move error page to kinetic_cafe_error/page.html.* instead of
180
- kinetic_cafe/error/page.html.*. This could be a breaking change, but I
181
- consider it low risk.
182
- * Added KineticCafe::Error#code as an alias for KineticCafe::Error#i18n_key.
183
-
184
- * 2 minor bugfixes:
185
-
186
- * The en and fr translation files were reporting en-CA and fr-CA as their
187
- locales, which is incorrect.
188
-
189
- * Renamed locale files to better match their names to their locales. The
190
- locale is not en_ca, but en-CA.
191
-
192
- === 1.0.1 / 2015-05-27
193
-
194
- * 1 minor bugfix
195
-
196
- * Mac OS X is not case-sensitive and I do not currently have Rails-specific
197
- tests.
198
-
199
- === 1.0.0 / 2015-05-27
200
-
201
- * 1 major enhancement
202
-
203
- * Birthday!