Class: Knapsack::Adapters::BaseAdapter
- Inherits:
-
Object
- Object
- Knapsack::Adapters::BaseAdapter
show all
- Defined in:
- lib/knapsack/adapters/base_adapter.rb
Constant Summary
collapse
- TEST_DIR_PATTERN =
Just examples, please overwrite constants in subclasses
'test/**{,/*/**}/*_test.rb'
- REPORT_PATH =
'knapsack_base_report.json'
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.bind ⇒ Object
8
9
10
11
12
|
# File 'lib/knapsack/adapters/base_adapter.rb', line 8
def self.bind
adapter = new
adapter.bind
adapter
end
|
Instance Method Details
#bind ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/knapsack/adapters/base_adapter.rb', line 14
def bind
update_report_config
if tracker.config[:generate_report]
Knapsack.logger.info 'Knapsack report generator started!'
bind_time_tracker
bind_report_generator
elsif tracker.config[:enable_time_offset_warning]
Knapsack.logger.info 'Knapsack time offset warning enabled!'
bind_time_tracker
bind_time_offset_warning
else
Knapsack.logger.warn 'Knapsack adapter is off!'
end
end
|
#bind_report_generator ⇒ Object
34
35
36
|
# File 'lib/knapsack/adapters/base_adapter.rb', line 34
def bind_report_generator
raise NotImplementedError
end
|
#bind_time_offset_warning ⇒ Object
38
39
40
|
# File 'lib/knapsack/adapters/base_adapter.rb', line 38
def bind_time_offset_warning
raise NotImplementedError
end
|
#bind_time_tracker ⇒ Object
30
31
32
|
# File 'lib/knapsack/adapters/base_adapter.rb', line 30
def bind_time_tracker
raise NotImplementedError
end
|