egov_utils 0.2.11 → 0.2.12

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
  SHA256:
3
- metadata.gz: f2899be5e361f84f804ca797e2642f1c1a2dd2fafb77611b0ddc31de6196b576
4
- data.tar.gz: 25af2ecd3c28f8e8891f499749c49d760fa8cdd227856cc7bccc494e7aa8fd50
3
+ metadata.gz: 38c99e9ec2cf5d25aa7b814edae5f6ea40bc0daf4415ab949b3a8cbacca86bb8
4
+ data.tar.gz: 0befe9b58a73e45efde674697f22c116e3a82e9219e68ea3ad8bf6bf6c70f29a
5
5
  SHA512:
6
- metadata.gz: f0b3c160f69bec1b24c52b901bb6cbe72ab3bf6e8d8f9776d9c27c2df5133a4be6b7305e6254a199e82c471ed1f9bd5359decf8790b18fc848f9ebff81c5d688
7
- data.tar.gz: 00f4ce960b807c0ad20a4300bf56cddcfeafde992ae599918e51729ae5033185714205d0f46ad093054b83ca9f7fafe4c1ca34709b738bbd63ff7e3869c294cd
6
+ metadata.gz: 73c3cef165f18c95dc3b518709ff825ff5f840b71444b471d414f2f0e0c031a17f68df0c4fa740e015109d7d7e509d7f92d3e2985f24375dc898e4fb1fbc51e9
7
+ data.tar.gz: c17455fe4ff7594600241b123e4100c881a0c6ba9bf9e6467c48d4b7912fbd3cc87f2891b48a1e89db0782d8a3da604a4726536acf20ed79f2e010656665c611
@@ -1,13 +1,13 @@
1
1
  module EgovUtils
2
- class FullAddress < AzaharaSchema::Attribute
2
+ class FullAddress < AzaharaSchema::DerivedAttribute
3
3
 
4
- def arel_field
5
- Arel::Nodes::NamedFunction.new 'CONCAT', [EgovUtils::Address.arel_table[:city], Arel::Nodes::SqlLiteral.new('\' \'') , EgovUtils::Address.arel_table[:street]]
4
+ def initialize(model, name, **options)
5
+ super(model, name, :concat, 'city', 'street', options)
6
6
  end
7
7
 
8
8
  def build_json_options!(options)
9
9
  options[:methods] ||= []
10
- options[:methods] << 'full_address'
10
+ options[:methods] << name
11
11
  options
12
12
  end
13
13
 
@@ -22,7 +22,7 @@ module EgovUtils
22
22
 
23
23
  def initialize_available_attributes
24
24
  @available_attributes ||= []
25
- @available_attributes << FullAddress.new(model, 'full_address', 'string')
25
+ @available_attributes << EgovUtils::FullAddress.new(model, 'full_address', schema: self)
26
26
  super
27
27
  end
28
28
 
@@ -1,5 +1,5 @@
1
1
  - @issues.group_by{|i| i.tracker}.each do |tracker, issues|
2
- %h4= tracker.name + '('+t('label_done')+')'
2
+ %h4= tracker.name + ' ('+t('label_done')+')'
3
3
  %ul
4
4
  - issues.each do |issue|
5
5
  %li= issue.subject
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.2.11'
2
+ VERSION = '0.2.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egov_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-19 00:00:00.000000000 Z
11
+ date: 2018-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails