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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3f2ea4b0e398cac6c0991a681acf9fb40ac1f4bd4c6dc2a8b949cf0cadf2e72
4
- data.tar.gz: d5cf5dc9034d44348ca6dfc6c468adf3559985aad2256d6950438f30909bfa30
3
+ metadata.gz: 559cb3c1dc15071bcb9ddb4dd8dbb7f31e212cfa131093aa29db1a8d8be5137e
4
+ data.tar.gz: 919e1f0458dc7d632dfd37c5cc62851adaedd05cb9a927477d021f637a1b9480
5
5
  SHA512:
6
- metadata.gz: 6fde4ddeb3362318b6d1a19f90790020b6743b535dcd55394e40f6a94a49873f2c4a167e301e516bf02f39248dae5fdf166bc8bb69d3c6d2d027ed6bbc7cc202
7
- data.tar.gz: 528cf8d9ab1f760a60ad01ab0463236df628ec77e10904ac6497a0b659fc0c3057bf5343ba0618eb2f4049cc86caa60f4082d4ce2c87ceaac7e4e0012af0f88c
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module FixtureFox
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
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.5
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-06-05 00:00:00.000000000 Z
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