baza 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +84 -0
- data/.rubocop_todo.yml +17 -135
- data/.travis.yml +21 -0
- data/Gemfile +10 -7
- data/Gemfile.lock +39 -44
- data/README.md +61 -3
- data/VERSION +1 -1
- data/baza.gemspec +146 -98
- data/config/best_project_practice_rubocop.yml +8 -0
- data/config/best_project_practice_rubocop_todo.yml +6 -0
- data/lib/baza.rb +8 -12
- data/lib/baza/base_sql_driver.rb +198 -52
- data/lib/baza/cloner.rb +1 -0
- data/lib/baza/column.rb +26 -0
- data/lib/baza/database.rb +19 -3
- data/lib/baza/db.rb +69 -271
- data/lib/baza/driver.rb +1 -6
- data/lib/baza/{drivers → driver}/active_record.rb +65 -21
- data/lib/baza/{drivers → driver}/active_record/columns.rb +0 -0
- data/lib/baza/driver/active_record/commands.rb +10 -0
- data/lib/baza/driver/active_record/databases.rb +10 -0
- data/lib/baza/{drivers → driver}/active_record/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/active_record/result.rb +3 -1
- data/lib/baza/{drivers → driver}/active_record/tables.rb +0 -0
- data/lib/baza/driver/active_record/users.rb +12 -0
- data/lib/baza/{drivers → driver}/mysql.rb +9 -26
- data/lib/baza/{drivers → driver}/mysql/column.rb +14 -35
- data/lib/baza/{drivers → driver}/mysql/columns.rb +9 -12
- data/lib/baza/driver/mysql/commands.rb +39 -0
- data/lib/baza/driver/mysql/database.rb +64 -0
- data/lib/baza/driver/mysql/databases.rb +63 -0
- data/lib/baza/{drivers → driver}/mysql/index.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql/result.rb +15 -7
- data/lib/baza/{drivers → driver}/mysql/sqlspecs.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql/table.rb +27 -43
- data/lib/baza/{drivers → driver}/mysql/tables.rb +5 -34
- data/lib/baza/{drivers → driver}/mysql/unbuffered_result.rb +8 -2
- data/lib/baza/driver/mysql/user.rb +22 -0
- data/lib/baza/driver/mysql/users.rb +39 -0
- data/lib/baza/{drivers → driver}/mysql2.rb +19 -49
- data/lib/baza/{drivers → driver}/mysql2/column.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/columns.rb +0 -0
- data/lib/baza/driver/mysql2/commands.rb +2 -0
- data/lib/baza/{drivers → driver}/mysql2/database.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/databases.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/index.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/result.rb +3 -1
- data/lib/baza/{drivers → driver}/mysql2/table.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/tables.rb +0 -0
- data/lib/baza/driver/mysql2/user.rb +2 -0
- data/lib/baza/driver/mysql2/users.rb +2 -0
- data/lib/baza/{drivers → driver}/mysql_java.rb +60 -38
- data/lib/baza/{drivers → driver}/mysql_java/column.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql_java/columns.rb +0 -0
- data/lib/baza/driver/mysql_java/commands.rb +2 -0
- data/lib/baza/driver/mysql_java/database.rb +2 -0
- data/lib/baza/driver/mysql_java/databases.rb +2 -0
- data/lib/baza/{drivers → driver}/mysql_java/index.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql_java/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql_java/table.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql_java/tables.rb +0 -0
- data/lib/baza/driver/mysql_java/user.rb +2 -0
- data/lib/baza/driver/mysql_java/users.rb +2 -0
- data/lib/baza/driver/pg.rb +80 -0
- data/lib/baza/driver/pg/column.rb +125 -0
- data/lib/baza/driver/pg/columns.rb +37 -0
- data/lib/baza/driver/pg/commands.rb +35 -0
- data/lib/baza/driver/pg/create_index_sql_creator.rb +51 -0
- data/lib/baza/driver/pg/database.rb +89 -0
- data/lib/baza/driver/pg/databases.rb +79 -0
- data/lib/baza/driver/pg/index.rb +35 -0
- data/lib/baza/driver/pg/indexes.rb +5 -0
- data/lib/baza/driver/pg/result.rb +139 -0
- data/lib/baza/driver/pg/table.rb +184 -0
- data/lib/baza/driver/pg/tables.rb +45 -0
- data/lib/baza/{drivers → driver}/sqlite3.rb +6 -24
- data/lib/baza/{drivers → driver}/sqlite3/column.rb +22 -24
- data/lib/baza/{drivers → driver}/sqlite3/columns.rb +6 -6
- data/lib/baza/driver/sqlite3/commands.rb +28 -0
- data/lib/baza/{drivers → driver}/sqlite3/database.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3/databases.rb +0 -1
- data/lib/baza/{drivers → driver}/sqlite3/index.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3/result.rb +14 -6
- data/lib/baza/{drivers → driver}/sqlite3/sqlspecs.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3/table.rb +25 -16
- data/lib/baza/{drivers → driver}/sqlite3/tables.rb +5 -6
- data/lib/baza/{drivers → driver}/sqlite3/unbuffered_result.rb +8 -2
- data/lib/baza/{drivers → driver}/sqlite3_java.rb +13 -23
- data/lib/baza/{drivers → driver}/sqlite3_java/column.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/columns.rb +0 -0
- data/lib/baza/driver/sqlite3_java/commands.rb +2 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/database.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/index.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/table.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/tables.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/unbuffered_result.rb +14 -9
- data/lib/baza/{drivers → driver}/sqlite3_rhodes.rb +6 -24
- data/lib/baza/errors.rb +2 -0
- data/lib/baza/idquery.rb +15 -8
- data/lib/baza/index.rb +7 -0
- data/lib/baza/jdbc_driver.rb +4 -16
- data/lib/baza/jdbc_result.rb +20 -12
- data/lib/baza/mysql_base_driver.rb +7 -7
- data/lib/baza/query_buffer.rb +20 -19
- data/lib/baza/row.rb +16 -16
- data/lib/baza/sql_queries.rb +3 -0
- data/lib/baza/sql_queries/generic_insert.rb +81 -0
- data/lib/baza/sql_queries/generic_update.rb +31 -0
- data/lib/baza/sql_queries/mysql_upsert.rb +52 -0
- data/lib/baza/sql_queries/mysql_upsert_duplicate_key.rb +57 -0
- data/lib/baza/sql_queries/non_atomic_upsert.rb +25 -0
- data/lib/baza/sql_queries/postgres_upsert_duplicate_key.rb +118 -0
- data/lib/baza/sql_queries/select.rb +170 -0
- data/lib/baza/sql_queries/sqlite_upsert_duplicate_key.rb +99 -0
- data/lib/baza/table.rb +35 -8
- data/spec/active_record/models/user.rb +3 -0
- data/spec/{cloner_spec.rb → baza/cloner_spec.rb} +0 -0
- data/spec/drivers/active_record_mysql2_spec.rb +5 -3
- data/spec/drivers/active_record_mysql_spec.rb +2 -1
- data/spec/drivers/active_record_pg_spec.rb +20 -0
- data/spec/drivers/active_record_sqlite3_spec.rb +2 -1
- data/spec/drivers/mysql2_spec.rb +1 -1
- data/spec/drivers/mysql_spec.rb +10 -10
- data/spec/drivers/pg_spec.rb +18 -0
- data/spec/drivers/sqlite3_spec.rb +7 -8
- data/spec/info_active_record_example.rb +1 -1
- data/spec/{info_active_record_mysql2.rb → info_active_record_mysql2_example.rb} +3 -2
- data/spec/info_active_record_mysql2_travis.rb +35 -0
- data/spec/{info_active_record_mysql.rb → info_active_record_mysql_example.rb} +5 -4
- data/spec/info_active_record_mysql_travis.rb +36 -0
- data/spec/info_active_record_pg_example.rb +36 -0
- data/spec/info_active_record_pg_travis.rb +34 -0
- data/spec/info_active_record_sqlite3.rb +1 -1
- data/spec/info_mysql2_example.rb +1 -3
- data/spec/{info_mysql2_shippable.rb → info_mysql2_travis.rb} +2 -4
- data/spec/info_mysql_example.rb +1 -3
- data/spec/{info_mysql_shippable.rb → info_mysql_travis.rb} +2 -4
- data/spec/info_pg_example.rb +22 -0
- data/spec/info_pg_travis.rb +20 -0
- data/spec/info_sqlite3.rb +1 -3
- data/spec/spec_helper.rb +1 -1
- data/spec/support/driver_active_record_collection.rb +62 -0
- data/spec/support/driver_collection.rb +136 -121
- data/spec/support/driver_columns_collection.rb +19 -10
- data/spec/support/driver_databases_collection.rb +23 -1
- data/spec/support/driver_indexes_collection.rb +2 -2
- data/spec/support/driver_tables_collection.rb +24 -4
- data/spec/support/driver_users_collection.rb +53 -0
- metadata +185 -104
- data/lib/baza/drivers/mysql/database.rb +0 -28
- data/lib/baza/drivers/mysql/databases.rb +0 -35
- data/lib/baza/drivers/mysql_java/database.rb +0 -2
- data/lib/baza/drivers/mysql_java/databases.rb +0 -2
- data/lib/baza/model.rb +0 -875
- data/lib/baza/model_custom.rb +0 -155
- data/lib/baza/model_handler.rb +0 -910
- data/lib/baza/model_handler_sqlhelper.rb +0 -484
- data/lib/baza/revision.rb +0 -383
- data/shippable.yml +0 -17
- data/spec/info_active_record_mysql2_shippable.rb +0 -34
- data/spec/info_active_record_mysql_shippable.rb +0 -34
- data/spec/model_handler_spec.rb +0 -431
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dc4209add2522108f9c69de529168208afb5f22
|
4
|
+
data.tar.gz: 16c14dfd76ca60e17f4b3a04c41f91a040454662
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6072099f859db6159e8e22ec87bd4adb2bd08bcee2bb77333fd81251513d1ea6426a324ed563872418a3b6cffd6ff13286f3d3d79e3313c305c6ba08994d283
|
7
|
+
data.tar.gz: b3de0fcbf50b3bb927f2aa8891092abb7d3ba7d1b97de98cad8572da7cd264f8cac11cff28625f2b7ab0028da478e748450c5b9425e77aa43e8c65d9cecb5b2f
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
DisplayCopNames: true
|
5
|
+
DisplayStyleGuide: true
|
6
|
+
Exclude:
|
7
|
+
- baza.gemspec
|
8
|
+
|
9
|
+
# https://github.com/AtomLinter/linter-rubocop/issues/2
|
10
|
+
Style/FileName:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
# Metrics/CyclomaticComplexity:
|
14
|
+
# Max: 10
|
15
|
+
|
16
|
+
# Metrics/LineLength:
|
17
|
+
# Max: 160
|
18
|
+
|
19
|
+
# Metrics/MethodLength:
|
20
|
+
# Max: 50
|
21
|
+
|
22
|
+
# Metrics/AbcSize:
|
23
|
+
# Max: 25
|
24
|
+
|
25
|
+
# Metrics/ClassLength:
|
26
|
+
# Max: 250
|
27
|
+
|
28
|
+
# .find_each is not the same as .each
|
29
|
+
Rails/FindEach:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Style/AccessModifierIndentation:
|
33
|
+
EnforcedStyle: outdent
|
34
|
+
|
35
|
+
Style/AlignParameters:
|
36
|
+
EnforcedStyle: with_fixed_indentation
|
37
|
+
|
38
|
+
Style/ClassAndModuleChildren:
|
39
|
+
EnforcedStyle: compact
|
40
|
+
|
41
|
+
Style/ConditionalAssignment:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Style/Documentation:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
Style/EmptyLines:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
# Will report offences for many places that are much more readable without using a guard clause
|
51
|
+
Style/GuardClause:
|
52
|
+
Enabled: false
|
53
|
+
|
54
|
+
Style/MultilineMethodCallIndentation:
|
55
|
+
EnforcedStyle: indented
|
56
|
+
|
57
|
+
Style/MultilineOperationIndentation:
|
58
|
+
EnforcedStyle: indented
|
59
|
+
|
60
|
+
Style/StringLiterals:
|
61
|
+
EnforcedStyle: double_quotes
|
62
|
+
|
63
|
+
Style/StringLiteralsInInterpolation:
|
64
|
+
Enabled: false
|
65
|
+
|
66
|
+
Style/NilComparison:
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Style/SignalException:
|
70
|
+
EnforcedStyle: only_raise
|
71
|
+
|
72
|
+
Style/MultilineOperationIndentation:
|
73
|
+
EnforcedStyle: indented
|
74
|
+
|
75
|
+
Style/SpaceInsideHashLiteralBraces:
|
76
|
+
EnforcedStyle: no_space
|
77
|
+
|
78
|
+
Style/TrivialAccessors:
|
79
|
+
ExactNameMatch: true
|
80
|
+
Enabled: true
|
81
|
+
|
82
|
+
# Disabled on purpose: https://github.com/bbatsov/rubocop/issues/1758
|
83
|
+
Style/ClosingParenthesisIndentation:
|
84
|
+
Enabled: false
|
data/.rubocop_todo.yml
CHANGED
@@ -1,157 +1,39 @@
|
|
1
|
-
|
2
|
-
|
3
1
|
# This configuration was generated by
|
4
2
|
# `rubocop --auto-gen-config`
|
5
|
-
# on
|
3
|
+
# on 2016-04-08 08:46:33 +0200 using RuboCop version 0.39.0.
|
6
4
|
# The point is for the user to remove these configuration records
|
7
5
|
# one by one as the offenses are removed from the code base.
|
8
6
|
# Note that changes in the inspected code, or installation of new
|
9
7
|
# versions of RuboCop, may require this file to be generated again.
|
10
8
|
|
11
|
-
# Offense count:
|
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
|
9
|
+
# Offense count: 69
|
51
10
|
Metrics/AbcSize:
|
52
|
-
Max:
|
11
|
+
Max: 66
|
53
12
|
|
54
|
-
# Offense count:
|
13
|
+
# Offense count: 3
|
55
14
|
Metrics/BlockNesting:
|
56
|
-
Max:
|
15
|
+
Max: 4
|
57
16
|
|
58
|
-
# Offense count:
|
17
|
+
# Offense count: 13
|
59
18
|
# Configuration parameters: CountComments.
|
60
19
|
Metrics/ClassLength:
|
61
|
-
Max:
|
20
|
+
Max: 473
|
62
21
|
|
63
|
-
# Offense count:
|
22
|
+
# Offense count: 20
|
64
23
|
Metrics/CyclomaticComplexity:
|
65
|
-
Max:
|
24
|
+
Max: 25
|
66
25
|
|
67
|
-
# Offense count:
|
68
|
-
# Configuration parameters: AllowURI, URISchemes.
|
26
|
+
# Offense count: 252
|
27
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
28
|
+
# URISchemes: http, https
|
69
29
|
Metrics/LineLength:
|
70
|
-
Max:
|
30
|
+
Max: 254
|
71
31
|
|
72
|
-
# Offense count:
|
32
|
+
# Offense count: 111
|
73
33
|
# Configuration parameters: CountComments.
|
74
34
|
Metrics/MethodLength:
|
75
|
-
Max:
|
35
|
+
Max: 61
|
76
36
|
|
77
|
-
# Offense count:
|
37
|
+
# Offense count: 47
|
78
38
|
Metrics/PerceivedComplexity:
|
79
|
-
Max:
|
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
|
39
|
+
Max: 27
|
data/.travis.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
language: ruby
|
2
|
+
cache: bundler
|
3
|
+
rvm:
|
4
|
+
- 1.9.3
|
5
|
+
- 2.1.7
|
6
|
+
- jruby-1.7.13
|
7
|
+
before_script:
|
8
|
+
- cp spec/info_mysql_travis.rb spec/info_mysql.rb
|
9
|
+
- cp spec/info_mysql2_travis.rb spec/info_mysql2.rb
|
10
|
+
- cp spec/info_pg_travis.rb spec/info_pg.rb
|
11
|
+
- cp spec/info_active_record_mysql_travis.rb spec/info_active_record_mysql.rb
|
12
|
+
- cp spec/info_active_record_mysql2_travis.rb spec/info_active_record_mysql2.rb
|
13
|
+
- cp spec/info_active_record_pg_travis.rb spec/info_active_record_pg.rb
|
14
|
+
- mysql -e 'CREATE DATABASE IF NOT EXISTS baza;'
|
15
|
+
- psql -c 'DROP DATABASE IF EXISTS "baza";' -U postgres
|
16
|
+
- psql -c 'CREATE DATABASE "baza";' -U postgres
|
17
|
+
script:
|
18
|
+
- CODECLIMATE_REPO_TOKEN=98c06de7271764c9cd7bbde7cee4ddfa0d3e7db4bd9933f17779100276672e5f bundle exec rspec
|
19
|
+
- bundle exec rake best_practice_project:run
|
20
|
+
notifications:
|
21
|
+
email: false
|
data/Gemfile
CHANGED
@@ -4,15 +4,17 @@ source "http://rubygems.org"
|
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
5
5
|
|
6
6
|
gem "datet", "~> 0.0.25"
|
7
|
-
gem "wref", "~> 0.0.8"
|
8
7
|
gem "array_enumerator", "~> 0.0.10"
|
9
|
-
gem "
|
8
|
+
gem "auto_autoloader", "~> 0.0.1"
|
10
9
|
gem "event_handler", "~> 0.0.0"
|
10
|
+
gem "simple_delegate", "~> 0.0.2"
|
11
|
+
gem "string-cases", "~> 0.0.4"
|
12
|
+
gem "wref", "~> 0.0.8"
|
11
13
|
|
12
14
|
# Add dependencies to develop your gem here.
|
13
15
|
# Include everything needed to run rake, tests, features, etc.
|
14
16
|
group :development, :test do
|
15
|
-
gem "rspec"
|
17
|
+
gem "rspec", "3.4.0"
|
16
18
|
gem "rdoc"
|
17
19
|
gem "bundler"
|
18
20
|
gem "jeweler"
|
@@ -21,11 +23,12 @@ group :development, :test do
|
|
21
23
|
gem "jdbc-mysql", platform: :jruby
|
22
24
|
gem "activerecord-jdbc-adapter", platform: :jruby
|
23
25
|
gem "sqlite3", platform: :ruby
|
24
|
-
gem "mysql", platform: :ruby
|
25
|
-
gem "mysql2", platform: :ruby
|
26
|
+
gem "mysql", "2.9.1", platform: :ruby
|
27
|
+
gem "mysql2", "0.4.2", platform: :ruby
|
28
|
+
gem "pg", "0.18.4", platform: :ruby
|
26
29
|
gem "activerecord", "4.2.5"
|
27
|
-
gem "best_practice_project",
|
28
|
-
gem "rubocop", "0.
|
30
|
+
gem "best_practice_project", "0.0.9", require: false
|
31
|
+
gem "rubocop", "0.39.0", require: false
|
29
32
|
end
|
30
33
|
|
31
34
|
gem "codeclimate-test-reporter", group: :test, require: nil
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,3 @@
|
|
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
|
-
|
8
1
|
GEM
|
9
2
|
remote: http://rubygems.org/
|
10
3
|
specs:
|
@@ -15,7 +8,7 @@ GEM
|
|
15
8
|
activemodel (= 4.2.5)
|
16
9
|
activesupport (= 4.2.5)
|
17
10
|
arel (~> 6.0)
|
18
|
-
activerecord-jdbc-adapter (1.3.
|
11
|
+
activerecord-jdbc-adapter (1.3.19)
|
19
12
|
activerecord (>= 2.2)
|
20
13
|
activesupport (4.2.5)
|
21
14
|
i18n (~> 0.7)
|
@@ -27,8 +20,10 @@ GEM
|
|
27
20
|
arel (6.0.3)
|
28
21
|
array_enumerator (0.0.10)
|
29
22
|
ast (2.2.0)
|
30
|
-
|
31
|
-
|
23
|
+
auto_autoloader (0.0.1)
|
24
|
+
string-cases
|
25
|
+
best_practice_project (0.0.9)
|
26
|
+
auto_autoloader
|
32
27
|
builder (3.2.2)
|
33
28
|
codeclimate-test-reporter (0.4.7)
|
34
29
|
simplecov (>= 0.7.1, < 1.0.0)
|
@@ -54,9 +49,8 @@ GEM
|
|
54
49
|
hashie (3.4.2)
|
55
50
|
highline (1.7.2)
|
56
51
|
i18n (0.7.0)
|
57
|
-
|
58
|
-
jdbc-
|
59
|
-
jdbc-sqlite3 (3.8.10.1)
|
52
|
+
jdbc-mysql (5.1.37)
|
53
|
+
jdbc-sqlite3 (3.8.11.2)
|
60
54
|
jeweler (2.0.1)
|
61
55
|
builder
|
62
56
|
bundler (>= 1.0)
|
@@ -76,7 +70,7 @@ GEM
|
|
76
70
|
multi_xml (0.5.5)
|
77
71
|
multipart-post (2.0.0)
|
78
72
|
mysql (2.9.1)
|
79
|
-
mysql2 (0.
|
73
|
+
mysql2 (0.4.2)
|
80
74
|
nokogiri (1.6.6.2)
|
81
75
|
mini_portile (~> 0.6.0)
|
82
76
|
nokogiri (1.6.6.2-java)
|
@@ -86,8 +80,9 @@ GEM
|
|
86
80
|
multi_json (~> 1.3)
|
87
81
|
multi_xml (~> 0.5)
|
88
82
|
rack (~> 1.2)
|
89
|
-
parser (2.
|
90
|
-
ast (
|
83
|
+
parser (2.3.0.7)
|
84
|
+
ast (~> 2.2)
|
85
|
+
pg (0.18.4)
|
91
86
|
powerpack (0.1.1)
|
92
87
|
pry (0.10.1)
|
93
88
|
coderay (~> 1.1.0)
|
@@ -98,35 +93,32 @@ GEM
|
|
98
93
|
method_source (~> 0.8.1)
|
99
94
|
slop (~> 3.4)
|
100
95
|
spoon (~> 0.0)
|
101
|
-
psych (2.0.16)
|
102
|
-
psych (2.0.16-java)
|
103
|
-
jar-dependencies (>= 0.1.7)
|
104
96
|
rack (1.6.4)
|
105
|
-
rainbow (2.
|
97
|
+
rainbow (2.1.0)
|
106
98
|
rake (10.4.2)
|
107
99
|
rdoc (4.2.0)
|
108
100
|
json (~> 1.4)
|
109
|
-
rspec (3.
|
110
|
-
rspec-core (~> 3.
|
111
|
-
rspec-expectations (~> 3.
|
112
|
-
rspec-mocks (~> 3.
|
113
|
-
rspec-core (3.
|
114
|
-
rspec-support (~> 3.
|
115
|
-
rspec-expectations (3.
|
101
|
+
rspec (3.4.0)
|
102
|
+
rspec-core (~> 3.4.0)
|
103
|
+
rspec-expectations (~> 3.4.0)
|
104
|
+
rspec-mocks (~> 3.4.0)
|
105
|
+
rspec-core (3.4.4)
|
106
|
+
rspec-support (~> 3.4.0)
|
107
|
+
rspec-expectations (3.4.0)
|
116
108
|
diff-lcs (>= 1.2.0, < 2.0)
|
117
|
-
rspec-support (~> 3.
|
118
|
-
rspec-mocks (3.
|
109
|
+
rspec-support (~> 3.4.0)
|
110
|
+
rspec-mocks (3.4.1)
|
119
111
|
diff-lcs (>= 1.2.0, < 2.0)
|
120
|
-
rspec-support (~> 3.
|
121
|
-
rspec-support (3.
|
122
|
-
rubocop (0.
|
123
|
-
|
124
|
-
parser (>= 2.2.3.0, < 3.0)
|
112
|
+
rspec-support (~> 3.4.0)
|
113
|
+
rspec-support (3.4.1)
|
114
|
+
rubocop (0.39.0)
|
115
|
+
parser (>= 2.3.0.7, < 3.0)
|
125
116
|
powerpack (~> 0.1)
|
126
117
|
rainbow (>= 1.99.1, < 3.0)
|
127
118
|
ruby-progressbar (~> 1.7)
|
128
|
-
|
119
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
129
120
|
ruby-progressbar (1.7.5)
|
121
|
+
simple_delegate (0.0.2)
|
130
122
|
simplecov (0.10.0)
|
131
123
|
docile (~> 1.1.0)
|
132
124
|
json (~> 1.8)
|
@@ -136,12 +128,12 @@ GEM
|
|
136
128
|
spoon (0.0.4)
|
137
129
|
ffi
|
138
130
|
sqlite3 (1.3.10)
|
139
|
-
string-cases (0.0.
|
131
|
+
string-cases (0.0.4)
|
140
132
|
thread_safe (0.3.5)
|
141
133
|
thread_safe (0.3.5-java)
|
142
|
-
tins (1.6.0)
|
143
134
|
tzinfo (1.2.2)
|
144
135
|
thread_safe (~> 0.1)
|
136
|
+
unicode-display_width (1.0.3)
|
145
137
|
wref (0.0.8)
|
146
138
|
|
147
139
|
PLATFORMS
|
@@ -152,7 +144,8 @@ DEPENDENCIES
|
|
152
144
|
activerecord (= 4.2.5)
|
153
145
|
activerecord-jdbc-adapter
|
154
146
|
array_enumerator (~> 0.0.10)
|
155
|
-
|
147
|
+
auto_autoloader (~> 0.0.1)
|
148
|
+
best_practice_project (= 0.0.9)
|
156
149
|
bundler
|
157
150
|
codeclimate-test-reporter
|
158
151
|
datet (~> 0.0.25)
|
@@ -160,15 +153,17 @@ DEPENDENCIES
|
|
160
153
|
jdbc-mysql
|
161
154
|
jdbc-sqlite3
|
162
155
|
jeweler
|
163
|
-
mysql
|
164
|
-
mysql2
|
156
|
+
mysql (= 2.9.1)
|
157
|
+
mysql2 (= 0.4.2)
|
158
|
+
pg (= 0.18.4)
|
165
159
|
pry
|
166
160
|
rdoc
|
167
|
-
rspec
|
168
|
-
rubocop (= 0.
|
161
|
+
rspec (= 3.4.0)
|
162
|
+
rubocop (= 0.39.0)
|
163
|
+
simple_delegate (~> 0.0.2)
|
169
164
|
sqlite3
|
170
|
-
string-cases (~> 0.0.
|
165
|
+
string-cases (~> 0.0.4)
|
171
166
|
wref (~> 0.0.8)
|
172
167
|
|
173
168
|
BUNDLED WITH
|
174
|
-
1.
|
169
|
+
1.11.2
|