junctions 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +50 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +45 -0
- data/LICENSE +21 -0
- data/README.md +49 -0
- data/junctions.gemspec +29 -0
- data/lib/junctions/engine.rb +30 -110
- data/lib/junctions/version.rb +4 -2
- data/lib/junctions.rb +11 -0
- data/test/junctions_test.rb +25 -3
- data/test/lib/common/wibble_extensions.rb +14 -0
- data/test/lib/metal/wibble_extensions.rb +11 -0
- data/test/lib/plastic/wibble_extensions.rb +7 -0
- data/test/lib/wibble.rb +8 -0
- data/test/lib/wobble.rb +8 -0
- data/test/test_helper.rb +1 -17
- metadata +78 -127
- data/lib/junctions/brand_methods.rb +0 -35
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/javascripts/easy_checks.js +0 -2
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/assets/stylesheets/easy_checks.css +0 -4
- data/test/dummy/app/assets/stylesheets/scaffold.css +0 -56
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/controllers/easy_checks_controller.rb +0 -58
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/helpers/easy_checks_helper.rb +0 -2
- data/test/dummy/app/models/easy_check.rb +0 -2
- data/test/dummy/app/views/easy_checks/_form.html.erb +0 -17
- data/test/dummy/app/views/easy_checks/edit.html.erb +0 -6
- data/test/dummy/app/views/easy_checks/index.html.erb +0 -25
- data/test/dummy/app/views/easy_checks/new.html.erb +0 -5
- data/test/dummy/app/views/easy_checks/show.html.erb +0 -4
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -29
- data/test/dummy/config/application.rb +0 -26
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/brands/databases/core/database.yml +0 -50
- data/test/dummy/config/brands/databases/dumdeedee/database.yml +0 -50
- data/test/dummy/config/brands/environments/core/development.rb +0 -13
- data/test/dummy/config/brands/environments/core/production.rb +0 -77
- data/test/dummy/config/brands/environments/core/test.rb +0 -42
- data/test/dummy/config/brands/environments/dumdeedee/development.rb +0 -4
- data/test/dummy/config/brands/environments/dumdeedee/production.rb +0 -77
- data/test/dummy/config/brands/environments/dumdeedee/test.rb +0 -42
- data/test/dummy/config/database.yml +0 -50
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -41
- data/test/dummy/config/environments/production.rb +0 -77
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -23
- data/test/dummy/config/routes.rb +0 -7
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/config.ru +0 -4
- data/test/dummy/db/migrate/20141118121139_create_easy_checks.rb +0 -8
- data/test/dummy/db/schema.rb +0 -36
- data/test/dummy/lib/brands/app/views/dumdeedee/easy_checks/index.html.erb +0 -25
- data/test/dummy/public/404.html +0 -67
- data/test/dummy/public/422.html +0 -67
- data/test/dummy/public/500.html +0 -66
- data/test/dummy/test/controllers/easy_checks_controller_test.rb +0 -49
- data/test/dummy/test/fixtures/easy_checks.yml +0 -11
- data/test/dummy/test/models/easy_check_test.rb +0 -7
- data/test/integration/navigation_test.rb +0 -10
- data/test/lib/generators/junctions/model_generator_test.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46968c8faf2deace067f63346169d31d0edeb70364bee6307aa3e16e1a58d654
|
4
|
+
data.tar.gz: e115486975b7d8642ea174899a85164cbba670420b8521ded913f29ddfebab10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 772a897be5bc58ff2f5a48b725c4d4baf5a62e241ff5cf810569b28d4abe5d1fbf77df2879a94c0431d06ae3cff369fa5642f14ca20f1b56087ce7fc584e04b3
|
7
|
+
data.tar.gz: e6d4a97ce751b35da00e77bd1cf9296f10900e273118b3494c0fc8e0eea8987fc29d935eb1b9c9fdc7b57735888d03cd60629abadd451eed8c825db6b42ef7c4
|
data/.gitignore
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
## Specific to RubyMotion:
|
17
|
+
.dat*
|
18
|
+
.repl_history
|
19
|
+
build/
|
20
|
+
*.bridgesupport
|
21
|
+
build-iPhoneOS/
|
22
|
+
build-iPhoneSimulator/
|
23
|
+
|
24
|
+
## Specific to RubyMotion (use of CocoaPods):
|
25
|
+
#
|
26
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
27
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
28
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
29
|
+
#
|
30
|
+
# vendor/Pods/
|
31
|
+
|
32
|
+
## Documentation cache and generated files:
|
33
|
+
/.yardoc/
|
34
|
+
/_yardoc/
|
35
|
+
/doc/
|
36
|
+
/rdoc/
|
37
|
+
|
38
|
+
## Environment normalization:
|
39
|
+
/.bundle/
|
40
|
+
/vendor/bundle
|
41
|
+
/lib/bundler/man/
|
42
|
+
|
43
|
+
# for a library or gem, you might want to ignore these files since the code is
|
44
|
+
# intended to run in multiple environments; otherwise, check them in:
|
45
|
+
# Gemfile.lock
|
46
|
+
# .ruby-version
|
47
|
+
# .ruby-gemset
|
48
|
+
|
49
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
50
|
+
.rvmrc
|
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Declare your gem's dependencies in junctions.gemspec.
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
+
# development dependencies will be added by default to the :development group.
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
# Declare any dependencies that are still in development here instead of in
|
9
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
10
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
11
|
+
# your gem to rubygems.org.
|
12
|
+
|
13
|
+
# To use a debugger
|
14
|
+
# gem 'byebug', group: [:development, :test]
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
junctions (0.0.2)
|
5
|
+
activesupport
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activesupport (5.2.0)
|
11
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
+
i18n (>= 0.7, < 2)
|
13
|
+
minitest (~> 5.1)
|
14
|
+
tzinfo (~> 1.1)
|
15
|
+
concurrent-ruby (1.0.5)
|
16
|
+
config_files (0.1.3)
|
17
|
+
activesupport
|
18
|
+
docile (1.3.0)
|
19
|
+
i18n (1.0.1)
|
20
|
+
concurrent-ruby (~> 1.0)
|
21
|
+
json (2.1.0)
|
22
|
+
minitest (5.11.3)
|
23
|
+
rake (12.3.1)
|
24
|
+
simplecov (0.16.1)
|
25
|
+
docile (~> 1.1)
|
26
|
+
json (>= 1.8, < 3)
|
27
|
+
simplecov-html (~> 0.10.0)
|
28
|
+
simplecov-html (0.10.2)
|
29
|
+
thread_safe (0.3.6)
|
30
|
+
tzinfo (1.2.5)
|
31
|
+
thread_safe (~> 0.1)
|
32
|
+
|
33
|
+
PLATFORMS
|
34
|
+
ruby
|
35
|
+
|
36
|
+
DEPENDENCIES
|
37
|
+
bundler
|
38
|
+
config_files
|
39
|
+
junctions!
|
40
|
+
minitest
|
41
|
+
rake
|
42
|
+
simplecov
|
43
|
+
|
44
|
+
BUNDLED WITH
|
45
|
+
1.16.1
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2010 Paul McKibbin
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Junctions
|
2
|
+
Layered junctioning for Rails. Feature flags done right.
|
3
|
+
|
4
|
+
Junctions works by enabling conditional namespaced module inclusion. What that actually means is that features
|
5
|
+
in a module can be enabled or disable by creating them in a particular namespace. For example:
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
module Core
|
9
|
+
include Junctions
|
10
|
+
def overridden_method
|
11
|
+
puts('You are in core')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
module Wibble
|
16
|
+
def overridden_method
|
17
|
+
puts('Wibble')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
module Wobble
|
22
|
+
def overridden_method
|
23
|
+
puts('Something else')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
```
|
27
|
+
Including Junctions in Core means that if there is a 'junctions' setting as, for example, an environment variable
|
28
|
+
```bash
|
29
|
+
junctions=wibble, wobble
|
30
|
+
```
|
31
|
+
would first load up Core, then Wibble and finally Wobble as modules and include each of them in turn. This has the effect of
|
32
|
+
overriding the 'overridden_method' inside Core to display 'Something else' as the message.
|
33
|
+
Likewise if the environment variable were:
|
34
|
+
```bash
|
35
|
+
junctions=wibble
|
36
|
+
```
|
37
|
+
This would only include Wibble into the list of namespaces to override Core methods.
|
38
|
+
|
39
|
+
Ruby and Rails Versions
|
40
|
+
|
41
|
+
Junctions has been built for Ruby 2.5 and Rails 5. Although it was originally built for Ruby 1.8 and Rails 2,
|
42
|
+
because of fundamental changes to later versions of rails and engines in particular, the decision was made to
|
43
|
+
track the latest Rails version only.
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
data/junctions.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
$:.push File.expand_path('../lib', __FILE__)
|
2
|
+
|
3
|
+
# Maintain your gem's version:
|
4
|
+
require 'junctions'
|
5
|
+
|
6
|
+
# Describe your gem and declare its dependencies:
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'junctions'
|
9
|
+
s.version = Rails::Junctions::VERSION
|
10
|
+
s.authors = ['Paul McKibbin']
|
11
|
+
s.email = ['pmckibbin@gmail.com']
|
12
|
+
s.homepage = 'http://blackrat.org'
|
13
|
+
s.summary = 'Summary of Junctions.'
|
14
|
+
s.description = 'Description of Junctions.'
|
15
|
+
s.license = 'MIT'
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split($/)
|
18
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
20
|
+
s.require_paths = ['lib']
|
21
|
+
|
22
|
+
s.add_dependency 'activesupport', '~> 0'
|
23
|
+
|
24
|
+
s.add_development_dependency 'bundler', '~> 0'
|
25
|
+
s.add_development_dependency 'rake', '~> 0'
|
26
|
+
s.add_development_dependency 'minitest', '~> 0'
|
27
|
+
s.add_development_dependency 'simplecov', '~> 0'
|
28
|
+
s.add_development_dependency 'config_files', '~> 0'
|
29
|
+
end
|
data/lib/junctions/engine.rb
CHANGED
@@ -1,126 +1,46 @@
|
|
1
|
+
require 'active_support/inflector'
|
1
2
|
module Junctions
|
2
|
-
class Engine
|
3
|
-
isolate_namespace Junctions
|
4
|
-
|
5
|
-
@brand_list=nil
|
3
|
+
class Engine
|
6
4
|
class << self
|
7
|
-
|
8
|
-
|
9
|
-
def get_initializer_roots(*args)
|
10
|
-
args.map do |arg|
|
11
|
-
root=ENV[arg]
|
12
|
-
root && root.split(',') or nil
|
13
|
-
end.flatten.compact << 'core'
|
14
|
-
end
|
15
|
-
|
16
|
-
def brand_list
|
17
|
-
@brand_list||=get_initializer_roots('brand')
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
|
22
|
-
private
|
23
|
-
def all_features(&blk)
|
24
|
-
[:cells,:controllers,:decorators,:helpers,:mailers,:models,:notifications,:observers,:policies,:reports].each do |feature|
|
25
|
-
yield feature
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def base_config(config)
|
30
|
-
config.paths.add 'lib/brands', eager_load: true, glob: '*'
|
31
|
-
config.paths.add 'lib/brands/lib', eager_load: true, glob: '*'
|
32
|
-
all_features do |feature|
|
33
|
-
config.paths.add "lib/brands/app/#{feature}", eager_load: true, glob: '*'
|
34
|
-
config.paths.add "app/#{feature}", eager_load: true, glob: '*'
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def brand_config(config, brand)
|
39
|
-
config.paths.add "lib/brands/#{brand}", eager_load: true, glob: '*'
|
40
|
-
config.paths.add "lib/brands/lib/#{brand}", eager_load: true, glob: '*'
|
41
|
-
all_features do |feature|
|
42
|
-
config.paths.add "lib/brands/app/#{feature}/#{brand}"
|
43
|
-
config.paths.add "app/#{feature}/#{brand}"
|
44
|
-
end
|
45
|
-
end
|
5
|
+
public
|
6
|
+
attr_writer :junction_list, :core
|
46
7
|
|
47
|
-
|
48
|
-
|
49
|
-
Pathname.new("app/views/#{brand}").expand_path,
|
50
|
-
Pathname.new("lib/brands/app/views/#{brand}").expand_path
|
51
|
-
]
|
52
|
-
end
|
53
|
-
|
54
|
-
def for_all_brands_reversed(&blk)
|
55
|
-
brand_list.reverse.each do |brand|
|
56
|
-
yield brand
|
8
|
+
def junction_list
|
9
|
+
@junction_list||=get_initializer_roots('junctions')
|
57
10
|
end
|
58
|
-
end
|
59
11
|
|
60
|
-
|
61
|
-
|
62
|
-
yield brand
|
12
|
+
def core
|
13
|
+
@core||='core'
|
63
14
|
end
|
64
|
-
end
|
65
|
-
|
66
|
-
def already_in_root?(app)
|
67
|
-
root.to_s.match app.root.to_s
|
68
|
-
end
|
69
|
-
|
70
|
-
public
|
71
|
-
def brand_list
|
72
|
-
self.class.brand_list
|
73
|
-
end
|
74
|
-
|
75
15
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
#TODO unless you overwrite it.
|
83
|
-
app.config.paths['config/database'] = "config/brands/databases/#{brand}/database.yml"
|
84
|
-
app.config.paths['config.routes.rb'] = "config/brands/routes/#{brand}/routes.rb"
|
16
|
+
private
|
17
|
+
def get_initializer_roots(*args)
|
18
|
+
args.map do |arg|
|
19
|
+
root=ENV[arg]
|
20
|
+
root && root.split(',') or nil
|
21
|
+
end.flatten.compact << core
|
85
22
|
end
|
86
|
-
# app.config.paths['config/database'],old_db='',app.config.paths['config/database']
|
87
|
-
# app.config.paths['config/routes.rb'],old_routes='',app.config.paths['config/routes']
|
88
|
-
# for_all_brands do |brand|
|
89
|
-
# app.config.paths['config/database'] = "config/brands/databases/#{brand}/database.yml"
|
90
|
-
# app.config.paths['config.routes.rb'] = "config/brands/routes/#{brand}/routes.rb"
|
91
|
-
# end
|
92
|
-
# app.config.paths['config/database'] << old_db
|
93
|
-
# app.config.paths['config/routes.rb'] << old_routes
|
94
|
-
end
|
95
23
|
|
96
|
-
|
97
|
-
|
98
|
-
config.paths['db/migrate'].expanded.each do |expanded_path|
|
99
|
-
app.config.paths['db/migrate'] << expanded_path
|
100
|
-
end
|
24
|
+
def junction_classes
|
25
|
+
junction_list.reverse
|
101
26
|
end
|
102
|
-
end
|
103
27
|
|
104
|
-
|
105
|
-
|
106
|
-
|
28
|
+
def switch_to_junction(junction_class, base, base_name)
|
29
|
+
name=base_name.gsub("#{core.classify}::", "#{junction_class}::")
|
30
|
+
begin
|
31
|
+
require(name.underscore)
|
32
|
+
base.instance_eval {
|
33
|
+
include name.constantize
|
34
|
+
} if name.gsub(/::[^:]*$/, '').constantize.const_defined?(name.demodulize)
|
35
|
+
rescue Exception => e
|
36
|
+
puts(e.message)
|
37
|
+
puts(e.backtrace)
|
38
|
+
end unless base_name==name
|
107
39
|
end
|
108
|
-
base_config(app.config)
|
109
|
-
app.config.paths.add 'lib/brands/app', eager_load: true, glob: '*'
|
110
|
-
end
|
111
40
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
view_config(brand).each do |brand_view|
|
116
|
-
ActiveSupport.on_load(:action_controller){
|
117
|
-
prepend_view_path(brand_view) if respond_to?(:prepend_view_path)
|
118
|
-
}
|
119
|
-
ActiveSupport.on_load(:action_mailer){
|
120
|
-
prepend_view_path(brand_view)
|
121
|
-
}
|
122
|
-
end
|
123
|
-
end
|
41
|
+
public
|
42
|
+
def activate(base, name)
|
43
|
+
junction_classes.each { |junction_class| switch_to_junction(junction_class.classify, base, name) }
|
124
44
|
end
|
125
45
|
end
|
126
46
|
end
|
data/lib/junctions/version.rb
CHANGED
data/lib/junctions.rb
CHANGED
data/test/junctions_test.rb
CHANGED
@@ -1,7 +1,29 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../lib'))
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
1
3
|
require 'test_helper'
|
4
|
+
require 'wibble'
|
5
|
+
require 'wobble'
|
2
6
|
|
3
|
-
class
|
4
|
-
|
5
|
-
|
7
|
+
class Junctions::Test < MiniTest::Spec
|
8
|
+
describe Junctions do
|
9
|
+
it 'is a module' do
|
10
|
+
assert_kind_of Module, Junctions
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe ::Wibble do
|
15
|
+
it 'has to_s overridden' do
|
16
|
+
assert_equal Wibble.new.to_s, 'metal'
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'has a metal method' do
|
20
|
+
assert_equal 'metal included too', Wibble.new.metal
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe ::Wobble do
|
25
|
+
it 'overrides the to_s from metal with its own method' do
|
26
|
+
assert_equal 'plastic included too', Wobble.new.metal
|
27
|
+
end
|
6
28
|
end
|
7
29
|
end
|
data/test/lib/wibble.rb
ADDED
data/test/lib/wobble.rb
ADDED
data/test/test_helper.rb
CHANGED
@@ -1,17 +1 @@
|
|
1
|
-
|
2
|
-
ENV["RAILS_ENV"] = "test"
|
3
|
-
|
4
|
-
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
5
|
-
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
6
|
-
ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
|
7
|
-
require "rails/test_help"
|
8
|
-
|
9
|
-
Rails.backtrace_cleaner.remove_silencers!
|
10
|
-
|
11
|
-
# Load support files
|
12
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
13
|
-
|
14
|
-
# Load fixtures from the engine
|
15
|
-
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
16
|
-
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
17
|
-
end
|
1
|
+
require 'minitest/autorun'
|