power_enum 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f576f611a7675530e8dacd67401ea4ec81678e7ac80faf8e0617f6d66ca05ac
4
- data.tar.gz: '0945f46839b9e6c6350d89650444eac4743f238f4fb3ed61c8cc0fe354f8441c'
3
+ metadata.gz: 0d082903c63c4312b09017f253ab915ce20548fae15d69472afa0781a8880354
4
+ data.tar.gz: 726cf42b46643730d6999adb7f7ecebbbc0dd952cecca428ffaac153555cabee
5
5
  SHA512:
6
- metadata.gz: 7e8e9b81d7a8fb74308c8d3f45b21bf9c600d56c0b3f46a7b9d8ab2562dcf1059365ab78b0003449856208a3832a2af5bdc73a6fb3fdbf1cf7b30a5b52a31a01
7
- data.tar.gz: d2bbc899889bde2eab17dc42829e7ffef2c2b11cc27c18ac27e566807329e6a5933d6f24b64d84a80a3c9d1670280b2d1fc819812f6fa89f6b7dcfe9ff9eabd8
6
+ metadata.gz: f5c5ef9ffde3a15bea67001ad4c27763488268ed6d850f0e8a25bde2a1ce24b48e4f5db979c90aa4de95c32f9e7ac51825fc6909dd2594cb5b2dbf7de59490d3
7
+ data.tar.gz: e4ca6e0641f07b4d0357b260e17175263094f4fe8234f195082a69527ebc7384b6ecb5ee42bf7fd02f2c7322cbe816dede2d403bd494d5096cfb72d0fe0ff26f
data/README.markdown CHANGED
@@ -10,7 +10,7 @@ Enumerations for Rails Done Right.
10
10
 
11
11
  ## Versions
12
12
 
13
- * PowerEnum 4.X (this version) supports Rails 6.X, and Rails 7.0
13
+ * PowerEnum 4.0.X (this version) supports Rails 6.X, and Rails 7.0 (Experimental)
14
14
  * PowerEnum 3.X supports Rails 4.2, Rails 5.X and Rails 6.0
15
15
  * PowerEnum 2.X supports Rails 4.X and Rails 5.0
16
16
  * PowerEnum 1.X supports Rails 3.1/3.2, available here: https://github.com/albertosaurus/power_enum
@@ -53,7 +53,7 @@ See "How to use it" below for more information.
53
53
 
54
54
  ## Requirements
55
55
 
56
- ### PowerEnum 4.X
56
+ ### PowerEnum 4.0.X
57
57
 
58
58
  * Ruby 2.7 or later (JRuby should work but isn't extensively tested).
59
59
  * Rails 6.0, 6.1, 6.2, 7.0
@@ -84,10 +84,6 @@ then run
84
84
 
85
85
  gem install power_enum
86
86
 
87
- If you want to verify the gem signature, use the `HighSecurity` installation option.
88
-
89
- gem install power_enum -P HighSecurity
90
-
91
87
  ## Gem Contents
92
88
 
93
89
  This package adds:
@@ -158,6 +154,8 @@ create_enum :booking_status, :name_limit => 50
158
154
  # end
159
155
  ```
160
156
 
157
+ **WARNING - This conflicts with PostgreSQL enum support in Rails 7+ and will be renamed in future versions.**
158
+
161
159
  Now, when you create your Booking model, your migration should create a reference column for status id's and a foreign
162
160
  key relationship to the booking\_statuses table.
163
161
 
@@ -169,7 +167,7 @@ create_table :bookings do |t|
169
167
  end
170
168
 
171
169
  # It's highly recommended to add a foreign key constraint here.
172
- # Ideally, you would use a gem of some sort to handle this.
170
+ # Ideally, you would use a gem of some sort to handle this for Rails < 6.
173
171
  # I have been using PgPower https://rubygems.org/gems/pg_power with much
174
172
  # success. It's fork, PgSaurus https://rubygems.org/gems/pg_saurus should
175
173
  # work just as well.
@@ -191,6 +189,8 @@ There are two methods added to Rails migrations:
191
189
 
192
190
  ##### create\_enum(enum\_name, options = {}, &block)
193
191
 
192
+ **WARNING - This conflicts with PostgreSQL enum support in Rails 7+ and will be renamed in future versions.**
193
+
194
194
  Creates a new enum table. `enum_name` will be automatically pluralized. The following options are supported:
195
195
 
196
196
  - [:name\_column] Specify the column name for name of the enum. By default it's :name. This can be a String or a Symbol
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.0
1
+ 4.0.1
@@ -8,7 +8,9 @@ module PowerEnum::Schema
8
8
 
9
9
  def self.included(base) # :nodoc:
10
10
  base::AbstractAdapter.class_eval do
11
- include PowerEnum::Schema::AbstractAdapter
11
+ # This squashes the "#create_enum" in the PostgreSQL adapter in Rails 7+.
12
+ # .../activerecord-7.0.X.Y/lib/active_record/connection_adapters/postgresql_adapter.rb
13
+ prepend PowerEnum::Schema::AbstractAdapter
12
14
  end
13
15
  end
14
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: power_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trevor Squires
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-01-20 00:00:00.000000000 Z
14
+ date: 2023-02-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler