sql_enum 0.1.2 → 0.1.3

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: 8e66d89471635b35ba4a82a44cbdba443120926c
4
- data.tar.gz: bc24ffca63ef8480683d5bed1027a5104d23d94b
3
+ metadata.gz: 7df07c9d1ef110523da51ed7f0b2550ec1809f84
4
+ data.tar.gz: efa2e03748856de6da182b2635f16e3dc276a74e
5
5
  SHA512:
6
- metadata.gz: 0e8faa146d9d0b72b09e2822834659ff1c4c1ddbb80175b226df6df923603f1fb02eaa678af4b044887d12a31b03cfaaf4d275f9f7b2d275c1212c50efd27521
7
- data.tar.gz: 46a7a0b34a9aaeddf20016745c4dd2d73e02005bc1a4ea1bb6e7ce05094ead55c0509bb7f945548b121a608e1ac73fc2f5f7c08fc401ccf20372e45eb9c07ae6
6
+ metadata.gz: 107b0da16e773d658326ba2d819e5aa684fdfdef741c7b58519c41b86ab3184a11d67d23e55c75caa8b1bb32844ecd4e238bbdb815e4fde40b04bdb456c96ca9
7
+ data.tar.gz: 133795064b7aea3675a13a211243c932825fa73ddd00527240abfb21638197db6ae672ea402cbb1b1eac5c0b4eba249e6223c50bf7725c2748b36bfc21f8dae1
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sql_enum (0.1.0)
5
- activerecord (~> 5.x)
4
+ sql_enum (0.1.2)
5
+ activerecord (~> 5.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -41,7 +41,7 @@ module ActiveRecord
41
41
 
42
42
  # def active?() status == 0 end
43
43
  klass.send(:detect_enum_conflict!, name, "#{value_method_name}?")
44
- define_method("#{value_method_name}?") { binding.pry; self[attr] == value.to_s }
44
+ define_method("#{value_method_name}?") { self[attr] == value.to_s }
45
45
 
46
46
  # def active!() update! status: :active end
47
47
  klass.send(:detect_enum_conflict!, name, "#{value_method_name}!")
@@ -1,3 +1,3 @@
1
1
  module SqlEnum
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/sql_enum.rb CHANGED
@@ -1,13 +1,5 @@
1
1
  require 'active_record'
2
2
 
3
- require_relative 'active_record/enum/enum_type'
4
- require_relative 'active_record/type/enum'
5
- require_relative 'active_record/enum_override'
6
- require_relative 'active_record/connection_adapters/mysql2'
7
- require_relative 'active_record/connection_adapters/abstract_mysql'
8
- require_relative 'active_record/connection_adapters/mysql/column_methods'
9
- require_relative "sql_enum/version"
10
-
11
3
  module SqlEnum
12
4
  class << self
13
5
  attr_accessor :configuration
@@ -27,3 +19,11 @@ module SqlEnum
27
19
  end
28
20
  end
29
21
  end
22
+
23
+ require_relative 'active_record/enum/enum_type'
24
+ require_relative 'active_record/type/enum'
25
+ require_relative 'active_record/enum_override'
26
+ require_relative 'active_record/connection_adapters/mysql2'
27
+ require_relative 'active_record/connection_adapters/abstract_mysql'
28
+ require_relative 'active_record/connection_adapters/mysql/column_methods'
29
+ require_relative "sql_enum/version"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sql_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Fowler