activerecord-mysql-enum 0.1.0.pre.1 → 0.1.0

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
  SHA1:
3
- metadata.gz: c37c82f5ddedde0545503bdb4c824964037844e1
4
- data.tar.gz: 70ba4e27acd85d71c6343dabfa6e85de651d4a9d
3
+ metadata.gz: 731be1b698830840960df66c633230838cc5a12a
4
+ data.tar.gz: 0546d381f19f95569f6b44aa9c63ec2e5aa53cf1
5
5
  SHA512:
6
- metadata.gz: 0c7b178395cd972e7f48eb34ec889468fd356ade6af3fc234fb7bcc89bdf435fa151b4baac3e5fa655194b5c1fb7ef60218d5c8d22018bee2f60e4ba85ebe184
7
- data.tar.gz: e85ffe4570a862afb670ae6095f9c1b792a51c9c00783776c8480090b3897edf5d16a1776bc7cdeb658e435ac9c877556c6cd331be414ce30b4111cd14f91828
6
+ metadata.gz: 03b00f78790935c06f5fca8979e25618a73e81a9e7f5c8c3bd7745834054b63303414769dc17374e1f482ec5aeaa2b30b470ec03eafe943f8b4046614cd3ae21
7
+ data.tar.gz: 94b3cf153dfc170e391914761b6286002806ff405bdaabf9877e57294218363714f38f1af9d32b6696d6a205a469e22aef969183888799d072aa74d108a1f61a
@@ -0,0 +1,10 @@
1
+ ---
2
+ version: 1
3
+ update_configs:
4
+ - package_manager: "ruby:bundler"
5
+ directory: "/"
6
+ update_schedule: "live"
7
+ version_requirement_updates: "off"
8
+ commit_message:
9
+ prefix: "No-Jira"
10
+ include_scope: true
@@ -0,0 +1,38 @@
1
+ ---
2
+ on:
3
+ push:
4
+ tags:
5
+ - 'v*'
6
+ - '!v*.pre*'
7
+
8
+ name: Create Release
9
+
10
+ jobs:
11
+ build:
12
+ name: Create Release
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Get version from tag
16
+ id: tag_name
17
+ shell: bash
18
+ run: |
19
+ echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
20
+ - name: Checkout code
21
+ uses: actions/checkout@v2
22
+ - name: Get Changelog Entry
23
+ id: changelog_reader
24
+ uses: mindsers/changelog-reader-action@v1
25
+ with:
26
+ version: ${{ steps.tag_name.outputs.current_version }}
27
+ path: ./CHANGELOG.md
28
+ - name: Create Release
29
+ id: create_release
30
+ uses: actions/create-release@v1
31
+ env:
32
+ GITHUB_TOKEN: ${{ secrets.GEM_RELEASE_GIT_TOKEN }}
33
+ with:
34
+ tag_name: ${{ github.ref }}
35
+ release_name: Release ${{ github.ref }}
36
+ body: ${{ steps.changelog_reader.outputs.log_entry }}
37
+ draft: false
38
+ prerelease: false
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
@@ -4,7 +4,7 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
5
  Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [0.1.0] - Unreleased
7
+ ## [0.1.0] - 2020-08-17
8
8
  ### Added
9
9
  - Backwards compatibility with Rails 4
10
10
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activerecord-mysql-enum (0.1.0.pre.1)
4
+ activerecord-mysql-enum (0.1.0)
5
5
  activerecord (>= 4.2, < 6)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  This gem is an extension to ActiveRecord which enables native support of
4
4
  enumerations in the database schema using the ENUM type in MySQL. Forked
5
- and revitalized from the early work that Nick Pohodnya did with [enum_column3](https://github.com/jewlr/enum_column).
5
+ and revitalized from [enum_column3](https://github.com/jewlr/enum_column)
6
+ which was itself a fork of a fork of Nick Pohodnya's original gem for
7
+ Rails 3, [enum_column3](https://github.com/electronick/enum_column).
6
8
 
7
9
  ## Support
8
10
  Currently this has been manually tested with Rails version 4 and 5, and works with scaffolding.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path("../lib", __FILE__)
3
+ lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require "active_record/mysql/enum/version"
6
6
 
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.email = ["development@invoca.com"]
12
12
 
13
13
  spec.summary = "Enable enum type for the MySQL Adapter in ActiveRecord"
14
- spec.description = "Enable enum type for the MySQL Adapter in ActiveRecord"
14
+ spec.description = spec.summary
15
15
  spec.homepage = "http://github.com/Invoca/activerecord-mysql-enum"
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
@@ -28,7 +28,7 @@ module ActiveRecord
28
28
  #
29
29
  # will generate enum('a', 'b', 'c') for :limit => [:a, :b, :c]
30
30
  if Rails::VERSION::MAJOR < 5
31
- def type_to_sql(type, limit = nil, precision = nil, scale = nil, unsigned = nil, **) # :nodoc:
31
+ def type_to_sql(type, limit = nil, precision = nil, scale = nil, unsigned = nil, **_options) # :nodoc:
32
32
  if type.to_s == 'enum'
33
33
  native = native_database_types[type]
34
34
  column_type_sql = (native || {})[:name] || 'enum'
@@ -41,7 +41,7 @@ module ActiveRecord
41
41
  end
42
42
  end
43
43
  else
44
- def type_to_sql(type, limit: nil, precision: nil, scale: nil, unsigned: nil, **) # :nodoc:
44
+ def type_to_sql(type, limit: nil, precision: nil, scale: nil, unsigned: nil, **_options) # :nodoc:
45
45
  if type.to_s == 'enum'
46
46
  native = native_database_types[type]
47
47
  column_type_sql = (native || {})[:name] || 'enum'
@@ -57,11 +57,12 @@ module ActiveRecord
57
57
 
58
58
 
59
59
  private
60
+
60
61
  def initialize_type_map(m = type_map)
61
62
  super
62
63
 
63
- m.register_type(%r(enum)i) do |sql_type|
64
- limit = sql_type.sub(/^enum\('(.+)'\)/i, '\1').split("','").map { |v| v.intern }
64
+ m.register_type(/enum/i) do |sql_type|
65
+ limit = sql_type.sub(/^enum\('(.+)'\)/i, '\1').split("','").map { |v| v.to_sym }
65
66
  ActiveRecord::Type::Enum.new(limit: limit)
66
67
  end
67
68
  end
@@ -3,7 +3,7 @@
3
3
  module ActiveRecord
4
4
  module Mysql
5
5
  module Enum
6
- VERSION = "0.1.0.pre.1"
6
+ VERSION = "0.1.0"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-mysql-enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Pohodnya
@@ -38,6 +38,9 @@ executables: []
38
38
  extensions: []
39
39
  extra_rdoc_files: []
40
40
  files:
41
+ - ".dependabot/config.yml"
42
+ - ".github/workflows/gem_release.yml"
43
+ - ".gitignore"
41
44
  - CHANGELOG.md
42
45
  - Gemfile
43
46
  - Gemfile.lock
@@ -73,9 +76,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
76
  version: '0'
74
77
  required_rubygems_version: !ruby/object:Gem::Requirement
75
78
  requirements:
76
- - - ">"
79
+ - - ">="
77
80
  - !ruby/object:Gem::Version
78
- version: 1.3.1
81
+ version: '0'
79
82
  requirements: []
80
83
  rubyforge_project:
81
84
  rubygems_version: 2.6.13