releaf-core 1.1.20 → 1.1.21
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 66579feb4b72a4e21b94e6e965e00fd77d4260df47e3e5776daad361e5e2bb61
|
4
|
+
data.tar.gz: cbdcf7c45b10a77ff42cc0f496cbee6539289dd06c959100f6d3a51e5d848e9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ec8ca25333d442825321ff6664ceec06a225c4bbd786e53889c99616c59d47888344a21d2aede206cef7fd507ca04544c7b4b36cc5977ac723edfe4673b7ba5
|
7
|
+
data.tar.gz: 7a0d77ab21152b8b2471ea4462924137aa8e7da9c3eed1d2bf9ac0bb9208df1bf03635f5ca895877a021a5e1fc4eba4c68b457ad9b49719a9428fa853631634a
|
@@ -174,6 +174,13 @@ class Releaf::Builders::TableBuilder
|
|
174
174
|
I18n.l(value, format: format) unless value.nil?
|
175
175
|
end
|
176
176
|
|
177
|
+
|
178
|
+
def format_time_content(resource, column)
|
179
|
+
value = column_value(resource, column)
|
180
|
+
format = Releaf::Builders::Utilities::DateFields.date_or_time_default_format(:time)
|
181
|
+
I18n.l(value, format: format) unless value.nil?
|
182
|
+
end
|
183
|
+
|
177
184
|
def format_association_content(resource, column)
|
178
185
|
format_string_content(resource, association_name(column))
|
179
186
|
end
|
@@ -457,6 +457,19 @@ describe Releaf::Builders::TableBuilder, type: :class do
|
|
457
457
|
end
|
458
458
|
end
|
459
459
|
|
460
|
+
describe "#format_time_content" do
|
461
|
+
it "returns localized time value" do
|
462
|
+
value = Time.parse("2012.12.29 17:12:07")
|
463
|
+
allow(subject).to receive(:column_value).with(resource, :created_at)
|
464
|
+
.and_return(value)
|
465
|
+
|
466
|
+
allow(I18n).to receive(:l).with(value, format: "%H:%M")
|
467
|
+
.and_return("17:12")
|
468
|
+
|
469
|
+
expect(subject.format_time_content(resource, :created_at)).to eq("17:12")
|
470
|
+
end
|
471
|
+
end
|
472
|
+
|
460
473
|
describe "#association_name" do
|
461
474
|
it "normalizes given column name by removing '_id' postfix and returning new value as symbol" do
|
462
475
|
expect(subject.association_name(:author_id)).to eq(:author)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: releaf-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CubeSystems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -638,104 +638,103 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
638
638
|
- !ruby/object:Gem::Version
|
639
639
|
version: '0'
|
640
640
|
requirements: []
|
641
|
-
|
642
|
-
rubygems_version: 2.6.10
|
641
|
+
rubygems_version: 3.0.2
|
643
642
|
signing_key:
|
644
643
|
specification_version: 4
|
645
644
|
summary: core gem for releaf
|
646
645
|
test_files:
|
647
|
-
- spec/
|
648
|
-
- spec/builders/releaf/
|
646
|
+
- spec/misc/factories_spec.rb
|
647
|
+
- spec/builders/releaf/settings/table_builder_spec.rb
|
648
|
+
- spec/builders/releaf/settings/form_builder_spec.rb
|
649
649
|
- spec/builders/releaf/builders/collection_spec.rb
|
650
|
-
- spec/builders/releaf/builders/confirm_destroy_dialog_builder_spec.rb
|
651
650
|
- spec/builders/releaf/builders/confirm_dialog_builder_spec.rb
|
652
|
-
- spec/builders/releaf/builders/
|
651
|
+
- spec/builders/releaf/builders/table_builder_spec.rb
|
652
|
+
- spec/builders/releaf/builders/page/menu_builder_spec.rb
|
653
|
+
- spec/builders/releaf/builders/page/layout_builder_spec.rb
|
654
|
+
- spec/builders/releaf/builders/page/header_builder_spec.rb
|
655
|
+
- spec/builders/releaf/builders/toolbox_builder_spec.rb
|
656
|
+
- spec/builders/releaf/builders/view_spec.rb
|
657
|
+
- spec/builders/releaf/builders/index_builder_spec.rb
|
658
|
+
- spec/builders/releaf/builders/utilities/date_fields_spec.rb
|
659
|
+
- spec/builders/releaf/builders/utilities/resolve_attribute_field_method_name_spec.rb
|
660
|
+
- spec/builders/releaf/builders/template_spec.rb
|
661
|
+
- spec/builders/releaf/builders/resource_view_spec.rb
|
662
|
+
- spec/builders/releaf/builders/pagination_builder_spec.rb
|
653
663
|
- spec/builders/releaf/builders/form_builder/associations_spec.rb
|
654
664
|
- spec/builders/releaf/builders/form_builder/date_fields_spec.rb
|
655
|
-
- spec/builders/releaf/builders/form_builder/i18n_fields_spec.rb
|
656
665
|
- spec/builders/releaf/builders/form_builder/label_spec.rb
|
666
|
+
- spec/builders/releaf/builders/form_builder/i18n_fields_spec.rb
|
657
667
|
- spec/builders/releaf/builders/form_builder/number_fields_spec.rb
|
658
668
|
- spec/builders/releaf/builders/form_builder_spec.rb
|
659
|
-
- spec/builders/releaf/builders/
|
660
|
-
- spec/builders/releaf/builders/
|
661
|
-
- spec/builders/releaf/builders/
|
662
|
-
- spec/builders/releaf/builders/
|
663
|
-
- spec/builders/releaf/builders/
|
669
|
+
- spec/builders/releaf/builders/association_reflector_spec.rb
|
670
|
+
- spec/builders/releaf/builders/base_spec.rb
|
671
|
+
- spec/builders/releaf/builders/confirm_destroy_dialog_builder_spec.rb
|
672
|
+
- spec/builders/releaf/builders/toolbox_spec.rb
|
673
|
+
- spec/builders/releaf/builders/edit_builder_spec.rb
|
664
674
|
- spec/builders/releaf/builders/resource_dialog_spec.rb
|
665
|
-
- spec/builders/releaf/builders/resource_view_spec.rb
|
666
675
|
- spec/builders/releaf/builders/show_builder_spec.rb
|
667
|
-
- spec/builders/releaf/builders/table_builder_spec.rb
|
668
|
-
- spec/builders/releaf/builders/template_spec.rb
|
669
|
-
- spec/builders/releaf/builders/toolbox_builder_spec.rb
|
670
|
-
- spec/builders/releaf/builders/toolbox_spec.rb
|
671
|
-
- spec/builders/releaf/builders/utilities/date_fields_spec.rb
|
672
|
-
- spec/builders/releaf/builders/utilities/resolve_attribute_field_method_name_spec.rb
|
673
|
-
- spec/builders/releaf/builders/view_spec.rb
|
674
676
|
- spec/builders/releaf/builders_spec.rb
|
675
|
-
- spec/
|
676
|
-
- spec/
|
677
|
-
- spec/controllers/concerns/releaf/richtext_attachments_spec.rb
|
678
|
-
- spec/controllers/releaf/action_controller_spec.rb
|
679
|
-
- spec/controllers/releaf/root_controller_spec.rb
|
680
|
-
- spec/controllers/releaf/settings_controller_spec.rb
|
681
|
-
- spec/error_hash_builder_spec.rb
|
677
|
+
- spec/rspec_helpers/test_helpers_spec.rb
|
678
|
+
- spec/rspec_helpers/test_spec.rb
|
682
679
|
- spec/ext/array_reorder_spec.rb
|
683
|
-
- spec/features/ajaxbox_spec.rb
|
684
|
-
- spec/features/authorization_spec.rb
|
685
|
-
- spec/features/breadcrumbs_spec.rb
|
686
|
-
- spec/features/dragonfly_integration_spec.rb
|
687
|
-
- spec/features/edit_actions_spec.rb
|
688
|
-
- spec/features/errors_spec.rb
|
689
|
-
- spec/features/index_actions_spec.rb
|
690
680
|
- spec/features/index_table_spec.rb
|
681
|
+
- spec/features/index_actions_spec.rb
|
682
|
+
- spec/features/title_spec.rb
|
683
|
+
- spec/features/richtext_embed_spec.rb
|
684
|
+
- spec/features/search_spec.rb
|
685
|
+
- spec/features/breadcrumbs_spec.rb
|
686
|
+
- spec/features/authorization_spec.rb
|
691
687
|
- spec/features/menu_spec.rb
|
692
|
-
- spec/features/
|
688
|
+
- spec/features/ajaxbox_spec.rb
|
689
|
+
- spec/features/edit_actions_spec.rb
|
693
690
|
- spec/features/richtext_custom_config_spec.rb
|
694
|
-
- spec/features/richtext_embed_spec.rb
|
695
691
|
- spec/features/richtext_spec.rb
|
696
|
-
- spec/features/search_spec.rb
|
697
692
|
- spec/features/settings_spec.rb
|
698
|
-
- spec/features/
|
699
|
-
- spec/
|
700
|
-
- spec/
|
701
|
-
- spec/
|
702
|
-
- spec/
|
703
|
-
- spec/
|
704
|
-
- spec/
|
705
|
-
- spec/lib/releaf/
|
693
|
+
- spec/features/richtext_attachments_spec.rb
|
694
|
+
- spec/features/dragonfly_integration_spec.rb
|
695
|
+
- spec/features/errors_spec.rb
|
696
|
+
- spec/models/settings_spec.rb
|
697
|
+
- spec/error_hash_builder_spec.rb
|
698
|
+
- spec/lib/releaf/responders/error_responder_spec.rb
|
699
|
+
- spec/lib/releaf/responders/confirm_destroy_responder_spec.rb
|
700
|
+
- spec/lib/releaf/responders/feature_disabled_responder_spec.rb
|
701
|
+
- spec/lib/releaf/responders/page_not_found_responder_spec.rb
|
702
|
+
- spec/lib/releaf/responders/after_save_responder_spec.rb
|
703
|
+
- spec/lib/releaf/responders/destroy_responder_spec.rb
|
704
|
+
- spec/lib/releaf/responders/access_denied_responder_spec.rb
|
706
705
|
- spec/lib/releaf/action_controller/search_spec.rb
|
707
|
-
- spec/lib/releaf/
|
708
|
-
- spec/lib/releaf/
|
706
|
+
- spec/lib/releaf/action_controller/features_spec.rb
|
707
|
+
- spec/lib/releaf/settings/register_spec.rb
|
708
|
+
- spec/lib/releaf/settings/normalize_value_spec.rb
|
709
|
+
- spec/lib/releaf/settings_manager_spec.rb
|
710
|
+
- spec/lib/releaf/resource_base_spec.rb
|
709
711
|
- spec/lib/releaf/build_errors_hash_spec.rb
|
712
|
+
- spec/lib/releaf/assets_resolver_spec.rb
|
713
|
+
- spec/lib/releaf/instance_cache_spec.rb
|
710
714
|
- spec/lib/releaf/configuration_spec.rb
|
711
715
|
- spec/lib/releaf/controller_definition_spec.rb
|
712
|
-
- spec/lib/releaf/
|
713
|
-
- spec/lib/releaf/
|
714
|
-
- spec/lib/releaf/instance_cache_spec.rb
|
715
|
-
- spec/lib/releaf/resource_base_spec.rb
|
716
|
-
- spec/lib/releaf/resource_fields_spec.rb
|
717
|
-
- spec/lib/releaf/resource_params_spec.rb
|
718
|
-
- spec/lib/releaf/resource_table_fields_spec.rb
|
719
|
-
- spec/lib/releaf/resource_utilities_spec.rb
|
720
|
-
- spec/lib/releaf/responders/access_denied_responder_spec.rb
|
721
|
-
- spec/lib/releaf/responders/after_save_responder_spec.rb
|
722
|
-
- spec/lib/releaf/responders/confirm_destroy_responder_spec.rb
|
723
|
-
- spec/lib/releaf/responders/destroy_responder_spec.rb
|
724
|
-
- spec/lib/releaf/responders/error_responder_spec.rb
|
725
|
-
- spec/lib/releaf/responders/feature_disabled_responder_spec.rb
|
726
|
-
- spec/lib/releaf/responders/page_not_found_responder_spec.rb
|
716
|
+
- spec/lib/releaf/service_spec.rb
|
717
|
+
- spec/lib/releaf/root_spec.rb
|
727
718
|
- spec/lib/releaf/responders_spec.rb
|
719
|
+
- spec/lib/releaf/resource_params_spec.rb
|
720
|
+
- spec/lib/releaf/resource_fields_spec.rb
|
721
|
+
- spec/lib/releaf/controller_group_definition_spec.rb
|
728
722
|
- spec/lib/releaf/root/configuration_spec.rb
|
729
723
|
- spec/lib/releaf/root/default_controller_resolver_spec.rb
|
730
|
-
- spec/lib/releaf/
|
731
|
-
- spec/lib/releaf/
|
732
|
-
- spec/lib/releaf/
|
733
|
-
- spec/lib/releaf/
|
734
|
-
- spec/lib/releaf/settings_manager_spec.rb
|
724
|
+
- spec/lib/releaf/resource_table_fields_spec.rb
|
725
|
+
- spec/lib/releaf/default_searchable_fields_spec.rb
|
726
|
+
- spec/lib/releaf/application_spec.rb
|
727
|
+
- spec/lib/releaf/resource_utilities_spec.rb
|
735
728
|
- spec/lib/validation_error_codes_spec.rb
|
736
|
-
- spec/
|
737
|
-
- spec/
|
729
|
+
- spec/fixtures/unicorn.jpg
|
730
|
+
- spec/fixtures/time.formats.xlsx
|
731
|
+
- spec/fixtures/common_fields.yml
|
732
|
+
- spec/fixtures/cs.png
|
738
733
|
- spec/routing/route_mapper_spec.rb
|
739
|
-
- spec/
|
740
|
-
- spec/
|
734
|
+
- spec/controllers/releaf/root_controller_spec.rb
|
735
|
+
- spec/controllers/releaf/action_controller_spec.rb
|
736
|
+
- spec/controllers/releaf/settings_controller_spec.rb
|
737
|
+
- spec/controllers/concerns/releaf/richtext_attachments_spec.rb
|
738
|
+
- spec/helpers/application_helper_spec.rb
|
739
|
+
- spec/helpers/button_helper_spec.rb
|
741
740
|
- spec/services/array/reorder_spec.rb
|