schema_dev 3.5.1 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/lib/schema_dev/gem.rb +47 -32
- data/lib/schema_dev/gemfiles.rb +15 -24
- data/lib/schema_dev/readme.rb +3 -3
- data/lib/schema_dev/ruby_selector.rb +22 -10
- data/lib/schema_dev/templates.rb +26 -0
- data/lib/schema_dev/version.rb +1 -1
- data/schema_dev.gemspec +1 -0
- data/spec/gem_spec.rb +16 -11
- data/spec/gemfiles_spec.rb +17 -8
- data/spec/runner_spec.rb +5 -5
- data/templates/README/installation.md.erb +6 -0
- data/templates/README/{uses.schema_dev.md → uses.schema_dev.md.erb} +1 -1
- data/templates/README/{uses.schema_monkey.md → uses.schema_monkey.md.erb} +1 -1
- data/templates/README/{uses.schema_plus_core.md → uses.schema_plus_core.md.erb} +1 -1
- data/templates/gem/{GEM_NAME.gemspec → GEM_NAME.gemspec.erb} +8 -8
- data/templates/gem/{Gemfile → Gemfile.erb} +0 -0
- data/templates/gem/{Gemfile.local → Gemfile.local.erb} +0 -0
- data/templates/gem/{LICENSE.txt → LICENSE.txt.erb} +1 -1
- data/templates/gem/README.md.erb +42 -0
- data/templates/gem/{Rakefile → Rakefile.erb} +0 -0
- data/templates/gem/{gitignore → gitignore.erb} +0 -0
- data/templates/gem/lib/GEM_BASE_NAME/version.rb.erb +3 -0
- data/templates/gem/lib/GEM_BASE_NAME.rb.erb +13 -0
- data/templates/gem/{schema_dev.yml → schema_dev.yml.erb} +0 -0
- data/templates/gem/spec/{sanity_spec.rb → sanity_spec.rb.erb} +0 -0
- data/templates/gem/spec/{spec_helper.rb → spec_helper.rb.erb} +1 -1
- data/templates/gemfiles/{Gemfile.base → Gemfile.base.erb} +0 -0
- data/templates/gemfiles/activerecord-3.2/{Gemfile.base → Gemfile.base.erb} +0 -0
- data/templates/gemfiles/activerecord-3.2/{Gemfile.mysql → Gemfile.mysql.erb} +0 -0
- data/templates/gemfiles/activerecord-3.2/{Gemfile.mysql2 → Gemfile.mysql2.erb} +0 -0
- data/templates/gemfiles/activerecord-3.2/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
- data/templates/gemfiles/activerecord-3.2/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
- data/templates/gemfiles/activerecord-4.0/{Gemfile.base → Gemfile.base.erb} +0 -0
- data/templates/gemfiles/activerecord-4.0/{Gemfile.mysql2 → Gemfile.mysql2.erb} +0 -0
- data/templates/gemfiles/activerecord-4.0/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
- data/templates/gemfiles/activerecord-4.0/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
- data/templates/gemfiles/activerecord-4.1/{Gemfile.base → Gemfile.base.erb} +0 -0
- data/templates/gemfiles/activerecord-4.1/{Gemfile.mysql2 → Gemfile.mysql2.erb} +0 -0
- data/templates/gemfiles/activerecord-4.1/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
- data/templates/gemfiles/activerecord-4.1/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
- data/templates/gemfiles/activerecord-4.2/{Gemfile.base → Gemfile.base.erb} +0 -0
- data/templates/gemfiles/activerecord-4.2/Gemfile.mysql2.erb +10 -0
- data/templates/gemfiles/activerecord-4.2/Gemfile.postgresql.erb +10 -0
- data/templates/gemfiles/activerecord-4.2/Gemfile.sqlite3.erb +10 -0
- data/templates/gemfiles/activerecord-4.2.0/{Gemfile.base → Gemfile.base.erb} +0 -0
- data/templates/gemfiles/activerecord-4.2.0/Gemfile.mysql2.erb +10 -0
- data/templates/gemfiles/activerecord-4.2.0/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
- data/templates/gemfiles/activerecord-4.2.0/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
- data/templates/gemfiles/activerecord-4.2.1/{Gemfile.base → Gemfile.base.erb} +0 -0
- data/templates/gemfiles/activerecord-4.2.1/Gemfile.mysql2.erb +10 -0
- data/templates/gemfiles/activerecord-4.2.1/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
- data/templates/gemfiles/activerecord-4.2.1/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
- data/templates/gemfiles/activerecord-4.2.6/Gemfile.base.erb +3 -0
- data/templates/gemfiles/activerecord-4.2.6/Gemfile.mysql2.erb +10 -0
- data/templates/gemfiles/{activerecord-4.2/Gemfile.postgresql → activerecord-4.2.6/Gemfile.postgresql.erb} +0 -0
- data/templates/gemfiles/{activerecord-4.2/Gemfile.sqlite3 → activerecord-4.2.6/Gemfile.sqlite3.erb} +0 -0
- data/templates/gemfiles/activerecord-edge/{Gemfile.base → Gemfile.base.erb} +0 -0
- data/templates/gemfiles/activerecord-edge/{Gemfile.mysql2 → Gemfile.mysql2.erb} +0 -0
- data/templates/gemfiles/activerecord-edge/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
- data/templates/gemfiles/activerecord-edge/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
- metadata +66 -48
- data/templates/README/installation.md +0 -6
- data/templates/gem/README.md +0 -42
- data/templates/gem/lib/GEM_BASE_NAME/version.rb +0 -3
- data/templates/gem/lib/GEM_BASE_NAME.rb +0 -13
- data/templates/gemfiles/activerecord-4.2/Gemfile.mysql2 +0 -10
- data/templates/gemfiles/activerecord-4.2.0/Gemfile.mysql2 +0 -10
- data/templates/gemfiles/activerecord-4.2.1/Gemfile.mysql2 +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0bce6dcaccf91b8325859c4cc69162aa94c4787
|
4
|
+
data.tar.gz: e04e9b015e977bfc0f1386622c169a9a4e151902
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deac22f0cd1788edc325dca993db634f24fa5df2f73b98f19601bbc059909bfd07719c407ff3f6af27707a446a9bc668eb1b3f90e76a22a4fcafbd7a4a1e48b6
|
7
|
+
data.tar.gz: 786d2927b14402be3db3f492a0216cdcdd1d4b50ea4f62b70f9c677d90a323ab02b84d44d8a5e8c8b2ec63df05be4a4a9c83ba291cabb593492b033354099411
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ Similar to `bundle gem`, this creates a skeleton structure for a new gem. The s
|
|
22
22
|
|
23
23
|
### schema_dev.yml
|
24
24
|
|
25
|
-
The client gem needs a file `schema_dev.yml` in
|
25
|
+
The client gem needs a file `schema_dev.yml` in its root, which specifies the testing matrix among other things.
|
26
26
|
|
27
27
|
* `ruby`: A single version of ruby, or a list of ruby versions.
|
28
28
|
* `activerecord`: A single version of ActiveRecord, or a list of ActiveRecord versions
|
@@ -130,3 +130,9 @@ The client gem's `Rakefile` includes:
|
|
130
130
|
require 'schema_dev/tasks'
|
131
131
|
|
132
132
|
Which defines the rake task `create_databases` and also a task for travis-ci
|
133
|
+
|
134
|
+
## History
|
135
|
+
|
136
|
+
Release notes for schema_dev versions:
|
137
|
+
|
138
|
+
* **3.6.0** - Add support for AR 4.2.6; fix mysql2 dependencies; internal improvements and bug fixes. Thanks to [@dmeranda](https://github.com/SchemaPlus/schema_dev/issues?q=is%3Apr+is%3Aopen+author%3Admeranda) and [@dholdren](https://github.com/SchemaPlus/schema_dev/issues?q=is%3Apr+is%3Aopen+author%3Adholdren)
|
data/lib/schema_dev/gem.rb
CHANGED
@@ -15,6 +15,47 @@ module SchemaDev
|
|
15
15
|
|
16
16
|
attr_accessor :gem_name, :gem_module, :gem_root, :gem_parent_name, :gem_base_name, :gem_lib_path, :fullname, :email
|
17
17
|
|
18
|
+
class TemplateEnv
|
19
|
+
extend Forwardable
|
20
|
+
|
21
|
+
def_delegators :@gem, :gem_name, :gem_module, :gem_root, :gem_parent_name, :gem_base_name, :gem_lib_path, :fullname, :email
|
22
|
+
|
23
|
+
def initialize(gem)
|
24
|
+
@gem = gem
|
25
|
+
end
|
26
|
+
|
27
|
+
def schema_plus_core_dependency
|
28
|
+
_dependency(self.class.schema_plus_core_version)
|
29
|
+
end
|
30
|
+
|
31
|
+
def schema_dev_dependency
|
32
|
+
_dependency(SchemaDev::VERSION)
|
33
|
+
end
|
34
|
+
|
35
|
+
def year
|
36
|
+
Time.now.strftime("%Y")
|
37
|
+
end
|
38
|
+
|
39
|
+
def get_binding
|
40
|
+
binding
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.schema_plus_core_version
|
44
|
+
@core_version ||= begin
|
45
|
+
gems = JSON.parse Faraday.get('https://rubygems.org/api/v1/versions/schema_plus_core.json').body
|
46
|
+
gems.reject(&it["prerelease"]).sort_by(&it["number"].split('.')).last["number"]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def _dependency(v)
|
51
|
+
major, minor, patch = v.split('.')
|
52
|
+
dep = %Q{"~> #{major}.#{minor}"}
|
53
|
+
dep += %Q{, ">= #{v}"} if patch != "0"
|
54
|
+
dep
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
18
59
|
def initialize(name)
|
19
60
|
self.gem_name = name.underscore
|
20
61
|
self.gem_root = Pathname.new(gem_name)
|
@@ -41,7 +82,6 @@ module SchemaDev
|
|
41
82
|
self.gem_root = self.gem_root.realpath
|
42
83
|
rename_files
|
43
84
|
fixup_subdir if @subdir
|
44
|
-
substitute_keys
|
45
85
|
freshen
|
46
86
|
git_init
|
47
87
|
puts <<-END.strip_heredoc
|
@@ -80,11 +120,11 @@ module SchemaDev
|
|
80
120
|
end
|
81
121
|
|
82
122
|
def copy_template
|
83
|
-
|
84
|
-
(gem_root + "gitignore").rename gem_root + ".gitignore"
|
123
|
+
Templates.install_subtree src: "gem", dst: gem_root, bound: template_binding
|
85
124
|
end
|
86
125
|
|
87
126
|
def rename_files
|
127
|
+
(gem_root + "gitignore").rename gem_root + ".gitignore"
|
88
128
|
Dir.glob(gem_root + "**/*GEM_NAME*").each do |path|
|
89
129
|
FileUtils.mv path, path.gsub(/GEM_NAME/, gem_name)
|
90
130
|
end
|
@@ -106,37 +146,12 @@ module SchemaDev
|
|
106
146
|
END
|
107
147
|
end
|
108
148
|
|
109
|
-
def
|
110
|
-
|
111
|
-
next unless path.file?
|
112
|
-
path.write subs(path.read)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
def subs(s)
|
117
|
-
s = s.gsub('%GEM_NAME%', gem_name)
|
118
|
-
s = s.gsub('%GEM_BASE_NAME%', gem_base_name)
|
119
|
-
s = s.gsub('%GEM_LIB_PATH%', gem_lib_path)
|
120
|
-
s = s.gsub('%GEM_MODULE%', gem_module)
|
121
|
-
s = s.gsub('%FULLNAME%', fullname)
|
122
|
-
s = s.gsub('%EMAIL%', email)
|
123
|
-
s = s.gsub('%SCHEMA_PLUS_CORE_DEPENDENCY%') { dependency(schema_plus_core_version) }
|
124
|
-
s = s.gsub('%SCHEMA_DEV_DEPENDENCY%', dependency(SchemaDev::VERSION))
|
125
|
-
s = s.gsub('%YEAR%', Time.now.strftime("%Y"))
|
126
|
-
end
|
127
|
-
|
128
|
-
def dependency(v)
|
129
|
-
major, minor, patch = v.split('.')
|
130
|
-
dep = %Q{"~> #{major}.#{minor}"}
|
131
|
-
dep += %Q{, ">= #{v}"} if patch != "0"
|
132
|
-
dep
|
149
|
+
def erb(s)
|
150
|
+
ERB.new(s).result template_binding
|
133
151
|
end
|
134
152
|
|
135
|
-
def
|
136
|
-
@
|
137
|
-
gems = JSON.parse Faraday.get('https://rubygems.org/api/v1/versions/schema_plus_core.json').body
|
138
|
-
gems.reject(&it["prerelease"]).sort_by(&it["number"].split('.')).last["number"]
|
139
|
-
end
|
153
|
+
def template_binding
|
154
|
+
@template_binding ||= TemplateEnv.new(self).get_binding
|
140
155
|
end
|
141
156
|
|
142
157
|
def freshen
|
data/lib/schema_dev/gemfiles.rb
CHANGED
@@ -9,47 +9,38 @@ module SchemaDev
|
|
9
9
|
|
10
10
|
def build(config)
|
11
11
|
Dir.mktmpdir do |tmpdir|
|
12
|
-
@
|
13
|
-
@dst_root = Pathname.new(tmpdir).realpath
|
12
|
+
@tmpdir = Pathname.new(tmpdir).realpath
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
gemfiles = Pathname("gemfiles")
|
15
|
+
tmp_root = @tmpdir + gemfiles
|
16
|
+
target_root = Pathname.new(".").realpath + gemfiles
|
18
17
|
|
19
|
-
|
18
|
+
_install gemfiles + 'Gemfile.base'
|
20
19
|
|
21
20
|
config.activerecord.each do |activerecord|
|
22
|
-
|
23
|
-
activerecord_path
|
24
|
-
_copy(activerecord_path, 'Gemfile.base')
|
25
|
-
|
21
|
+
activerecord_path = gemfiles + "activerecord-#{activerecord}"
|
22
|
+
_install activerecord_path + 'Gemfile.base'
|
26
23
|
config.db.each do |db|
|
27
|
-
|
24
|
+
_install activerecord_path + "Gemfile.#{db}"
|
28
25
|
end
|
29
26
|
end
|
30
27
|
|
31
|
-
if `diff -rq #{
|
28
|
+
if `diff -rq #{tmp_root} #{target_root} 2>&1 | grep -v lock`.length == 0
|
32
29
|
return false
|
33
30
|
end
|
34
31
|
|
35
|
-
|
36
|
-
abspath.rename(target_abspath)
|
32
|
+
_force_rename(tmp_root, target_root)
|
37
33
|
return true
|
38
34
|
end
|
39
35
|
end
|
40
36
|
|
41
|
-
def
|
42
|
-
|
43
|
-
dstfile = @dst_root + relpath + filename
|
44
|
-
return unless srcfile.exist?
|
45
|
-
|
46
|
-
dstfile.dirname.mkpath
|
47
|
-
FileUtils.copy_file(srcfile, dstfile)
|
37
|
+
def _install(relpath)
|
38
|
+
Templates.install_relative src: relpath, dst: @tmpdir
|
48
39
|
end
|
49
40
|
|
50
|
-
def
|
51
|
-
|
52
|
-
|
41
|
+
def _force_rename(src, dst)
|
42
|
+
dst.rmtree if dst.directory?
|
43
|
+
src.rename dst
|
53
44
|
end
|
54
45
|
end
|
55
46
|
end
|
data/lib/schema_dev/readme.rb
CHANGED
@@ -18,7 +18,7 @@ module SchemaDev
|
|
18
18
|
lines = readme.readlines
|
19
19
|
newlines = sub_matrix(lines.dup)
|
20
20
|
newlines = sub_templates(newlines)
|
21
|
-
newreadme = Gem.new(Pathname.pwd.basename.to_s).
|
21
|
+
newreadme = Gem.new(Pathname.pwd.basename.to_s).erb(newlines.join)
|
22
22
|
if newreadme != lines.join
|
23
23
|
readme.write newreadme
|
24
24
|
return true
|
@@ -38,14 +38,14 @@ module SchemaDev
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def sub_templates(lines)
|
41
|
-
Pathname.glob(SchemaDev::Templates.root + "README" + "*.md").each do |template|
|
41
|
+
Pathname.glob(SchemaDev::Templates.root + "README" + "*.md.erb").each do |template|
|
42
42
|
lines = sub_template(template, lines)
|
43
43
|
end
|
44
44
|
lines
|
45
45
|
end
|
46
46
|
|
47
47
|
def sub_template(template, lines)
|
48
|
-
key = template.basename.
|
48
|
+
key = template.basename(".md.erb").to_s.upcase.tr('.', ' ')
|
49
49
|
|
50
50
|
replace_block(lines, %r{^\s*<!-- SCHEMA_DEV: TEMPLATE #{key}}) do |contents|
|
51
51
|
contents << "<!-- SCHEMA_DEV: TEMPLATE #{key} - begin -->\n"
|
@@ -1,34 +1,46 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require 'which_works'
|
3
|
+
|
1
4
|
module SchemaDev
|
2
5
|
module RubySelector
|
3
6
|
def self.command(ruby)
|
4
|
-
@@selector ||=
|
5
|
-
when system('which -s chruby-exec') then Chruby
|
6
|
-
when system('which -s rvm') then Rvm
|
7
|
-
else Rbenv
|
8
|
-
end.new
|
7
|
+
@@selector ||= [Chruby, Rvm, Rbenv].find(&:installed?).andand.new || abort("No ruby version manager found")
|
9
8
|
@@selector.command ruby
|
10
9
|
end
|
11
10
|
def self._reset # for rspec, to avoid stickiness
|
12
11
|
@@selector = nil
|
13
12
|
end
|
14
13
|
|
15
|
-
class
|
14
|
+
class ManagerBase
|
15
|
+
def self.installed?
|
16
|
+
Which.which const_get :CORE_COMMAND
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class Chruby < ManagerBase
|
21
|
+
CORE_COMMAND = "chruby-exec"
|
22
|
+
|
16
23
|
def initialize
|
17
24
|
@rubies = Pathname.new(ENV['HOME']).join(".rubies").entries().map(&its.basename.to_s)
|
18
25
|
end
|
19
26
|
def command(ruby)
|
27
|
+
bash = Which.which 'bash' || abort("no bash shell found")
|
20
28
|
ruby = @rubies.select(&it =~ /^(ruby-)?#{ruby}(-p.*)?$/).last || ruby
|
21
|
-
"SHELL
|
29
|
+
"SHELL=#{bash} #{CORE_COMMAND} #{ruby} --"
|
22
30
|
end
|
23
31
|
end
|
24
32
|
|
25
|
-
class Rvm
|
33
|
+
class Rvm < ManagerBase
|
34
|
+
CORE_COMMAND = "rvm"
|
35
|
+
|
26
36
|
def command(ruby)
|
27
|
-
"
|
37
|
+
"#{CORE_COMMAND} #{ruby} do"
|
28
38
|
end
|
29
39
|
end
|
30
40
|
|
31
|
-
class Rbenv
|
41
|
+
class Rbenv < ManagerBase
|
42
|
+
CORE_COMMAND = "rbenv"
|
43
|
+
|
32
44
|
def initialize
|
33
45
|
# because we're running within a ruby program that was launched by
|
34
46
|
# rbenv, we already have various environment variables set up. need
|
data/lib/schema_dev/templates.rb
CHANGED
@@ -5,5 +5,31 @@ module SchemaDev
|
|
5
5
|
def self.root
|
6
6
|
@root ||= Pathname.new(__FILE__).dirname.parent.parent + "templates"
|
7
7
|
end
|
8
|
+
|
9
|
+
def self.install_subtree(src:, dst:, bound: nil)
|
10
|
+
src = root + src
|
11
|
+
Pathname.glob(src + "**/*").select(&:file?).each do |p|
|
12
|
+
_install(p, dst + p.relative_path_from(src).sub_ext(''), bound)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.install_relative(src:, dst:, bound: nil)
|
17
|
+
srcfile = @root + src
|
18
|
+
dstfile = dst + src
|
19
|
+
_install(srcfile, dstfile, bound)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self._install(src, dst, bound)
|
23
|
+
src = Pathname(src.to_s + ".erb") unless src.file?
|
24
|
+
dst.sub_ext '' if dst.extname == '.erb'
|
25
|
+
dst.dirname.mkpath
|
26
|
+
dst.write process(src.read, bound: bound)
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.process(text, bound: nil)
|
30
|
+
ERB.new(text).result(bound)
|
31
|
+
end
|
32
|
+
|
33
|
+
|
8
34
|
end
|
9
35
|
end
|
data/lib/schema_dev/version.rb
CHANGED
data/schema_dev.gemspec
CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_dependency "its-it"
|
27
27
|
spec.add_dependency "key_struct"
|
28
28
|
spec.add_dependency "thor"
|
29
|
+
spec.add_dependency "which_works"
|
29
30
|
|
30
31
|
spec.add_development_dependency "bundler", "~> 1.7"
|
31
32
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/spec/gem_spec.rb
CHANGED
@@ -34,25 +34,30 @@ describe SchemaDev::Gem do
|
|
34
34
|
When { SchemaDev::Gem.build gem_name }
|
35
35
|
|
36
36
|
When(:gemspec) { File.read "#{gem_name}/#{gem_name}.gemspec" }
|
37
|
+
When(:readme) { File.read "#{gem_name}/README.md" }
|
38
|
+
|
39
|
+
Invariant { expect(readme).to include %q{<!-- These lines are auto-generated by schema_dev based on schema_dev.yml -->} }
|
40
|
+
Invariant { expect(readme).to include %q{<!-- These lines are auto-inserted from a schema_dev template -->} }
|
37
41
|
|
38
42
|
Invariant { expect(gemspec).to include %q{"schema_plus_core", "~> 0.2", ">= 0.2.1"} }
|
39
43
|
Invariant { expect(gemspec).to match %r{authors.*#{user_name}} }
|
40
44
|
Invariant { expect(gemspec).to match %r{email.*#{user_email}} }
|
41
45
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
46
|
+
context "flat gem" do
|
47
|
+
Given(:gem_name) { "new_gem" }
|
48
|
+
Then { expect(gemspec).to include %q{require 'new_gem/version'} }
|
49
|
+
Then { expect(File.read "new_gem/lib/new_gem.rb").to include %q{SchemaMonkey.register NewGem} }
|
50
|
+
end
|
47
51
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
52
|
+
context "subdir gem" do
|
53
|
+
Given(:gem_name) { "schema_plus_new_gem" }
|
54
|
+
Then { expect(gemspec).to include %q{require 'schema_plus/new_gem/version'} }
|
55
|
+
Then { expect(File.read "schema_plus_new_gem/lib/schema_plus_new_gem.rb").to include %q{require_relative 'schema_plus/new_gem'} }
|
56
|
+
Then { expect(File.read "schema_plus_new_gem/lib/schema_plus/new_gem.rb").to include %q{SchemaMonkey.register SchemaPlus::NewGem} }
|
57
|
+
end
|
54
58
|
end
|
55
59
|
|
60
|
+
|
56
61
|
context "complains" do
|
57
62
|
|
58
63
|
context "when no git user.name" do
|
data/spec/gemfiles_spec.rb
CHANGED
@@ -19,14 +19,23 @@ describe SchemaDev::Gemfiles do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def relevant_diff(config, dir)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
22
|
+
Dir.mktmpdir do |no_erb_root|
|
23
|
+
no_erb_root = Pathname(no_erb_root)
|
24
|
+
erb_root = SchemaDev::Templates.root + dir
|
25
|
+
Pathname.glob(erb_root + "**/*").select(&:file?).each do |p|
|
26
|
+
d = (no_erb_root+p.relative_path_from(erb_root)).sub_ext('')
|
27
|
+
d.dirname.mkpath
|
28
|
+
d.write p.read
|
29
|
+
end
|
30
|
+
|
31
|
+
diff = `diff -rq #{no_erb_root} #{dir} 2>&1`.split("\n")
|
32
|
+
|
33
|
+
# expect copy not to have entry for activerecord not in config
|
34
|
+
diff.reject!{ |d| d =~ %r[Only in #{no_erb_root}: activerecord-(.*)] and not config.activerecord.include? $1 }
|
35
|
+
|
36
|
+
# expect copy not to have entry for db not in config
|
37
|
+
diff.reject!{ |d| d =~ %r[Only in #{no_erb_root}.*: Gemfile.(.*)] and not config.db.include? $1 }
|
38
|
+
end
|
30
39
|
end
|
31
40
|
|
32
41
|
end
|
data/spec/runner_spec.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'schema_dev/runner'
|
2
|
+
require 'which_works'
|
3
|
+
require 'pathname'
|
2
4
|
|
3
5
|
describe SchemaDev::Runner do
|
4
6
|
|
@@ -21,7 +23,7 @@ describe SchemaDev::Runner do
|
|
21
23
|
end
|
22
24
|
|
23
25
|
Selectors = {
|
24
|
-
'chruby-exec' => "SHELL
|
26
|
+
'chruby-exec' => "SHELL=/usr/local/bin/bash chruby-exec ruby-#{RUBY_VERSION} --",
|
25
27
|
'rvm' => "rvm #{RUBY_VERSION} do",
|
26
28
|
'rbenv' => "RBENV_VERSION=#{RUBY_VERSION}"
|
27
29
|
}
|
@@ -30,11 +32,9 @@ describe SchemaDev::Runner do
|
|
30
32
|
|
31
33
|
describe "matrix (#{selector})" do
|
32
34
|
before(:each) do
|
33
|
-
# mocking
|
35
|
+
# mocking Which.which to find selector
|
34
36
|
SchemaDev::RubySelector._reset
|
35
|
-
|
36
|
-
allow(SchemaDev::RubySelector).to receive(:system).with("which -s #{k}").and_return k == selector
|
37
|
-
end
|
37
|
+
allow(Which).to receive(:which) {|cmd| ["bash", selector].include?(cmd) ? "/usr/local/bin/#{cmd}" : nil }
|
38
38
|
case selector
|
39
39
|
when 'chruby-exec'
|
40
40
|
expect_any_instance_of(Pathname).to receive(:entries).and_return [Pathname.new("ruby-#{RUBY_VERSION}")]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
* **schema_dev**:
|
1
|
+
* **schema_dev**: <%= gem_module %> uses [schema_dev](https://github.com/SchemaPlus/schema_dev) to
|
2
2
|
facilitate running rspec tests on the matrix of ruby, activerecord, and database
|
3
3
|
versions that the gem supports, both locally and on
|
4
4
|
[travis-ci](http://travis-ci.org/SchemaPlus/%GEM_NAME%)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
* **schema_monkey**:
|
1
|
+
* **schema_monkey**: <%= gem_module %> is implemented as a
|
2
2
|
[schema_monkey](https://github.com/SchemaPlus/schema_monkey) client,
|
3
3
|
using [schema_monkey](https://github.com/SchemaPlus/schema_monkey)'s
|
4
4
|
convention-based protocols for extending ActiveRecord and using middleware stacks.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
* **schema_plus_core**:
|
1
|
+
* **schema_plus_core**: <%= gem_module %> uses the SchemaPlus::Core API that
|
2
2
|
provides middleware callback stacks to make it easy to extend
|
3
3
|
ActiveRecord's behavior. If that API is missing something you need for
|
4
4
|
your contribution, please head over to
|
@@ -1,16 +1,16 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require '<%= gem_lib_path %>/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
|
-
gem.name = "
|
8
|
-
gem.version =
|
9
|
-
gem.authors = ["
|
10
|
-
gem.email = ["
|
7
|
+
gem.name = "<%= gem_name %>"
|
8
|
+
gem.version = <%= gem_module %>::VERSION
|
9
|
+
gem.authors = ["<%= fullname %>"]
|
10
|
+
gem.email = ["<%= email %>"]
|
11
11
|
gem.summary = %q{TODO: Write a short summary. Required.}
|
12
12
|
gem.description = %q{TODO: Write a longer description. Optional.}
|
13
|
-
gem.homepage = "https://github.com/SchemaPlus
|
13
|
+
gem.homepage = "https://github.com/SchemaPlus/<%= gem_name %>"
|
14
14
|
gem.license = "MIT"
|
15
15
|
|
16
16
|
gem.files = `git ls-files -z`.split("\x0")
|
@@ -19,12 +19,12 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.require_paths = ["lib"]
|
20
20
|
|
21
21
|
gem.add_dependency "activerecord", "~> 4.2"
|
22
|
-
gem.add_dependency "schema_plus_core",
|
22
|
+
gem.add_dependency "schema_plus_core", <%= schema_plus_core_dependency %>
|
23
23
|
|
24
24
|
gem.add_development_dependency "bundler", "~> 1.7"
|
25
25
|
gem.add_development_dependency "rake", "~> 10.0"
|
26
26
|
gem.add_development_dependency "rspec", "~> 3.0"
|
27
|
-
gem.add_development_dependency "schema_dev",
|
27
|
+
gem.add_development_dependency "schema_dev", <%= schema_dev_dependency %>
|
28
28
|
gem.add_development_dependency "simplecov"
|
29
29
|
gem.add_development_dependency "simplecov-gem-profile"
|
30
30
|
end
|
File without changes
|
File without changes
|
@@ -0,0 +1,42 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/<%= gem_name %>.svg)](http://badge.fury.io/rb/<%= gem_name %>)
|
2
|
+
[![Build Status](https://secure.travis-ci.org/SchemaPlus/<%= gem_name %>.svg)](http://travis-ci.org/SchemaPlus/<%= gem_name %>)
|
3
|
+
[![Coverage Status](https://img.shields.io/coveralls/SchemaPlus/<%= gem_name %>.svg)](https://coveralls.io/r/SchemaPlus/<%= gem_name %>)
|
4
|
+
[![Dependency Status](https://gemnasium.com/lomba/<%= gem_name %>.svg)](https://gemnasium.com/SchemaPlus/<%= gem_name %>)
|
5
|
+
|
6
|
+
# <%= gem_module %>
|
7
|
+
|
8
|
+
TODO: Write a gem description
|
9
|
+
|
10
|
+
<%= gem_module %> is part of the [SchemaPlus](https://github.com/SchemaPlus/) family of Ruby on Rails ActiveRecord extension gems.
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
|
14
|
+
<!-- SCHEMA_DEV: TEMPLATE INSTALLATION -->
|
15
|
+
|
16
|
+
## Compatibility
|
17
|
+
|
18
|
+
<%= gem_module %> is tested on:
|
19
|
+
|
20
|
+
<!-- SCHEMA_DEV: MATRIX -->
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
TODO: Write usage instructions here
|
25
|
+
|
26
|
+
## History
|
27
|
+
|
28
|
+
* 0.1.0 - Initial release
|
29
|
+
|
30
|
+
## Development & Testing
|
31
|
+
|
32
|
+
Are you interested in contributing to <%= gem_module %>? Thanks! Please follow
|
33
|
+
the standard protocol: fork, feature branch, develop, push, and issue pull
|
34
|
+
request.
|
35
|
+
|
36
|
+
Some things to know about to help you develop and test:
|
37
|
+
|
38
|
+
<!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_DEV -->
|
39
|
+
|
40
|
+
<!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_PLUS_CORE -->
|
41
|
+
|
42
|
+
<!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_MONKEY -->
|
File without changes
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'schema_plus/core'
|
2
|
+
|
3
|
+
require_relative '<%= gem_base_name %>/version'
|
4
|
+
|
5
|
+
# Load any mixins to ActiveRecord modules, such as:
|
6
|
+
#
|
7
|
+
#require_relative '<%= gem_base_name %>/active_record/base'
|
8
|
+
|
9
|
+
# Load any middleware, such as:
|
10
|
+
#
|
11
|
+
# require_relative '<%= gem_base_name %>/middleware/model'
|
12
|
+
|
13
|
+
SchemaMonkey.register <%= gem_module %>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/templates/gemfiles/{activerecord-4.2/Gemfile.sqlite3 → activerecord-4.2.6/Gemfile.sqlite3.erb}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema_dev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ronen barzel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: which_works
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: bundler
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -248,52 +262,56 @@ files:
|
|
248
262
|
- spec/runner_spec.rb
|
249
263
|
- spec/spec_helper.rb
|
250
264
|
- spec/travis_spec.rb
|
251
|
-
- templates/README/installation.md
|
252
|
-
- templates/README/uses.schema_dev.md
|
253
|
-
- templates/README/uses.schema_monkey.md
|
254
|
-
- templates/README/uses.schema_plus_core.md
|
255
|
-
- templates/gem/GEM_NAME.gemspec
|
256
|
-
- templates/gem/Gemfile
|
257
|
-
- templates/gem/Gemfile.local
|
258
|
-
- templates/gem/LICENSE.txt
|
259
|
-
- templates/gem/README.md
|
260
|
-
- templates/gem/Rakefile
|
261
|
-
- templates/gem/gitignore
|
262
|
-
- templates/gem/lib/GEM_BASE_NAME.rb
|
263
|
-
- templates/gem/lib/GEM_BASE_NAME/version.rb
|
264
|
-
- templates/gem/schema_dev.yml
|
265
|
-
- templates/gem/spec/sanity_spec.rb
|
266
|
-
- templates/gem/spec/spec_helper.rb
|
267
|
-
- templates/gemfiles/Gemfile.base
|
268
|
-
- templates/gemfiles/activerecord-3.2/Gemfile.base
|
269
|
-
- templates/gemfiles/activerecord-3.2/Gemfile.mysql
|
270
|
-
- templates/gemfiles/activerecord-3.2/Gemfile.mysql2
|
271
|
-
- templates/gemfiles/activerecord-3.2/Gemfile.postgresql
|
272
|
-
- templates/gemfiles/activerecord-3.2/Gemfile.sqlite3
|
273
|
-
- templates/gemfiles/activerecord-4.0/Gemfile.base
|
274
|
-
- templates/gemfiles/activerecord-4.0/Gemfile.mysql2
|
275
|
-
- templates/gemfiles/activerecord-4.0/Gemfile.postgresql
|
276
|
-
- templates/gemfiles/activerecord-4.0/Gemfile.sqlite3
|
277
|
-
- templates/gemfiles/activerecord-4.1/Gemfile.base
|
278
|
-
- templates/gemfiles/activerecord-4.1/Gemfile.mysql2
|
279
|
-
- templates/gemfiles/activerecord-4.1/Gemfile.postgresql
|
280
|
-
- templates/gemfiles/activerecord-4.1/Gemfile.sqlite3
|
281
|
-
- templates/gemfiles/activerecord-4.2.0/Gemfile.base
|
282
|
-
- templates/gemfiles/activerecord-4.2.0/Gemfile.mysql2
|
283
|
-
- templates/gemfiles/activerecord-4.2.0/Gemfile.postgresql
|
284
|
-
- templates/gemfiles/activerecord-4.2.0/Gemfile.sqlite3
|
285
|
-
- templates/gemfiles/activerecord-4.2.1/Gemfile.base
|
286
|
-
- templates/gemfiles/activerecord-4.2.1/Gemfile.mysql2
|
287
|
-
- templates/gemfiles/activerecord-4.2.1/Gemfile.postgresql
|
288
|
-
- templates/gemfiles/activerecord-4.2.1/Gemfile.sqlite3
|
289
|
-
- templates/gemfiles/activerecord-4.2/Gemfile.base
|
290
|
-
- templates/gemfiles/activerecord-4.2/Gemfile.mysql2
|
291
|
-
- templates/gemfiles/activerecord-4.2/Gemfile.postgresql
|
292
|
-
- templates/gemfiles/activerecord-4.2/Gemfile.sqlite3
|
293
|
-
- templates/gemfiles/activerecord-
|
294
|
-
- templates/gemfiles/activerecord-
|
295
|
-
- templates/gemfiles/activerecord-
|
296
|
-
- templates/gemfiles/activerecord-
|
265
|
+
- templates/README/installation.md.erb
|
266
|
+
- templates/README/uses.schema_dev.md.erb
|
267
|
+
- templates/README/uses.schema_monkey.md.erb
|
268
|
+
- templates/README/uses.schema_plus_core.md.erb
|
269
|
+
- templates/gem/GEM_NAME.gemspec.erb
|
270
|
+
- templates/gem/Gemfile.erb
|
271
|
+
- templates/gem/Gemfile.local.erb
|
272
|
+
- templates/gem/LICENSE.txt.erb
|
273
|
+
- templates/gem/README.md.erb
|
274
|
+
- templates/gem/Rakefile.erb
|
275
|
+
- templates/gem/gitignore.erb
|
276
|
+
- templates/gem/lib/GEM_BASE_NAME.rb.erb
|
277
|
+
- templates/gem/lib/GEM_BASE_NAME/version.rb.erb
|
278
|
+
- templates/gem/schema_dev.yml.erb
|
279
|
+
- templates/gem/spec/sanity_spec.rb.erb
|
280
|
+
- templates/gem/spec/spec_helper.rb.erb
|
281
|
+
- templates/gemfiles/Gemfile.base.erb
|
282
|
+
- templates/gemfiles/activerecord-3.2/Gemfile.base.erb
|
283
|
+
- templates/gemfiles/activerecord-3.2/Gemfile.mysql.erb
|
284
|
+
- templates/gemfiles/activerecord-3.2/Gemfile.mysql2.erb
|
285
|
+
- templates/gemfiles/activerecord-3.2/Gemfile.postgresql.erb
|
286
|
+
- templates/gemfiles/activerecord-3.2/Gemfile.sqlite3.erb
|
287
|
+
- templates/gemfiles/activerecord-4.0/Gemfile.base.erb
|
288
|
+
- templates/gemfiles/activerecord-4.0/Gemfile.mysql2.erb
|
289
|
+
- templates/gemfiles/activerecord-4.0/Gemfile.postgresql.erb
|
290
|
+
- templates/gemfiles/activerecord-4.0/Gemfile.sqlite3.erb
|
291
|
+
- templates/gemfiles/activerecord-4.1/Gemfile.base.erb
|
292
|
+
- templates/gemfiles/activerecord-4.1/Gemfile.mysql2.erb
|
293
|
+
- templates/gemfiles/activerecord-4.1/Gemfile.postgresql.erb
|
294
|
+
- templates/gemfiles/activerecord-4.1/Gemfile.sqlite3.erb
|
295
|
+
- templates/gemfiles/activerecord-4.2.0/Gemfile.base.erb
|
296
|
+
- templates/gemfiles/activerecord-4.2.0/Gemfile.mysql2.erb
|
297
|
+
- templates/gemfiles/activerecord-4.2.0/Gemfile.postgresql.erb
|
298
|
+
- templates/gemfiles/activerecord-4.2.0/Gemfile.sqlite3.erb
|
299
|
+
- templates/gemfiles/activerecord-4.2.1/Gemfile.base.erb
|
300
|
+
- templates/gemfiles/activerecord-4.2.1/Gemfile.mysql2.erb
|
301
|
+
- templates/gemfiles/activerecord-4.2.1/Gemfile.postgresql.erb
|
302
|
+
- templates/gemfiles/activerecord-4.2.1/Gemfile.sqlite3.erb
|
303
|
+
- templates/gemfiles/activerecord-4.2.6/Gemfile.base.erb
|
304
|
+
- templates/gemfiles/activerecord-4.2.6/Gemfile.mysql2.erb
|
305
|
+
- templates/gemfiles/activerecord-4.2.6/Gemfile.postgresql.erb
|
306
|
+
- templates/gemfiles/activerecord-4.2.6/Gemfile.sqlite3.erb
|
307
|
+
- templates/gemfiles/activerecord-4.2/Gemfile.base.erb
|
308
|
+
- templates/gemfiles/activerecord-4.2/Gemfile.mysql2.erb
|
309
|
+
- templates/gemfiles/activerecord-4.2/Gemfile.postgresql.erb
|
310
|
+
- templates/gemfiles/activerecord-4.2/Gemfile.sqlite3.erb
|
311
|
+
- templates/gemfiles/activerecord-edge/Gemfile.base.erb
|
312
|
+
- templates/gemfiles/activerecord-edge/Gemfile.mysql2.erb
|
313
|
+
- templates/gemfiles/activerecord-edge/Gemfile.postgresql.erb
|
314
|
+
- templates/gemfiles/activerecord-edge/Gemfile.sqlite3.erb
|
297
315
|
homepage: https://github.com/SchemaPlus/schema_dev
|
298
316
|
licenses:
|
299
317
|
- MIT
|
data/templates/gem/README.md
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
[![Gem Version](https://badge.fury.io/rb/%GEM_NAME%.svg)](http://badge.fury.io/rb/%GEM_NAME%)
|
2
|
-
[![Build Status](https://secure.travis-ci.org/SchemaPlus/%GEM_NAME%.svg)](http://travis-ci.org/SchemaPlus/%GEM_NAME%)
|
3
|
-
[![Coverage Status](https://img.shields.io/coveralls/SchemaPlus/%GEM_NAME%.svg)](https://coveralls.io/r/SchemaPlus/%GEM_NAME%)
|
4
|
-
[![Dependency Status](https://gemnasium.com/lomba/%GEM_NAME%.svg)](https://gemnasium.com/SchemaPlus/%GEM_NAME%)
|
5
|
-
|
6
|
-
# %GEM_MODULE%
|
7
|
-
|
8
|
-
TODO: Write a gem description
|
9
|
-
|
10
|
-
%GEM_MODULE% is part of the [SchemaPlus](https://github.com/SchemaPlus/) family of Ruby on Rails ActiveRecord extension gems.
|
11
|
-
|
12
|
-
## Installation
|
13
|
-
|
14
|
-
<!-- SCHEMA_DEV: TEMPLATE INSTALLATION -->
|
15
|
-
|
16
|
-
## Compatibility
|
17
|
-
|
18
|
-
%GEM_MODULE% is tested on:
|
19
|
-
|
20
|
-
<!-- SCHEMA_DEV: MATRIX -->
|
21
|
-
|
22
|
-
## Usage
|
23
|
-
|
24
|
-
TODO: Write usage instructions here
|
25
|
-
|
26
|
-
## History
|
27
|
-
|
28
|
-
* 0.1.0 - Initial release
|
29
|
-
|
30
|
-
## Development & Testing
|
31
|
-
|
32
|
-
Are you interested in contributing to %GEM_MODULE%? Thanks! Please follow
|
33
|
-
the standard protocol: fork, feature branch, develop, push, and issue pull
|
34
|
-
request.
|
35
|
-
|
36
|
-
Some things to know about to help you develop and test:
|
37
|
-
|
38
|
-
<!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_DEV -->
|
39
|
-
|
40
|
-
<!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_PLUS_CORE -->
|
41
|
-
|
42
|
-
<!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_MONKEY -->
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'schema_plus/core'
|
2
|
-
|
3
|
-
require_relative '%GEM_BASE_NAME%/version'
|
4
|
-
|
5
|
-
# Load any mixins to ActiveRecord modules, such as:
|
6
|
-
#
|
7
|
-
#require_relative '%GEM_BASE_NAME%/active_record/base'
|
8
|
-
|
9
|
-
# Load any middleware, such as:
|
10
|
-
#
|
11
|
-
# require_relative '%GEM_BASE_NAME%/middleware/model'
|
12
|
-
|
13
|
-
SchemaMonkey.register %GEM_MODULE%
|