rom-sql 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
  SHA1:
3
- metadata.gz: b33ebf8637ba61f769f9ef29bef9f8669600a5ec
4
- data.tar.gz: e6aa49e9b572394bd11cabfb2af4901a2f7c2d49
3
+ metadata.gz: b418fd66438b79201905f6028726de01065b463f
4
+ data.tar.gz: 07b4d5462ea91aea73913c11794d7946569c3d34
5
5
  SHA512:
6
- metadata.gz: 7cbd522a297fad97d735728bdbb501a96a5660a41d4129a56d7cd9e829bd04f18dae86ff58db1f92d32b2d445a9dc30d1f71a9fb5faacbb70ba682921e827a50
7
- data.tar.gz: c7a8943d94016f88a5782cfa0b1a83c802649831841be8fe04093e1b0a49e76d5a74502dedb5742fc76852fafe205824af56145164244eeb17aa812a68ffaf72
6
+ metadata.gz: 8525d555c7682a1122613f1b4de21205029f6a6c1d4f1046cdff8c875468cacca3846826f2007fa73fc98074733f3bcfe4027049c2cfb24aed585a6049ae20b0
7
+ data.tar.gz: 4efbe175a8462af7c47751ca171085e112f5d82da75f3dbc3d20d81e4eac568e558a93490af860dd800900f449d59d61ca12e7e1dd2da0560b3fbe94dac95f33
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
- # v0.3.0 2014-11-24
1
+ # v0.1.1 2014-11-24
2
+
3
+ * [fixed] fix equalizer in header (solnic)
4
+ * [internal] minor refactor in adapter (solnic)
5
+
6
+ # v0.1.0 2014-11-24
2
7
 
3
8
  First release powered by Sequel
@@ -20,7 +20,7 @@ module ROM
20
20
  end
21
21
 
22
22
  def schema
23
- tables.map { |table| [table, dataset(table), dataset(table).columns] }
23
+ tables.map { |table| [table, dataset(table), columns(table)] }
24
24
  end
25
25
 
26
26
  def extend_relation_class(klass)
@@ -37,6 +37,10 @@ module ROM
37
37
  connection.tables
38
38
  end
39
39
 
40
+ def columns(table)
41
+ dataset(table).columns
42
+ end
43
+
40
44
  def dataset(table)
41
45
  connection[table]
42
46
  end
@@ -1,9 +1,10 @@
1
1
  module ROM
2
2
  module SQL
3
3
 
4
+ # @private
4
5
  class Header
5
6
  include Charlatan.new(:columns)
6
- include Equalizer.new(:columns, :name)
7
+ include Equalizer.new(:columns, :table)
7
8
 
8
9
  attr_reader :table
9
10
 
@@ -1,5 +1,5 @@
1
1
  module ROM
2
2
  module SQL
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -57,4 +57,11 @@ describe ROM::Relation do
57
57
  expect(columns).to eql([:users__id___user_id])
58
58
  end
59
59
  end
60
+
61
+ describe '#inspect' do
62
+ it 'includes dataset and header' do
63
+ expect(users.inspect).to include('header')
64
+ expect(users.inspect).to include('dataset')
65
+ end
66
+ end
60
67
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rom-sql
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
  - Piotr Solnica