fixture_fox 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fox.dsl.rb +42 -0
- data/lib/fixture_fox/analyzer.rb +1 -1
- data/lib/fixture_fox/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 559cb3c1dc15071bcb9ddb4dd8dbb7f31e212cfa131093aa29db1a8d8be5137e
|
4
|
+
data.tar.gz: 919e1f0458dc7d632dfd37c5cc62851adaedd05cb9a927477d021f637a1b9480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c8e37e8ced79cf730949f3bf7c05e53cca8d63c617071fb27c69693f2e025387a29941672fa59ec5a4f001c8d4e258660be64ea6e29a1992103f06492783a02
|
7
|
+
data.tar.gz: db3e0a16ee29fa1f31b33b27c05da0d702e70ce90617200a91b474ce29ae36eca40f9238c14e4ff7507a583de5c1ceeb481f7fd3b3784a14de283f2e0ce85953
|
data/fox.dsl.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# En DSL implementation kan også løse problemet med ordinals med en simpel
|
4
|
+
# method med en tæller
|
5
|
+
|
6
|
+
record Users, :alice do
|
7
|
+
name "Alice", :alices_name # Label on value is possible syntax
|
8
|
+
age 20
|
9
|
+
groups [supers, users]
|
10
|
+
picture do
|
11
|
+
title "Picture of Alice"
|
12
|
+
blob "image.jpg"
|
13
|
+
end
|
14
|
+
role :alices_role do
|
15
|
+
name "Administrator"
|
16
|
+
active true
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
record Users, :alice do # Merge with "alice" above
|
21
|
+
last_post ref(:alices_first_post)
|
22
|
+
end
|
23
|
+
|
24
|
+
record Blogs, :alices_blog do
|
25
|
+
user ref(:alice)
|
26
|
+
title "Alice's Blog"
|
27
|
+
end
|
28
|
+
|
29
|
+
table Roles do
|
30
|
+
record :user_role do
|
31
|
+
name "User"
|
32
|
+
active true
|
33
|
+
end
|
34
|
+
record :anon_role do
|
35
|
+
name "Anon"
|
36
|
+
active true
|
37
|
+
end
|
38
|
+
record do
|
39
|
+
name "RoleWithoutALabel"
|
40
|
+
active false
|
41
|
+
end
|
42
|
+
end
|
data/lib/fixture_fox/analyzer.rb
CHANGED
@@ -180,7 +180,7 @@ module FixtureFox
|
|
180
180
|
value =~ /^\d\d\d\d-\d\d-\d\d(?: \d\d:\d\d(?::\d\d)?)?$/
|
181
181
|
;
|
182
182
|
else
|
183
|
-
f.value.error("Data type mismatch - expected #{klass}, got #{value.class}")
|
183
|
+
f.value.error("Data type mismatch - expected #{klass}, got #{value.class}: #{value.inspect}")
|
184
184
|
end
|
185
185
|
}
|
186
186
|
when AstReferenceMember
|
data/lib/fixture_fox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fixture_fox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Rasmussen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -217,6 +217,7 @@ files:
|
|
217
217
|
- examples/views.sql
|
218
218
|
- exe/fox
|
219
219
|
- fixture_fox.gemspec
|
220
|
+
- fox.dsl.rb
|
220
221
|
- lib/fixture_fox.rb
|
221
222
|
- lib/fixture_fox/analyzer.rb
|
222
223
|
- lib/fixture_fox/anchor.rb
|