baza 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +157 -0
- data/Gemfile +11 -9
- data/Gemfile.lock +41 -9
- data/README.md +1 -1
- data/Rakefile +19 -16
- data/VERSION +1 -1
- data/baza.gemspec +31 -7
- data/config/best_project_practice_rubocop.yml +2 -0
- data/config/best_project_practice_rubocop_todo.yml +157 -0
- data/lib/baza/base_sql_driver.rb +79 -20
- data/lib/baza/cloner.rb +2 -2
- data/lib/baza/column.rb +6 -0
- data/lib/baza/database.rb +33 -0
- data/lib/baza/database_model.rb +26 -0
- data/lib/baza/database_model_functionality.rb +10 -0
- data/lib/baza/database_model_name.rb +16 -0
- data/lib/baza/db.rb +210 -413
- data/lib/baza/dbtime.rb +20 -20
- data/lib/baza/driver.rb +3 -3
- data/lib/baza/drivers/active_record/columns.rb +1 -1
- data/lib/baza/drivers/active_record/indexes.rb +1 -1
- data/lib/baza/drivers/active_record/result.rb +3 -5
- data/lib/baza/drivers/active_record/tables.rb +2 -2
- data/lib/baza/drivers/active_record.rb +30 -16
- data/lib/baza/drivers/mysql/column.rb +51 -48
- data/lib/baza/drivers/mysql/columns.rb +8 -8
- data/lib/baza/drivers/mysql/database.rb +28 -0
- data/lib/baza/drivers/mysql/databases.rb +35 -0
- data/lib/baza/drivers/mysql/index.rb +32 -22
- data/lib/baza/drivers/mysql/result.rb +24 -24
- data/lib/baza/drivers/mysql/sqlspecs.rb +1 -1
- data/lib/baza/drivers/mysql/table.rb +80 -91
- data/lib/baza/drivers/mysql/tables.rb +30 -32
- data/lib/baza/drivers/mysql/unbuffered_result.rb +5 -5
- data/lib/baza/drivers/mysql.rb +127 -220
- data/lib/baza/drivers/mysql2/database.rb +2 -0
- data/lib/baza/drivers/mysql2/databases.rb +2 -0
- data/lib/baza/drivers/mysql2/result.rb +3 -5
- data/lib/baza/drivers/mysql2.rb +21 -106
- data/lib/baza/drivers/mysql_java/database.rb +2 -0
- data/lib/baza/drivers/mysql_java/databases.rb +2 -0
- data/lib/baza/drivers/mysql_java.rb +16 -12
- data/lib/baza/drivers/sqlite3/column.rb +33 -33
- data/lib/baza/drivers/sqlite3/columns.rb +6 -6
- data/lib/baza/drivers/sqlite3/database.rb +2 -0
- data/lib/baza/drivers/sqlite3/databases.rb +25 -0
- data/lib/baza/drivers/sqlite3/index.rb +20 -6
- data/lib/baza/drivers/sqlite3/result.rb +16 -17
- data/lib/baza/drivers/sqlite3/sqlspecs.rb +1 -1
- data/lib/baza/drivers/sqlite3/table.rb +99 -100
- data/lib/baza/drivers/sqlite3/tables.rb +30 -23
- data/lib/baza/drivers/sqlite3/unbuffered_result.rb +2 -2
- data/lib/baza/drivers/sqlite3.rb +27 -14
- data/lib/baza/drivers/sqlite3_java/database.rb +2 -0
- data/lib/baza/drivers/sqlite3_java/unbuffered_result.rb +2 -2
- data/lib/baza/drivers/sqlite3_java.rb +12 -10
- data/lib/baza/drivers/sqlite3_rhodes.rb +9 -7
- data/lib/baza/dump.rb +55 -55
- data/lib/baza/errors.rb +5 -0
- data/lib/baza/idquery.rb +25 -25
- data/lib/baza/index.rb +6 -0
- data/lib/baza/jdbc_driver.rb +6 -8
- data/lib/baza/jdbc_result.rb +1 -1
- data/lib/baza/model.rb +299 -309
- data/lib/baza/model_custom.rb +74 -72
- data/lib/baza/model_handler.rb +244 -255
- data/lib/baza/model_handler_sqlhelper.rb +122 -132
- data/lib/baza/mysql_base_driver.rb +112 -0
- data/lib/baza/query_buffer.rb +23 -23
- data/lib/baza/result_base.rb +2 -2
- data/lib/baza/revision.rb +67 -67
- data/lib/baza/row.rb +82 -84
- data/lib/baza/sqlspecs.rb +1 -1
- data/lib/baza/table.rb +31 -0
- data/lib/baza.rb +43 -10
- data/shippable.yml +1 -0
- data/spec/cloner_spec.rb +4 -4
- data/spec/drivers/active_record_mysql2_spec.rb +3 -3
- data/spec/drivers/active_record_mysql_spec.rb +2 -2
- data/spec/drivers/active_record_sqlite3_spec.rb +2 -2
- data/spec/drivers/mysql2_spec.rb +1 -0
- data/spec/drivers/mysql_spec.rb +1 -0
- data/spec/drivers/sqlite3_spec.rb +4 -5
- data/spec/info_active_record_example.rb +4 -6
- data/spec/info_active_record_mysql.rb +6 -7
- data/spec/info_active_record_mysql2.rb +2 -4
- data/spec/info_active_record_mysql2_shippable.rb +2 -4
- data/spec/info_active_record_mysql_shippable.rb +2 -4
- data/spec/info_active_record_sqlite3.rb +5 -6
- data/spec/info_mysql2_example.rb +1 -1
- data/spec/info_mysql2_shippable.rb +1 -1
- data/spec/info_mysql_example.rb +1 -1
- data/spec/info_mysql_shippable.rb +1 -1
- data/spec/info_sqlite3.rb +4 -3
- data/spec/model_handler_spec.rb +102 -115
- data/spec/spec_helper.rb +5 -5
- data/spec/support/driver_collection.rb +98 -95
- data/spec/support/driver_columns_collection.rb +18 -22
- data/spec/support/driver_databases_collection.rb +29 -0
- data/spec/support/driver_indexes_collection.rb +7 -6
- data/spec/support/driver_tables_collection.rb +38 -26
- metadata +49 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85d196d2212dbbf2e122af961fdd24d2e1cf3780
|
4
|
+
data.tar.gz: 7a152c76b592f65b10a15893bbf840c098f9fb4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c033941c1f337b9a0ec1d7bdf50ef16fd9c1d8320668a15c0c609b2904680e2a31ae5b6d1bb8bf2299c98fb3faecbe32af130f262ee4401b6851cd029a56edb
|
7
|
+
data.tar.gz: bc8b87924b3d92d39bc94cf546310b095e6965a15696bb9600cb13337353fd2fa1536a59841b5363dec2a9bc09b860961007c82720ab93b8c6e9ce00dbc4bd01
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
# This configuration was generated by
|
4
|
+
# `rubocop --auto-gen-config`
|
5
|
+
# on 2015-12-20 21:21:20 +0100 using RuboCop version 0.35.1.
|
6
|
+
# The point is for the user to remove these configuration records
|
7
|
+
# one by one as the offenses are removed from the code base.
|
8
|
+
# Note that changes in the inspected code, or installation of new
|
9
|
+
# versions of RuboCop, may require this file to be generated again.
|
10
|
+
|
11
|
+
# Offense count: 43
|
12
|
+
# Configuration parameters: AllowSafeAssignment.
|
13
|
+
Lint/AssignmentInCondition:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
# Offense count: 1
|
17
|
+
Lint/ConditionPosition:
|
18
|
+
Exclude:
|
19
|
+
- 'lib/baza/model_handler.rb'
|
20
|
+
|
21
|
+
# Offense count: 2
|
22
|
+
Lint/HandleExceptions:
|
23
|
+
Exclude:
|
24
|
+
- 'spec/model_handler_spec.rb'
|
25
|
+
|
26
|
+
# Offense count: 1
|
27
|
+
Lint/NonLocalExitFromIterator:
|
28
|
+
Exclude:
|
29
|
+
- 'lib/baza/drivers/sqlite3/column.rb'
|
30
|
+
|
31
|
+
# Offense count: 8
|
32
|
+
Lint/ShadowingOuterLocalVariable:
|
33
|
+
Exclude:
|
34
|
+
- 'lib/baza/drivers/mysql/table.rb'
|
35
|
+
- 'lib/baza/drivers/sqlite3/table.rb'
|
36
|
+
- 'lib/baza/model_handler.rb'
|
37
|
+
- 'lib/baza/model_handler_sqlhelper.rb'
|
38
|
+
- 'lib/baza/revision.rb'
|
39
|
+
- 'spec/model_handler_spec.rb'
|
40
|
+
|
41
|
+
# Offense count: 1
|
42
|
+
Lint/UselessAccessModifier:
|
43
|
+
Exclude:
|
44
|
+
- 'lib/baza/model.rb'
|
45
|
+
|
46
|
+
# Offense count: 34
|
47
|
+
Lint/UselessAssignment:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
# Offense count: 51
|
51
|
+
Metrics/AbcSize:
|
52
|
+
Max: 558
|
53
|
+
|
54
|
+
# Offense count: 22
|
55
|
+
Metrics/BlockNesting:
|
56
|
+
Max: 6
|
57
|
+
|
58
|
+
# Offense count: 7
|
59
|
+
# Configuration parameters: CountComments.
|
60
|
+
Metrics/ClassLength:
|
61
|
+
Max: 684
|
62
|
+
|
63
|
+
# Offense count: 67
|
64
|
+
Metrics/CyclomaticComplexity:
|
65
|
+
Max: 128
|
66
|
+
|
67
|
+
# Offense count: 31
|
68
|
+
# Configuration parameters: AllowURI, URISchemes.
|
69
|
+
Metrics/LineLength:
|
70
|
+
Max: 311
|
71
|
+
|
72
|
+
# Offense count: 8
|
73
|
+
# Configuration parameters: CountComments.
|
74
|
+
Metrics/MethodLength:
|
75
|
+
Max: 382
|
76
|
+
|
77
|
+
# Offense count: 66
|
78
|
+
Metrics/PerceivedComplexity:
|
79
|
+
Max: 160
|
80
|
+
|
81
|
+
# Offense count: 1
|
82
|
+
Style/AccessorMethodName:
|
83
|
+
Exclude:
|
84
|
+
- 'lib/baza/db.rb'
|
85
|
+
|
86
|
+
# Offense count: 1
|
87
|
+
Style/AsciiComments:
|
88
|
+
Exclude:
|
89
|
+
- 'lib/baza/db.rb'
|
90
|
+
|
91
|
+
# Offense count: 1
|
92
|
+
Style/CaseEquality:
|
93
|
+
Exclude:
|
94
|
+
- 'lib/baza/drivers/mysql/result.rb'
|
95
|
+
|
96
|
+
# Offense count: 3
|
97
|
+
Style/ClassVars:
|
98
|
+
Exclude:
|
99
|
+
- 'lib/baza/model.rb'
|
100
|
+
- 'lib/baza/model_custom.rb'
|
101
|
+
|
102
|
+
# Offense count: 1
|
103
|
+
Style/EndOfLine:
|
104
|
+
Exclude:
|
105
|
+
- 'lib/baza/drivers/mysql.rb'
|
106
|
+
|
107
|
+
# Offense count: 1
|
108
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
109
|
+
Style/FormatString:
|
110
|
+
Exclude:
|
111
|
+
- 'lib/baza/row.rb'
|
112
|
+
|
113
|
+
# Offense count: 11
|
114
|
+
# Configuration parameters: AllowedVariables.
|
115
|
+
Style/GlobalVars:
|
116
|
+
Exclude:
|
117
|
+
- 'lib/baza/db.rb'
|
118
|
+
- 'lib/baza/model_custom.rb'
|
119
|
+
- 'lib/baza/row.rb'
|
120
|
+
|
121
|
+
# Offense count: 16
|
122
|
+
# Configuration parameters: MinBodyLength.
|
123
|
+
Style/GuardClause:
|
124
|
+
Exclude:
|
125
|
+
- 'lib/baza/db.rb'
|
126
|
+
- 'lib/baza/drivers/mysql/result.rb'
|
127
|
+
- 'lib/baza/drivers/sqlite3/result.rb'
|
128
|
+
- 'lib/baza/drivers/sqlite3_java/unbuffered_result.rb'
|
129
|
+
- 'lib/baza/idquery.rb'
|
130
|
+
- 'lib/baza/model.rb'
|
131
|
+
- 'lib/baza/model_handler.rb'
|
132
|
+
- 'lib/baza/query_buffer.rb'
|
133
|
+
- 'lib/baza/row.rb'
|
134
|
+
|
135
|
+
# Offense count: 1
|
136
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
137
|
+
Style/MethodName:
|
138
|
+
Enabled: false
|
139
|
+
|
140
|
+
# Offense count: 9
|
141
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
142
|
+
Style/PredicateName:
|
143
|
+
Exclude:
|
144
|
+
- 'lib/baza/model.rb'
|
145
|
+
- 'lib/baza/model_custom.rb'
|
146
|
+
- 'lib/baza/row.rb'
|
147
|
+
|
148
|
+
# Offense count: 2
|
149
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
150
|
+
Style/RaiseArgs:
|
151
|
+
Enabled: false
|
152
|
+
|
153
|
+
# Offense count: 1
|
154
|
+
# Cop supports --auto-correct.
|
155
|
+
# Configuration parameters: WordRegex.
|
156
|
+
Style/WordArray:
|
157
|
+
MinSize: 2
|
data/Gemfile
CHANGED
@@ -7,7 +7,7 @@ gem "datet", "~> 0.0.25"
|
|
7
7
|
gem "wref", "~> 0.0.8"
|
8
8
|
gem "array_enumerator", "~> 0.0.10"
|
9
9
|
gem "string-cases", "~> 0.0.1"
|
10
|
-
gem
|
10
|
+
gem "event_handler", "~> 0.0.0"
|
11
11
|
|
12
12
|
# Add dependencies to develop your gem here.
|
13
13
|
# Include everything needed to run rake, tests, features, etc.
|
@@ -16,14 +16,16 @@ group :development, :test do
|
|
16
16
|
gem "rdoc"
|
17
17
|
gem "bundler"
|
18
18
|
gem "jeweler"
|
19
|
-
gem
|
20
|
-
gem
|
21
|
-
gem
|
22
|
-
gem
|
23
|
-
gem
|
24
|
-
gem
|
25
|
-
gem
|
26
|
-
gem "activerecord"
|
19
|
+
gem "pry"
|
20
|
+
gem "jdbc-sqlite3", platform: :jruby
|
21
|
+
gem "jdbc-mysql", platform: :jruby
|
22
|
+
gem "activerecord-jdbc-adapter", platform: :jruby
|
23
|
+
gem "sqlite3", platform: :ruby
|
24
|
+
gem "mysql", platform: :ruby
|
25
|
+
gem "mysql2", platform: :ruby
|
26
|
+
gem "activerecord", "4.2.5"
|
27
|
+
gem "best_practice_project", github: "kaspernj/best_practice_project", require: false
|
28
|
+
gem "rubocop", "0.35.1", require: false
|
27
29
|
end
|
28
30
|
|
29
31
|
gem "codeclimate-test-reporter", group: :test, require: nil
|
data/Gemfile.lock
CHANGED
@@ -1,24 +1,34 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git://github.com/kaspernj/best_practice_project.git
|
3
|
+
revision: 0044e7efed0ee0f7b42f8acc662617812a38c5b1
|
4
|
+
specs:
|
5
|
+
best_practice_project (0.0.5)
|
6
|
+
psych (~> 2.0.0)
|
7
|
+
|
1
8
|
GEM
|
2
9
|
remote: http://rubygems.org/
|
3
10
|
specs:
|
4
|
-
activemodel (4.2.
|
5
|
-
activesupport (= 4.2.
|
11
|
+
activemodel (4.2.5)
|
12
|
+
activesupport (= 4.2.5)
|
6
13
|
builder (~> 3.1)
|
7
|
-
activerecord (4.2.
|
8
|
-
activemodel (= 4.2.
|
9
|
-
activesupport (= 4.2.
|
14
|
+
activerecord (4.2.5)
|
15
|
+
activemodel (= 4.2.5)
|
16
|
+
activesupport (= 4.2.5)
|
10
17
|
arel (~> 6.0)
|
11
18
|
activerecord-jdbc-adapter (1.3.17)
|
12
19
|
activerecord (>= 2.2)
|
13
|
-
activesupport (4.2.
|
20
|
+
activesupport (4.2.5)
|
14
21
|
i18n (~> 0.7)
|
15
22
|
json (~> 1.7, >= 1.7.7)
|
16
23
|
minitest (~> 5.1)
|
17
24
|
thread_safe (~> 0.3, >= 0.3.4)
|
18
25
|
tzinfo (~> 1.1)
|
19
26
|
addressable (2.3.8)
|
20
|
-
arel (6.0.
|
27
|
+
arel (6.0.3)
|
21
28
|
array_enumerator (0.0.10)
|
29
|
+
ast (2.2.0)
|
30
|
+
astrolabe (1.3.1)
|
31
|
+
parser (~> 2.2)
|
22
32
|
builder (3.2.2)
|
23
33
|
codeclimate-test-reporter (0.4.7)
|
24
34
|
simplecov (>= 0.7.1, < 1.0.0)
|
@@ -44,6 +54,7 @@ GEM
|
|
44
54
|
hashie (3.4.2)
|
45
55
|
highline (1.7.2)
|
46
56
|
i18n (0.7.0)
|
57
|
+
jar-dependencies (0.3.1)
|
47
58
|
jdbc-mysql (5.1.35)
|
48
59
|
jdbc-sqlite3 (3.8.10.1)
|
49
60
|
jeweler (2.0.1)
|
@@ -60,7 +71,7 @@ GEM
|
|
60
71
|
jwt (1.5.1)
|
61
72
|
method_source (0.8.2)
|
62
73
|
mini_portile (0.6.2)
|
63
|
-
minitest (5.
|
74
|
+
minitest (5.8.3)
|
64
75
|
multi_json (1.11.2)
|
65
76
|
multi_xml (0.5.5)
|
66
77
|
multipart-post (2.0.0)
|
@@ -75,6 +86,9 @@ GEM
|
|
75
86
|
multi_json (~> 1.3)
|
76
87
|
multi_xml (~> 0.5)
|
77
88
|
rack (~> 1.2)
|
89
|
+
parser (2.2.3.0)
|
90
|
+
ast (>= 1.1, < 3.0)
|
91
|
+
powerpack (0.1.1)
|
78
92
|
pry (0.10.1)
|
79
93
|
coderay (~> 1.1.0)
|
80
94
|
method_source (~> 0.8.1)
|
@@ -84,7 +98,11 @@ GEM
|
|
84
98
|
method_source (~> 0.8.1)
|
85
99
|
slop (~> 3.4)
|
86
100
|
spoon (~> 0.0)
|
101
|
+
psych (2.0.16)
|
102
|
+
psych (2.0.16-java)
|
103
|
+
jar-dependencies (>= 0.1.7)
|
87
104
|
rack (1.6.4)
|
105
|
+
rainbow (2.0.0)
|
88
106
|
rake (10.4.2)
|
89
107
|
rdoc (4.2.0)
|
90
108
|
json (~> 1.4)
|
@@ -101,6 +119,14 @@ GEM
|
|
101
119
|
diff-lcs (>= 1.2.0, < 2.0)
|
102
120
|
rspec-support (~> 3.3.0)
|
103
121
|
rspec-support (3.3.0)
|
122
|
+
rubocop (0.35.1)
|
123
|
+
astrolabe (~> 1.3)
|
124
|
+
parser (>= 2.2.3.0, < 3.0)
|
125
|
+
powerpack (~> 0.1)
|
126
|
+
rainbow (>= 1.99.1, < 3.0)
|
127
|
+
ruby-progressbar (~> 1.7)
|
128
|
+
tins (<= 1.6.0)
|
129
|
+
ruby-progressbar (1.7.5)
|
104
130
|
simplecov (0.10.0)
|
105
131
|
docile (~> 1.1.0)
|
106
132
|
json (~> 1.8)
|
@@ -113,6 +139,7 @@ GEM
|
|
113
139
|
string-cases (0.0.1)
|
114
140
|
thread_safe (0.3.5)
|
115
141
|
thread_safe (0.3.5-java)
|
142
|
+
tins (1.6.0)
|
116
143
|
tzinfo (1.2.2)
|
117
144
|
thread_safe (~> 0.1)
|
118
145
|
wref (0.0.8)
|
@@ -122,9 +149,10 @@ PLATFORMS
|
|
122
149
|
ruby
|
123
150
|
|
124
151
|
DEPENDENCIES
|
125
|
-
activerecord
|
152
|
+
activerecord (= 4.2.5)
|
126
153
|
activerecord-jdbc-adapter
|
127
154
|
array_enumerator (~> 0.0.10)
|
155
|
+
best_practice_project!
|
128
156
|
bundler
|
129
157
|
codeclimate-test-reporter
|
130
158
|
datet (~> 0.0.25)
|
@@ -137,6 +165,10 @@ DEPENDENCIES
|
|
137
165
|
pry
|
138
166
|
rdoc
|
139
167
|
rspec
|
168
|
+
rubocop (= 0.35.1)
|
140
169
|
sqlite3
|
141
170
|
string-cases (~> 0.0.1)
|
142
171
|
wref (~> 0.0.8)
|
172
|
+
|
173
|
+
BUNDLED WITH
|
174
|
+
1.10.6
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[![Code Climate](https://codeclimate.com/github/kaspernj/baza/badges/gpa.svg)](https://codeclimate.com/github/kaspernj/baza)
|
2
2
|
[![Test Coverage](https://codeclimate.com/github/kaspernj/baza/badges/coverage.svg)](https://codeclimate.com/github/kaspernj/baza)
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://img.shields.io/shippable/540e7b993479c5ea8f9ec1fe.svg)](https://app.shippable.com/projects/540e7b993479c5ea8f9ec1fe/builds/latest)
|
4
4
|
|
5
5
|
# baza
|
6
6
|
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "rubygems"
|
4
|
+
require "bundler"
|
5
5
|
begin
|
6
6
|
Bundler.setup(:default, :development)
|
7
7
|
rescue Bundler::BundlerError => e
|
@@ -9,41 +9,44 @@ rescue Bundler::BundlerError => e
|
|
9
9
|
$stderr.puts "Run `bundle install` to install missing gems"
|
10
10
|
exit e.status_code
|
11
11
|
end
|
12
|
-
require
|
12
|
+
require "rake"
|
13
13
|
|
14
|
-
require
|
14
|
+
require "jeweler"
|
15
15
|
Jeweler::Tasks.new do |gem|
|
16
16
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
17
|
gem.name = "baza"
|
18
18
|
gem.homepage = "http://github.com/kaspernj/baza"
|
19
19
|
gem.license = "MIT"
|
20
|
-
gem.summary = %
|
21
|
-
gem.description = %
|
20
|
+
gem.summary = %(A database abstraction layer, model framework and database framework.)
|
21
|
+
gem.description = %(A database abstraction layer, model framework and database framework.)
|
22
22
|
gem.email = "kj@gfish.com"
|
23
23
|
gem.authors = ["Kasper Johansen"]
|
24
24
|
# dependencies defined in Gemfile
|
25
25
|
end
|
26
26
|
Jeweler::RubygemsDotOrgTasks.new
|
27
27
|
|
28
|
-
require
|
29
|
-
require
|
28
|
+
require "rspec/core"
|
29
|
+
require "rspec/core/rake_task"
|
30
30
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
-
spec.pattern = FileList[
|
31
|
+
spec.pattern = FileList["spec/**/*_spec.rb"]
|
32
32
|
end
|
33
33
|
|
34
34
|
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
35
|
-
spec.pattern =
|
35
|
+
spec.pattern = "spec/**/*_spec.rb"
|
36
36
|
spec.rcov = true
|
37
37
|
end
|
38
38
|
|
39
|
-
task :
|
39
|
+
task default: :spec
|
40
40
|
|
41
|
-
require
|
41
|
+
require "rdoc/task"
|
42
42
|
Rake::RDocTask.new do |rdoc|
|
43
|
-
version = File.exist?(
|
43
|
+
version = File.exist?("VERSION") ? File.read("VERSION") : ""
|
44
44
|
|
45
|
-
rdoc.rdoc_dir =
|
45
|
+
rdoc.rdoc_dir = "rdoc"
|
46
46
|
rdoc.title = "baza #{version}"
|
47
|
-
rdoc.rdoc_files.include(
|
48
|
-
rdoc.rdoc_files.include(
|
47
|
+
rdoc.rdoc_files.include("README*")
|
48
|
+
rdoc.rdoc_files.include("lib/**/*.rb")
|
49
49
|
end
|
50
|
+
|
51
|
+
require "best_practice_project"
|
52
|
+
BestPracticeProject.load_tasks
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.20
|
data/baza.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: baza 0.0.
|
5
|
+
# stub: baza 0.0.20 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "baza"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.20"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Kasper Johansen"]
|
14
|
-
s.date = "2015-
|
14
|
+
s.date = "2015-12-30"
|
15
15
|
s.description = "A database abstraction layer, model framework and database framework."
|
16
16
|
s.email = "kj@gfish.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.files = [
|
22
22
|
".document",
|
23
23
|
".rspec",
|
24
|
+
".rubocop_todo.yml",
|
24
25
|
"Gemfile",
|
25
26
|
"Gemfile.lock",
|
26
27
|
"LICENSE.txt",
|
@@ -28,10 +29,16 @@ Gem::Specification.new do |s|
|
|
28
29
|
"Rakefile",
|
29
30
|
"VERSION",
|
30
31
|
"baza.gemspec",
|
32
|
+
"config/best_project_practice_rubocop.yml",
|
33
|
+
"config/best_project_practice_rubocop_todo.yml",
|
31
34
|
"lib/baza.rb",
|
32
35
|
"lib/baza/base_sql_driver.rb",
|
33
36
|
"lib/baza/cloner.rb",
|
34
37
|
"lib/baza/column.rb",
|
38
|
+
"lib/baza/database.rb",
|
39
|
+
"lib/baza/database_model.rb",
|
40
|
+
"lib/baza/database_model_functionality.rb",
|
41
|
+
"lib/baza/database_model_name.rb",
|
35
42
|
"lib/baza/db.rb",
|
36
43
|
"lib/baza/dbtime.rb",
|
37
44
|
"lib/baza/driver.rb",
|
@@ -43,6 +50,8 @@ Gem::Specification.new do |s|
|
|
43
50
|
"lib/baza/drivers/mysql.rb",
|
44
51
|
"lib/baza/drivers/mysql/column.rb",
|
45
52
|
"lib/baza/drivers/mysql/columns.rb",
|
53
|
+
"lib/baza/drivers/mysql/database.rb",
|
54
|
+
"lib/baza/drivers/mysql/databases.rb",
|
46
55
|
"lib/baza/drivers/mysql/index.rb",
|
47
56
|
"lib/baza/drivers/mysql/indexes.rb",
|
48
57
|
"lib/baza/drivers/mysql/result.rb",
|
@@ -53,6 +62,8 @@ Gem::Specification.new do |s|
|
|
53
62
|
"lib/baza/drivers/mysql2.rb",
|
54
63
|
"lib/baza/drivers/mysql2/column.rb",
|
55
64
|
"lib/baza/drivers/mysql2/columns.rb",
|
65
|
+
"lib/baza/drivers/mysql2/database.rb",
|
66
|
+
"lib/baza/drivers/mysql2/databases.rb",
|
56
67
|
"lib/baza/drivers/mysql2/index.rb",
|
57
68
|
"lib/baza/drivers/mysql2/indexes.rb",
|
58
69
|
"lib/baza/drivers/mysql2/result.rb",
|
@@ -61,6 +72,8 @@ Gem::Specification.new do |s|
|
|
61
72
|
"lib/baza/drivers/mysql_java.rb",
|
62
73
|
"lib/baza/drivers/mysql_java/column.rb",
|
63
74
|
"lib/baza/drivers/mysql_java/columns.rb",
|
75
|
+
"lib/baza/drivers/mysql_java/database.rb",
|
76
|
+
"lib/baza/drivers/mysql_java/databases.rb",
|
64
77
|
"lib/baza/drivers/mysql_java/index.rb",
|
65
78
|
"lib/baza/drivers/mysql_java/indexes.rb",
|
66
79
|
"lib/baza/drivers/mysql_java/table.rb",
|
@@ -68,6 +81,8 @@ Gem::Specification.new do |s|
|
|
68
81
|
"lib/baza/drivers/sqlite3.rb",
|
69
82
|
"lib/baza/drivers/sqlite3/column.rb",
|
70
83
|
"lib/baza/drivers/sqlite3/columns.rb",
|
84
|
+
"lib/baza/drivers/sqlite3/database.rb",
|
85
|
+
"lib/baza/drivers/sqlite3/databases.rb",
|
71
86
|
"lib/baza/drivers/sqlite3/index.rb",
|
72
87
|
"lib/baza/drivers/sqlite3/indexes.rb",
|
73
88
|
"lib/baza/drivers/sqlite3/result.rb",
|
@@ -78,6 +93,7 @@ Gem::Specification.new do |s|
|
|
78
93
|
"lib/baza/drivers/sqlite3_java.rb",
|
79
94
|
"lib/baza/drivers/sqlite3_java/column.rb",
|
80
95
|
"lib/baza/drivers/sqlite3_java/columns.rb",
|
96
|
+
"lib/baza/drivers/sqlite3_java/database.rb",
|
81
97
|
"lib/baza/drivers/sqlite3_java/index.rb",
|
82
98
|
"lib/baza/drivers/sqlite3_java/indexes.rb",
|
83
99
|
"lib/baza/drivers/sqlite3_java/table.rb",
|
@@ -94,6 +110,7 @@ Gem::Specification.new do |s|
|
|
94
110
|
"lib/baza/model_custom.rb",
|
95
111
|
"lib/baza/model_handler.rb",
|
96
112
|
"lib/baza/model_handler_sqlhelper.rb",
|
113
|
+
"lib/baza/mysql_base_driver.rb",
|
97
114
|
"lib/baza/query_buffer.rb",
|
98
115
|
"lib/baza/result_base.rb",
|
99
116
|
"lib/baza/revision.rb",
|
@@ -123,12 +140,13 @@ Gem::Specification.new do |s|
|
|
123
140
|
"spec/spec_helper.rb",
|
124
141
|
"spec/support/driver_collection.rb",
|
125
142
|
"spec/support/driver_columns_collection.rb",
|
143
|
+
"spec/support/driver_databases_collection.rb",
|
126
144
|
"spec/support/driver_indexes_collection.rb",
|
127
145
|
"spec/support/driver_tables_collection.rb"
|
128
146
|
]
|
129
147
|
s.homepage = "http://github.com/kaspernj/baza"
|
130
148
|
s.licenses = ["MIT"]
|
131
|
-
s.rubygems_version = "2.
|
149
|
+
s.rubygems_version = "2.4.0"
|
132
150
|
s.summary = "A database abstraction layer, model framework and database framework."
|
133
151
|
|
134
152
|
if s.respond_to? :specification_version then
|
@@ -151,7 +169,9 @@ Gem::Specification.new do |s|
|
|
151
169
|
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
152
170
|
s.add_development_dependency(%q<mysql>, [">= 0"])
|
153
171
|
s.add_development_dependency(%q<mysql2>, [">= 0"])
|
154
|
-
s.add_development_dependency(%q<activerecord>, ["
|
172
|
+
s.add_development_dependency(%q<activerecord>, ["= 4.2.5"])
|
173
|
+
s.add_development_dependency(%q<best_practice_project>, [">= 0"])
|
174
|
+
s.add_development_dependency(%q<rubocop>, ["= 0.35.1"])
|
155
175
|
else
|
156
176
|
s.add_dependency(%q<datet>, ["~> 0.0.25"])
|
157
177
|
s.add_dependency(%q<wref>, ["~> 0.0.8"])
|
@@ -169,7 +189,9 @@ Gem::Specification.new do |s|
|
|
169
189
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
170
190
|
s.add_dependency(%q<mysql>, [">= 0"])
|
171
191
|
s.add_dependency(%q<mysql2>, [">= 0"])
|
172
|
-
s.add_dependency(%q<activerecord>, ["
|
192
|
+
s.add_dependency(%q<activerecord>, ["= 4.2.5"])
|
193
|
+
s.add_dependency(%q<best_practice_project>, [">= 0"])
|
194
|
+
s.add_dependency(%q<rubocop>, ["= 0.35.1"])
|
173
195
|
end
|
174
196
|
else
|
175
197
|
s.add_dependency(%q<datet>, ["~> 0.0.25"])
|
@@ -188,7 +210,9 @@ Gem::Specification.new do |s|
|
|
188
210
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
189
211
|
s.add_dependency(%q<mysql>, [">= 0"])
|
190
212
|
s.add_dependency(%q<mysql2>, [">= 0"])
|
191
|
-
s.add_dependency(%q<activerecord>, ["
|
213
|
+
s.add_dependency(%q<activerecord>, ["= 4.2.5"])
|
214
|
+
s.add_dependency(%q<best_practice_project>, [">= 0"])
|
215
|
+
s.add_dependency(%q<rubocop>, ["= 0.35.1"])
|
192
216
|
end
|
193
217
|
end
|
194
218
|
|