configatron 2.13.0 → 3.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +0 -0
- data/.rvmrc +0 -1
- data/.travis.yml +5 -2
- data/Gemfile +5 -1
- data/Gemfile.lock +30 -13
- data/Guardfile +24 -0
- data/LICENSE.txt +22 -0
- data/README.md +122 -112
- data/Rakefile +6 -4
- data/V2-README.md +243 -0
- data/configatron.gemspec +4 -31
- data/lib/configatron/core.rb +3 -94
- data/lib/configatron/deep_clone.rb +69 -0
- data/lib/configatron/errors.rb +5 -9
- data/lib/configatron/rails.rb +8 -8
- data/lib/configatron/store.rb +66 -339
- data/lib/configatron/version.rb +1 -1
- data/lib/configatron.rb +8 -16
- data/lib/generators/configatron/install/install_generator.rb +0 -0
- data/lib/generators/configatron/install/templates/configatron/defaults.rb +0 -0
- data/lib/generators/configatron/install/templates/configatron/development.rb +0 -0
- data/lib/generators/configatron/install/templates/configatron/production.rb +0 -0
- data/lib/generators/configatron/install/templates/configatron/test.rb +0 -0
- data/lib/generators/configatron/install/templates/initializers/configatron.rb +0 -0
- data/test/configatron/store_test.rb +191 -0
- data/test/configatron_test.rb +5 -0
- data/test/test_helper.rb +14 -0
- metadata +27 -54
- data/LICENSE +0 -21
- data/lib/configatron/core_ext/class.rb +0 -25
- data/lib/configatron/core_ext/kernel.rb +0 -8
- data/lib/configatron/core_ext/object.rb +0 -13
- data/lib/configatron/core_ext/string.rb +0 -90
- data/lib/configatron/proc.rb +0 -104
- data/spec/configatron/proc_spec.rb +0 -67
- data/spec/configatron/rails_spec.rb +0 -66
- data/spec/lib/class_spec.rb +0 -46
- data/spec/lib/complex.yml +0 -13
- data/spec/lib/configatron_spec.rb +0 -630
- data/spec/lib/futurama.yml +0 -6
- data/spec/lib/lost.yml +0 -14
- data/spec/lib/math.yml +0 -2
- data/spec/lib/merge.yml +0 -14
- data/spec/spec_helper.rb +0 -4
- data/spec/support/rails.rb +0 -7
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 726b6ffdc130933ec1a38572f833537dd560c343
|
4
|
+
data.tar.gz: 2e905aedd57354e7bbda54a5e450d2288ac00493
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 19ec11d3152a002763a48ce31ad2eaf63b1413c991d4e50116d60298ca042e870065f86118266c6def811cbe2554dda330ca269cf4637eaa39f938c93fe098fb
|
7
|
+
data.tar.gz: f4dddffa04bbad1beb942302ca9366e47b6db9f7fbe53e96b402aa01bdcd6b1e0dfe6e29574c7da3e15223d200fcbcec1e4ae99477db8fe36da216171a23fda2
|
data/.gitignore
CHANGED
File without changes
|
data/.rvmrc
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,28 +1,45 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
configatron (
|
5
|
-
yamler (>= 0.1.0)
|
4
|
+
configatron (3.0.0.rc1)
|
6
5
|
|
7
6
|
GEM
|
8
7
|
remote: https://rubygems.org/
|
9
8
|
specs:
|
10
|
-
|
9
|
+
coderay (1.0.8)
|
10
|
+
guard (1.6.2)
|
11
|
+
listen (>= 0.6.0)
|
12
|
+
lumberjack (>= 1.0.2)
|
13
|
+
pry (>= 0.9.10)
|
14
|
+
terminal-table (>= 1.4.3)
|
15
|
+
thor (>= 0.14.6)
|
16
|
+
guard-minitest (0.5.0)
|
17
|
+
guard (>= 0.4)
|
18
|
+
listen (0.7.2)
|
19
|
+
lumberjack (1.0.2)
|
20
|
+
method_source (0.8.1)
|
21
|
+
minitest (2.12.1)
|
22
|
+
minitest-colorize (0.0.4)
|
23
|
+
minitest (~> 2.0)
|
24
|
+
pry (0.9.11.4)
|
25
|
+
coderay (~> 1.0.5)
|
26
|
+
method_source (~> 0.8)
|
27
|
+
slop (~> 3.4)
|
11
28
|
rake (0.9.2.2)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
rspec-expectations (2.8.0)
|
18
|
-
diff-lcs (~> 1.1.2)
|
19
|
-
rspec-mocks (2.8.0)
|
20
|
-
yamler (0.1.0)
|
29
|
+
rb-fsevent (0.9.3)
|
30
|
+
slop (3.4.3)
|
31
|
+
terminal-notifier-guard (1.5.3)
|
32
|
+
terminal-table (1.4.5)
|
33
|
+
thor (0.17.0)
|
21
34
|
|
22
35
|
PLATFORMS
|
23
36
|
ruby
|
24
37
|
|
25
38
|
DEPENDENCIES
|
26
39
|
configatron!
|
40
|
+
guard
|
41
|
+
guard-minitest
|
42
|
+
minitest-colorize
|
27
43
|
rake
|
28
|
-
|
44
|
+
rb-fsevent
|
45
|
+
terminal-notifier-guard
|
data/Guardfile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard 'minitest' do
|
5
|
+
# with Minitest::Unit
|
6
|
+
watch(%r|^test/(.*)\/?(.*)_test\.rb|)
|
7
|
+
watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "test/#{m[1]}#{m[2]}_test.rb" }
|
8
|
+
watch(%r|^test/test_helper\.rb|) { "test" }
|
9
|
+
|
10
|
+
# with Minitest::Spec
|
11
|
+
# watch(%r|^spec/(.*)_spec\.rb|)
|
12
|
+
# watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
13
|
+
# watch(%r|^spec/spec_helper\.rb|) { "spec" }
|
14
|
+
|
15
|
+
# Rails 3.2
|
16
|
+
# watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/controllers/#{m[1]}_test.rb" }
|
17
|
+
# watch(%r|^app/helpers/(.*)\.rb|) { |m| "test/helpers/#{m[1]}_test.rb" }
|
18
|
+
# watch(%r|^app/models/(.*)\.rb|) { |m| "test/unit/#{m[1]}_test.rb" }
|
19
|
+
|
20
|
+
# Rails
|
21
|
+
# watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/functional/#{m[1]}_test.rb" }
|
22
|
+
# watch(%r|^app/helpers/(.*)\.rb|) { |m| "test/helpers/#{m[1]}_test.rb" }
|
23
|
+
# watch(%r|^app/models/(.*)\.rb|) { |m| "test/unit/#{m[1]}_test.rb" }
|
24
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Mark Bates
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,222 +1,232 @@
|
|
1
|
-
# Configatron
|
1
|
+
# Configatron
|
2
2
|
|
3
3
|
Configatron makes configuring your applications and scripts incredibly easy. No longer is a there a need to use constants or global variables. Now you can use a simple and painless system to configure your life. And, because it's all Ruby, you can do any crazy thing you would like to!
|
4
4
|
|
5
|
+
## IMPORTANT NOTES ON V3
|
6
|
+
|
7
|
+
V3 is still a work in progress. It is also a complete rewrite of the library. Because V3 is a rewrite there is a lot that has been thrown out, modified, etc... There is a good chance that some feature or method that you were using doesn't exist, or works differently now. Hopefully you'll find these changes for the best. If not, you know how to submit a Pull Request. :)
|
8
|
+
|
9
|
+
One of the more important changes to V3 is that it now resembles more a `Hash` style interface. You can use `[]`, `fetch`, `each`, etc...
|
10
|
+
|
5
11
|
## Installation
|
6
12
|
|
7
|
-
|
13
|
+
Add this line to your application's Gemfile:
|
8
14
|
|
9
15
|
```ruby
|
10
|
-
|
16
|
+
gem 'configatron', '3.0.0.rc1'
|
11
17
|
```
|
12
18
|
|
13
|
-
|
19
|
+
And then execute:
|
14
20
|
|
21
|
+
```bash
|
22
|
+
$ bundle
|
15
23
|
```
|
16
|
-
|
24
|
+
|
25
|
+
Or install it yourself as:
|
26
|
+
|
27
|
+
```bash
|
28
|
+
$ gem install configatron --pre
|
17
29
|
```
|
18
30
|
|
31
|
+
## Usage
|
32
|
+
|
19
33
|
Once installed you just need to require it:
|
20
34
|
|
21
35
|
```ruby
|
22
|
-
|
36
|
+
require 'configatron'
|
23
37
|
```
|
24
38
|
|
25
|
-
## Examples
|
26
|
-
|
27
39
|
### Simple
|
28
40
|
|
29
41
|
```ruby
|
30
|
-
|
31
|
-
|
42
|
+
configatron.email = 'me@example.com'
|
43
|
+
configatron.database.url = "postgres://localhost/foo"
|
32
44
|
```
|
33
45
|
|
34
46
|
Now, anywhere in your code you can do the following:
|
35
47
|
|
36
48
|
```ruby
|
37
|
-
|
38
|
-
|
49
|
+
configatron.email # => "me@example.com"
|
50
|
+
configatron.database.url # => "postgres://localhost/foo"
|
39
51
|
```
|
40
52
|
|
41
53
|
Viola! Simple as can be.
|
42
54
|
|
43
|
-
Now you're saying, what if I want to have a 'default' set of options, but then override them later, based on other information? Simple again. Let's use our above example. We've configured our
|
55
|
+
Now you're saying, what if I want to have a 'default' set of options, but then override them later, based on other information? Simple again. Let's use our above example. We've configured our `database.url` option to be @postgres://localhost/foo@. The problem with that is that is our production database url, not our development url. Fair enough, all you have to do is redeclare it:
|
44
56
|
|
45
57
|
```ruby
|
46
|
-
|
58
|
+
configatron.database.url = "postgres://localhost/foo_development"
|
47
59
|
```
|
48
60
|
|
49
61
|
becomes:
|
50
62
|
|
51
63
|
```ruby
|
52
|
-
|
53
|
-
|
64
|
+
configatron.email # => "me@example.com"
|
65
|
+
configatron.database.url # => "postgres://localhost/foo_development"
|
54
66
|
```
|
55
67
|
|
56
68
|
Notice how our other configuration parameters haven't changed? Cool, eh?
|
57
69
|
|
58
70
|
### Hash/YAML
|
59
71
|
|
60
|
-
You can configure
|
72
|
+
You can configure Configatron from a hash as well (this is really only useful in testing or for data driven configuration, it's not recommended for actual configuration):
|
61
73
|
|
62
74
|
```ruby
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
75
|
+
configatron.configure_from_hash(email: {pop: {address: 'pop.example.com', port: 110}}, smtp: {address: 'smtp.example.com'})
|
76
|
+
|
77
|
+
configatron.email.pop.address # => 'pop.example.com'
|
78
|
+
configatron.email.pop.port # => 110
|
79
|
+
# and so on...
|
67
80
|
```
|
68
81
|
|
69
82
|
#### YAML
|
70
83
|
|
71
|
-
|
84
|
+
YAML is terrible and should be driven from the face of the Earth. Because of this Configatron V3 does not support it. Sorry.
|
72
85
|
|
73
86
|
### Namespaces
|
74
87
|
|
75
88
|
The question that should be on your lips is what I need to have namespaced configuration parameters. It's easy! Configatron allows you to create namespaces.
|
76
89
|
|
77
90
|
```ruby
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
91
|
+
configatron.website_url = "http://www.example.com"
|
92
|
+
configatron.email.pop.address = "pop.example.com"
|
93
|
+
configatron.email.pop.port = 110
|
94
|
+
configatron.email.smtp.address = "smtp.example.com"
|
95
|
+
configatron.email.smtp.port = 25
|
96
|
+
|
97
|
+
configatron.to_h # => {:website_url=>"http://www.example.com", :email=>{:pop=>{:address=>"pop.example.com", :port=>110}, :smtp=>{:address=>"smtp.example.com", :port=>25}}}
|
83
98
|
```
|
84
99
|
|
85
|
-
|
100
|
+
Configatron allows you to nest namespaces to your hearts content! Just keep going, it's that easy.
|
101
|
+
|
102
|
+
Of course you can update a single parameter n levels deep as well:
|
86
103
|
|
87
104
|
```ruby
|
88
|
-
|
89
|
-
|
90
|
-
|
105
|
+
configatron.email.pop.address = "pop2.example.com"
|
106
|
+
|
107
|
+
configatron.email.pop.address # => "pop2.example.com"
|
108
|
+
configatron.email.smtp.address # => "smtp.example.com"
|
91
109
|
```
|
92
|
-
####onfigatron allows you to nest namespaces to your hearts content! Just keep going, it's that easy.
|
93
110
|
|
94
|
-
|
111
|
+
Configatron will also let you use a block to clean up your configuration. For example the following two ways of setting values are equivalent:
|
95
112
|
|
96
113
|
```ruby
|
97
|
-
|
114
|
+
configatron.email.pop.address = "pop.example.com"
|
115
|
+
configatron.email.pop.port = 110
|
98
116
|
|
99
|
-
|
100
|
-
|
117
|
+
configatron.email.pop do |pop|
|
118
|
+
pop.address = "pop.example.com"
|
119
|
+
pop.port = 110
|
120
|
+
end
|
101
121
|
```
|
102
122
|
|
103
123
|
### Temp Configurations
|
104
124
|
|
105
|
-
Sometimes in testing, or other situations, you want to temporarily change some settings. You can do this with the
|
125
|
+
Sometimes in testing, or other situations, you want to temporarily change some settings. You can do this with the `temp` method:
|
106
126
|
|
107
127
|
```ruby
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
configatron.one # => 1
|
115
|
-
configatron.letters.a # => 'A'
|
116
|
-
configatron.letters.b # => 'bb'
|
117
|
-
configatron.letters.c # => 'c'
|
118
|
-
end
|
128
|
+
configatron.one = 1
|
129
|
+
configatron.letters.a = 'A'
|
130
|
+
configatron.letters.b = 'B'
|
131
|
+
configatron.temp do
|
132
|
+
configatron.letters.b = 'bb'
|
133
|
+
configatron.letters.c = 'c'
|
119
134
|
configatron.one # => 1
|
120
135
|
configatron.letters.a # => 'A'
|
121
|
-
configatron.letters.b # => '
|
122
|
-
configatron.letters.c # =>
|
136
|
+
configatron.letters.b # => 'bb'
|
137
|
+
configatron.letters.c # => 'c'
|
138
|
+
end
|
139
|
+
configatron.one # => 1
|
140
|
+
configatron.letters.a # => 'A'
|
141
|
+
configatron.letters.b # => 'B'
|
142
|
+
configatron.letters.c # => {}
|
123
143
|
```
|
124
144
|
|
125
|
-
|
145
|
+
### nil
|
146
|
+
|
147
|
+
Even if parameters haven't been set, you can still call them, but you'll get a `Configatron::Store` object back. The `Configatron::Store` class, however, will respond true to `.nil?` or `.blank?` if there are no parameters configured on it.
|
126
148
|
|
127
149
|
```ruby
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
configatron.temp(:letters => {:b => 'bb', :c => 'c'}) do
|
132
|
-
####one == 1
|
133
|
-
configatron.letters.a # => 'A'
|
134
|
-
configatron.letters.b # => 'bb'
|
135
|
-
configatron.letters.c # => 'c'
|
136
|
-
end
|
137
|
-
configatron.one == 1
|
138
|
-
configatron.letters.a # => 'A'
|
139
|
-
configatron.letters.b # => 'B'
|
140
|
-
configatron.letters.c # => nil
|
150
|
+
configatron.i.dont.exist.nil? # => true
|
151
|
+
configatron.i.dont.exist.blank? # => true
|
152
|
+
configatron.i.dont.exist # => Configatron::Store
|
141
153
|
```
|
142
154
|
|
143
|
-
|
144
|
-
|
145
|
-
There are times when you want to refer to one configuration setting in another configuration setting. Let's look at a fairly contrived example:
|
155
|
+
You can use `.has_key?` to determine if a key already exists.
|
146
156
|
|
147
157
|
```ruby
|
148
|
-
|
149
|
-
configatron.page_caching.servers = configatron.memcached.servers
|
150
|
-
configatron.object_caching.servers = configatron.memcached.servers
|
151
|
-
|
152
|
-
if Rails.env == 'production'
|
153
|
-
configatron.memcached.servers = ['192.168.0.1:11211']
|
154
|
-
configatron.page_caching.servers = configatron.memcached.servers
|
155
|
-
configatron.object_caching.servers = configatron.memcached.servers
|
156
|
-
elsif Rails.env == 'staging'
|
157
|
-
configatron.memcached.servers = ['192.168.0.2:11211']
|
158
|
-
configatron.page_caching.servers = configatron.memcached.servers
|
159
|
-
configatron.object_caching.servers = configatron.memcached.servers
|
160
|
-
end
|
158
|
+
configatron.i.dont.has_key?(:exist) # => false
|
161
159
|
```
|
162
160
|
|
163
|
-
|
161
|
+
### Kernel
|
164
162
|
|
165
|
-
|
163
|
+
The `configatron` "helper" method is store in the `Kernel` module. Some people didn't like that in the V2 of Configatron, so in V3, while that hasn't changed, you don't have to use it.
|
166
164
|
|
167
|
-
|
165
|
+
Instead of requiring `configatron` simply require `configatron/core`, but then you'll have to set up your own `Configatron::Store` object.
|
166
|
+
|
167
|
+
Example:
|
168
168
|
|
169
169
|
```ruby
|
170
|
-
|
171
|
-
|
172
|
-
|
170
|
+
require 'configatron/core'
|
171
|
+
|
172
|
+
store = Configatron::Store.new
|
173
|
+
store.foo = 'FOO'
|
173
174
|
|
174
|
-
|
175
|
-
configatron.memcached.servers = ['192.168.0.1:11211']
|
176
|
-
elsif Rails.env == 'staging'
|
177
|
-
configatron.memcached.servers = ['192.168.0.2:11211']
|
178
|
-
end
|
175
|
+
store.to_h #= {foo: 'FOO'}
|
179
176
|
```
|
180
177
|
|
181
|
-
|
178
|
+
### Locking
|
182
179
|
|
183
|
-
|
180
|
+
Once you have setup all of your configurations you can call the `lock!` method to lock your settings and raise an error should anyone try to change settings or access an unset setting later.
|
184
181
|
|
185
|
-
|
182
|
+
Example:
|
186
183
|
|
187
184
|
```ruby
|
188
|
-
|
189
|
-
|
185
|
+
configatron.foo = 'FOO'
|
186
|
+
configatron.lock!
|
190
187
|
|
191
|
-
|
188
|
+
configatron.foo # => 'FOO'
|
192
189
|
|
193
|
-
|
190
|
+
configatron.bar # => raises Configatron::UndefinedKeyError
|
191
|
+
configatron.bar = 'BAR' # => raises Configatron::LockedError
|
192
|
+
```
|
194
193
|
|
195
|
-
|
194
|
+
## Rails
|
196
195
|
|
197
|
-
|
198
|
-
|
199
|
-
|
196
|
+
Configatron works great with Rails. Use the built-in generate to generate an initializer file and a series of environment files for you to use to configure your applications.
|
197
|
+
|
198
|
+
``` bash
|
199
|
+
$ rails generate configatron:install
|
200
200
|
```
|
201
201
|
|
202
|
-
|
202
|
+
Configatron will read in the `config/configatron/defaults.rb` file first and then the environment specific file, such as `config/configatron/development.rb`. Settings in the environment file will merge into and replace the settings in the `defaults.rb` file.
|
203
|
+
|
204
|
+
### Example
|
203
205
|
|
204
206
|
```ruby
|
205
|
-
|
206
|
-
|
207
|
-
|
207
|
+
# config/configatron/defaults.rb
|
208
|
+
configatron.letters.a = 'A'
|
209
|
+
configatron.letters.b = 'B'
|
208
210
|
```
|
209
211
|
|
210
|
-
|
212
|
+
```ruby
|
213
|
+
# config/configatron/development.rb
|
214
|
+
configatron.letters.b = 'BB'
|
215
|
+
configatron.letters.c = 'C'
|
216
|
+
```
|
211
217
|
|
212
218
|
```ruby
|
213
|
-
|
214
|
-
configatron.name # => 'Mark Bates'
|
215
|
-
configatron.set_default(:name, 'Me')
|
216
|
-
configatron.name # => 'Mark Bates'
|
219
|
+
configatron.to_h # => {:letters=>{:a=>"A", :b=>"BB", :c=>"C"}}
|
217
220
|
```
|
218
221
|
|
219
|
-
|
222
|
+
## Contributing
|
223
|
+
|
224
|
+
1. Fork it
|
225
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
226
|
+
3. Write Tests!
|
227
|
+
4. Commit your changes (`git commit -am 'Add some feature'`)
|
228
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
229
|
+
6. Create new Pull Request
|
220
230
|
|
221
231
|
## Contributors
|
222
232
|
|
data/Rakefile
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
require 'bundler'
|
1
|
+
require 'bundler'
|
2
|
+
require 'rake/testtask'
|
3
|
+
|
2
4
|
Bundler::GemHelper.install_tasks
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
-
|
6
|
+
Rake::TestTask.new(:default) do |t|
|
7
|
+
t.libs << "test"
|
8
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
7
9
|
end
|