brief 1.3.1 → 1.3.2
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +3 -3
- data/lib/brief/repository.rb +9 -2
- data/lib/brief/version.rb +1 -1
- data/spec/lib/brief/briefcase_spec.rb +9 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec9ccb7e1861ffc357e84038673da7f6505023b0
|
4
|
+
data.tar.gz: c54d945e486627df421b55e4b1bbccba9f9deb41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afc280b0d00cb5ad6bbcecd7b739d8b9f6bb74ed0c18cf03de02bef8b625d16ffccedd62f3a2f067ae0ec3971be80e6911e6350614ba984414de4f2d87b45d5c
|
7
|
+
data.tar.gz: d49a83e4d1afb37afa9c4ece0b1a741329399b2449acfd4212a251cd2f92f70802f6e06844f31a8dd056b2b544d1dd6fe4571758ee56030e140cdb8625f693c0
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
brief (1.3.
|
4
|
+
brief (1.3.1)
|
5
5
|
activemodel
|
6
6
|
activesupport
|
7
7
|
commander
|
@@ -24,7 +24,7 @@ GEM
|
|
24
24
|
minitest (~> 5.1)
|
25
25
|
thread_safe (~> 0.3, >= 0.3.4)
|
26
26
|
tzinfo (~> 1.1)
|
27
|
-
addressable (2.3.
|
27
|
+
addressable (2.3.7)
|
28
28
|
axiom-types (0.1.1)
|
29
29
|
descendants_tracker (~> 0.0.4)
|
30
30
|
ice_nine (~> 0.11.0)
|
@@ -45,7 +45,7 @@ GEM
|
|
45
45
|
activesupport (> 3.2.0)
|
46
46
|
octokit
|
47
47
|
rack
|
48
|
-
hashie (3.
|
48
|
+
hashie (3.4.0)
|
49
49
|
highline (1.6.21)
|
50
50
|
i18n (0.7.0)
|
51
51
|
ice_nine (0.11.1)
|
data/lib/brief/repository.rb
CHANGED
@@ -47,8 +47,15 @@ module Brief
|
|
47
47
|
# Create a finder method on the repository
|
48
48
|
# which lets us find instances of models by their class name
|
49
49
|
Brief::Model.table.keys.each do |type|
|
50
|
-
|
51
|
-
|
50
|
+
plural = type.to_s.pluralize
|
51
|
+
|
52
|
+
define_method("#{ plural }") do
|
53
|
+
instance_variable_get("@#{ plural }") || send("#{ plural }!")
|
54
|
+
end
|
55
|
+
|
56
|
+
define_method("#{ plural }!") do
|
57
|
+
instance_variable_set("@#{plural}", Brief::Model.for_type(type).models.to_a)
|
58
|
+
instance_variable_get("@#{ plural }")
|
52
59
|
end
|
53
60
|
end
|
54
61
|
end
|
data/lib/brief/version.rb
CHANGED
@@ -13,15 +13,23 @@ describe "The Briefcase" do
|
|
13
13
|
|
14
14
|
context "Model Loading" do
|
15
15
|
it "loads the model definitions from the models folder" do
|
16
|
+
expect(Brief::Model.classes.length).to eq(2)
|
16
17
|
end
|
17
18
|
|
18
19
|
it "loads the model definitions from the DSL in the config file" do
|
20
|
+
expect(Brief::Model.classes.length).to eq(2)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "caches the output" do
|
24
|
+
object_id = briefcase.epics.object_id
|
25
|
+
expect(briefcase.epics.object_id).to eq(object_id)
|
19
26
|
end
|
20
27
|
end
|
21
28
|
|
22
29
|
context "Document Mappings" do
|
23
30
|
it "has all of the documents" do
|
24
|
-
|
31
|
+
expect(briefcase.epics.length).to eq(1)
|
32
|
+
expect(briefcase.documents.length).to eq(7)
|
25
33
|
end
|
26
34
|
end
|
27
35
|
end
|