automodel-sqlserver 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +81 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +5 -0
  7. data/.yardopts +1 -0
  8. data/Gemfile +6 -0
  9. data/Gemfile.lock +82 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +225 -0
  12. data/Rakefile +6 -0
  13. data/automodel-sqlserver.gemspec +39 -0
  14. data/bin/console +14 -0
  15. data/bin/setup +8 -0
  16. data/docs/Automodel.html +161 -0
  17. data/docs/Automodel/AdapterAlreadyRegistered.html +144 -0
  18. data/docs/Automodel/AdapterAlreadyRegisteredError.html +144 -0
  19. data/docs/Automodel/CannotFindOnCompoundPrimaryKey.html +144 -0
  20. data/docs/Automodel/Connectors.html +117 -0
  21. data/docs/Automodel/Error.html +140 -0
  22. data/docs/Automodel/FindOnCompoundPrimaryKeyError.html +144 -0
  23. data/docs/Automodel/Helpers.html +722 -0
  24. data/docs/Automodel/NameCollisionError.html +143 -0
  25. data/docs/Automodel/SchemaInspector.html +1046 -0
  26. data/docs/Automodel/UnregisteredAdapter.html +144 -0
  27. data/docs/_index.html +206 -0
  28. data/docs/class_list.html +51 -0
  29. data/docs/css/common.css +1 -0
  30. data/docs/css/full_list.css +58 -0
  31. data/docs/css/style.css +496 -0
  32. data/docs/file.README.html +333 -0
  33. data/docs/file_list.html +56 -0
  34. data/docs/frames.html +17 -0
  35. data/docs/index.html +333 -0
  36. data/docs/js/app.js +292 -0
  37. data/docs/js/full_list.js +216 -0
  38. data/docs/js/jquery.js +4 -0
  39. data/docs/method_list.html +155 -0
  40. data/docs/top-level-namespace.html +478 -0
  41. data/lib/automodel.rb +132 -0
  42. data/lib/automodel/automodel.rb +4 -0
  43. data/lib/automodel/connectors.rb +8 -0
  44. data/lib/automodel/errors.rb +24 -0
  45. data/lib/automodel/helpers.rb +141 -0
  46. data/lib/automodel/schema_inspector.rb +218 -0
  47. data/lib/automodel/version.rb +10 -0
  48. data/samples/database.yml +38 -0
  49. metadata +259 -0
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,39 @@
1
+
2
+ lib = File.expand_path('lib', __dir__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'automodel/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'automodel-sqlserver'
8
+ spec.version = Automodel::VERSION
9
+ spec.authors = ['Nestor Custodio']
10
+ spec.email = ['sakimorix@gmail.com']
11
+
12
+ spec.summary = 'A fork of "automodel" with the proper dependencies for use with SQL Server.'
13
+ spec.homepage = 'https://www.github.com/nestor-custodio/automodel-sqlserver'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = 'exe'
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ['lib']
22
+
23
+ spec.add_development_dependency 'bundler', '~> 1.16'
24
+ spec.add_development_dependency 'pry', '~> 0.11'
25
+ spec.add_development_dependency 'pry-byebug', '~> 3.6'
26
+ spec.add_development_dependency 'rake', '~> 10.0'
27
+ spec.add_development_dependency 'rspec', '~> 3.0'
28
+ spec.add_development_dependency 'rspec_junit_formatter', '~> 0.3'
29
+
30
+ ## Database adapters for development and testing.
31
+ ##
32
+ spec.add_development_dependency 'mysql2', '~> 0.5.1'
33
+ spec.add_development_dependency 'pg', '~> 0.21'
34
+ spec.add_development_dependency 'sqlite3', '~> 1.3.13'
35
+
36
+ spec.add_dependency 'activerecord', '~> 4.2'
37
+ spec.add_dependency 'activerecord-sqlserver-adapter', '~> 4.2.0'
38
+ spec.add_dependency 'tiny_tds', '~> 2.1.2'
39
+ end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'automodel'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,161 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Automodel
8
+
9
+ &mdash; Documentation by YARD 0.9.14
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Automodel";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (A)</a> &raquo;
40
+
41
+
42
+ <span class="title">Automodel</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Automodel
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/automodel/automodel.rb<span class="defines">,<br />
82
+ lib/automodel/errors.rb,<br /> lib/automodel/helpers.rb,<br /> lib/automodel/version.rb,<br /> lib/automodel/connectors.rb,<br /> lib/automodel/schema_inspector.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Overview</h2><div class="docstring">
89
+ <div class="discussion">
90
+
91
+ <p>The root module for the <strong>automodel-sqlserver</strong> gem.</p>
92
+
93
+
94
+ </div>
95
+ </div>
96
+ <div class="tags">
97
+
98
+
99
+ </div><h2>Defined Under Namespace</h2>
100
+ <p class="children">
101
+
102
+
103
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Automodel/Connectors.html" title="Automodel::Connectors (module)">Connectors</a></span>, <span class='object_link'><a href="Automodel/Helpers.html" title="Automodel::Helpers (module)">Helpers</a></span>
104
+
105
+
106
+
107
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Automodel/AdapterAlreadyRegisteredError.html" title="Automodel::AdapterAlreadyRegisteredError (class)">AdapterAlreadyRegisteredError</a></span>, <span class='object_link'><a href="Automodel/Error.html" title="Automodel::Error (class)">Error</a></span>, <span class='object_link'><a href="Automodel/FindOnCompoundPrimaryKeyError.html" title="Automodel::FindOnCompoundPrimaryKeyError (class)">FindOnCompoundPrimaryKeyError</a></span>, <span class='object_link'><a href="Automodel/NameCollisionError.html" title="Automodel::NameCollisionError (class)">NameCollisionError</a></span>, <span class='object_link'><a href="Automodel/SchemaInspector.html" title="Automodel::SchemaInspector (class)">SchemaInspector</a></span>
108
+
109
+
110
+ </p>
111
+
112
+
113
+ <h2>
114
+ Constant Summary
115
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
116
+ </h2>
117
+
118
+ <dl class="constants">
119
+
120
+ <dt id="VERSION-constant" class="">VERSION =
121
+ <div class="docstring">
122
+ <div class="discussion">
123
+
124
+ <p>The canonical <strong>automodel-sqlserver</strong> gem version.</p>
125
+
126
+ <p>This should only ever be updated <em>immediately</em> before a release; the
127
+ commit that updates this value should be pushed <strong>by</strong> the
128
+ <code>rake release</code> process.</p>
129
+
130
+
131
+ </div>
132
+ </div>
133
+ <div class="tags">
134
+
135
+
136
+ </div>
137
+ </dt>
138
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
139
+
140
+ </dl>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+ </div>
152
+
153
+ <div id="footer">
154
+ Generated on Wed Jun 20 18:16:10 2018 by
155
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
156
+ 0.9.14 (ruby-2.4.4).
157
+ </div>
158
+
159
+ </div>
160
+ </body>
161
+ </html>
@@ -0,0 +1,144 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Exception: Automodel::AdapterAlreadyRegistered
8
+
9
+ &mdash; Documentation by YARD 0.9.14
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Automodel::AdapterAlreadyRegistered";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (A)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Automodel.html" title="Automodel (module)">Automodel</a></span></span>
41
+ &raquo;
42
+ <span class="title">AdapterAlreadyRegistered</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Exception: Automodel::AdapterAlreadyRegistered
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Error.html" title="Automodel::Error (class)">Error</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="Error.html" title="Automodel::Error (class)">Error</a></span></li>
80
+
81
+ <li class="next">Automodel::AdapterAlreadyRegistered</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/automodel/errors.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>An error resulting from an attempt to register the same adapter name with
110
+ <span class='object_link'><a href="SchemaInspector.html#register_adapter-class_method" title="Automodel::SchemaInspector.register_adapter (method)">SchemaInspector.register_adapter</a></span> multiple times.</p>
111
+
112
+
113
+ </div>
114
+ </div>
115
+ <div class="tags">
116
+
117
+
118
+ </div>
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ </div>
135
+
136
+ <div id="footer">
137
+ Generated on Thu Jun 14 14:06:16 2018 by
138
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
139
+ 0.9.14 (ruby-2.5.1).
140
+ </div>
141
+
142
+ </div>
143
+ </body>
144
+ </html>
@@ -0,0 +1,144 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Exception: Automodel::AdapterAlreadyRegisteredError
8
+
9
+ &mdash; Documentation by YARD 0.9.14
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Automodel::AdapterAlreadyRegisteredError";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (A)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Automodel.html" title="Automodel (module)">Automodel</a></span></span>
41
+ &raquo;
42
+ <span class="title">AdapterAlreadyRegisteredError</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Exception: Automodel::AdapterAlreadyRegisteredError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Error.html" title="Automodel::Error (class)">Error</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="Error.html" title="Automodel::Error (class)">Error</a></span></li>
80
+
81
+ <li class="next">Automodel::AdapterAlreadyRegisteredError</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/automodel/errors.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>An error resulting from an attempt to register the same adapter name with
110
+ <span class='object_link'><a href="SchemaInspector.html#register_adapter-class_method" title="Automodel::SchemaInspector.register_adapter (method)">SchemaInspector.register_adapter</a></span> multiple times.</p>
111
+
112
+
113
+ </div>
114
+ </div>
115
+ <div class="tags">
116
+
117
+
118
+ </div>
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ </div>
135
+
136
+ <div id="footer">
137
+ Generated on Wed Jun 20 18:16:10 2018 by
138
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
139
+ 0.9.14 (ruby-2.4.4).
140
+ </div>
141
+
142
+ </div>
143
+ </body>
144
+ </html>