arable 0.1.0 → 0.1.5

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: 6902faa8ab5b48277e24a765c398d433af4dcdcda5ddff07db42e8e27a145481
4
- data.tar.gz: c12e4b8086aadac55214f08e792f92f167ea5a055de4eff128e5dd224f81063f
3
+ metadata.gz: e759cee16589d2e4a6938fa4fdd8299e7265212cd9eab8313fd5bd8bf8b22836
4
+ data.tar.gz: 20609ecbdca2c5c47b858d7d041a10e51f0c3c6a90fc447e25132e54c419175d
5
5
  SHA512:
6
- metadata.gz: 8c3db6a6754381c41b0856bebfb8b1d5f48c91c278590e7f3e96a241ad7cc7db8e84553eff5092ed690f22dd59a65f81d60f359d93a642cdb1afc1368b037935
7
- data.tar.gz: 28a80481d6fb7bb8a2b2763d1133995150652028b58a44ea3f94b144f4c997a1dd0d86f87941b5527fc3fb54b97021770f8470b038583087234d31df72e2b1c0
6
+ metadata.gz: d0d31fceda28bfc71b997b27ef8de06965e4663b0b25e913aecea6467347161540877090f4b54633f7ced28e7110be493c13ba70a30166d452c2d40e80ddaa2a
7
+ data.tar.gz: 8a662ef630e48b470c6057575fc83c967aedfaa46544f470eacab9e667d5ab4ce8b778cdc3fccd5f3000fd0a50f4f184be3b260d21b265ec2700b79e66c3ee13
data/README.md CHANGED
@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
32
 
33
33
  ## Contributing
34
34
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/arable.
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/dvisockas/arable.
36
36
 
37
37
  ## License
38
38
 
data/arable-0.1.0.gem ADDED
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Arable
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.5"
5
5
  end
data/lib/arable.rb CHANGED
@@ -8,7 +8,9 @@ module Arable
8
8
  SKIP_ARABLE_COLUMNS_CLASS_VAR_NAME = :@@skip_arable_columns
9
9
 
10
10
  def self.models
11
- ApplicationRecord.models.reject { _1.class_variable_defined?(SKIP_ARABLE_COLUMNS_CLASS_VAR_NAME) }
11
+ ApplicationRecord
12
+ .models
13
+ .reject { |model| model.class_variable_defined?(SKIP_ARABLE_COLUMNS_CLASS_VAR_NAME) }
12
14
  end
13
15
 
14
16
  def self.column_names_from_schema(table_name)
@@ -56,20 +58,19 @@ module Arable
56
58
  arel_table[Arel.star]
57
59
  end
58
60
  end
59
- end
60
61
 
61
- ActiveSupport.on_load(:active_record) do |active_record|
62
- def inherited(subclass)
63
- super
62
+ module ActiveRecordExtension
63
+ def inherited(subclass)
64
+ super
64
65
 
65
- subclass.extend(Arable::ClassMethods)
66
+ subclass.extend(Arable::ClassMethods)
66
67
 
67
- # include Arable only when the class has finished defining itself
68
- ActiveSupport.on_load(subclass)
69
- TracePoint.trace(:end) do |trace|
70
- if subclass == trace.self
71
- subclass.include(Arable)
72
- trace.disable
68
+ # include Arable only when the class has finished defining itself
69
+ TracePoint.trace(:end) do |trace|
70
+ if subclass == trace.self
71
+ subclass.include(Arable)
72
+ trace.disable
73
+ end
73
74
  end
74
75
  end
75
76
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danielius Visockas
@@ -26,6 +26,7 @@ files:
26
26
  - LICENSE.txt
27
27
  - README.md
28
28
  - Rakefile
29
+ - arable-0.1.0.gem
29
30
  - lib/arable.rb
30
31
  - lib/arable/version.rb
31
32
  - sig/arable.rbs