card 1.16.5 → 1.16.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: bac89305ac339879278dba238d03e42b6f23ee48
4
- data.tar.gz: 1c92961bd981e632e33aec1688c555fcbf2a2d33
3
+ metadata.gz: fa16afa179644ed93610916824415dc0f335f98a
4
+ data.tar.gz: 4be27d6a8d2009ccdfe4f0eab560384f7d994031
5
5
  SHA512:
6
- metadata.gz: 930912c69ec9ecec592e821ee0fff42d62dc6bbd5ead2ee821d3a115b389f78b017d7ac77a7efc03d082c2d7bd355b4ededb58abdb4eb93c23c8c89e7f3583ee
7
- data.tar.gz: af32720632194cbfda4e0479195dc10d8b9748d19bd2f2bf8a89d5b7427315646d5de409486d523851d7e8ef09c538230d4e201aa6ec37a3f73abd45170dce26
6
+ metadata.gz: 1c10b84e81e83247a8c9edc39f69dedc3491db92966d50423488322acc16d4e840fd23480a3cfe97439963c2e64fa9500303bbaf7d41bdcc4d2275e8fa862614
7
+ data.tar.gz: 8e50aad38512790c0197d36be90e5788d22c1b263c927c605d6a3613f68e165cd1a635c8a1e06a36a25ec80e673de0412e64bda37a28cc46884e443c41997a90
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.16.5
1
+ 1.16.6
@@ -13,17 +13,17 @@ class SearchCardContext < Card::CoreMigration
13
13
  ['', 'left'],
14
14
  ]
15
15
  Card.search(:type_id=>['in', Card::SearchTypeID, Card::SetID]).each do |card|
16
- if card.cardname.junction?
16
+ if card.cardname.junction? && !card.virtual?
17
17
  content = card.content
18
18
  replace.each do |key, val|
19
- content.gsub!(/(?<=#{sep})_(#{key})(?=#{sep})/, "_#{val}")
19
+ content.gsub!(/(#{sep})_(#{key})(?=#{sep})/, "\\1_#{val}")
20
20
  end
21
21
  card.update_column :db_content, content
22
22
  card.actions.each do |action|
23
23
  if (content_change = action.change_for(:db_content).first)
24
24
  content = content_change.value
25
25
  replace.each do |key, val|
26
- content.gsub!(/(?<=#{sep})_(#{key})(?=#{sep})/, "_#{val}")
26
+ content.gsub!(/(#{sep})_(#{key})(?=#{sep})/, "\\1_#{val}")
27
27
  end
28
28
  content_change.update_column :value, content
29
29
  end
@@ -29,7 +29,7 @@ def get_query params={}
29
29
  query = Auth.as_bot do ## why is this a wagn_bot thing? can't deny search content??
30
30
  query_content = params.delete(:query) || raw_content
31
31
  #warn "get_query #{name}, #{query_content}, #{params.inspect}"
32
- raise("Error in card '#{self.name}':can't run search with empty content") if query_content.empty?
32
+ raise(JSON::ParserError, "Error in card '#{self.name}':can't run search with empty content") if query_content.empty?
33
33
  String === query_content ? JSON.parse( query_content ) : query_content
34
34
  end
35
35
  query.symbolize_keys!.merge! params.symbolize_keys
@@ -81,7 +81,7 @@ format do
81
81
  v[:query] = card.query( search_params )
82
82
  v[:item] = set_inclusion_opts args.merge( :query_view=>v[:query][:view] )
83
83
  v
84
- rescue =>e
84
+ rescue JSON::ParserError => e
85
85
  { :error => e }
86
86
  end
87
87
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.5
4
+ version: 1.16.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-09-19 00:00:00.000000000 Z
14
+ date: 2015-09-22 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: smartname