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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -1
  3. data/lib/schema_dev/gem.rb +47 -32
  4. data/lib/schema_dev/gemfiles.rb +15 -24
  5. data/lib/schema_dev/readme.rb +3 -3
  6. data/lib/schema_dev/ruby_selector.rb +22 -10
  7. data/lib/schema_dev/templates.rb +26 -0
  8. data/lib/schema_dev/version.rb +1 -1
  9. data/schema_dev.gemspec +1 -0
  10. data/spec/gem_spec.rb +16 -11
  11. data/spec/gemfiles_spec.rb +17 -8
  12. data/spec/runner_spec.rb +5 -5
  13. data/templates/README/installation.md.erb +6 -0
  14. data/templates/README/{uses.schema_dev.md → uses.schema_dev.md.erb} +1 -1
  15. data/templates/README/{uses.schema_monkey.md → uses.schema_monkey.md.erb} +1 -1
  16. data/templates/README/{uses.schema_plus_core.md → uses.schema_plus_core.md.erb} +1 -1
  17. data/templates/gem/{GEM_NAME.gemspec → GEM_NAME.gemspec.erb} +8 -8
  18. data/templates/gem/{Gemfile → Gemfile.erb} +0 -0
  19. data/templates/gem/{Gemfile.local → Gemfile.local.erb} +0 -0
  20. data/templates/gem/{LICENSE.txt → LICENSE.txt.erb} +1 -1
  21. data/templates/gem/README.md.erb +42 -0
  22. data/templates/gem/{Rakefile → Rakefile.erb} +0 -0
  23. data/templates/gem/{gitignore → gitignore.erb} +0 -0
  24. data/templates/gem/lib/GEM_BASE_NAME/version.rb.erb +3 -0
  25. data/templates/gem/lib/GEM_BASE_NAME.rb.erb +13 -0
  26. data/templates/gem/{schema_dev.yml → schema_dev.yml.erb} +0 -0
  27. data/templates/gem/spec/{sanity_spec.rb → sanity_spec.rb.erb} +0 -0
  28. data/templates/gem/spec/{spec_helper.rb → spec_helper.rb.erb} +1 -1
  29. data/templates/gemfiles/{Gemfile.base → Gemfile.base.erb} +0 -0
  30. data/templates/gemfiles/activerecord-3.2/{Gemfile.base → Gemfile.base.erb} +0 -0
  31. data/templates/gemfiles/activerecord-3.2/{Gemfile.mysql → Gemfile.mysql.erb} +0 -0
  32. data/templates/gemfiles/activerecord-3.2/{Gemfile.mysql2 → Gemfile.mysql2.erb} +0 -0
  33. data/templates/gemfiles/activerecord-3.2/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
  34. data/templates/gemfiles/activerecord-3.2/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
  35. data/templates/gemfiles/activerecord-4.0/{Gemfile.base → Gemfile.base.erb} +0 -0
  36. data/templates/gemfiles/activerecord-4.0/{Gemfile.mysql2 → Gemfile.mysql2.erb} +0 -0
  37. data/templates/gemfiles/activerecord-4.0/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
  38. data/templates/gemfiles/activerecord-4.0/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
  39. data/templates/gemfiles/activerecord-4.1/{Gemfile.base → Gemfile.base.erb} +0 -0
  40. data/templates/gemfiles/activerecord-4.1/{Gemfile.mysql2 → Gemfile.mysql2.erb} +0 -0
  41. data/templates/gemfiles/activerecord-4.1/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
  42. data/templates/gemfiles/activerecord-4.1/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
  43. data/templates/gemfiles/activerecord-4.2/{Gemfile.base → Gemfile.base.erb} +0 -0
  44. data/templates/gemfiles/activerecord-4.2/Gemfile.mysql2.erb +10 -0
  45. data/templates/gemfiles/activerecord-4.2/Gemfile.postgresql.erb +10 -0
  46. data/templates/gemfiles/activerecord-4.2/Gemfile.sqlite3.erb +10 -0
  47. data/templates/gemfiles/activerecord-4.2.0/{Gemfile.base → Gemfile.base.erb} +0 -0
  48. data/templates/gemfiles/activerecord-4.2.0/Gemfile.mysql2.erb +10 -0
  49. data/templates/gemfiles/activerecord-4.2.0/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
  50. data/templates/gemfiles/activerecord-4.2.0/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
  51. data/templates/gemfiles/activerecord-4.2.1/{Gemfile.base → Gemfile.base.erb} +0 -0
  52. data/templates/gemfiles/activerecord-4.2.1/Gemfile.mysql2.erb +10 -0
  53. data/templates/gemfiles/activerecord-4.2.1/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
  54. data/templates/gemfiles/activerecord-4.2.1/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
  55. data/templates/gemfiles/activerecord-4.2.6/Gemfile.base.erb +3 -0
  56. data/templates/gemfiles/activerecord-4.2.6/Gemfile.mysql2.erb +10 -0
  57. data/templates/gemfiles/{activerecord-4.2/Gemfile.postgresql → activerecord-4.2.6/Gemfile.postgresql.erb} +0 -0
  58. data/templates/gemfiles/{activerecord-4.2/Gemfile.sqlite3 → activerecord-4.2.6/Gemfile.sqlite3.erb} +0 -0
  59. data/templates/gemfiles/activerecord-edge/{Gemfile.base → Gemfile.base.erb} +0 -0
  60. data/templates/gemfiles/activerecord-edge/{Gemfile.mysql2 → Gemfile.mysql2.erb} +0 -0
  61. data/templates/gemfiles/activerecord-edge/{Gemfile.postgresql → Gemfile.postgresql.erb} +0 -0
  62. data/templates/gemfiles/activerecord-edge/{Gemfile.sqlite3 → Gemfile.sqlite3.erb} +0 -0
  63. metadata +66 -48
  64. data/templates/README/installation.md +0 -6
  65. data/templates/gem/README.md +0 -42
  66. data/templates/gem/lib/GEM_BASE_NAME/version.rb +0 -3
  67. data/templates/gem/lib/GEM_BASE_NAME.rb +0 -13
  68. data/templates/gemfiles/activerecord-4.2/Gemfile.mysql2 +0 -10
  69. data/templates/gemfiles/activerecord-4.2.0/Gemfile.mysql2 +0 -10
  70. 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: 1481d9f44def055ad1850c98749b75b61063ef60
4
- data.tar.gz: cec6c7efda4385d0c946c8f087a80b72bceabe4d
3
+ metadata.gz: c0bce6dcaccf91b8325859c4cc69162aa94c4787
4
+ data.tar.gz: e04e9b015e977bfc0f1386622c169a9a4e151902
5
5
  SHA512:
6
- metadata.gz: 299f0969a608665874d481ac1091f5f4f08d64c466bbf0b492c396d2bbb66a63c6d30b017de74fd47f2bf82fc424e23da868f102c4f2df9fe634a7dd983692f9
7
- data.tar.gz: 37e46f560ee1de6902fcd5dceea1755bf72a0e9b2a204aff8ea3f591ef19dff951d4c80b5623c81ecfd83e431a1eca04c86e2a14380798db117f0feaf9b7dd46
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 it's root, which specifies the testing matrix among other things.
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)
@@ -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
- FileUtils.cp_r Templates.root + "gem", gem_root
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 substitute_keys
110
- gem_root.find.each do |path|
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 schema_plus_core_version
136
- @core_version ||= begin
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
@@ -9,47 +9,38 @@ module SchemaDev
9
9
 
10
10
  def build(config)
11
11
  Dir.mktmpdir do |tmpdir|
12
- @src_root = Templates.root
13
- @dst_root = Pathname.new(tmpdir).realpath
12
+ @tmpdir = Pathname.new(tmpdir).realpath
14
13
 
15
- relpath = Pathname.new("gemfiles")
16
- abspath = @dst_root + relpath
17
- target_abspath = Pathname.new(".").realpath + relpath
14
+ gemfiles = Pathname("gemfiles")
15
+ tmp_root = @tmpdir + gemfiles
16
+ target_root = Pathname.new(".").realpath + gemfiles
18
17
 
19
- _copy(relpath, 'Gemfile.base')
18
+ _install gemfiles + 'Gemfile.base'
20
19
 
21
20
  config.activerecord.each do |activerecord|
22
-
23
- activerecord_path = relpath + "activerecord-#{activerecord}"
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
- _copy(activerecord_path, "Gemfile.#{db}")
24
+ _install activerecord_path + "Gemfile.#{db}"
28
25
  end
29
26
  end
30
27
 
31
- if `diff -rq #{abspath} gemfiles 2>&1 | grep -v lock`.length == 0
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
- _blow_away(target_abspath)
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 _copy(relpath, filename)
42
- srcfile = @src_root + relpath + filename
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 _blow_away(relpath)
51
- (@dst_root + relpath).rmtree
52
- rescue Errno::ENOENT
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
@@ -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).subs(newlines.join)
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.sub_ext('').to_s.upcase.tr('.', ' ')
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 ||= case
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 Chruby
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=`which bash` chruby-exec #{ruby} --"
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
- "rvm #{ruby} do"
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module SchemaDev
2
- VERSION = "3.5.1"
2
+ VERSION = "3.6.0"
3
3
  end
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
- context "flat gem" do
43
- Given(:gem_name) { "new_gem" }
44
- Then { expect(gemspec).to include %q{require 'new_gem/version'} }
45
- Then { expect(File.read "new_gem/lib/new_gem.rb").to include %q{SchemaMonkey.register NewGem} }
46
- end
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
- context "subdir gem" do
49
- Given(:gem_name) { "schema_plus_new_gem" }
50
- Then { expect(gemspec).to include %q{require 'schema_plus/new_gem/version'} }
51
- Then { expect(File.read "schema_plus_new_gem/lib/schema_plus_new_gem.rb").to include %q{require_relative 'schema_plus/new_gem'} }
52
- Then { expect(File.read "schema_plus_new_gem/lib/schema_plus/new_gem.rb").to include %q{SchemaMonkey.register SchemaPlus::NewGem} }
53
- end
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
@@ -19,14 +19,23 @@ describe SchemaDev::Gemfiles do
19
19
  end
20
20
 
21
21
  def relevant_diff(config, dir)
22
- src = SchemaDev::Templates.root + dir
23
- diff = `diff -rq #{src} #{dir} 2>&1`.split("\n")
24
-
25
- # expect copy not to have entry for activerecord not in config
26
- diff.reject!{ |d| d =~ %r[Only in #{src}: activerecord-(.*)] and not config.activerecord.include? $1 }
27
-
28
- # expect copy not to have entry for db not in config
29
- diff.reject!{ |d| d =~ %r[Only in #{src}.*: Gemfile.(.*)] and not config.db.include? $1 }
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=`which bash` chruby-exec ruby-#{RUBY_VERSION} --",
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 RubySelector to find selector
35
+ # mocking Which.which to find selector
34
36
  SchemaDev::RubySelector._reset
35
- Selectors.keys.each do |k|
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}")]
@@ -0,0 +1,6 @@
1
+ As usual:
2
+
3
+ ```ruby
4
+ gem "<%= gem_name %>" # in a Gemfile
5
+ gem.add_dependency "<%= gem_name %>" # in a .gemspec
6
+ ```
@@ -1,4 +1,4 @@
1
- * **schema_dev**: %GEM_MODULE% uses [schema_dev](https://github.com/SchemaPlus/schema_dev) to
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**: %GEM_MODULE% is implemented as a
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**: %GEM_MODULE% uses the SchemaPlus::Core API that
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 '%GEM_LIB_PATH%/version'
4
+ require '<%= gem_lib_path %>/version'
5
5
 
6
6
  Gem::Specification.new do |gem|
7
- gem.name = "%GEM_NAME%"
8
- gem.version = %GEM_MODULE%::VERSION
9
- gem.authors = ["%FULLNAME%"]
10
- gem.email = ["%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/%GEM_NAME%"
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", %SCHEMA_PLUS_CORE_DEPENDENCY%
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", %SCHEMA_DEV_DEPENDENCY%
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
@@ -1,4 +1,4 @@
1
- Copyright (c) %YEAR% %FULLNAME%
1
+ Copyright (c) <%= year %> <%= fullname %>
2
2
 
3
3
  MIT License
4
4
 
@@ -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,3 @@
1
+ module <%= gem_module %>
2
+ VERSION = "0.1.0"
3
+ end
@@ -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 %>
@@ -7,7 +7,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
7
7
 
8
8
  require 'rspec'
9
9
  require 'active_record'
10
- require '%GEM_NAME%'
10
+ require '<%= gem_name %>'
11
11
  require 'schema_dev/rspec'
12
12
 
13
13
  SchemaDev::Rspec.setup
@@ -0,0 +1,10 @@
1
+ require "pathname"
2
+ eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
+
4
+ platform :ruby do
5
+ gem 'mysql2', '~> 0.3.18'
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcmysql-adapter'
10
+ end
@@ -0,0 +1,10 @@
1
+ require "pathname"
2
+ eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
+
4
+ platform :ruby do
5
+ gem "pg"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcpostgresql-adapter'
10
+ end
@@ -0,0 +1,10 @@
1
+ require "pathname"
2
+ eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
+
4
+ platform :ruby do
5
+ gem "sqlite3"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcsqlite3-adapter', '>=1.3.0.beta2'
10
+ end
@@ -0,0 +1,10 @@
1
+ require "pathname"
2
+ eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
+
4
+ platform :ruby do
5
+ gem 'mysql2','>= 0.3.18', '< 0.5'
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcmysql-adapter'
10
+ end
@@ -0,0 +1,10 @@
1
+ require "pathname"
2
+ eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
+
4
+ platform :ruby do
5
+ gem 'mysql2', '~> 0.3.18'
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcmysql-adapter'
10
+ end
@@ -0,0 +1,3 @@
1
+ eval File.read File.expand_path('../../Gemfile.base', __FILE__)
2
+
3
+ gem "activerecord", "4.2.6"
@@ -0,0 +1,10 @@
1
+ require "pathname"
2
+ eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
+
4
+ platform :ruby do
5
+ gem "mysql2", '>= 0.3.18', '< 0.5'
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcmysql-adapter'
10
+ end
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.5.1
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: 2015-05-17 00:00:00.000000000 Z
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-edge/Gemfile.base
294
- - templates/gemfiles/activerecord-edge/Gemfile.mysql2
295
- - templates/gemfiles/activerecord-edge/Gemfile.postgresql
296
- - templates/gemfiles/activerecord-edge/Gemfile.sqlite3
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
@@ -1,6 +0,0 @@
1
- As usual:
2
-
3
- ```ruby
4
- gem "%GEM_NAME%" # in a Gemfile
5
- gem.add_dependency "%GEM_NAME%" # in a .gemspec
6
- ```
@@ -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,3 +0,0 @@
1
- module %GEM_MODULE%
2
- VERSION = "0.1.0"
3
- end
@@ -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%
@@ -1,10 +0,0 @@
1
- require "pathname"
2
- eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
-
4
- platform :ruby do
5
- gem "mysql2"
6
- end
7
-
8
- platform :jruby do
9
- gem 'activerecord-jdbcmysql-adapter'
10
- end
@@ -1,10 +0,0 @@
1
- require "pathname"
2
- eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
-
4
- platform :ruby do
5
- gem "mysql2"
6
- end
7
-
8
- platform :jruby do
9
- gem 'activerecord-jdbcmysql-adapter'
10
- end
@@ -1,10 +0,0 @@
1
- require "pathname"
2
- eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
-
4
- platform :ruby do
5
- gem "mysql2"
6
- end
7
-
8
- platform :jruby do
9
- gem 'activerecord-jdbcmysql-adapter'
10
- end