activerecord-pg_enum 1.0.0 → 1.0.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: 6cc3af8b6c62c5db56b315c318f77f6cabf8ca8b522e6548f20f0cc780a64aa4
4
- data.tar.gz: 2bdc0adf214333b6777006dfeb025aca3de673adbb672d7581df53ea0bf3724b
3
+ metadata.gz: 8b1832aa7fd717d65aa994e1f6e66d7230199acde89ce3f773c624fd78e47edd
4
+ data.tar.gz: 6ebfdb25f6bc7b7cde05f1b1e7e15187d0636a1e286c97619ba38a379486eb1b
5
5
  SHA512:
6
- metadata.gz: 7fbbbf6ddf2d7f1eca10bc5fbc7218ffedbb87fd9798e277a0f566b0c6e18b428ed7a96824fd1e5676442a74796c9d7a55977adf2f7c17da36bf8d08a6b8981f
7
- data.tar.gz: e6a309965758d93b2c558e8029edcdb51bf4a4e2c5af5283d5fdf645e65729596dc02dfba497b22f3bfa35e913c3dc903c4ebe7ea8e2b8535da29bf88c7ff174
6
+ metadata.gz: 1950b01db769d5bb6e2a939d48661df46ec5349e6a26f7831a7d09c03dc1b02bcface09fc3dadda128fb367b39cb44d1a45534735dc6ca3c6022f64ddf627c1f
7
+ data.tar.gz: 6fd8d5fdeba244ee8944929073806b7f9d1e3d719345c09a6fc556ae9e28b30221133ee38594d2eca5247f5c89d0f4e2277d90b99a817abeba9171a8315fe7f1
data/.travis.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  sudo: false
2
+ dist: xenial
2
3
  language: ruby
3
4
  matrix:
4
5
  include:
@@ -18,10 +19,13 @@ matrix:
18
19
  gemfile: gemfiles/edge.gemfile
19
20
  allow_failures:
20
21
  - gemfile: gemfiles/edge.gemfile
22
+ services:
23
+ - postgresql
21
24
  addons:
22
- postgresql: "9.3"
25
+ postgresql: "9.6"
23
26
  before_install: gem install bundler -v 1.17.3
24
27
  script: "bundle exec rake spec"
25
28
  env:
26
29
  global:
27
30
  - TEST_USER=postgres
31
+ - PGPORT=5432
data/Appraisals CHANGED
@@ -1,5 +1,5 @@
1
1
  appraise "6.0" do
2
- gem "activerecord", "6.0.0.rc1"
2
+ gem "activerecord", "6.0.0"
3
3
  end
4
4
 
5
5
  appraise "5.2" do
data/CHANGELOG.md CHANGED
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.1] - 2019-08-16
10
+ - Update Rails 6 support to 6.0-final
11
+
9
12
  ## [1.0.0] - 2019-06-23
10
13
  ### Added
11
14
  - Support for 4.1 and 4.2
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in activerecord-pg_enum.gemspec
6
+ gemspec
data/README.md CHANGED
@@ -34,6 +34,25 @@ The best part is that PostgreSQL supports inserting new values at any point of t
34
34
  ALTER TYPE status_type ADD VALUE 'pending' BEFORE 'active';
35
35
  ```
36
36
 
37
+ ## schema.rb Support
38
+
39
+ The principle motivation of this gem is to seamlessly integrate PG enums into your `schema.rb` file. This means you can use them in your database columns without switching to `structure.sql`.
40
+
41
+ ```ruby
42
+ ActiveRecord::Schema.define(version: 2019_06_19_214914) do
43
+
44
+ # These are extensions that must be enabled in order to support this database
45
+ enable_extension "plpgsql"
46
+
47
+ create_enum "status_type", %w[new pending active archived]
48
+
49
+ create_table "orders", id: :serial, force: :cascade do |t|
50
+ t.enum "status", as: "status_type", default: "new"
51
+ end
52
+
53
+ end
54
+ ```
55
+
37
56
  ## Version support
38
57
 
39
58
  Every version of Rails with an `enum` macro is supported. This means 4.1 through master. Yes, this was annoying and difficult.
@@ -118,9 +137,9 @@ There's no technical reason why you couldn't detect enum columns at startup time
118
137
 
119
138
  ## Development
120
139
 
121
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `appraise rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
140
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `appraisal rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
122
141
 
123
- Test a specific version with `appraise 6.0 rake spec`. This is usually necessary because different versions have different Ruby version support.
142
+ Test a specific version with `appraisal 6.0 rake spec`. This is usually necessary because different versions have different Ruby version support.
124
143
 
125
144
  To install this gem onto your local machine, run `bundle exec rake install`.
126
145
 
data/Rakefile CHANGED
@@ -13,6 +13,7 @@ task :connection do
13
13
 
14
14
  ActiveRecord::Base.establish_connection(
15
15
  adapter: "postgresql",
16
+ port: ENV.fetch("PGPORT", "5432"),
16
17
  username: ENV.fetch("TEST_USER") { ENV.fetch("USER", "pg_enum") },
17
18
  password: ENV["TEST_PASSWORD"]
18
19
  )
data/bin/setup CHANGED
@@ -4,6 +4,6 @@ IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
6
  gem install appraisal
7
- appraise bundle install
7
+ appraisal bundle install
8
8
 
9
9
  # Do any other automated setup that you need to do here
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- activerecord-pg_enum (0.4.0)
4
+ activerecord-pg_enum (1.0.0)
5
5
  activerecord (>= 4.1.0)
6
6
  activesupport
7
7
  pg
@@ -74,4 +74,4 @@ DEPENDENCIES
74
74
  rspec (~> 3.0)
75
75
 
76
76
  BUNDLED WITH
77
- 1.16.3
77
+ 1.17.3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- activerecord-pg_enum (0.4.0)
4
+ activerecord-pg_enum (1.0.0)
5
5
  activerecord (>= 4.1.0)
6
6
  activesupport
7
7
  pg
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- activerecord-pg_enum (0.4.0)
4
+ activerecord-pg_enum (1.0.0)
5
5
  activerecord (>= 4.1.0)
6
6
  activesupport
7
7
  pg
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- activerecord-pg_enum (0.4.0)
4
+ activerecord-pg_enum (1.0.0)
5
5
  activerecord (>= 4.1.0)
6
6
  activesupport
7
7
  pg
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- activerecord-pg_enum (0.4.0)
4
+ activerecord-pg_enum (1.0.0)
5
5
  activerecord (>= 4.1.0)
6
6
  activesupport
7
7
  pg
data/gemfiles/6.0.gemfile CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "6.0.0.rc1"
5
+ gem "activerecord", "6.0.0"
6
6
 
7
7
  gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- activerecord-pg_enum (0.4.0)
4
+ activerecord-pg_enum (1.0.0)
5
5
  activerecord (>= 4.1.0)
6
6
  activesupport
7
7
  pg
@@ -9,17 +9,17 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (6.0.0.rc1)
13
- activesupport (= 6.0.0.rc1)
14
- activerecord (6.0.0.rc1)
15
- activemodel (= 6.0.0.rc1)
16
- activesupport (= 6.0.0.rc1)
17
- activesupport (6.0.0.rc1)
12
+ activemodel (6.0.0)
13
+ activesupport (= 6.0.0)
14
+ activerecord (6.0.0)
15
+ activemodel (= 6.0.0)
16
+ activesupport (= 6.0.0)
17
+ activesupport (6.0.0)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 0.7, < 2)
20
20
  minitest (~> 5.1)
21
21
  tzinfo (~> 1.1)
22
- zeitwerk (~> 2.1, >= 2.1.4)
22
+ zeitwerk (~> 2.1, >= 2.1.8)
23
23
  appraisal (2.2.0)
24
24
  bundler
25
25
  rake
@@ -53,13 +53,13 @@ GEM
53
53
  thread_safe (0.3.6)
54
54
  tzinfo (1.2.5)
55
55
  thread_safe (~> 0.1)
56
- zeitwerk (2.1.6)
56
+ zeitwerk (2.1.9)
57
57
 
58
58
  PLATFORMS
59
59
  ruby
60
60
 
61
61
  DEPENDENCIES
62
- activerecord (= 6.0.0.rc1)
62
+ activerecord (= 6.0.0)
63
63
  activerecord-pg_enum!
64
64
  appraisal
65
65
  bundler (~> 1.15)
@@ -66,7 +66,7 @@ GIT
66
66
  PATH
67
67
  remote: ..
68
68
  specs:
69
- activerecord-pg_enum (0.4.0)
69
+ activerecord-pg_enum (1.0.0)
70
70
  activerecord (>= 4.1.0)
71
71
  activesupport
72
72
  pg
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module PGEnum
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-pg_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Lassek
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-23 00:00:00.000000000 Z
11
+ date: 2019-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -135,6 +135,7 @@ files:
135
135
  - ".travis.yml"
136
136
  - Appraisals
137
137
  - CHANGELOG.md
138
+ - Gemfile
138
139
  - LICENSE
139
140
  - README.md
140
141
  - Rakefile