declare_schema 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/declare_schema_build.yml +21 -5
  3. data/Appraisals +21 -4
  4. data/CHANGELOG.md +40 -0
  5. data/Gemfile +1 -2
  6. data/Gemfile.lock +7 -9
  7. data/README.md +3 -3
  8. data/Rakefile +17 -4
  9. data/bin/declare_schema +1 -1
  10. data/declare_schema.gemspec +1 -1
  11. data/gemfiles/rails_4_mysql.gemfile +22 -0
  12. data/gemfiles/{rails_4.gemfile → rails_4_sqlite.gemfile} +1 -2
  13. data/gemfiles/rails_5_mysql.gemfile +22 -0
  14. data/gemfiles/{rails_5.gemfile → rails_5_sqlite.gemfile} +1 -2
  15. data/gemfiles/rails_6_mysql.gemfile +22 -0
  16. data/gemfiles/{rails_6.gemfile → rails_6_sqlite.gemfile} +2 -3
  17. data/lib/declare_schema/command.rb +10 -3
  18. data/lib/declare_schema/model/column.rb +168 -0
  19. data/lib/declare_schema/model/field_spec.rb +59 -143
  20. data/lib/declare_schema/model/foreign_key_definition.rb +36 -25
  21. data/lib/declare_schema/model/table_options_definition.rb +8 -6
  22. data/lib/declare_schema/version.rb +1 -1
  23. data/lib/generators/declare_schema/migration/migration_generator.rb +1 -1
  24. data/lib/generators/declare_schema/migration/migrator.rb +142 -116
  25. data/spec/lib/declare_schema/field_declaration_dsl_spec.rb +1 -1
  26. data/spec/lib/declare_schema/field_spec_spec.rb +135 -38
  27. data/spec/lib/declare_schema/generator_spec.rb +4 -2
  28. data/spec/lib/declare_schema/interactive_primary_key_spec.rb +8 -2
  29. data/spec/lib/declare_schema/migration_generator_spec.rb +277 -171
  30. data/spec/lib/declare_schema/model/column_spec.rb +141 -0
  31. data/spec/lib/declare_schema/model/foreign_key_definition_spec.rb +93 -0
  32. data/spec/lib/declare_schema/model/index_definition_spec.rb +4 -5
  33. data/spec/lib/declare_schema/model/table_options_definition_spec.rb +19 -29
  34. data/spec/lib/generators/declare_schema/migration/migrator_spec.rb +12 -26
  35. data/spec/support/acceptance_spec_helpers.rb +3 -3
  36. metadata +15 -9
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: declare_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca Development adapted from hobo_fields by Tom Locke
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-23 00:00:00.000000000 Z
11
+ date: 2021-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -49,15 +49,19 @@ files:
49
49
  - bin/declare_schema
50
50
  - declare_schema.gemspec
51
51
  - gemfiles/.bundle/config
52
- - gemfiles/rails_4.gemfile
53
- - gemfiles/rails_5.gemfile
54
- - gemfiles/rails_6.gemfile
52
+ - gemfiles/rails_4_mysql.gemfile
53
+ - gemfiles/rails_4_sqlite.gemfile
54
+ - gemfiles/rails_5_mysql.gemfile
55
+ - gemfiles/rails_5_sqlite.gemfile
56
+ - gemfiles/rails_6_mysql.gemfile
57
+ - gemfiles/rails_6_sqlite.gemfile
55
58
  - lib/declare_schema.rb
56
59
  - lib/declare_schema/command.rb
57
60
  - lib/declare_schema/extensions/active_record/fields_declaration.rb
58
61
  - lib/declare_schema/extensions/module.rb
59
62
  - lib/declare_schema/field_declaration_dsl.rb
60
63
  - lib/declare_schema/model.rb
64
+ - lib/declare_schema/model/column.rb
61
65
  - lib/declare_schema/model/field_spec.rb
62
66
  - lib/declare_schema/model/foreign_key_definition.rb
63
67
  - lib/declare_schema/model/index_definition.rb
@@ -79,6 +83,8 @@ files:
79
83
  - spec/lib/declare_schema/generator_spec.rb
80
84
  - spec/lib/declare_schema/interactive_primary_key_spec.rb
81
85
  - spec/lib/declare_schema/migration_generator_spec.rb
86
+ - spec/lib/declare_schema/model/column_spec.rb
87
+ - spec/lib/declare_schema/model/foreign_key_definition_spec.rb
82
88
  - spec/lib/declare_schema/model/index_definition_spec.rb
83
89
  - spec/lib/declare_schema/model/table_options_definition_spec.rb
84
90
  - spec/lib/declare_schema/prepare_testapp.rb
@@ -90,7 +96,7 @@ homepage: https://github.com/Invoca/declare_schema
90
96
  licenses: []
91
97
  metadata:
92
98
  allowed_push_host: https://rubygems.org
93
- post_install_message:
99
+ post_install_message:
94
100
  rdoc_options: []
95
101
  require_paths:
96
102
  - lib
@@ -106,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
112
  version: 1.3.6
107
113
  requirements: []
108
114
  rubygems_version: 3.0.3
109
- signing_key:
115
+ signing_key:
110
116
  specification_version: 4
111
- summary: Database migration generator for Rails
117
+ summary: Database schema declaration and migration generator for Rails
112
118
  test_files: []