native_enum 1.0.0pre1 → 1.0.0
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 +4 -4
- data/README.markdown +10 -3
- data/lib/native_enum/version.rb +1 -1
- data/{activerecord_enum.gemspec → native_enum.gemspec} +1 -1
- data/spec/.travis.database.yml +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c36fa38e55ef02bee0cd0f847e761369a3bd3ee
|
4
|
+
data.tar.gz: b99e44f639de95c7fd18e131421845436a9ca998
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fddecaf480a6468c31fbde72d2a71a970ca2dc29d16dfd6f999716edb9c27ae3d3c3f21d1debb35a6b1c95c566d62855548705196559ef5fc231b222145db33e
|
7
|
+
data.tar.gz: 4f6870e00b9837cad9143f5d472bb4098acc3cdebc2b0ba1e27554518c9c4b49b46d85afc38c30a2b6ee58338d5244cd82929fd0838269272ebef06247ac9e42
|
data/README.markdown
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Native
|
1
|
+
# Native ENUM types in ActiveRecord #
|
2
2
|
|
3
3
|
Provides ActiveRecord (and thus Rails) support for the nonstandard `ENUM` and `SET` data types.
|
4
4
|
|
@@ -26,7 +26,14 @@ Your schema<->db coupling will work again, and it will fall back to a `VARCHAR`
|
|
26
26
|
gem 'native_enum'
|
27
27
|
```
|
28
28
|
|
29
|
-
|
29
|
+
Make sure to put this line *after* the line for your database adapter gem, like so:
|
30
|
+
|
31
|
+
```
|
32
|
+
gem 'mysql2', '~> 0.3.20'
|
33
|
+
gem 'native_enum'
|
34
|
+
```
|
35
|
+
|
36
|
+
That's it!
|
30
37
|
|
31
38
|
## Hypothetically asked questions ##
|
32
39
|
|
@@ -42,8 +49,8 @@ If you'd like to support other adapters, pull requests are welcome!
|
|
42
49
|
|
43
50
|
### I thought Rails 4.1+ did enums? ###
|
44
51
|
|
45
|
-
[ActiveRecord::Enum](http://api.rubyonrails.org/classes/ActiveRecord/Enum.html) is actually a layer that takes an integer column in the DB and *presents* it as an enum type.
|
46
52
|
This gem provides compatibility for *native* `ENUM` types in the DB.
|
53
|
+
[ActiveRecord::Enum](http://api.rubyonrails.org/classes/ActiveRecord/Enum.html) is actually a layer that takes an integer column in the DB and *presents* it as an enum type.
|
47
54
|
These are fundamentally different approaches, with different motivations, costs and benefits.
|
48
55
|
|
49
56
|
### Why doesn't it validate anything? ###
|
data/lib/native_enum/version.rb
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = NativeEnum::VERSION
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["Ian Young"]
|
10
|
-
s.email = ["
|
10
|
+
s.email = ["dev@iangreenleaf.com"]
|
11
11
|
s.homepage = ""
|
12
12
|
s.summary = %q{Enum data types for ActiveRecord}
|
13
13
|
s.description = %q{Adds the ENUM data type natively to ActiveRecord.}
|
data/spec/.travis.database.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: native_enum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Young
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
version: 3.1.0
|
97
97
|
description: Adds the ENUM data type natively to ActiveRecord.
|
98
98
|
email:
|
99
|
-
-
|
99
|
+
- dev@iangreenleaf.com
|
100
100
|
executables: []
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
@@ -108,13 +108,13 @@ files:
|
|
108
108
|
- LICENSE
|
109
109
|
- README.markdown
|
110
110
|
- Rakefile
|
111
|
-
- activerecord_enum.gemspec
|
112
111
|
- lib/connection_adapters/mysql2.rb
|
113
112
|
- lib/connection_adapters/sqlite3.rb
|
114
113
|
- lib/native_enum.rb
|
115
114
|
- lib/native_enum/activerecord_enum_post42.rb
|
116
115
|
- lib/native_enum/activerecord_enum_pre42.rb
|
117
116
|
- lib/native_enum/version.rb
|
117
|
+
- native_enum.gemspec
|
118
118
|
- spec/.travis.database.yml
|
119
119
|
- spec/Gemfile.rails_3_0
|
120
120
|
- spec/Gemfile.rails_3_1
|
@@ -144,9 +144,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
|
-
- - "
|
147
|
+
- - ">="
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version:
|
149
|
+
version: '0'
|
150
150
|
requirements: []
|
151
151
|
rubyforge_project: native_enum
|
152
152
|
rubygems_version: 2.4.2
|