rom-sql 0.5.0 → 0.5.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7899f84b60af6ef8f8e80c230905abde0ca7be65
|
4
|
+
data.tar.gz: 34e2218734e91c6dfff3f83bf90db56e90b64be8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69fb7e9221a9fd8255fec6e41f2bf3f266b8e4d5c52c102381226c0ce09c7b3bdbb1c64e6c69f0755ee97e549eb3fe258fbfc888e574f4a6130f201fd45c9838
|
7
|
+
data.tar.gz: b6275286b6649dd026b5b9c248027579da3d5b4b3de1ea123a3a252a07df42e599265d97536ac84282fb97007fe4b0d356455b2ed201df31986daea382bb76f0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## v0.5.1 to-be-released
|
2
|
+
|
3
|
+
### Changed
|
4
|
+
|
5
|
+
* relations won't be finalized when table(s) is/are missing (solnic)
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
* Wrap errors when calling commands with `[]`-syntax (kwando)
|
10
|
+
|
11
|
+
[Compare v0.5.0...v0.5.1](https://github.com/rom-rb/rom-sql/compare/v0.5.0...v0.5.1)
|
12
|
+
|
1
13
|
## v0.5.0 2015-05-22
|
2
14
|
|
3
15
|
### Added
|
@@ -17,7 +29,7 @@
|
|
17
29
|
* `Commands::Update#set` has been deprecated (solnic)
|
18
30
|
* `Commands::Update#to` has been deprecated (solnic)
|
19
31
|
|
20
|
-
[Compare v0.4.3...
|
32
|
+
[Compare v0.4.3...v0.5.0](https://github.com/rom-rb/rom-sql/compare/v0.4.2...v0.5.0)
|
21
33
|
|
22
34
|
## v0.4.3 2015-05-17
|
23
35
|
|
data/lib/rom/sql/version.rb
CHANGED
@@ -184,6 +184,13 @@ describe 'Commands / Create' do
|
|
184
184
|
}.to raise_error(ROM::SQL::DatabaseError)
|
185
185
|
end
|
186
186
|
|
187
|
+
it 'supports [] syntax instead of call' do
|
188
|
+
expect {
|
189
|
+
Params.attribute :bogus_field
|
190
|
+
users.try { users.create[name: 'some name', bogus_field: 23] }
|
191
|
+
}.to raise_error(ROM::SQL::DatabaseError)
|
192
|
+
end
|
193
|
+
|
187
194
|
describe '.associates' do
|
188
195
|
it 'sets foreign key prior execution for many tuples' do
|
189
196
|
setup.commands(:tasks) do
|
@@ -59,4 +59,30 @@ describe ROM::SQL::Repository do
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
62
|
+
|
63
|
+
context 'setting up' do
|
64
|
+
include_context 'database setup'
|
65
|
+
|
66
|
+
it 'skips settings up associations when tables are missing' do
|
67
|
+
ROM.setup(:sql, uri)
|
68
|
+
|
69
|
+
ROM.relation(:foos) do
|
70
|
+
one_to_many :bars, key: :foo_id
|
71
|
+
end
|
72
|
+
|
73
|
+
expect { ROM.finalize }.not_to raise_error
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'skips finalization a relation when table is missing' do
|
77
|
+
ROM.setup(:sql, uri)
|
78
|
+
|
79
|
+
class Foos < ROM::Relation[:sql]
|
80
|
+
dataset :foos
|
81
|
+
one_to_many :bars, key: :foo_id
|
82
|
+
end
|
83
|
+
|
84
|
+
expect { ROM.finalize }.not_to raise_error
|
85
|
+
expect { Foos.model.dataset }.to raise_error(Sequel::Error, /no dataset/i)
|
86
|
+
end
|
87
|
+
end
|
62
88
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom-sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|