lhs 15.5.1 → 15.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +3 -0
- data/README.md +1630 -780
- data/lhs.gemspec +2 -2
- data/lib/lhs/concerns/record/chainable.rb +4 -0
- data/lib/lhs/concerns/record/configuration.rb +7 -0
- data/lib/lhs/concerns/record/request.rb +4 -2
- data/lib/lhs/version.rb +1 -1
- data/spec/autoloading_spec.rb +1 -1
- data/spec/dummy/app/controllers/error_handling_with_chains_controller.rb +34 -0
- data/spec/dummy/app/models/record.rb +4 -0
- data/spec/dummy/app/views/error_handling_with_chains/error.html.erb +1 -0
- data/spec/dummy/app/views/error_handling_with_chains/show.html.erb +3 -0
- data/spec/dummy/config/routes.rb +6 -0
- data/spec/pagination/parameters_spec.rb +2 -2
- data/spec/record/all_spec.rb +26 -0
- data/spec/record/error_handling_integration_spec.rb +23 -0
- data/spec/record/{chain_error_handling_spec.rb → error_handling_spec.rb} +0 -0
- data/spec/record/fetch_spec.rb +24 -9
- data/spec/{request_cycle_cache/main_spec.rb → request_cycle_cache_spec.rb} +8 -8
- data/spec/support/reset.rb +43 -0
- metadata +24 -13
- data/spec/support/cleanup.rb +0 -32
data/spec/support/cleanup.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'lhc'
|
2
|
-
class LHC::Config
|
3
|
-
|
4
|
-
def _cleanup
|
5
|
-
@endpoints = {}
|
6
|
-
@placeholders = {}
|
7
|
-
@interceptors = nil
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
class LHS::Record
|
12
|
-
|
13
|
-
CHILDREN = []
|
14
|
-
|
15
|
-
def self.inherited(child)
|
16
|
-
CHILDREN.push(child)
|
17
|
-
super
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
|
22
|
-
RSpec.configure do |config|
|
23
|
-
config.before do |spec|
|
24
|
-
next if spec.metadata.key?(:cleanup_before) && spec.metadata[:cleanup_before] == false
|
25
|
-
LHC::Config.instance._cleanup
|
26
|
-
LHS::Record::Endpoints.all = {}
|
27
|
-
LHS::Record::CHILDREN.each do |child|
|
28
|
-
child.endpoints = [] if !child.name['LHS'] && defined?(child.endpoints)
|
29
|
-
child.configuration({}) if !child.name['LHS']
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|