declare_schema 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 389da0d9f9e0753e62297aeca33c3c73305d95082a3f50baf6288362011e6f52
|
|
4
|
+
data.tar.gz: 7d20d8ef4a085e37ec13273c020b8c3883e96359e9e4c7d173c3beccf5c73dab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e4eb02bc1d989d648095b952e1feff00af9cbbc4ea3dbb7962f15fdbcafce2fac4bc93c467417d29396e6753993874c3c2faf882a620db0d54f3ea905195cf9
|
|
7
|
+
data.tar.gz: d504a96bb5f60d7c64b03fd975c9e7c78fe9614f06a0aa73fffe0c0987786a554e3f603a79198f962b13b0b869690b839fb1cd0215196353064360ef81e46e51
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
4
4
|
|
|
5
5
|
Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.11.1] - 2021-03-26
|
|
8
|
+
### Fixed
|
|
9
|
+
- Fixed a bug where up and down in generated migration would be empty in Rails 4.
|
|
10
|
+
|
|
7
11
|
## [0.11.0] - 2021-03-22
|
|
8
12
|
### Removed
|
|
9
13
|
- Removed `g|m|c` prompt entirely, since it was confusing. Instead, the migration is
|
|
@@ -164,6 +168,7 @@ using the appropriate Rails configuration attributes.
|
|
|
164
168
|
### Added
|
|
165
169
|
- Initial version from https://github.com/Invoca/hobo_fields v4.1.0.
|
|
166
170
|
|
|
171
|
+
[0.11.1]: https://github.com/Invoca/declare_schema/compare/v0.11.0...v0.11.1
|
|
167
172
|
[0.11.0]: https://github.com/Invoca/declare_schema/compare/v0.10.1...v0.11.0
|
|
168
173
|
[0.10.1]: https://github.com/Invoca/declare_schema/compare/v0.10.0...v0.10.1
|
|
169
174
|
[0.10.0]: https://github.com/Invoca/declare_schema/compare/v0.9.0...v0.10.0
|
data/Gemfile.lock
CHANGED
|
@@ -73,8 +73,8 @@ module DeclareSchema
|
|
|
73
73
|
end ||
|
|
74
74
|
default_migration_name
|
|
75
75
|
|
|
76
|
-
@up = indent(up, 4)
|
|
77
|
-
@down = indent(down, 4)
|
|
76
|
+
@up = indent(up.strip, 4)
|
|
77
|
+
@down = indent(down.strip, 4)
|
|
78
78
|
@migration_class_name = final_migration_name.camelize
|
|
79
79
|
|
|
80
80
|
migration_template('migration.rb.erb', "db/migrate/#{final_migration_name.underscore}.rb")
|
|
@@ -100,7 +100,7 @@ module DeclareSchema
|
|
|
100
100
|
if ActiveSupport::VERSION::MAJOR < 5
|
|
101
101
|
def indent(string, columns)
|
|
102
102
|
whitespace = ' ' * columns
|
|
103
|
-
string.gsub("\n", "\n#{whitespace}").gsub
|
|
103
|
+
string.gsub("\n", "\n#{whitespace}").gsub(/ +\n/, "\n")
|
|
104
104
|
end
|
|
105
105
|
end
|
|
106
106
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
class <%= @migration_class_name %> < (ActiveSupport::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[4.2] : ActiveRecord::Migration)
|
|
2
2
|
def self.up
|
|
3
|
-
<%= @up %>
|
|
3
|
+
<%= @up.presence or raise "no @up given!" %>
|
|
4
4
|
end
|
|
5
5
|
|
|
6
6
|
def self.down
|
|
7
|
-
<%= @down %>
|
|
7
|
+
<%= @down.presence or raise "no @down given!" %>
|
|
8
8
|
end
|
|
9
9
|
end
|
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.11.
|
|
4
|
+
version: 0.11.1
|
|
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: 2021-03-
|
|
11
|
+
date: 2021-03-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -128,7 +128,7 @@ homepage: https://github.com/Invoca/declare_schema
|
|
|
128
128
|
licenses: []
|
|
129
129
|
metadata:
|
|
130
130
|
allowed_push_host: https://rubygems.org
|
|
131
|
-
post_install_message:
|
|
131
|
+
post_install_message:
|
|
132
132
|
rdoc_options: []
|
|
133
133
|
require_paths:
|
|
134
134
|
- lib
|
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
144
144
|
version: 1.3.6
|
|
145
145
|
requirements: []
|
|
146
146
|
rubygems_version: 3.0.3
|
|
147
|
-
signing_key:
|
|
147
|
+
signing_key:
|
|
148
148
|
specification_version: 4
|
|
149
149
|
summary: Database schema declaration and migration generator for Rails
|
|
150
150
|
test_files: []
|