easy_app_helper 1.0.14 → 2.0.2
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.
- checksums.yaml +4 -4
- data/.gitignore +48 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/README.md +90 -447
- data/Rakefile +1 -8
- data/easy_app_helper.gemspec +6 -6
- data/lib/easy_app_helper/config/compatibility.rb +22 -0
- data/lib/easy_app_helper/config/initializer.rb +15 -0
- data/lib/easy_app_helper/config.rb +11 -0
- data/lib/easy_app_helper/logger/initializer.rb +46 -0
- data/lib/easy_app_helper/logger/wrapper.rb +12 -0
- data/lib/easy_app_helper/managed_logger.rb +9 -0
- data/lib/easy_app_helper/version.rb +1 -8
- data/lib/easy_app_helper.rb +23 -14
- data/spec/config_spec.rb +18 -188
- data/spec/easy_app_helper_spec.rb +28 -0
- data/spec/logger_spec.rb +8 -27
- data/spec/spec_helper.rb +92 -0
- metadata +27 -18
- data/etc/test_internal.conf +0 -3
- data/lib/easy_app_helper/core/base.rb +0 -228
- data/lib/easy_app_helper/core/config.rb +0 -220
- data/lib/easy_app_helper/core/logger.rb +0 -111
- data/lib/easy_app_helper/core/merge_policies.rb +0 -40
- data/lib/easy_app_helper/core/places.rb +0 -87
- data/lib/easy_app_helper/module_manager.rb +0 -68
- data/test/test.yml +0 -7
@@ -0,0 +1,22 @@
|
|
1
|
+
module EasyAppHelper
|
2
|
+
module Config
|
3
|
+
|
4
|
+
module Compatibility
|
5
|
+
|
6
|
+
# For backward compatibility with EasyAppHelper v1.x
|
7
|
+
def help
|
8
|
+
command_line_help
|
9
|
+
end
|
10
|
+
|
11
|
+
def command_line_config
|
12
|
+
command_line_layer.slop_definition.to_hash
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.set_compatibility_mode(config=EasyAppHelper.config)
|
18
|
+
config.extend EasyAppHelper::Config::Compatibility
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module EasyAppHelper
|
2
|
+
module Config
|
3
|
+
|
4
|
+
module Initializer
|
5
|
+
|
6
|
+
def self.build_config
|
7
|
+
config = StackedConfig::Orchestrator.new
|
8
|
+
EasyAppHelper::Config.set_compatibility_mode(config) if config[:easy_app_helper_compatibility_mode]
|
9
|
+
config
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module EasyAppHelper
|
2
|
+
module Logger
|
3
|
+
|
4
|
+
module Initializer
|
5
|
+
|
6
|
+
def self.init_command_line_options
|
7
|
+
EasyAppHelper.config.add_command_line_section('Debug and logging options') do |slop|
|
8
|
+
slop.on :debug, 'Run in debug mode.', argument: false
|
9
|
+
slop.on 'debug-on-err', 'Run in debug mode with output to stderr.', argument: false
|
10
|
+
slop.on 'log-level', "Log level from 0 to 5, default #{::Logger::Severity::WARN}.", argument: true, as: Integer
|
11
|
+
slop.on 'log-file', 'File to log to.', argument: true, as: String
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.setup_logger(logger)
|
16
|
+
logger.level = EasyAppHelper.config[:'log-level'] ? EasyAppHelper.config[:'log-level'] : ::Logger::Severity::WARN
|
17
|
+
logger.extend EasyAppHelper::Logger::Wrapper
|
18
|
+
logger
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.build_logger
|
22
|
+
log_device = if EasyAppHelper.config[:debug]
|
23
|
+
if EasyAppHelper.config[:'log-file']
|
24
|
+
EasyAppHelper.config[:'log-file']
|
25
|
+
elsif EasyAppHelper.config[:'debug-on-err']
|
26
|
+
STDERR
|
27
|
+
else
|
28
|
+
STDOUT
|
29
|
+
end
|
30
|
+
else
|
31
|
+
File::NULL
|
32
|
+
end
|
33
|
+
setup_logger(::Logger.new log_device)
|
34
|
+
end
|
35
|
+
|
36
|
+
init_command_line_options
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
@@ -1,10 +1,3 @@
|
|
1
|
-
################################################################################
|
2
|
-
# EasyAppHelper
|
3
|
-
#
|
4
|
-
# Copyright (c) 2013 L.Briais under MIT license
|
5
|
-
# http://opensource.org/licenses/MIT
|
6
|
-
################################################################################
|
7
|
-
|
8
1
|
module EasyAppHelper
|
9
|
-
|
2
|
+
VERSION = '2.0.2'
|
10
3
|
end
|
data/lib/easy_app_helper.rb
CHANGED
@@ -1,20 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
# Copyright (c) 2013 L.Briais under MIT license
|
5
|
-
# http://opensource.org/licenses/MIT
|
6
|
-
################################################################################
|
1
|
+
require 'stacked_config'
|
2
|
+
|
3
|
+
require 'logger'
|
7
4
|
|
8
5
|
require 'easy_app_helper/version'
|
6
|
+
require 'easy_app_helper/config/compatibility'
|
7
|
+
require 'easy_app_helper/config/initializer'
|
8
|
+
require 'easy_app_helper/config'
|
9
|
+
require 'easy_app_helper/logger/initializer'
|
10
|
+
require 'easy_app_helper/logger/wrapper'
|
11
|
+
require 'easy_app_helper/managed_logger'
|
9
12
|
|
10
|
-
# When this module is included in any class, it mixes in automatically
|
11
|
-
# EasyAppHelper::ModuleManager methods both into the
|
12
|
-
# instance and the class of the instance that includes it.
|
13
|
-
# Thus to have access to the helper methods, the only requirement is to include
|
14
|
-
# this module...
|
15
13
|
module EasyAppHelper
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
|
15
|
+
def puts_and_logs(*args)
|
16
|
+
logger.puts_and_logs *args
|
17
|
+
end
|
18
|
+
|
19
|
+
def safely_exec(message, *args, &block)
|
20
|
+
if self[:simulate]
|
21
|
+
puts_and_logs "SIMULATING: #{message}" unless message.nil?
|
22
|
+
else
|
23
|
+
puts_and_logs message
|
24
|
+
yield(*args)
|
25
|
+
end
|
26
|
+
end
|
19
27
|
|
20
28
|
|
29
|
+
end
|
data/spec/config_spec.rb
CHANGED
@@ -1,201 +1,31 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# Copyright (c) 2013 L.Briais under MIT license
|
5
|
-
# http://opensource.org/licenses/MIT
|
6
|
-
#-------------------------------------------------------------------------------
|
1
|
+
require 'spec_helper'
|
7
2
|
|
8
|
-
require 'rspec'
|
9
|
-
require 'easy_app_helper'
|
10
3
|
|
4
|
+
describe EasyAppHelper.config do
|
11
5
|
|
12
|
-
|
13
|
-
|
14
|
-
SAMPLE_STRING = 'TestConfig'
|
15
|
-
subject {EasyAppHelper.config}
|
16
|
-
|
17
|
-
|
18
|
-
it 'should be fully initialized when first accessed' do
|
19
|
-
subject.should_not be nil
|
20
|
-
subject.logger.should_not be nil
|
6
|
+
it 'should be a StackedConfig::Orchestrator' do
|
7
|
+
expect(subject).to be_a_kind_of StackedConfig::Orchestrator
|
21
8
|
end
|
22
9
|
|
23
|
-
it 'should be consistent regardless the way it is accessed' do
|
24
|
-
subject[:basic_test] = SAMPLE_STRING
|
25
|
-
expect(subject[]).to eq subject.to_hash
|
26
|
-
expect(subject[:basic_test]).to eq SAMPLE_STRING
|
27
|
-
end
|
28
|
-
|
29
|
-
it 'should be the same object accross different instances' do
|
30
|
-
expect(subject[:basic_test]).to eq SAMPLE_STRING
|
31
|
-
end
|
32
|
-
|
33
|
-
it 'should store the data in the :modified layer' do
|
34
|
-
expect(subject.find_layer :basic_test).to eq :modified
|
35
|
-
expect(subject.internal_configs[:modified][:content][:basic_test]).to eq subject[:basic_test]
|
36
|
-
end
|
37
|
-
|
38
|
-
it 'should provide a direct r/w access to layers' do
|
39
|
-
subject.set_value :stupid_conf, SAMPLE_STRING, :system
|
40
|
-
expect(subject[:stupid_conf]).to eq SAMPLE_STRING
|
41
|
-
end
|
42
10
|
|
43
|
-
it 'should
|
44
|
-
subject.
|
45
|
-
subject
|
11
|
+
it 'should have the compatibility mode set if :easy_app_helper_compatibility_mode is set in the config' do
|
12
|
+
expect(subject).to_not respond_to :help
|
13
|
+
expect(subject).to_not respond_to :command_line_config
|
14
|
+
EasyAppHelper::Config.set_compatibility_mode subject
|
15
|
+
expect(subject).to respond_to :help
|
16
|
+
expect(subject).to respond_to :command_line_config
|
46
17
|
end
|
47
18
|
|
48
|
-
|
49
|
-
subject
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
context 'when dealing with the multiple layers of the config' do
|
55
|
-
|
56
|
-
before(:all) do
|
57
|
-
EasyAppHelper.config.layers.each do |layer|
|
58
|
-
EasyAppHelper.config.set_value :basic_test, "#{SAMPLE_STRING} #{layer.to_s}", layer
|
59
|
-
end
|
60
|
-
EasyAppHelper.config.set_value :'config-file', true, :command_line
|
61
|
-
end
|
62
|
-
|
63
|
-
context "when trying to access some data" do
|
64
|
-
let(:layers) {subject.layers}
|
65
|
-
#subject {EasyAppHelper.config}
|
66
|
-
|
67
|
-
original_ordered_layers = EasyAppHelper.config.layers
|
68
|
-
layers = original_ordered_layers.dup
|
69
|
-
original_ordered_layers.each do |layer|
|
70
|
-
test_descr = "It should find the data in #{layer} layer if present in #{layer} layer"
|
71
|
-
unless layers.length == original_ordered_layers.length
|
72
|
-
already_removed = original_ordered_layers - layers
|
73
|
-
if already_removed.length == 1
|
74
|
-
test_descr += " and not present in #{already_removed[0]} layer"
|
75
|
-
end
|
76
|
-
if already_removed.length > 1
|
77
|
-
test_descr += " and not present in #{already_removed.join ', '} layers"
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
it test_descr, layers: layers.dup do
|
82
|
-
layers = example.metadata[:layers]
|
83
|
-
expect(subject.find_layer :basic_test).to eq layer
|
84
|
-
expect(subject[:basic_test]).to eq "#{SAMPLE_STRING} #{layer.to_s}"
|
85
|
-
subject.internal_configs[layer][:content].delete :basic_test
|
86
|
-
end
|
87
|
-
|
88
|
-
layers.shift
|
89
|
-
|
19
|
+
context 'when mixing-in the EasyAppHelper module' do
|
20
|
+
subject {
|
21
|
+
class A
|
22
|
+
include EasyAppHelper
|
90
23
|
end
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
it "should log a warning and return nil" do
|
97
|
-
subject.logger.should_receive(:warn)
|
98
|
-
expect(subject.get_value :non_existing_value, :another_non_existing_layer).to be_nil
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
context "in write mode" do
|
103
|
-
|
104
|
-
it "should log a warning and create it" do
|
105
|
-
subject.logger.should_receive(:warn)
|
106
|
-
subject.set_value :non_existing_value, SAMPLE_STRING, :another_non_existing_layer
|
107
|
-
expect(subject.get_value :non_existing_value, :another_non_existing_layer).to be SAMPLE_STRING
|
108
|
-
expect(subject[:non_existing_value]).to be SAMPLE_STRING
|
109
|
-
end
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
|
-
context "when manually creating a layer" do
|
114
|
-
|
115
|
-
it "should be handled with the lowest priority" do
|
116
|
-
subject.set_value :unused_option, SAMPLE_STRING, :non_existing_layer
|
117
|
-
expect(subject[:unused_option]).to eq SAMPLE_STRING
|
118
|
-
subject.set_value :unused_option, 'Not the sample string', :system
|
119
|
-
expect(subject[:unused_option]).to_not eq SAMPLE_STRING
|
120
|
-
end
|
121
|
-
|
24
|
+
A.new
|
25
|
+
}
|
26
|
+
it 'should be the exact same object' do
|
27
|
+
expect(subject.config.equal? EasyAppHelper.config).to be_truthy
|
122
28
|
end
|
123
29
|
|
124
30
|
end
|
125
|
-
|
126
|
-
context "when reset" do
|
127
|
-
|
128
|
-
it "should remove all modifications done the standard way" do
|
129
|
-
subject[:test_remove] = SAMPLE_STRING
|
130
|
-
subject.reset
|
131
|
-
expect(subject[:test_remove]).to be_nil
|
132
|
-
end
|
133
|
-
|
134
|
-
it "should keep modifications directly done on internal layers" do
|
135
|
-
subject.set_value :stupid_conf, SAMPLE_STRING, :system
|
136
|
-
subject.reset
|
137
|
-
expect(subject.get_value :stupid_conf, :system).to eq SAMPLE_STRING
|
138
|
-
end
|
139
|
-
|
140
|
-
end
|
141
|
-
|
142
|
-
context "when reloaded" do
|
143
|
-
|
144
|
-
it "should keep all modifications done the standard way" do
|
145
|
-
subject[:test_remove] = SAMPLE_STRING
|
146
|
-
subject.load_config
|
147
|
-
expect(subject[:test_remove]).to eq SAMPLE_STRING
|
148
|
-
end
|
149
|
-
|
150
|
-
it "should remove all modifications directly done on internal layers" do
|
151
|
-
subject.set_value :stupid_conf, SAMPLE_STRING, :system
|
152
|
-
subject.set_value :stupid_conf, SAMPLE_STRING, :command_line
|
153
|
-
subject.load_config
|
154
|
-
expect(subject.get_value :stupid_conf,:system).to be_nil
|
155
|
-
expect(subject.get_value :stupid_conf,:command_line).to be_nil
|
156
|
-
end
|
157
|
-
|
158
|
-
end
|
159
|
-
|
160
|
-
context "when reloaded (forced)" do
|
161
|
-
|
162
|
-
it "should keep all modifications done the standard way" do
|
163
|
-
subject[:test_remove] = SAMPLE_STRING
|
164
|
-
subject.force_reload
|
165
|
-
expect(subject[:test_remove]).to eq SAMPLE_STRING
|
166
|
-
end
|
167
|
-
|
168
|
-
it "should remove all modifications directly done on internal layers" do
|
169
|
-
subject.set_value :stupid_conf, SAMPLE_STRING, :system
|
170
|
-
subject.set_value :stupid_conf, SAMPLE_STRING, :command_line
|
171
|
-
subject.force_reload
|
172
|
-
expect(subject.get_value :stupid_conf,:system).to be_nil
|
173
|
-
expect(subject.get_value :stupid_conf,:command_line).to be_nil
|
174
|
-
end
|
175
|
-
|
176
|
-
end
|
177
|
-
|
178
|
-
|
179
|
-
context "When dealing with command line" do
|
180
|
-
|
181
|
-
it 'should have the same content using #command_line_config and #internal_configs[:command_line][:content]' do
|
182
|
-
subject.add_command_line_section('Scripts analysis') do |slop|
|
183
|
-
slop.on :p, :pipo, 'Directory path where SQL files are located.', argument: false
|
184
|
-
end
|
185
|
-
expect(subject.command_line_config).to eq subject.internal_configs[:command_line][:content]
|
186
|
-
end
|
187
|
-
|
188
|
-
end
|
189
|
-
|
190
|
-
context "When a gem has its own :internal config file" do
|
191
|
-
before(:all) do
|
192
|
-
EasyAppHelper.config.script_filename = 'test_internal'
|
193
|
-
end
|
194
|
-
|
195
|
-
it "should take its data in account" do
|
196
|
-
expect(subject[:internal_credits]).to_not be_nil
|
197
|
-
end
|
198
|
-
|
199
|
-
end
|
200
|
-
|
201
31
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
|
4
|
+
describe EasyAppHelper do
|
5
|
+
|
6
|
+
%i(config logger puts_and_logs safely_exec).each do |m|
|
7
|
+
it "should have module method #{m.to_s}" do
|
8
|
+
expect(subject).to respond_to m
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
context 'when mixing-in the EasyAppHelper module' do
|
13
|
+
subject {
|
14
|
+
class A
|
15
|
+
include EasyAppHelper
|
16
|
+
end
|
17
|
+
A.new
|
18
|
+
}
|
19
|
+
|
20
|
+
%i(config logger puts_and_logs safely_exec).each do |m|
|
21
|
+
it "should have a #{m.to_s} method " do
|
22
|
+
expect(subject).to respond_to m
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
data/spec/logger_spec.rb
CHANGED
@@ -1,34 +1,15 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# Copyright (c) 2013 L.Briais under MIT license
|
5
|
-
# http://opensource.org/licenses/MIT
|
6
|
-
#-------------------------------------------------------------------------------
|
1
|
+
require 'spec_helper'
|
7
2
|
|
8
|
-
require 'rspec'
|
9
|
-
require 'easy_app_helper'
|
10
3
|
|
4
|
+
describe EasyAppHelper.logger do
|
11
5
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
let (:config) {EasyAppHelper.config}
|
16
|
-
|
17
|
-
context "to modify the log level, it should be possible " do
|
18
|
-
|
19
|
-
it 'to use the config object' do
|
20
|
-
Logger::Severity::DEBUG.upto(Logger::Severity::UNKNOWN) do |severity|
|
21
|
-
config[:'log-level'] = severity
|
22
|
-
expect(subject.level).to eq severity
|
23
|
-
end
|
24
|
-
end
|
6
|
+
it 'should be a valid logger' do
|
7
|
+
expect(subject).to be_a_kind_of ::Logger
|
8
|
+
end
|
25
9
|
|
26
|
-
|
27
|
-
|
28
|
-
subject.level= severity
|
29
|
-
expect(config[:'log-level']).to eq severity
|
30
|
-
end
|
31
|
-
end
|
10
|
+
it 'should respond to puts_and_logs' do
|
11
|
+
expect(subject).to respond_to :puts_and_logs
|
32
12
|
end
|
33
13
|
|
14
|
+
|
34
15
|
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause this
|
4
|
+
# file to always be loaded, without a need to explicitly require it in any files.
|
5
|
+
#
|
6
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
7
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
8
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
9
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
10
|
+
# a separate helper file that requires the additional dependencies and performs
|
11
|
+
# the additional setup, and require it from the spec files that actually need it.
|
12
|
+
#
|
13
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
14
|
+
# users commonly want.
|
15
|
+
#
|
16
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
17
|
+
|
18
|
+
require 'easy_app_helper'
|
19
|
+
|
20
|
+
RSpec.configure do |config|
|
21
|
+
# rspec-expectations config goes here. You can use an alternate
|
22
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
23
|
+
# assertions if you prefer.
|
24
|
+
config.expect_with :rspec do |expectations|
|
25
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
26
|
+
# and `failure_message` of custom matchers include text for helper methods
|
27
|
+
# defined using `chain`, e.g.:
|
28
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
29
|
+
# # => "be bigger than 2 and smaller than 4"
|
30
|
+
# ...rather than:
|
31
|
+
# # => "be bigger than 2"
|
32
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
33
|
+
end
|
34
|
+
|
35
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
36
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
37
|
+
config.mock_with :rspec do |mocks|
|
38
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
39
|
+
# a real object. This is generally recommended, and will default to
|
40
|
+
# `true` in RSpec 4.
|
41
|
+
mocks.verify_partial_doubles = true
|
42
|
+
end
|
43
|
+
|
44
|
+
# The settings below are suggested to provide a good initial experience
|
45
|
+
# with RSpec, but feel free to customize to your heart's content.
|
46
|
+
=begin
|
47
|
+
# These two settings work together to allow you to limit a spec run
|
48
|
+
# to individual examples or groups you care about by tagging them with
|
49
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
50
|
+
# get run.
|
51
|
+
config.filter_run :focus
|
52
|
+
config.run_all_when_everything_filtered = true
|
53
|
+
|
54
|
+
# Limits the available syntax to the non-monkey patched syntax that is recommended.
|
55
|
+
# For more details, see:
|
56
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
57
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
58
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
59
|
+
config.disable_monkey_patching!
|
60
|
+
|
61
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
62
|
+
# be too noisy due to issues in dependencies.
|
63
|
+
config.warnings = true
|
64
|
+
|
65
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
66
|
+
# file, and it's useful to allow more verbose output when running an
|
67
|
+
# individual spec file.
|
68
|
+
if config.files_to_run.one?
|
69
|
+
# Use the documentation formatter for detailed output,
|
70
|
+
# unless a formatter has already been configured
|
71
|
+
# (e.g. via a command-line flag).
|
72
|
+
config.default_formatter = 'doc'
|
73
|
+
end
|
74
|
+
|
75
|
+
# Print the 10 slowest examples and example groups at the
|
76
|
+
# end of the spec run, to help surface which specs are running
|
77
|
+
# particularly slow.
|
78
|
+
config.profile_examples = 10
|
79
|
+
|
80
|
+
# Run specs in random order to surface order dependencies. If you find an
|
81
|
+
# order dependency and want to debug it, you can fix the order by providing
|
82
|
+
# the seed, which is printed after each run.
|
83
|
+
# --seed 1234
|
84
|
+
config.order = :random
|
85
|
+
|
86
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
87
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
88
|
+
# test failures related to randomization by passing the same `--seed` value
|
89
|
+
# as the one that triggered the failure.
|
90
|
+
Kernel.srand config.seed
|
91
|
+
=end
|
92
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_app_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- L.Briais
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,28 +58,34 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: stacked_config
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0.1'
|
76
|
+
- - '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 0.1.2
|
76
79
|
type: :runtime
|
77
80
|
prerelease: false
|
78
81
|
version_requirements: !ruby/object:Gem::Requirement
|
79
82
|
requirements:
|
80
83
|
- - ~>
|
81
84
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
85
|
+
version: '0.1'
|
86
|
+
- - '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 0.1.2
|
83
89
|
description: Easy Application Helpers framework
|
84
90
|
email:
|
85
91
|
- lbnetid+rb@gmail.com
|
@@ -87,23 +93,26 @@ executables: []
|
|
87
93
|
extensions: []
|
88
94
|
extra_rdoc_files: []
|
89
95
|
files:
|
96
|
+
- .gitignore
|
97
|
+
- .rspec
|
98
|
+
- .travis.yml
|
90
99
|
- Gemfile
|
91
100
|
- LICENSE.txt
|
92
101
|
- README.md
|
93
102
|
- Rakefile
|
94
103
|
- easy_app_helper.gemspec
|
95
|
-
- etc/test_internal.conf
|
96
104
|
- lib/easy_app_helper.rb
|
97
|
-
- lib/easy_app_helper/
|
98
|
-
- lib/easy_app_helper/
|
99
|
-
- lib/easy_app_helper/
|
100
|
-
- lib/easy_app_helper/
|
101
|
-
- lib/easy_app_helper/
|
102
|
-
- lib/easy_app_helper/
|
105
|
+
- lib/easy_app_helper/config.rb
|
106
|
+
- lib/easy_app_helper/config/compatibility.rb
|
107
|
+
- lib/easy_app_helper/config/initializer.rb
|
108
|
+
- lib/easy_app_helper/logger/initializer.rb
|
109
|
+
- lib/easy_app_helper/logger/wrapper.rb
|
110
|
+
- lib/easy_app_helper/managed_logger.rb
|
103
111
|
- lib/easy_app_helper/version.rb
|
104
112
|
- spec/config_spec.rb
|
113
|
+
- spec/easy_app_helper_spec.rb
|
105
114
|
- spec/logger_spec.rb
|
106
|
-
-
|
115
|
+
- spec/spec_helper.rb
|
107
116
|
homepage: https://github.com/lbriais/easy_app_helper
|
108
117
|
licenses:
|
109
118
|
- MIT
|
@@ -124,13 +133,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
133
|
version: '0'
|
125
134
|
requirements: []
|
126
135
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.0.
|
136
|
+
rubygems_version: 2.0.0
|
128
137
|
signing_key:
|
129
138
|
specification_version: 4
|
130
139
|
summary: Provides cool helpers to your application, including configuration and logging
|
131
140
|
features
|
132
141
|
test_files:
|
133
|
-
- etc/test_internal.conf
|
134
142
|
- spec/config_spec.rb
|
143
|
+
- spec/easy_app_helper_spec.rb
|
135
144
|
- spec/logger_spec.rb
|
136
|
-
-
|
145
|
+
- spec/spec_helper.rb
|
data/etc/test_internal.conf
DELETED