wire-framework 0.1.2 → 0.1.2.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/app/render/page.rb +9 -5
  3. data/lib/wire.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 238b040a1b739e2147c5e4a1252c0925a0be460f
4
- data.tar.gz: c9e5b877804cab40e02b6764fb5d169f0979fb64
3
+ metadata.gz: 4e9a3ea744103e56dceed5009e7621a3fa4739cf
4
+ data.tar.gz: b28737bac2591fbe91b1724d83650fc0e34b4699
5
5
  SHA512:
6
- metadata.gz: 01153b003e06bc29276695f65febff34065df8bd5616420fccd2afb463d43b314a852d147e11ee2dd83e947ea8ce4d7724c3ea4f91e8bd96dc426687e28260e6
7
- data.tar.gz: 46a20308fb4c4f7df2bd46374c58061a0774f7d599d070ff22f02fda57586788cdfa9267fa9d0c01104be8f7ac02ee5abc6e41c20b6d8f663b7c9bcb96eb5e95
6
+ metadata.gz: c87716ef046b41f1dd0c67683c43a47bc3591f050e236477b435698df429b57858ab27e9d3dda4f466386d63b244157d4ecd54601fd413fcf959c885e8972fa1
7
+ data.tar.gz: 7987137bed5acac4adb25ddca05eb7f7dc5b3e600e81e03884a73e87bc441d06174d1329e521d7d17cb2f3e3c201e8387e2b3c03660ccba8c3e3260d0ad7a38f
@@ -18,18 +18,22 @@ module Render
18
18
  hash = { actions: actions, context: context, content: content }
19
19
  template[:sources].each do |k, s|
20
20
  uri = "http://#{context.app[:remote_host]}/#{s[:uri]}"
21
+ go_ahead = true
21
22
  case s[:key]
22
23
  when :user
24
+ go_ahead = !context.user.nil?
23
25
  uri += "/#{context.user}"
24
26
  when :resource
25
27
  uri += "/#{context.uri[2]}"
26
28
  end
27
- begin
28
- temp = RestClient.get uri
29
- rescue RestClient::ResourceNotFound
30
- temp = nil
29
+ if go_ahead
30
+ begin
31
+ temp = RestClient.get uri
32
+ rescue RestClient::ResourceNotFound
33
+ temp = nil
34
+ end
35
+ hash[k] = temp
31
36
  end
32
- hash[k] = temp
33
37
  end
34
38
  message = template[:path].render(self, hash)
35
39
  if template[:use_layout]
data/lib/wire.rb CHANGED
@@ -24,5 +24,5 @@ end
24
24
  # @author Bryan T. Meyers
25
25
  module Wire
26
26
  # Current version of the Wire Gem
27
- VERSION = '0.1.2'
27
+ VERSION = '0.1.2.1'
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wire-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan T. Meyers