brief 1.3.1 → 1.3.2

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
  SHA1:
3
- metadata.gz: f76fe6d3f07ffe657ecf1457f3b3895a882b5e7c
4
- data.tar.gz: 7721891fd080e174065958f0112757506c31fe1c
3
+ metadata.gz: ec9ccb7e1861ffc357e84038673da7f6505023b0
4
+ data.tar.gz: c54d945e486627df421b55e4b1bbccba9f9deb41
5
5
  SHA512:
6
- metadata.gz: 64c0b59e9917dec20b4affbe230e358418af652b47b16a8ca56f5789c2b44463291883e08ca60c9ff6db12f05f7aad24c84f4063764ea7c5d79ba99efb415eaf
7
- data.tar.gz: 677548043e04af7deddf8a30211b939101265587620a280c5987351c8728311091c41274c1203419029013f670a42b73b646fa2e2ed454953e9299a48e4f3891
6
+ metadata.gz: afc280b0d00cb5ad6bbcecd7b739d8b9f6bb74ed0c18cf03de02bef8b625d16ffccedd62f3a2f067ae0ec3971be80e6911e6350614ba984414de4f2d87b45d5c
7
+ data.tar.gz: d49a83e4d1afb37afa9c4ece0b1a741329399b2449acfd4212a251cd2f92f70802f6e06844f31a8dd056b2b544d1dd6fe4571758ee56030e140cdb8625f693c0
data/CHANGELOG.md CHANGED
@@ -106,3 +106,8 @@ attributes.
106
106
  ```
107
107
 
108
108
  then it will open up $EDITOR
109
+
110
+ ### 1.3.2
111
+
112
+ - Various performance fixes
113
+ - Model package loading system foundation
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brief (1.3.0)
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.6)
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.3.2)
48
+ hashie (3.4.0)
49
49
  highline (1.6.21)
50
50
  i18n (0.7.0)
51
51
  ice_nine (0.11.1)
@@ -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
- define_method(type.to_s.pluralize) do
51
- Brief::Model.for_type(type).models.to_a
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
@@ -1,3 +1,3 @@
1
1
  module Brief
2
- VERSION = '1.3.1'
2
+ VERSION = '1.3.2'
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brief
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Soeder