active_enum 1.0.0.rc5 → 1.0.0.rc6

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: f3b4223a54b48ca6e5810cd4ca651928cea2bcba2d5248a3f622823a4b608c0f
4
- data.tar.gz: e6c737353663a7ac4f354ce6a93b08bf23c767b64b3e53eeb7b2828f3b9dd2f8
3
+ metadata.gz: a6fb4a88a4e4c0b8894a94b35dee75c23f9ddbdba0db2c5078dd51049cbeb82a
4
+ data.tar.gz: 53e5d91603101b6c0e6590ceb58f6c214cbd221be7da6e4780825b51e71b640f
5
5
  SHA512:
6
- metadata.gz: 7e50f59ae27956da9f624247f43b94a947f966b4be8092deb53f37f50d2469bfe269eedc27e09a962111c9f15f00ab341af96db6f6d4d0411b7775636ce73dbf
7
- data.tar.gz: b6c2861e5ab807b77484715322f162ede9f56eab207620070637aa2a3b202841798f96873fbf856350ff2d1d1e9dbe6cf776c10f9f529cdc1c5c97e9405860d0
6
+ metadata.gz: b208b4ad29373d4f604673eef17315d5ede6265384d0cb3cadda81b674953fa35d09ac8149a2831a257d2f4e05e9931b02c01767aece9b2a7e45e4152f09e462
7
+ data.tar.gz: 8ef7bde84f962ac14307dccfee60849d022699c2841fabd7fe33cb5b4c284cafcff938e91497a6f44f02df27fc0cd0d7bbf707162b16663df30ad61d63688f08
@@ -1,8 +1,8 @@
1
- env:
2
- - "RAILS_VERSION=3.1.0"
3
- - "RAILS_VERSION=3.2.0"
4
- - "RAILS_VERSION=4.0.0"
5
- - "RAILS_VERSION=master"
1
+ gemfile:
2
+ - gemfiles/rails_4_2.gemfile
3
+ - gemfiles/rails_5_0.gemfile
4
+ - gemfiles/rails_5_1.gemfile
5
+ - gemfiles/rails_5_2.gemfile
6
6
  rvm:
7
- - 1.9.3
8
- - 2.0.0
7
+ - 2.5.8
8
+ - 2.6.6
@@ -0,0 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 4.2.11"
6
+
7
+ gem 'sqlite3', '~> 1.3.0'
8
+
9
+ gem 'rake'
10
+ gem 'simple_form', '~> 3.0'
11
+ gem 'byebug'
12
+ gem 'rspec', '~> 3.4'
13
+ gem 'rspec-rails', '~> 3.4'
14
+ gem 'capybara'
15
+
16
+ gemspec path: "../"
@@ -0,0 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 5.1.0"
6
+
7
+ gem 'sqlite3', '~> 1.3.0'
8
+
9
+ gem 'rake'
10
+ gem 'simple_form', '~> 5.0'
11
+ gem 'byebug'
12
+ gem 'rspec', '~> 3.4'
13
+ gem 'rspec-rails', '~> 3.4'
14
+ gem 'capybara'
15
+
16
+ gemspec path: "../"
@@ -0,0 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 5.1.0"
6
+
7
+ gem 'sqlite3', '~> 1.3.0'
8
+
9
+ gem 'rake'
10
+ gem 'simple_form', '~> 5.0'
11
+ gem 'byebug'
12
+ gem 'rspec', '~> 3.4'
13
+ gem 'rspec-rails', '~> 3.4'
14
+ gem 'capybara'
15
+
16
+ gemspec path: "../"
@@ -0,0 +1,16 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 5.2.0"
6
+
7
+ gem 'sqlite3', '~> 1.3.0'
8
+
9
+ gem 'rake'
10
+ gem 'simple_form', '~> 5.0'
11
+ gem 'byebug'
12
+ gem 'rspec', '~> 3.4'
13
+ gem 'rspec-rails', '~> 3.4'
14
+ gem 'capybara'
15
+
16
+ gemspec path: "../"
@@ -7,9 +7,9 @@ module ActiveEnum
7
7
  extend ClassMethods
8
8
  class_attribute :active_enum_options
9
9
  self.active_enum_options = options.reverse_merge(:name_column => 'name')
10
- scope :enum_values, proc { select("#{primary_key}, #{active_enum_options[:name_column]}").
10
+ scope :enum_values, proc { select(Arel.sql("#{primary_key}, #{active_enum_options[:name_column]}")).
11
11
  where(active_enum_options[:conditions]).
12
- order("#{primary_key} #{active_enum_options[:order]}") }
12
+ order(Arel.sql("#{primary_key} #{active_enum_options[:order]}")) }
13
13
  end
14
14
 
15
15
  end
@@ -63,7 +63,7 @@ module ActiveEnum
63
63
  if index.is_a?(Integer)
64
64
  enum_values.where(id: index)
65
65
  else
66
- enum_values.where("#{active_enum_options[:name_column]} like lower(?)", index.to_s)
66
+ enum_values.where("lower(#{active_enum_options[:name_column]}) = lower(?)", Arel.sql(index.to_s))
67
67
  end
68
68
  end
69
69
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveEnum
2
- VERSION = '1.0.0.rc5'
2
+ VERSION = '1.0.0.rc6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc5
4
+ version: 1.0.0.rc6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Meehan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-27 00:00:00.000000000 Z
11
+ date: 2020-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -39,6 +39,10 @@ files:
39
39
  - README.rdoc
40
40
  - Rakefile
41
41
  - active_enum.gemspec
42
+ - gemfiles/rails_4_2.gemfile
43
+ - gemfiles/rails_5_0.gemfile
44
+ - gemfiles/rails_5_1.gemfile
45
+ - gemfiles/rails_5_2.gemfile
42
46
  - init.rb
43
47
  - lib/active_enum.rb
44
48
  - lib/active_enum/acts_as_enum.rb
@@ -68,7 +72,7 @@ files:
68
72
  homepage: http://github.com/adzap/active_enum
69
73
  licenses: []
70
74
  metadata: {}
71
- post_install_message:
75
+ post_install_message:
72
76
  rdoc_options: []
73
77
  require_paths:
74
78
  - lib
@@ -84,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
88
  version: 1.3.1
85
89
  requirements: []
86
90
  rubygems_version: 3.0.3
87
- signing_key:
91
+ signing_key:
88
92
  specification_version: 4
89
93
  summary: Define enum classes in Rails and use them to enumerate ActiveRecord attributes
90
94
  test_files: