edtf-humanize 0.0.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE.txt +12 -0
  3. data/lib/edtf/humanize.rb +15 -5
  4. data/lib/edtf/humanize/century.rb +1 -1
  5. data/lib/edtf/humanize/decade.rb +1 -1
  6. data/lib/edtf/humanize/formats.rb +3 -3
  7. data/lib/edtf/humanize/interval.rb +5 -1
  8. data/lib/edtf/humanize/season.rb +13 -1
  9. data/lib/edtf/humanize/set.rb +28 -7
  10. data/lib/edtf/humanize/unknown.rb +11 -0
  11. data/lib/edtf/humanize/version.rb +1 -1
  12. data/spec/edtf_humanize_spec.rb +65 -0
  13. data/spec/spec_helper.rb +101 -0
  14. metadata +53 -92
  15. data/Rakefile +0 -34
  16. data/lib/tasks/edtf_humanize_tasks.rake +0 -4
  17. data/test/dummy/README.rdoc +0 -28
  18. data/test/dummy/Rakefile +0 -6
  19. data/test/dummy/app/assets/javascripts/application.js +0 -13
  20. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  21. data/test/dummy/app/controllers/application_controller.rb +0 -5
  22. data/test/dummy/app/helpers/application_helper.rb +0 -2
  23. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  24. data/test/dummy/bin/bundle +0 -3
  25. data/test/dummy/bin/rails +0 -4
  26. data/test/dummy/bin/rake +0 -4
  27. data/test/dummy/bin/setup +0 -29
  28. data/test/dummy/config.ru +0 -4
  29. data/test/dummy/config/application.rb +0 -26
  30. data/test/dummy/config/boot.rb +0 -5
  31. data/test/dummy/config/database.yml +0 -25
  32. data/test/dummy/config/environment.rb +0 -5
  33. data/test/dummy/config/environments/development.rb +0 -41
  34. data/test/dummy/config/environments/production.rb +0 -79
  35. data/test/dummy/config/environments/test.rb +0 -42
  36. data/test/dummy/config/initializers/assets.rb +0 -11
  37. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  38. data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  39. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  40. data/test/dummy/config/initializers/inflections.rb +0 -16
  41. data/test/dummy/config/initializers/mime_types.rb +0 -4
  42. data/test/dummy/config/initializers/session_store.rb +0 -3
  43. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  44. data/test/dummy/config/locales/en.yml +0 -23
  45. data/test/dummy/config/routes.rb +0 -56
  46. data/test/dummy/config/secrets.yml +0 -22
  47. data/test/dummy/db/test.sqlite3 +0 -0
  48. data/test/dummy/log/test.log +0 -540
  49. data/test/dummy/public/404.html +0 -67
  50. data/test/dummy/public/422.html +0 -67
  51. data/test/dummy/public/500.html +0 -66
  52. data/test/dummy/public/favicon.ico +0 -0
  53. data/test/edtf_humanize_test.rb +0 -70
  54. data/test/test_helper.rb +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8e0e270335cf2b7abbc0422aae7201a087a0be8b
4
- data.tar.gz: bbe083a2e89d792d98d849cc68200f1ee83c2ff2
2
+ SHA256:
3
+ metadata.gz: 370eca8ed68c9afdd06117f0e584f82f2f48eac108a1113b77ce91355844bcba
4
+ data.tar.gz: 608b950683ce5117a1bcb9fe63380fc99ce705b53184f8e68c6e6a545527bbf7
5
5
  SHA512:
6
- metadata.gz: 44252fe461dcc101dd6bda09cc54d313a5466b295aa0dbdf140e4ffd9269f12c2541a525afe622402891367bbd8d26c4f5a08921d96fdb7c72e6f0230a585cc4
7
- data.tar.gz: a15d6d76736c69afb1c70bfca8bd3e56ae849f15c916fd3727eb4fd0821fb80252ac46d91f1d5b77ff4ae88cfd98c3f3f3ddad24ef8c92e7e7a7c1c4acde61d4
6
+ metadata.gz: 4093df048a06504a30c04a8960ed6e253bb39a3d5d0015ac6f791287515ea9d2c800c0d04bf1e2834b5da2757243b47a1ab78589c5b259e7b9a7bd58ad4d2991
7
+ data.tar.gz: 6946c6594d3149788cbfc4ec50f770d450b3716817d7c8ad4c73c0ad58cd3a3b535436b1e373ccf998528d9ebdd4eb9faed24f42898da2d5de58b9ca9023bd7e
@@ -0,0 +1,12 @@
1
+ Copyright (c) 2014, Duke University
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+
8
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
+
10
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -9,6 +9,7 @@ module Edtf
9
9
  require 'edtf/humanize/season'
10
10
  require 'edtf/humanize/interval'
11
11
  require 'edtf/humanize/set'
12
+ require 'edtf/humanize/unknown'
12
13
  require 'edtf/humanize/iso_date'
13
14
 
14
15
  EDTF::Decade.include Edtf::Humanize::Decade
@@ -16,8 +17,10 @@ module Edtf
16
17
  EDTF::Season.include Edtf::Humanize::Season
17
18
  EDTF::Interval.include Edtf::Humanize::Interval
18
19
  EDTF::Set.include Edtf::Humanize::Set
20
+ EDTF::Unknown.include Edtf::Humanize::Unknown
19
21
  Date.include Edtf::Humanize::IsoDate
20
22
 
23
+
21
24
  def self.configuration
22
25
  @configuration ||= Configuration.new
23
26
  end
@@ -41,10 +44,13 @@ module Edtf
41
44
  :century_suffix,
42
45
  :unspecified_digit_substitute,
43
46
  :interval_connector,
47
+ :interval_unspecified_suffix,
44
48
  :set_dates_connector,
45
49
  :set_last_date_connector,
46
50
  :set_two_dates_connector,
47
- :interval_unspecified_suffix
51
+ :set_earlier_prefix,
52
+ :set_later_prefix,
53
+ :unknown
48
54
 
49
55
  def initialize
50
56
  @day_precision_strftime_format = "%B %-d, %Y"
@@ -52,12 +58,12 @@ module Edtf
52
58
  @year_precision_strftime_format = "%Y"
53
59
 
54
60
  @approximate_date_prefix = "circa "
55
-
61
+
56
62
  @uncertain_date_suffix = "?"
57
-
63
+
58
64
  @decade_suffix = "s"
59
65
  @century_suffix = "s"
60
-
66
+
61
67
  @unspecified_digit_substitute = "x"
62
68
 
63
69
  @interval_connector = " to "
@@ -66,9 +72,13 @@ module Edtf
66
72
  @set_dates_connector = ", "
67
73
  @set_last_date_connector = " or "
68
74
  @set_two_dates_connector = " or "
75
+ @set_earlier_prefix = "on or before "
76
+ @set_later_prefix = "on or after "
77
+
78
+ @unknown = "unknown"
69
79
  end
70
80
 
71
81
  end
72
-
82
+
73
83
  end
74
84
  end
@@ -3,7 +3,7 @@ module Edtf
3
3
  module Century
4
4
 
5
5
  include Edtf::Humanize::Formats
6
-
6
+
7
7
  def humanize
8
8
  "#{self.begin.year}#{Edtf::Humanize.configuration.century_suffix}"
9
9
  end
@@ -3,7 +3,7 @@ module Edtf
3
3
  module Decade
4
4
 
5
5
  include Edtf::Humanize::Formats
6
-
6
+
7
7
  def humanize
8
8
  "#{self.begin.year}#{Edtf::Humanize.configuration.decade_suffix}"
9
9
  end
@@ -25,14 +25,14 @@ module Edtf
25
25
 
26
26
  # October 5, 1995
27
27
  def day_precision_format date
28
- date.strftime(Edtf::Humanize.configuration.day_precision_strftime_format)
28
+ I18n.localize(date, format: Edtf::Humanize.configuration.day_precision_strftime_format)
29
29
  end
30
30
 
31
31
  # October 1995
32
32
  def month_precision_format date
33
- date.strftime(Edtf::Humanize.configuration.month_precision_strftime_format)
33
+ I18n.localize(date, format: Edtf::Humanize.configuration.month_precision_strftime_format)
34
34
  end
35
-
35
+
36
36
  # 1995
37
37
  def year_precision_format date
38
38
  date.strftime(Edtf::Humanize.configuration.year_precision_strftime_format)
@@ -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
@@ -5,7 +5,19 @@ module Edtf
5
5
  include Edtf::Humanize::Formats
6
6
 
7
7
  def humanize
8
- "#{apply_if_approximate(self)}#{self.season} #{self.year}#{apply_if_uncertain(self)}"
8
+ "#{apply_if_approximate(self)}"\
9
+ "#{translate_season(self.season)} #{self.year}"\
10
+ "#{apply_if_uncertain(self)}"
11
+ end
12
+
13
+ private
14
+
15
+ def translate_season(season)
16
+ begin
17
+ I18n.translate!("date.seasons.#{self.season}")
18
+ rescue I18n::MissingTranslationData
19
+ self.season
20
+ end
9
21
  end
10
22
 
11
23
  end
@@ -5,15 +5,36 @@ module Edtf
5
5
  include Edtf::Humanize::Formats
6
6
 
7
7
  def humanize
8
- display = []
9
- self.entries.each do |date|
10
- display << "#{apply_if_approximate(date)}#{simple_date_format(date)}"
11
- end
12
- display.to_sentence(
13
- words_connector: Edtf::Humanize.configuration.set_dates_connector,
8
+ format_set_entries(self).to_sentence(
9
+ words_connector: Edtf::Humanize.configuration.set_dates_connector,
14
10
  last_word_connector: Edtf::Humanize.configuration.set_last_date_connector,
15
11
  two_words_connector: Edtf::Humanize.configuration.set_two_dates_connector
16
- )
12
+ )
13
+ end
14
+
15
+ private
16
+
17
+ def format_set_entries(dates)
18
+ dates.entries.map.with_index { |date, index|
19
+ "#{apply_if_earlier(dates, index)}"\
20
+ "#{apply_if_later(dates, index)}"\
21
+ "#{apply_if_approximate(date)}"\
22
+ "#{simple_date_format(date)}"
23
+ }
24
+ end
25
+
26
+ # '[..1760-12-03]' => on or before December 3, 1760
27
+ def apply_if_earlier(dates, index)
28
+ if dates.earlier? && index == 0
29
+ Edtf::Humanize.configuration.set_earlier_prefix
30
+ end
31
+ end
32
+
33
+ # '[1760-12..]' => on or after December 1760
34
+ def apply_if_later(dates, index)
35
+ if dates.later? && (index + 1) == dates.size
36
+ Edtf::Humanize.configuration.set_later_prefix
37
+ end
17
38
  end
18
39
 
19
40
  end
@@ -0,0 +1,11 @@
1
+ module Edtf
2
+ module Humanize
3
+ module Unknown
4
+
5
+ def humanize
6
+ Edtf::Humanize.configuration.unknown
7
+ end
8
+
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  module Edtf
2
2
  module Humanize
3
- VERSION = "0.0.3"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -0,0 +1,65 @@
1
+ require 'edtf-humanize'
2
+
3
+ RSpec.describe Edtf::Humanize do
4
+
5
+ it { is_expected.to be_a(Module) }
6
+
7
+ context 'with a decade' do
8
+ it 'should return a humanized decade string' do
9
+ expect(Date.edtf('199x').humanize).to eq('1990s')
10
+ end
11
+ end
12
+
13
+ context 'with a centrury' do
14
+ it 'should return a humanized century string' do
15
+ expect(Date.edtf('19xx').humanize).to eq('1900s')
16
+ end
17
+ end
18
+
19
+ context 'with an interval' do
20
+ it 'should return a humanized interval string' do
21
+ expect(Date.edtf('1970/1980').humanize).to eq('1970 to 1980')
22
+ end
23
+ end
24
+
25
+ context 'with an appoximate interval'
26
+ it 'should return a humanized approximate interval string' do
27
+ expect(Date.edtf('1970~/1980~').humanize).to eq('circa 1970 to circa 1980')
28
+ end
29
+
30
+ context 'with an iso date' do
31
+ it 'should return a humanized ISO date string' do
32
+ expect(Date.edtf('1975-07-01').humanize).to eq('July 1, 1975')
33
+ end
34
+ end
35
+
36
+ context 'with an uncertain iso date' do
37
+ it 'should return a humanized uncertain ISO date string' do
38
+ expect(Date.edtf('1975?').humanize).to eq('1975?')
39
+ end
40
+ end
41
+
42
+ context 'with an unspecfic year iso date' do
43
+ it 'should return a humanized unspecified year ISO date string' do
44
+ expect(Date.edtf('197u').humanize).to eq('197x')
45
+ end
46
+ end
47
+
48
+ context 'with a season' do
49
+ it 'should return a humanized season string' do
50
+ expect(Date.edtf('1975-22').humanize).to eq('summer 1975')
51
+ end
52
+ end
53
+
54
+ context 'with a set' do
55
+ it 'should return a humanized set string' do
56
+ expect(Date.edtf('[1980, 1981, 1983]').humanize).to eq('1980, 1981 or 1983')
57
+ end
58
+ end
59
+
60
+ context 'with an unknown value' do
61
+ it 'should return a humanized unknown string' do
62
+ expect(Date.edtf('uuuu').humanize).to eq('unknown')
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,101 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
16
+ #
17
+ RSpec.configure do |config|
18
+ # rspec-expectations config goes here. You can use an alternate
19
+ # assertion/expectation library such as wrong or the stdlib/minitest
20
+ # assertions if you prefer.
21
+ config.expect_with :rspec do |expectations|
22
+ # This option will default to `true` in RSpec 4. It makes the `description`
23
+ # and `failure_message` of custom matchers include text for helper methods
24
+ # defined using `chain`, e.g.:
25
+ # be_bigger_than(2).and_smaller_than(4).description
26
+ # # => "be bigger than 2 and smaller than 4"
27
+ # ...rather than:
28
+ # # => "be bigger than 2"
29
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
30
+ end
31
+
32
+ # rspec-mocks config goes here. You can use an alternate test double
33
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
34
+ config.mock_with :rspec do |mocks|
35
+ # Prevents you from mocking or stubbing a method that does not exist on
36
+ # a real object. This is generally recommended, and will default to
37
+ # `true` in RSpec 4.
38
+ mocks.verify_partial_doubles = true
39
+ end
40
+
41
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
42
+ # have no way to turn it off -- the option exists only for backwards
43
+ # compatibility in RSpec 3). It causes shared context metadata to be
44
+ # inherited by the metadata hash of host groups and examples, rather than
45
+ # triggering implicit auto-inclusion in groups with matching metadata.
46
+ config.shared_context_metadata_behavior = :apply_to_host_groups
47
+
48
+ # The settings below are suggested to provide a good initial experience
49
+ # with RSpec, but feel free to customize to your heart's content.
50
+ =begin
51
+ # This allows you to limit a spec run to individual examples or groups
52
+ # you care about by tagging them with `:focus` metadata. When nothing
53
+ # is tagged with `:focus`, all examples get run. RSpec also provides
54
+ # aliases for `it`, `describe`, and `context` that include `:focus`
55
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
56
+ config.filter_run_when_matching :focus
57
+
58
+ # Allows RSpec to persist some state between runs in order to support
59
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
60
+ # you configure your source control system to ignore this file.
61
+ config.example_status_persistence_file_path = "spec/examples.txt"
62
+
63
+ # Limits the available syntax to the non-monkey patched syntax that is
64
+ # recommended. For more details, see:
65
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
66
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
67
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
68
+ config.disable_monkey_patching!
69
+
70
+ # This setting enables warnings. It's recommended, but in some cases may
71
+ # be too noisy due to issues in dependencies.
72
+ config.warnings = true
73
+
74
+ # Many RSpec users commonly either run the entire suite or an individual
75
+ # file, and it's useful to allow more verbose output when running an
76
+ # individual spec file.
77
+ if config.files_to_run.one?
78
+ # Use the documentation formatter for detailed output,
79
+ # unless a formatter has already been configured
80
+ # (e.g. via a command-line flag).
81
+ config.default_formatter = "doc"
82
+ end
83
+
84
+ # Print the 10 slowest examples and example groups at the
85
+ # end of the spec run, to help surface which specs are running
86
+ # particularly slow.
87
+ config.profile_examples = 10
88
+
89
+ # Run specs in random order to surface order dependencies. If you find an
90
+ # order dependency and want to debug it, you can fix the order by providing
91
+ # the seed, which is printed after each run.
92
+ # --seed 1234
93
+ config.order = :random
94
+
95
+ # Seed global randomization in this process using the `--seed` CLI option.
96
+ # Setting this allows you to use `--seed` to deterministically reproduce
97
+ # test failures related to randomization by passing the same `--seed` value
98
+ # as the one that triggered the failure.
99
+ Kernel.srand config.seed
100
+ =end
101
+ end
metadata CHANGED
@@ -1,45 +1,79 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edtf-humanize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 1.0.0
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-04-21 00:00:00.000000000 Z
11
+ date: 2020-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: edtf
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '2.3'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '4'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '2.3'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '4'
33
+ - !ruby/object:Gem::Dependency
34
+ name: activesupport
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
18
38
  - !ruby/object:Gem::Version
19
- version: '4.0'
39
+ version: '4'
20
40
  type: :runtime
21
41
  prerelease: false
22
42
  version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '4'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rake
49
+ requirement: !ruby/object:Gem::Requirement
23
50
  requirements:
24
51
  - - "~>"
25
52
  - !ruby/object:Gem::Version
26
- version: '4.0'
53
+ version: '13.0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '13.0'
27
61
  - !ruby/object:Gem::Dependency
28
- name: edtf
62
+ name: rspec
29
63
  requirement: !ruby/object:Gem::Requirement
30
64
  requirements:
31
65
  - - "~>"
32
66
  - !ruby/object:Gem::Version
33
- version: '2.3'
34
- type: :runtime
67
+ version: '3.9'
68
+ type: :development
35
69
  prerelease: false
36
70
  version_requirements: !ruby/object:Gem::Requirement
37
71
  requirements:
38
72
  - - "~>"
39
73
  - !ruby/object:Gem::Version
40
- version: '2.3'
74
+ version: '3.9'
41
75
  - !ruby/object:Gem::Dependency
42
- name: sqlite3
76
+ name: bump
43
77
  requirement: !ruby/object:Gem::Requirement
44
78
  requirements:
45
79
  - - ">="
@@ -53,14 +87,14 @@ dependencies:
53
87
  - !ruby/object:Gem::Version
54
88
  version: '0'
55
89
  description: This gem adds a humanize method to EDTF::Decade, EDTF::Interval, EDTF::Set,
56
- EDTF::Season, and Date (ISO 8601 compliant) objects.
90
+ EDTF::Season, EDTF::Unknown, and Date (ISO 8601 compliant) objects.
57
91
  email:
58
92
  - cory.lown@duke.edu
59
93
  executables: []
60
94
  extensions: []
61
95
  extra_rdoc_files: []
62
96
  files:
63
- - Rakefile
97
+ - LICENSE.txt
64
98
  - lib/edtf-humanize.rb
65
99
  - lib/edtf/humanize.rb
66
100
  - lib/edtf/humanize/century.rb
@@ -70,46 +104,10 @@ files:
70
104
  - lib/edtf/humanize/iso_date.rb
71
105
  - lib/edtf/humanize/season.rb
72
106
  - lib/edtf/humanize/set.rb
107
+ - lib/edtf/humanize/unknown.rb
73
108
  - lib/edtf/humanize/version.rb
74
- - lib/tasks/edtf_humanize_tasks.rake
75
- - test/dummy/README.rdoc
76
- - test/dummy/Rakefile
77
- - test/dummy/app/assets/javascripts/application.js
78
- - test/dummy/app/assets/stylesheets/application.css
79
- - test/dummy/app/controllers/application_controller.rb
80
- - test/dummy/app/helpers/application_helper.rb
81
- - test/dummy/app/views/layouts/application.html.erb
82
- - test/dummy/bin/bundle
83
- - test/dummy/bin/rails
84
- - test/dummy/bin/rake
85
- - test/dummy/bin/setup
86
- - test/dummy/config.ru
87
- - test/dummy/config/application.rb
88
- - test/dummy/config/boot.rb
89
- - test/dummy/config/database.yml
90
- - test/dummy/config/environment.rb
91
- - test/dummy/config/environments/development.rb
92
- - test/dummy/config/environments/production.rb
93
- - test/dummy/config/environments/test.rb
94
- - test/dummy/config/initializers/assets.rb
95
- - test/dummy/config/initializers/backtrace_silencers.rb
96
- - test/dummy/config/initializers/cookies_serializer.rb
97
- - test/dummy/config/initializers/filter_parameter_logging.rb
98
- - test/dummy/config/initializers/inflections.rb
99
- - test/dummy/config/initializers/mime_types.rb
100
- - test/dummy/config/initializers/session_store.rb
101
- - test/dummy/config/initializers/wrap_parameters.rb
102
- - test/dummy/config/locales/en.yml
103
- - test/dummy/config/routes.rb
104
- - test/dummy/config/secrets.yml
105
- - test/dummy/db/test.sqlite3
106
- - test/dummy/log/test.log
107
- - test/dummy/public/404.html
108
- - test/dummy/public/422.html
109
- - test/dummy/public/500.html
110
- - test/dummy/public/favicon.ico
111
- - test/edtf_humanize_test.rb
112
- - test/test_helper.rb
109
+ - spec/edtf_humanize_spec.rb
110
+ - spec/spec_helper.rb
113
111
  homepage: https://github.com/duke-libraries/edtf-humanize
114
112
  licenses:
115
113
  - BSD-3-Clause
@@ -129,47 +127,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
127
  - !ruby/object:Gem::Version
130
128
  version: '0'
131
129
  requirements: []
132
- rubyforge_project:
133
- rubygems_version: 2.4.3
130
+ rubygems_version: 3.0.6
134
131
  signing_key:
135
132
  specification_version: 4
136
133
  summary: This gem adds a humanize method to EDTF dates.
137
134
  test_files:
138
- - test/dummy/app/assets/javascripts/application.js
139
- - test/dummy/app/assets/stylesheets/application.css
140
- - test/dummy/app/controllers/application_controller.rb
141
- - test/dummy/app/helpers/application_helper.rb
142
- - test/dummy/app/views/layouts/application.html.erb
143
- - test/dummy/bin/bundle
144
- - test/dummy/bin/rails
145
- - test/dummy/bin/rake
146
- - test/dummy/bin/setup
147
- - test/dummy/config/application.rb
148
- - test/dummy/config/boot.rb
149
- - test/dummy/config/database.yml
150
- - test/dummy/config/environment.rb
151
- - test/dummy/config/environments/development.rb
152
- - test/dummy/config/environments/production.rb
153
- - test/dummy/config/environments/test.rb
154
- - test/dummy/config/initializers/assets.rb
155
- - test/dummy/config/initializers/backtrace_silencers.rb
156
- - test/dummy/config/initializers/cookies_serializer.rb
157
- - test/dummy/config/initializers/filter_parameter_logging.rb
158
- - test/dummy/config/initializers/inflections.rb
159
- - test/dummy/config/initializers/mime_types.rb
160
- - test/dummy/config/initializers/session_store.rb
161
- - test/dummy/config/initializers/wrap_parameters.rb
162
- - test/dummy/config/locales/en.yml
163
- - test/dummy/config/routes.rb
164
- - test/dummy/config/secrets.yml
165
- - test/dummy/config.ru
166
- - test/dummy/db/test.sqlite3
167
- - test/dummy/log/test.log
168
- - test/dummy/public/404.html
169
- - test/dummy/public/422.html
170
- - test/dummy/public/500.html
171
- - test/dummy/public/favicon.ico
172
- - test/dummy/Rakefile
173
- - test/dummy/README.rdoc
174
- - test/edtf_humanize_test.rb
175
- - test/test_helper.rb
135
+ - spec/spec_helper.rb
136
+ - spec/edtf_humanize_spec.rb