ff1 1.2.9 → 1.2.11

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: b2a8f14c9ed2b368d4e72793e52de24e84a723bd50ceeddad97e0c0ab9caa150
4
- data.tar.gz: d5c0d266bd3717159f3b0c1f20456ae29b1cc85af388a1374874e135dc4a47da
3
+ metadata.gz: 10982ee7cc3205806f1e9262bcb8d3e2626acd5682d803256e8eb031be0105f9
4
+ data.tar.gz: a5ef9091c8358b291853b3999911f1259806c6080517fad3e988c1fa636fba6c
5
5
  SHA512:
6
- metadata.gz: 85719a4be80d352561ab9252c80bf11cad5ae510b3815ed26deb47365505d261753bd88bbfbe6676ec4d1cb6da992b08e1137a214a9a41224368160b754e0f80
7
- data.tar.gz: d01dceca1693ac6adc01241391f93cde14e16e06b0d8381007bef99af0a3e584d8e3e568579b149af10473918e958b8901f57ca60788fc29269ce78f14637f77
6
+ metadata.gz: '090b4c372b1f54da49e80b1a7fc8ff97ab5356f809b13d9eac00a3b88925cdb41c9aee646fb8062349c84a1d7b55abcc43a5591764503b46b4d2a196eb01de8c'
7
+ data.tar.gz: c2dd04aaf2870860cce1a5c2752af4a98948f277eb447655a21611597a1c95a8cfff73a1204a41c252510ad489b033aebff2d5c35707ca95010ad92348a2c14f
data/lib/ff1/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module FF1
4
4
  # Current version of the FF1 gem
5
- VERSION = '1.2.9'
5
+ VERSION = '1.2.11'
6
6
  end
@@ -56,10 +56,8 @@ module Ff1
56
56
  def generate_model_migration(model_name)
57
57
  model_class_name = model_name.camelize
58
58
  @table_name = model_name.underscore.pluralize
59
- @migration_number = self.class.next_migration_number(nil)
59
+ @migration_version = ActiveRecord::Migration.current_version
60
60
  migration_name = "add_ff1_columns_to_#{@table_name}"
61
- @migration_file_name = "#{@migration_number}_#{migration_name}"
62
- @migration_class_name = migration_name.camelize
63
61
 
64
62
  # Check if model exists
65
63
  begin
@@ -70,7 +68,7 @@ module Ff1
70
68
 
71
69
  # Generate migration file
72
70
  migration_template 'migration.rb.erb',
73
- "db/migrate/#{@migration_file_name}.rb"
71
+ "db/migrate/#{migration_name}.rb"
74
72
 
75
73
  say "Migration created for #{model_class_name}", :green
76
74
  say "Run 'rails db:migrate' to apply the changes", :blue
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class <%= @migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
3
+ class <%= migration_class_name %> < ActiveRecord::Migration[<%= @migration_version %>]
4
4
  def change
5
5
  add_column :<%= @table_name %>, :<%= deleted_at_column %>, :datetime, null: true
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ff1
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmed Abdellatif