edtf-humanize 0.0.6 → 0.0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ee4450eeb42029edd41bbb6b58dd24e66ae1fd8
4
- data.tar.gz: 1491fe02881b157527af1121d6a9fffddf461e49
3
+ metadata.gz: dc28b955897a0df8fd98e869bfe4cbafc60c850b
4
+ data.tar.gz: 67ceb2bfccf3438ec328f4dfc491bf7e3005e800
5
5
  SHA512:
6
- metadata.gz: 18462c0ce9aa3cd1919666f421cf8da6b059cceb931a1d37f578286eaaf430b80c7dd5dfc1a3989279eb31554d32b4849e8464cf88493dd3403a88dc7aa20d78
7
- data.tar.gz: bb7833b4a6c7586b3f0b8e73d436ef4dd5b1f395f9f0f8380c5e95abf5f7ad3ea995271a67d50585ea2dc0de5663c63bfd872cb7f8603caacd1b65decf534283
6
+ metadata.gz: 7e7a12162e59e2defc0726c7cf4fef39d99a14759bdc5333e18b3981df9a944eca2a950066880f8cc8ce9eb625d131f54517c95fa221b215110467f73596607d
7
+ data.tar.gz: e915de6f949f2de23aef3d4970e012751eaa5d7a3b240263876ad89bb1e7823ba96ffce2fa3217ee875622d348061c25174dc121b92f2a20ab90dab18b87fec7
@@ -5,7 +5,11 @@ module Edtf
5
5
  include Edtf::Humanize::Formats
6
6
 
7
7
  def humanize
8
- "#{apply_if_approximate(self.from)}#{simple_date_format(self.from)}#{Edtf::Humanize.configuration.interval_connector}#{simple_date_format(self.to)}"
8
+ "#{apply_if_approximate(self.from)}"\
9
+ "#{simple_date_format(self.from)}"\
10
+ "#{Edtf::Humanize.configuration.interval_connector}"\
11
+ "#{apply_if_approximate(self.to)}"\
12
+ "#{simple_date_format(self.to)}"
9
13
  end
10
14
 
11
15
  private
@@ -1,5 +1,5 @@
1
1
  module Edtf
2
2
  module Humanize
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -1039,3 +1039,102 @@ HumanizeSetTest: test_should_return_a_humanized_set_string
1039
1039
  HumanizeUnknownTest: test_should_return_a_humanized_unknown_string
1040
1040
  ------------------------------------------------------------------
1041
1041
   (0.0ms) rollback transaction
1042
+ --------------------------------------------------------------------------------------
1043
+ HumanizeUncertainIsoDateTest: test_should_return_a_humanized_uncertain_ISO_date_string
1044
+ --------------------------------------------------------------------------------------
1045
+ ------------------------------------------------------------------
1046
+ HumanizeCenturyTest: test_should_return_a_humanized_century_string
1047
+ ------------------------------------------------------------------
1048
+ ----------------------------------------------------------------
1049
+ HumanizeSeasonTest: test_should_return_a_humanized_season_string
1050
+ ----------------------------------------------------------------
1051
+ ---------------------------------------------------------------------------------------------------
1052
+ HumanizeUnspecifiedYearIsoDateTest: test_should_return_a_humanized_unspecified_year_ISO_date_string
1053
+ ---------------------------------------------------------------------------------------------------
1054
+ ----------------------------------------------------------
1055
+ HumanizeSetTest: test_should_return_a_humanized_set_string
1056
+ ----------------------------------------------------------
1057
+ -------------------------------------------------------------------------------------------
1058
+ HumanizeApproximateIntervalTest: test_should_return_a_humanized_approximate_interval_string
1059
+ -------------------------------------------------------------------------------------------
1060
+ --------------------------------------------------------------------
1061
+ HumanizeIntervalTest: test_should_return_a_humanized_interval_string
1062
+ --------------------------------------------------------------------
1063
+ ----------------------------
1064
+ EdtfHumanizeTest: test_truth
1065
+ ----------------------------
1066
+ -------------------------------------------------------------------
1067
+ HumanizeIsoDateTest: test_should_return_a_humanized_ISO_date_string
1068
+ -------------------------------------------------------------------
1069
+ ----------------------------------------------------------------
1070
+ HumanizeDecadeTest: test_should_return_a_humanized_decade_string
1071
+ ----------------------------------------------------------------
1072
+ ------------------------------------------------------------------
1073
+ HumanizeUnknownTest: test_should_return_a_humanized_unknown_string
1074
+ ------------------------------------------------------------------
1075
+ ----------------------------------------------------------
1076
+ HumanizeSetTest: test_should_return_a_humanized_set_string
1077
+ ----------------------------------------------------------
1078
+ ----------------------------
1079
+ EdtfHumanizeTest: test_truth
1080
+ ----------------------------
1081
+ --------------------------------------------------------------------------------------
1082
+ HumanizeUncertainIsoDateTest: test_should_return_a_humanized_uncertain_ISO_date_string
1083
+ --------------------------------------------------------------------------------------
1084
+ ---------------------------------------------------------------------------------------------------
1085
+ HumanizeUnspecifiedYearIsoDateTest: test_should_return_a_humanized_unspecified_year_ISO_date_string
1086
+ ---------------------------------------------------------------------------------------------------
1087
+ ------------------------------------------------------------------
1088
+ HumanizeCenturyTest: test_should_return_a_humanized_century_string
1089
+ ------------------------------------------------------------------
1090
+ ----------------------------------------------------------------
1091
+ HumanizeSeasonTest: test_should_return_a_humanized_season_string
1092
+ ----------------------------------------------------------------
1093
+ -------------------------------------------------------------------------------------------
1094
+ HumanizeApproximateIntervalTest: test_should_return_a_humanized_approximate_interval_string
1095
+ -------------------------------------------------------------------------------------------
1096
+ --------------------------------------------------------------------
1097
+ HumanizeIntervalTest: test_should_return_a_humanized_interval_string
1098
+ --------------------------------------------------------------------
1099
+ ----------------------------------------------------------------
1100
+ HumanizeDecadeTest: test_should_return_a_humanized_decade_string
1101
+ ----------------------------------------------------------------
1102
+ -------------------------------------------------------------------
1103
+ HumanizeIsoDateTest: test_should_return_a_humanized_ISO_date_string
1104
+ -------------------------------------------------------------------
1105
+ ------------------------------------------------------------------
1106
+ HumanizeUnknownTest: test_should_return_a_humanized_unknown_string
1107
+ ------------------------------------------------------------------
1108
+ ------------------------------------------------------------------
1109
+ HumanizeUnknownTest: test_should_return_a_humanized_unknown_string
1110
+ ------------------------------------------------------------------
1111
+ ---------------------------------------------------------------------------------------------------
1112
+ HumanizeUnspecifiedYearIsoDateTest: test_should_return_a_humanized_unspecified_year_ISO_date_string
1113
+ ---------------------------------------------------------------------------------------------------
1114
+ ----------------------------------------------------------------
1115
+ HumanizeSeasonTest: test_should_return_a_humanized_season_string
1116
+ ----------------------------------------------------------------
1117
+ -------------------------------------------------------------------------------------------
1118
+ HumanizeApproximateIntervalTest: test_should_return_a_humanized_approximate_interval_string
1119
+ -------------------------------------------------------------------------------------------
1120
+ ----------------------------------------------------------
1121
+ HumanizeSetTest: test_should_return_a_humanized_set_string
1122
+ ----------------------------------------------------------
1123
+ --------------------------------------------------------------------
1124
+ HumanizeIntervalTest: test_should_return_a_humanized_interval_string
1125
+ --------------------------------------------------------------------
1126
+ ----------------------------
1127
+ EdtfHumanizeTest: test_truth
1128
+ ----------------------------
1129
+ --------------------------------------------------------------------------------------
1130
+ HumanizeUncertainIsoDateTest: test_should_return_a_humanized_uncertain_ISO_date_string
1131
+ --------------------------------------------------------------------------------------
1132
+ ------------------------------------------------------------------
1133
+ HumanizeCenturyTest: test_should_return_a_humanized_century_string
1134
+ ------------------------------------------------------------------
1135
+ ----------------------------------------------------------------
1136
+ HumanizeDecadeTest: test_should_return_a_humanized_decade_string
1137
+ ----------------------------------------------------------------
1138
+ -------------------------------------------------------------------
1139
+ HumanizeIsoDateTest: test_should_return_a_humanized_ISO_date_string
1140
+ -------------------------------------------------------------------
@@ -30,7 +30,7 @@ end
30
30
  class HumanizeApproximateIntervalTest < ActiveSupport::TestCase
31
31
  test "should return a humanized approximate interval string" do
32
32
  d = Date.edtf('1970~/1980~')
33
- assert_equal "circa 1970 to 1980", d.humanize
33
+ assert_equal "circa 1970 to circa 1980", d.humanize
34
34
  end
35
35
  end
36
36
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edtf-humanize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cory Lown
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-23 00:00:00.000000000 Z
11
+ date: 2016-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: edtf