togglefy 1.1.0 → 1.1.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: 2419d9b30bf9193f8262fb0437f128510be4b00a0556a0fb244cf6b316299bb5
4
- data.tar.gz: 8e1b0f85f9aedd05eb5880277f6657eee36e1c570a768f3a037b9a1a4137852c
3
+ metadata.gz: 48668b30d043e271706d2264cba4c2ff6917bd36bc11aed4e8aee24aa9431917
4
+ data.tar.gz: f1d0543de69758fb5ef769b5b509901d4b9d1ae263d5f362489c7e099b0bc840
5
5
  SHA512:
6
- metadata.gz: c40f79f61887796ac7e646c0db064fc4a90862e3eea7260597d10eb6cad57543378e7ed6ca4ef0fd8e51efdc8539147035501419de7007bc07d47c63da755d3d
7
- data.tar.gz: 9cb7c91cc395acc224d1fa19533e86d9c899b15e61c56f05e608f0dc74d2d9f1392e3f1bf78a9d92790d67440e0b001411a2309f983134ddfe555f6ad6e5d2a1
6
+ metadata.gz: e9ef4ce6770dc88b80b9a4a27b3ce4b43cfa8484b4115f6c6e1451065721e248f0fd0464b881c6edfacfa57f93dae213e10157910b4fc44bc93aa06f4aa3a724
7
+ data.tar.gz: 8181535e9663feb971707ac2d6806020c13e15745fc647508da0d0f578f57cb298fdd98927b90e525837c37b7f7ec5249d1eaab0eb5be580dd068d39e7a19f23
data/README.md CHANGED
@@ -37,7 +37,37 @@ After adding the gem to your project, you need to run the generate command to ad
37
37
  rails generate togglefy:install
38
38
  ```
39
39
 
40
- This command will create the migrations to create the tables inside your project. Please, don't remove/change anything that's there or Togglefy may not work as expected.
40
+ This command will create the migrations to create the tables inside your project.
41
+
42
+ If you use an older version of Rails (< 5), then the migration files don't need you to specify the version.
43
+
44
+ To fix this, you will have to manually go to the two migration files of Togglefy: `create_feature` and `create_feature_assignments` and do the following:
45
+
46
+ Change these lines from this:
47
+
48
+ ```ruby
49
+ rails_version = "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}"
50
+
51
+ class CreateTogglefyFeatures < ActiveRecord::Migration[rails_version]
52
+ ```
53
+
54
+ ```ruby
55
+ rails_version = "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}"
56
+
57
+ class CreateTogglefyFeatureAssignments < ActiveRecord::Migration[rails_version]
58
+ ```
59
+
60
+ To this:
61
+
62
+ ```ruby
63
+ class CreateTogglefyFeatures < ActiveRecord::Migration
64
+ ```
65
+
66
+ ```ruby
67
+ class CreateTogglefyFeatureAssignments < ActiveRecord::Migration
68
+ ```
69
+
70
+ Please, don't remove/change anything else that's there or Togglefy may not work as expected.
41
71
 
42
72
  Run the migration to create these in your datase:
43
73
  ```bash
@@ -1,4 +1,8 @@
1
- class CreateTogglefyFeatureAssignments < ActiveRecord::Migration[8.0]
1
+ # frozen_string_literal: true
2
+
3
+ rails_version = "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}"
4
+
5
+ class CreateTogglefyFeatureAssignments < ActiveRecord::Migration[rails_version]
2
6
  def change
3
7
  create_table :togglefy_feature_assignments do |t|
4
8
  t.references :feature, null: false, foreign_key: { to_table: :togglefy_features }
@@ -1,4 +1,8 @@
1
- class CreateTogglefyFeatures < ActiveRecord::Migration[8.0]
1
+ # frozen_string_literal: true
2
+
3
+ rails_version = "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}"
4
+
5
+ class CreateTogglefyFeatures < ActiveRecord::Migration[rails_version]
2
6
  def change
3
7
  create_table :togglefy_features do |t|
4
8
  t.string :name, null: false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Togglefy
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: togglefy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Azevedo
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-04-16 00:00:00.000000000 Z
10
+ date: 2025-04-18 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Togglefy is a feature management Rails gem to help you control which
13
13
  features an user or a group has access to.