ff1 1.2.5 → 1.2.7

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: 5de9048dd906a7817056d714e7fecf5da1998097b0c306c596978d798047e731
4
- data.tar.gz: f429bf063cc0fa566fff0b98b247be77f0e3ddb8c7b50f4c071b5121b7225a7f
3
+ metadata.gz: 71afb6323a419b0916d942aebde5f19bfa5396dbf44ffa631eff6a942b686ca2
4
+ data.tar.gz: ff57e228e1e2a16ba28384102cdbc7a14fc46c4089d8b4aea2e6226739e15b50
5
5
  SHA512:
6
- metadata.gz: '0988c145809495d4d34c8c2369e6c90c39e9b085d9d099dd9a5a28a7f62bf329f78201af1e70a6f63a287a34e286e027d620241b839c6412421b0c5415664d27'
7
- data.tar.gz: 27133bc842e71cabd2830d3f903ac042fa2bb7c5c35aab969139da49d99b00be1f70bdaecc40ceb1e21e7320737902d1c4f9b83d248e10e631477fe2885c134d
6
+ metadata.gz: a576582e6f503dd1b81baac07f4a095b70a3eddaa1547e352118e2f8814734e3d10071a758bb14d6a9c5ad1256f7cff2faa03d63f73479c8288ddf1c8dd3f839
7
+ data.tar.gz: 54d9e13bd33917747bab54644cc5f8ce6669c2a5f8f257125c45436baf1ca998671fe2f0c99ec8daf5ef6c7b8c3e7e4e242377b535d2995d5cfddd0433bce120
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.5'
5
+ VERSION = '1.2.7'
6
6
  end
@@ -21,8 +21,6 @@ module Ff1
21
21
  class_option :deleted_at_column, type: :string, default: 'deleted_at',
22
22
  desc: 'Name of the deleted_at timestamp column'
23
23
 
24
- class_option :ff1_deleted_column, type: :string, default: 'ff1_deleted',
25
- desc: 'Name of the FF1 deleted boolean column'
26
24
 
27
25
  class_option :add_indexes, type: :boolean, default: true,
28
26
  desc: 'Add database indexes for performance'
@@ -57,9 +55,9 @@ module Ff1
57
55
 
58
56
  def generate_model_migration(model_name)
59
57
  model_class_name = model_name.camelize
60
- table_name = model_name.underscore.pluralize
61
- migration_name = "add_ff1_columns_to_#{table_name}"
62
- migration_class_name = "AddFf1ColumnsTo#{model_class_name.pluralize}"
58
+ @table_name = model_name.underscore.pluralize
59
+ migration_name = "add_ff1_columns_to_#{@table_name}"
60
+ @migration_class_name = "AddFf1ColumnsTo#{model_class_name.pluralize}"
63
61
 
64
62
  # Check if model exists
65
63
  begin
@@ -70,12 +68,7 @@ module Ff1
70
68
 
71
69
  # Generate migration file
72
70
  migration_template 'migration.rb.erb',
73
- "db/migrate/#{timestamp}_#{migration_name}.rb",
74
- migration_class: migration_class_name,
75
- table_name: table_name,
76
- deleted_at_column: deleted_at_column,
77
- ff1_deleted_column: ff1_deleted_column,
78
- add_indexes: add_indexes?
71
+ "db/migrate/#{timestamp}_#{migration_name}.rb"
79
72
 
80
73
  say "Migration created for #{model_class_name}", :green
81
74
  say "Run 'rails db:migrate' to apply the changes", :blue
@@ -89,9 +82,6 @@ module Ff1
89
82
  options['deleted_at_column']
90
83
  end
91
84
 
92
- def ff1_deleted_column
93
- options['ff1_deleted_column']
94
- end
95
85
 
96
86
  def add_indexes?
97
87
  options['add_indexes']
@@ -1,15 +1,11 @@
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[<%= ActiveRecord::Migration.current_version %>]
4
4
  def change
5
- add_column :<%= table_name %>, :<%= deleted_at_column %>, :datetime, null: true
6
- add_column :<%= table_name %>, :<%= ff1_deleted_column %>, :boolean, null: false, default: false
5
+ add_column :<%= @table_name %>, :<%= deleted_at_column %>, :datetime, null: true
7
6
 
8
7
  <% if add_indexes? %>
9
- add_index :<%= table_name %>, :<%= deleted_at_column %>
10
- add_index :<%= table_name %>, :<%= ff1_deleted_column %>
11
- add_index :<%= table_name %>, [:<%= ff1_deleted_column %>, :<%= deleted_at_column %>],
12
- name: 'index_<%= table_name %>_on_ff1_deletion'
8
+ add_index :<%= @table_name %>, :<%= deleted_at_column %>
13
9
  <% end %>
14
10
  end
15
11
  end
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.5
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmed Abdellatif
@@ -129,15 +129,15 @@ files:
129
129
  - spec/ff1_spec.rb
130
130
  - spec/generators/ff1/install_generator_spec.rb
131
131
  - spec/spec_helper.rb
132
- homepage: https://github.com/a-abdellatif98/ff1
132
+ homepage: https://github.com/a-abdellatif98/ff1_gem
133
133
  licenses:
134
134
  - MIT
135
135
  metadata:
136
- bug_tracker_uri: https://github.com/a-abdellatif98/ff1/issues
137
- changelog_uri: https://github.com/a-abdellatif98/ff1/blob/main/CHANGELOG.md
138
- documentation_uri: https://github.com/a-abdellatif98/ff1/blob/main/README.md
139
- homepage_uri: https://github.com/a-abdellatif98/ff1
140
- source_code_uri: https://github.com/a-abdellatif98/ff1
136
+ bug_tracker_uri: https://github.com/a-abdellatif98/ff1_gem/issues
137
+ changelog_uri: https://github.com/a-abdellatif98/ff1/ff1_gem/main/CHANGELOG.md
138
+ documentation_uri: https://github.com/a-abdellatif98/ff1_gem/blob/main/README.md
139
+ homepage_uri: https://github.com/a-abdellatif98/ff1_gem
140
+ source_code_uri: https://github.com/a-abdellatif98/ff1_gem
141
141
  post_install_message:
142
142
  rdoc_options: []
143
143
  require_paths: