adt-driver 0.1.1 → 0.1.2

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: 2b88e37958e07e31a6fbbbc2efb1391d3457a35b1497b0f9585df84c756f2811
4
- data.tar.gz: 8820828832c9f226667025199c8a7d7b9f5b8166c350066aa3dd68b4370b5623
3
+ metadata.gz: 49559d422c1b13021c150a8f621f1cfcbd00db1e5cf16d8c9b4cd0e04e25d9ec
4
+ data.tar.gz: 566496b86af7218528a708cd5ff307c4b3f0876273af12a47b215647afd5bec3
5
5
  SHA512:
6
- metadata.gz: dbd52461545f32648131d31f35c99f177864ae16c35309ea7380406f301bb63f6ea0d4ef45f2c939f64c8a8d5bd4e7cb19e0fd8a75c8c547d9812db3c798fb61
7
- data.tar.gz: 375d511f301dd11418cf2c335a320ab21b9e19325a45c7131bee0a3ffb44c7eae74596700b07893ccc6734bb6fa9a7fd746bce70515b2a3940d81b044e63be9c
6
+ metadata.gz: 6eb4df8077c83fb3b0ef500bf861bee2efbe218d5b7c43d3dc67b14af9c478cf1e6b7130c6cba7c6bdaeebfe2d1c18e9a84f338fc2b90471df922adfd91913a2
7
+ data.tar.gz: c47d2292dcf24f767c84c82e791be003c7ed76619cdfe2a785233c34386ec86fca9cad243a3375e49bf8ee01900dc66df8b43fea7f02f1e122d1c787131cab02
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- adt-driver (0.1.1)
4
+ adt-driver (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -23,7 +23,7 @@ module ADT
23
23
  #
24
24
  # @return [Array]
25
25
  def to_a
26
- @columns.map { |column| attributes[column.name] }
26
+ @columns.map { |column| attributes[column.underscored_name] }
27
27
  end
28
28
 
29
29
  # Do all search parameters match?
@@ -57,7 +57,7 @@ module ADT
57
57
  private
58
58
 
59
59
  def attribute_map # :nodoc:
60
- @columns.map { |column| [column.name, init_attribute(column)] }
60
+ @columns.map { |column| [column.underscored_name, init_attribute(column)] }
61
61
  end
62
62
 
63
63
  def get_data(column) # :nodoc:
@@ -51,7 +51,7 @@ module ADT
51
51
 
52
52
  def activerecord_schema(_table_only = false) # :nodoc:
53
53
  s = "ActiveRecord::Schema.define do\n"
54
- s << " create_table \"#{name}\" #{'{id: false}' if columns.map(&:downcase).include?('id')} do |t|\n"
54
+ s << " create_table \"#{name}\"#{', {id: false}' if columns.map(&:downcase).include?('id')} do |t|\n"
55
55
  columns.each do |column|
56
56
  s << " t.column #{activerecord_schema_definition(column)}"
57
57
  end
@@ -79,7 +79,7 @@ module ADT
79
79
  #
80
80
  # @return [String]
81
81
  def column_names
82
- columns.map(&:name)
82
+ columns.map(&:underscored_name)
83
83
  end
84
84
 
85
85
  # @return [String]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ADT
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adt-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Clement