tablature 0.1.0 → 0.1.1

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: 78e1704fd9d861cc494afaea95d8b823cd9067ff7100215fee67a80fd3a6ed8c
4
- data.tar.gz: d4cbb87e57da6eca06be82239cd9f2ed57e0ddfedc64313f7d065b72b63d12e4
3
+ metadata.gz: eaec79244b29bb6514402673f8cb56f281c9cf25fb73c9a4dab413520e96b652
4
+ data.tar.gz: 54cfe803f7387135d1334dba6b4b16a0c7d1946adb6c88e092889fe881203511
5
5
  SHA512:
6
- metadata.gz: ccaf49c24f56fd9dedc98c852fb7c0e79b90b80cb56822257c8ae3068d23afc5b0e116b3f3f09491c2f0f0a17d2d474ace5038e3907747b3a8fce193eb7c36b7
7
- data.tar.gz: af0ac14e53c058c9c69700e9f8ce8e8195935ec4fa2719212243fec0ed6a93827f10807dfccc65c83dff0145241b389dc3db3a5b28a5938242bf2bd377e58345
6
+ metadata.gz: f30ffd3c9b8b14b08447b222a2bc5202042ef37f2c530beda33ed651c47ea7095f536bec494eef5767c44ba7a9b9751578bd9e3ff497e53203ac9bba477fc8a2
7
+ data.tar.gz: 2553bb52f8fecfa642cf2b8c1f3908bcabf01c3a9c6e5902076e7d447e6cf64c8bd13069902d95cc7e4478daff7a08b1d899128b74722687ad5a0dcf6e0962a0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tablature (0.1.0)
4
+ tablature (0.1.1)
5
5
  activerecord (>= 5.0.0)
6
6
  railties (>= 5.0.0)
7
7
 
@@ -48,12 +48,19 @@ module Tablature
48
48
  def to_tablature_table(table_name, rows)
49
49
  result = rows.first
50
50
  partioning_method = METHOD_MAP.fetch(result['type'])
51
- partitions = rows.map { |row| row['partition_name'] }.compact
51
+ partitions = rows.map { |row| row['partition_name'] }.compact.map(&method(:unquote))
52
52
 
53
53
  Tablature::PartitionedTable.new(
54
54
  name: table_name, partioning_method: partioning_method, partitions: partitions
55
55
  )
56
56
  end
57
+
58
+ # Taken from Rails's codebase.
59
+ def unquote(part)
60
+ return part if part.blank?
61
+
62
+ part.start_with?('"') ? part[1..-2] : part
63
+ end
57
64
  end
58
65
  end
59
66
  end
@@ -1,3 +1,3 @@
1
1
  module Tablature
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tablature
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aliou Diallo