contingency 0.2.0 → 0.2.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: c9134c71586b5d7aac0b9727f60bb93c42bbc7dd
4
- data.tar.gz: 4997bbb2c4aa49e210def0d56b05501b8ad9407d
3
+ metadata.gz: b05a25d72b87cc7ed868a00d76314c926a3a8c9d
4
+ data.tar.gz: bc945aa8e74e60e473e139b7223afaa6e476e3d8
5
5
  SHA512:
6
- metadata.gz: ce5c44af5d7d25603f7e3ba1352f6feb1e83abefe3b5af02c0271c5aa3e19bda3e716689404758d91b4d305e18d6e2849321546b59a4bd8504837659771be7c4
7
- data.tar.gz: f9ede3175ea4026ecb8614b85f79778f7428b381ded5c13d8990372b840e9b686ac9789b12a39c9989ce2b82bc0e538469dd549909dec7cfdca242c48e1540d5
6
+ metadata.gz: 44f6af546c56be798d3bc7bf7650f16f13b589e92e44038fb40d35c95332344debeaa92631ac4c74bdfbdf9693c62cacae20d3eb4bc879527c05eeb602abc5c7
7
+ data.tar.gz: 57bddbc0aaa47a9af90d69d77bda7af48f18c26b838a0a04c152af06a9638b729a3260284fcff252951a77eeb6f1d5491d1ae6ecd00439597879d0e74e315d21
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <a name='contingency'>
1
+ <a name='contingency-readme'>
2
2
  # Contingency
3
3
  </a>
4
4
 
@@ -40,7 +40,7 @@ It's also very lightweight: the core functionality (the module in `contingency/p
40
40
 
41
41
  Add this line to your application's Gemfile:
42
42
 
43
- gem 'contingency-my_framework_name', '~> x.0', require: 'contingency/adapters/my_framework_name'
43
+ gem 'contingency-my_framework_name', '~> x.0'
44
44
 
45
45
  ...where [`my_framework_name`](#supported-integrations) is the name of your framework, and `x` is the major version of the framework you're using.
46
46
 
@@ -48,11 +48,15 @@ Then, execute:
48
48
 
49
49
  $ bundle
50
50
 
51
+ Finally, enable Contingency in whatever object serves as your controller:
52
+
53
+ include Contingency::Plan
54
+
51
55
  <a name='configuration'>
52
56
  ## Configuration
53
57
  </a>
54
58
 
55
- Contingency
59
+ Contingency-Rails uses the same configuration object as Contingency, but has different defaults. Run 'rake contingency:generate:config' to create a highly documented `contingency.rb` file in the root of your project that goes over all configuration options and defaults.
56
60
 
57
61
  <a name='supported-integrations'>
58
62
  ## Supported Integrations
@@ -70,16 +74,16 @@ Contingency
70
74
  <tbody>
71
75
  <tr>
72
76
  <td>
73
- <a href='https://www.github.com/christhekeele/contingency_rails'>Rails</a>
77
+ <a href='https://www.github.com/christhekeele/contingency-rails'>Rails</a>
74
78
  </td>
75
79
  <td>
76
80
  **Bad**
77
81
  </td>
78
82
  <td>
79
- <a href='https://rubygems.org/gems/contingency_rails'>3.x</a>
83
+ <a href='https://rubygems.org/gems/contingency-rails'>3.x</a>
80
84
  </td>
81
85
  <td>
82
- <a href='https://www.github.com/christhekeele/contingency_rails/issues'>christhekeele</a>
86
+ <a href='https://www.github.com/christhekeele/contingency-rails/issues'>christhekeele</a>
83
87
  </td>
84
88
  </tr>
85
89
  </tbody>
@@ -123,7 +127,7 @@ Contingency integrations should take their major version number from [their fram
123
127
  ## Contributing Integrations
124
128
  </a>
125
129
 
126
- See [contingency_rails](https://www.github.com/christhekeele/contingency_rails) as an example.
130
+ See [contingency-rails](https://www.github.com/christhekeele/contingency-rails) as an example.
127
131
 
128
132
  1. Create a new gem named after your framework (`bundle gem contingency-my_integration`)
129
133
  1. Add Contingency as a dependency to your gemspec and bundle install
@@ -134,7 +138,7 @@ See [contingency_rails](https://www.github.com/christhekeele/contingency_rails)
134
138
  1. Create the intital build of your gem (`gem build contingency-my_integration`)
135
139
  1. Release your gem (`gem push contingency-my_integration.gem`)
136
140
  1. Revel in the fact that you've provided a Contingency plan for you and yours
137
- 1. Follow [the steps below](#contributing-to-contingency) to update this README with links to your Contingency integrationaccepted
141
+ 1. Follow [the steps below](#contributing-to-contingency) to update this README with links to your Contingency integration
138
142
 
139
143
 
140
144
  <a name='contributing-to-contingency'>
@@ -143,7 +147,6 @@ See [contingency_rails](https://www.github.com/christhekeele/contingency_rails)
143
147
 
144
148
  1. Fork it
145
149
  1. Create your feature branch (`git checkout -b my-new-feature`)
146
- 1. Add the name of your integration to the integrations array in the contingency/integration.rb file if [you're contributing a Contingency integration](#contributing-integrations)
147
150
  1. Commit your changes (`git commit -am 'Add some feature'`)
148
151
  1. Push to the branch (`git push origin my-new-feature`)
149
152
  1. Create new Pull Request
data/contingency.gemspec CHANGED
@@ -8,9 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Contingency::VERSION
9
9
  spec.authors = ["Christopher Keele"]
10
10
  spec.email = ["dev@chriskeele.com"]
11
- spec.description = "A framework agnostic exception catcher and custom error page generator."
11
+ spec.description = "A framework agnostic controller exception catcher and custom error page router."
12
12
  spec.summary = "Handle your ruby web application's errors your way, with your own beautiful customized error pages. Framework agnostic with several integrations and i18n support."
13
- # spec.homepage = ""
14
13
  spec.license = "MIT"
15
14
 
16
15
  spec.files = `git ls-files`.split($/)
@@ -1,3 +1,3 @@
1
1
  module Contingency
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/lib/contingency.rb CHANGED
@@ -10,10 +10,10 @@ module Contingency
10
10
  attr_accessor :adapter, :adapters
11
11
  end
12
12
 
13
- self.adapters = Contingency::Adapters.constants.reject{ |a| a == :Interface }
14
13
 
15
14
  def self.configure
16
- self.adapter ||= Contingency::Adapters.const_get self.adapters.first || Adapters::Interface
15
+ self.adapters = Contingency::Adapters.constants.reject{ |a| a == :Interface }
16
+ self.adapter ||= self.adapters.length > 0 ? Contingency::Adapters.const_get self.adapters.first : Adapters::Interface
17
17
  self.configuration ||= defined?(self.adapter::Configuration) ? self.adapter::Configuration.new : Configuration.new
18
18
 
19
19
  yield(configuration) if block_given?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contingency
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Keele
@@ -80,7 +80,8 @@ dependencies:
80
80
  - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.13'
83
- description: A framework agnostic exception catcher and custom error page generator.
83
+ description: A framework agnostic controller exception catcher and custom error page
84
+ router.
84
85
  email:
85
86
  - dev@chriskeele.com
86
87
  executables: []