wagn 1.14.5 → 1.14.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
  SHA1:
3
- metadata.gz: 603db4f3309ae1bbfef9fa3d46c0ea8726d19eeb
4
- data.tar.gz: bb63d11defc3f9358593f61eb91b1da1b6e7d96a
3
+ metadata.gz: 10504368aca16ec7391adb5e9777576dec0d7ffe
4
+ data.tar.gz: 6e82c4b52133d3c8341cb993d321ecbef2dadd01
5
5
  SHA512:
6
- metadata.gz: 76e13643f4a56c46998d3e829e3da401f096351d657320832356e496a8cba3f988a560aed3a41da0f291c77f49e6cc9f87c4366cc68d73ff5bc4b218e8adc5f8
7
- data.tar.gz: 0fbab63157b1a92a25d4b29bee7e1dd78b1e9d46a5c62f39d480d12c642d7b3f2f8481f4a53af4d5bcb18256d6befe68cc1329e08599d3be1d0d8820c007e204
6
+ metadata.gz: 7fde2052c74abcbb39c23ce8cf8eabfe1a585a5106ab0d478aab32a0ce92699a7041f97e37ff99e476e048731fd30037b8838ee40d7f4651458abd4de1109d6a
7
+ data.tar.gz: deafe3aeb7de4766adcf4c9e13485db15d973a1666e81b3b6f96fb81619553165b931193b2cfc006bb9f234f9641456987f7e3625d4a89051d280ed2e253761d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.14.5
1
+ 1.14.6
@@ -115,6 +115,7 @@ class CardController < ActionController::Base
115
115
  if action = @card.find_action_by_params( params )
116
116
  @card.selected_action_id = action.id
117
117
  end
118
+ Card::Env[:main_name] = params[:main] || (card && card.name) || ''
118
119
 
119
120
  render_errors if card.errors.any?
120
121
  true
@@ -4,8 +4,8 @@ class Card
4
4
  module Env
5
5
  class << self
6
6
  def reset args={}
7
- @@env = {}
8
-
7
+ @@env = { :main_name => nil }
8
+
9
9
  if c = args[:controller]
10
10
  self[:controller] = c
11
11
  self[:session] = c.request.session
@@ -106,6 +106,8 @@ describe Card::HtmlFormat do
106
106
  end
107
107
  c = Card['*all+*layout'] and c.content = '[[tmp layout]]'
108
108
  @main_card = Card.fetch('Joe User')
109
+ Card::Env[:main_name] = @main_card.name
110
+
109
111
  #warn "lay #{@layout_card.inspect}, #{@main_card.inspect}"
110
112
  end
111
113
 
@@ -145,7 +145,7 @@ format :html do
145
145
  view :not_found do |args| #ug. bad name.
146
146
  sign_in_or_up_links = if !Auth.signed_in?
147
147
  %{<div>
148
- #{ card_link ':signin', :text=>'Sign in' } or
148
+ #{ card_link :signin, :text=>'Sign in' } or
149
149
  #{ link_to 'Sign up', wagn_path('new/:signup') } to create it.
150
150
  </div>}
151
151
  end
@@ -22,7 +22,7 @@ format do
22
22
  when /^\//
23
23
  href = internal_url href[1..-1] ; 'internal-link'
24
24
  else
25
- return card_link href, options
25
+ return card_link href, opts
26
26
  end
27
27
  add_class opts, new_class
28
28
  link_to text, href, opts
@@ -31,6 +31,7 @@ format do
31
31
  # link to a specific card
32
32
  def card_link name, opts={}
33
33
  text = (opts.delete(:text) || name).to_name.to_show @context_names
34
+ name = Card[name].cardname if Symbol===name
34
35
 
35
36
  path_opts = opts.delete( :path_opts ) || {}
36
37
  path_opts[:name ] = name
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wagn
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.5
4
+ version: 1.14.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-01-19 00:00:00.000000000 Z
13
+ date: 2015-01-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails