edtf-humanize 0.0.5 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/config/locales/en.edtf.yml +44 -0
- data/config/locales/fr.edtf.yml +55 -0
- data/config/locales/it.edtf.yml +55 -0
- data/lib/edtf-humanize.rb +5 -0
- data/lib/edtf/humanize.rb +24 -41
- data/lib/edtf/humanize/century.rb +4 -4
- data/lib/edtf/humanize/decade.rb +4 -4
- data/lib/edtf/humanize/interval.rb +4 -17
- data/lib/edtf/humanize/iso_date.rb +4 -4
- data/lib/edtf/humanize/language.rb +13 -0
- data/lib/edtf/humanize/language/default.rb +17 -0
- data/lib/edtf/humanize/language/default/century.rb +20 -0
- data/lib/edtf/humanize/language/default/decade.rb +21 -0
- data/lib/edtf/humanize/language/default/formats.rb +114 -0
- data/lib/edtf/humanize/language/default/interval.rb +132 -0
- data/lib/edtf/humanize/language/default/iso_date.rb +21 -0
- data/lib/edtf/humanize/language/default/season.rb +30 -0
- data/lib/edtf/humanize/language/default/set.rb +78 -0
- data/lib/edtf/humanize/language/default/unknown.rb +17 -0
- data/lib/edtf/humanize/language/english.rb +11 -0
- data/lib/edtf/humanize/language/french.rb +36 -0
- data/lib/edtf/humanize/language/italian.rb +34 -0
- data/lib/edtf/humanize/season.rb +4 -4
- data/lib/edtf/humanize/set.rb +4 -12
- data/lib/edtf/humanize/unknown.rb +5 -3
- data/lib/edtf/humanize/version.rb +3 -1
- data/spec/edtf_humanize_en_spec.rb +102 -0
- data/spec/edtf_humanize_fr_spec.rb +110 -0
- data/spec/edtf_humanize_it_spec.rb +110 -0
- data/spec/spec_helper.rb +103 -0
- metadata +92 -112
- data/Rakefile +0 -34
- data/lib/edtf/humanize/formats.rb +0 -73
- data/lib/tasks/edtf_humanize_tasks.rake +0 -4
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -29
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -26
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -41
- data/test/dummy/config/environments/production.rb +0 -79
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -23
- data/test/dummy/config/routes.rb +0 -56
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +0 -865
- data/test/dummy/public/404.html +0 -67
- data/test/dummy/public/422.html +0 -67
- data/test/dummy/public/500.html +0 -66
- data/test/dummy/public/favicon.ico +0 -0
- data/test/edtf_humanize_test.rb +0 -78
- data/test/test_helper.rb +0 -19
@@ -0,0 +1,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'edtf-humanize'
|
4
|
+
|
5
|
+
RSpec.describe Edtf::Humanize do
|
6
|
+
before do
|
7
|
+
I18n.locale = :fr
|
8
|
+
end
|
9
|
+
|
10
|
+
it { is_expected.to be_a(Module) }
|
11
|
+
|
12
|
+
context 'with a decade' do
|
13
|
+
it 'returns a humanized decade string' do
|
14
|
+
expect(Date.edtf('199x').humanize).to eq('Les années 1990')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'with a century' do
|
19
|
+
it 'returns a humanized century string' do
|
20
|
+
expect(Date.edtf('19xx').humanize).to eq('XXe siècle')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'with an interval' do
|
25
|
+
it 'returns a humanized interval string' do
|
26
|
+
expect(Date.edtf('1970/1980').humanize).to eq('De 1970 à 1980')
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'with an open interval' do
|
31
|
+
it 'returns a humanized interval string' do
|
32
|
+
expect(Date.edtf('1970/open').humanize).to eq('Depuis 1970')
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context 'with an approximate interval'
|
37
|
+
it 'returns a humanized approximate interval string' do
|
38
|
+
expect(Date.edtf('1970~/1980~').humanize).to(
|
39
|
+
eq('De 1970 environ à 1980 environ')
|
40
|
+
)
|
41
|
+
end
|
42
|
+
|
43
|
+
context 'with an iso date' do
|
44
|
+
it 'returns a humanized ISO date string' do
|
45
|
+
expect(Date.edtf('1975-07-01').humanize).to eq('1 Juillet 1975')
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
context 'with an uncertain iso date' do
|
50
|
+
it 'returns a humanized uncertain ISO date string' do
|
51
|
+
expect(Date.edtf('1975?').humanize).to eq('1975?')
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
context 'with an unspecified year iso date' do
|
56
|
+
it 'returns a humanized unspecified year ISO date string' do
|
57
|
+
expect(Date.edtf('197u').humanize).to eq('197x')
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
context 'with a season' do
|
62
|
+
it 'returns a humanized season string' do
|
63
|
+
expect(Date.edtf('1975-22').humanize).to eq('été 1975')
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context 'with a set' do
|
68
|
+
it 'returns a humanized exclusive set string' do
|
69
|
+
expect(Date.edtf('[1980, 1981, 1983]').humanize).to(
|
70
|
+
eq('1980, 1981 ou 1983')
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
it 'returns a humanized inclusive set string' do
|
75
|
+
expect(Date.edtf('{1980, 1981, 1983}').humanize).to(
|
76
|
+
eq('1980, 1981 et 1983')
|
77
|
+
)
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'returns a humanized open (before) exclusive set string' do
|
81
|
+
expect(Date.edtf('[..1980]').humanize).to(
|
82
|
+
eq('Le ou avant 1980')
|
83
|
+
)
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'returns a humanized open (after) exclusive set string' do
|
87
|
+
expect(Date.edtf('[1980..]').humanize).to(
|
88
|
+
eq('Le ou après 1980')
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'returns a humanized open (before) inclusive set string' do
|
93
|
+
expect(Date.edtf('{..1980}').humanize).to(
|
94
|
+
eq('Le et avant 1980')
|
95
|
+
)
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'returns a humanized open (after) inclusive set string' do
|
99
|
+
expect(Date.edtf('{1980..}').humanize).to(
|
100
|
+
eq('Le et après 1980')
|
101
|
+
)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
context 'with an unknown value' do
|
106
|
+
it 'returns a humanized unknown string' do
|
107
|
+
expect(Date.edtf('uuuu').humanize).to eq('Inconnue')
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'edtf-humanize'
|
4
|
+
|
5
|
+
RSpec.describe Edtf::Humanize do
|
6
|
+
before do
|
7
|
+
I18n.locale = :it
|
8
|
+
end
|
9
|
+
|
10
|
+
it { is_expected.to be_a(Module) }
|
11
|
+
|
12
|
+
context 'with a decade' do
|
13
|
+
it 'returns a humanized decade string' do
|
14
|
+
expect(Date.edtf('199x').humanize).to eq('anni 1990')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'with a century' do
|
19
|
+
it 'returns a humanized century string' do
|
20
|
+
expect(Date.edtf('19xx').humanize).to eq('XX secolo')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'with an interval' do
|
25
|
+
it 'returns a humanized interval string' do
|
26
|
+
expect(Date.edtf('1970/1980').humanize).to eq('1970 - 1980')
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'with an open interval' do
|
31
|
+
it 'returns a humanized interval string' do
|
32
|
+
expect(Date.edtf('1970/open').humanize).to eq('1970 - ')
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context 'with an approximate interval'
|
37
|
+
it 'returns a humanized approximate interval string' do
|
38
|
+
expect(Date.edtf('1970~/1980~').humanize).to(
|
39
|
+
eq('circa 1970 - circa 1980')
|
40
|
+
)
|
41
|
+
end
|
42
|
+
|
43
|
+
context 'with an iso date' do
|
44
|
+
it 'returns a humanized ISO date string' do
|
45
|
+
expect(Date.edtf('1975-07-01').humanize).to eq('1 luglio 1975')
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
context 'with an uncertain iso date' do
|
50
|
+
it 'returns a humanized uncertain ISO date string' do
|
51
|
+
expect(Date.edtf('1975?').humanize).to eq('1975 ?')
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
context 'with an unspecified year iso date' do
|
56
|
+
it 'returns a humanized unspecified year ISO date string' do
|
57
|
+
expect(Date.edtf('197u').humanize).to eq('197x')
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
context 'with a season' do
|
62
|
+
it 'returns a humanized season string' do
|
63
|
+
expect(Date.edtf('1975-22').humanize).to eq('estate 1975')
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context 'with a set' do
|
68
|
+
it 'returns a humanized exclusive set string' do
|
69
|
+
expect(Date.edtf('[1980, 1981, 1983]').humanize).to(
|
70
|
+
eq('1980, 1981 o 1983')
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
it 'returns a humanized inclusive set string' do
|
75
|
+
expect(Date.edtf('{1980, 1981, 1983}').humanize).to(
|
76
|
+
eq('1980, 1981 e 1983')
|
77
|
+
)
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'returns a humanized open (before) exclusive set string' do
|
81
|
+
expect(Date.edtf('[..1980]').humanize).to(
|
82
|
+
eq('prima di 1980')
|
83
|
+
)
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'returns a humanized open (after) exclusive set string' do
|
87
|
+
expect(Date.edtf('[1980..]').humanize).to(
|
88
|
+
eq('dopo 1980')
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'returns a humanized open (before) inclusive set string' do
|
93
|
+
expect(Date.edtf('{..1980}').humanize).to(
|
94
|
+
eq('prima di 1980')
|
95
|
+
)
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'returns a humanized open (after) inclusive set string' do
|
99
|
+
expect(Date.edtf('{1980..}').humanize).to(
|
100
|
+
eq('dopo 1980')
|
101
|
+
)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
context 'with an unknown value' do
|
106
|
+
it 'returns a humanized unknown string' do
|
107
|
+
expect(Date.edtf('uuuu').humanize).to eq('data sconosciuta')
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
4
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
5
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
6
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
7
|
+
# files.
|
8
|
+
#
|
9
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
10
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
11
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
12
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
13
|
+
# a separate helper file that requires the additional dependencies and performs
|
14
|
+
# the additional setup, and require it from the spec files that actually need
|
15
|
+
# it.
|
16
|
+
#
|
17
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
18
|
+
#
|
19
|
+
RSpec.configure do |config|
|
20
|
+
# rspec-expectations config goes here. You can use an alternate
|
21
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
22
|
+
# assertions if you prefer.
|
23
|
+
config.expect_with :rspec do |expectations|
|
24
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
25
|
+
# and `failure_message` of custom matchers include text for helper methods
|
26
|
+
# defined using `chain`, e.g.:
|
27
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
28
|
+
# # => "be bigger than 2 and smaller than 4"
|
29
|
+
# ...rather than:
|
30
|
+
# # => "be bigger than 2"
|
31
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
32
|
+
end
|
33
|
+
|
34
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
35
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
36
|
+
config.mock_with :rspec do |mocks|
|
37
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
38
|
+
# a real object. This is generally recommended, and will default to
|
39
|
+
# `true` in RSpec 4.
|
40
|
+
mocks.verify_partial_doubles = true
|
41
|
+
end
|
42
|
+
|
43
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
44
|
+
# have no way to turn it off -- the option exists only for backwards
|
45
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
46
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
47
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
48
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
49
|
+
|
50
|
+
# The settings below are suggested to provide a good initial experience
|
51
|
+
# with RSpec, but feel free to customize to your heart's content.
|
52
|
+
=begin
|
53
|
+
# This allows you to limit a spec run to individual examples or groups
|
54
|
+
# you care about by tagging them with `:focus` metadata. When nothing
|
55
|
+
# is tagged with `:focus`, all examples get run. RSpec also provides
|
56
|
+
# aliases for `it`, `describe`, and `context` that include `:focus`
|
57
|
+
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
58
|
+
config.filter_run_when_matching :focus
|
59
|
+
|
60
|
+
# Allows RSpec to persist some state between runs in order to support
|
61
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
62
|
+
# you configure your source control system to ignore this file.
|
63
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
64
|
+
|
65
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
66
|
+
# recommended. For more details, see:
|
67
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
68
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
69
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
70
|
+
config.disable_monkey_patching!
|
71
|
+
|
72
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
73
|
+
# be too noisy due to issues in dependencies.
|
74
|
+
config.warnings = true
|
75
|
+
|
76
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
77
|
+
# file, and it's useful to allow more verbose output when running an
|
78
|
+
# individual spec file.
|
79
|
+
if config.files_to_run.one?
|
80
|
+
# Use the documentation formatter for detailed output,
|
81
|
+
# unless a formatter has already been configured
|
82
|
+
# (e.g. via a command-line flag).
|
83
|
+
config.default_formatter = "doc"
|
84
|
+
end
|
85
|
+
|
86
|
+
# Print the 10 slowest examples and example groups at the
|
87
|
+
# end of the spec run, to help surface which specs are running
|
88
|
+
# particularly slow.
|
89
|
+
config.profile_examples = 10
|
90
|
+
|
91
|
+
# Run specs in random order to surface order dependencies. If you find an
|
92
|
+
# order dependency and want to debug it, you can fix the order by providing
|
93
|
+
# the seed, which is printed after each run.
|
94
|
+
# --seed 1234
|
95
|
+
config.order = :random
|
96
|
+
|
97
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
98
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
99
|
+
# test failures related to randomization by passing the same `--seed` value
|
100
|
+
# as the one that triggered the failure.
|
101
|
+
Kernel.srand config.seed
|
102
|
+
=end
|
103
|
+
end
|
metadata
CHANGED
@@ -1,83 +1,119 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edtf-humanize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cory Lown
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: edtf
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.3'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
36
|
+
version: '4'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
43
|
+
version: '2.3'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '4'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: roman
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.2.0
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.2.0
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rake
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
52
66
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
67
|
+
version: '13.0'
|
54
68
|
type: :development
|
55
69
|
prerelease: false
|
56
70
|
version_requirements: !ruby/object:Gem::Requirement
|
57
71
|
requirements:
|
58
|
-
- - "
|
72
|
+
- - "~>"
|
59
73
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0'
|
74
|
+
version: '13.0'
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
76
|
+
name: rspec
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|
64
78
|
requirements:
|
65
|
-
- - "
|
79
|
+
- - "~>"
|
66
80
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
68
|
-
|
81
|
+
version: '3.9'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3.9'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rubocop
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
69
94
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
95
|
+
version: '0.87'
|
71
96
|
type: :development
|
72
97
|
prerelease: false
|
73
98
|
version_requirements: !ruby/object:Gem::Requirement
|
74
99
|
requirements:
|
75
|
-
- - "
|
100
|
+
- - "~>"
|
76
101
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
78
|
-
|
102
|
+
version: '0.87'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rubocop-rspec
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
79
108
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
109
|
+
version: '1.39'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '1.39'
|
81
117
|
description: This gem adds a humanize method to EDTF::Decade, EDTF::Interval, EDTF::Set,
|
82
118
|
EDTF::Season, EDTF::Unknown, and Date (ISO 8601 compliant) objects.
|
83
119
|
email:
|
@@ -87,117 +123,61 @@ extensions: []
|
|
87
123
|
extra_rdoc_files: []
|
88
124
|
files:
|
89
125
|
- LICENSE.txt
|
90
|
-
-
|
126
|
+
- config/locales/en.edtf.yml
|
127
|
+
- config/locales/fr.edtf.yml
|
128
|
+
- config/locales/it.edtf.yml
|
91
129
|
- lib/edtf-humanize.rb
|
92
130
|
- lib/edtf/humanize.rb
|
93
131
|
- lib/edtf/humanize/century.rb
|
94
132
|
- lib/edtf/humanize/decade.rb
|
95
|
-
- lib/edtf/humanize/formats.rb
|
96
133
|
- lib/edtf/humanize/interval.rb
|
97
134
|
- lib/edtf/humanize/iso_date.rb
|
135
|
+
- lib/edtf/humanize/language.rb
|
136
|
+
- lib/edtf/humanize/language/default.rb
|
137
|
+
- lib/edtf/humanize/language/default/century.rb
|
138
|
+
- lib/edtf/humanize/language/default/decade.rb
|
139
|
+
- lib/edtf/humanize/language/default/formats.rb
|
140
|
+
- lib/edtf/humanize/language/default/interval.rb
|
141
|
+
- lib/edtf/humanize/language/default/iso_date.rb
|
142
|
+
- lib/edtf/humanize/language/default/season.rb
|
143
|
+
- lib/edtf/humanize/language/default/set.rb
|
144
|
+
- lib/edtf/humanize/language/default/unknown.rb
|
145
|
+
- lib/edtf/humanize/language/english.rb
|
146
|
+
- lib/edtf/humanize/language/french.rb
|
147
|
+
- lib/edtf/humanize/language/italian.rb
|
98
148
|
- lib/edtf/humanize/season.rb
|
99
149
|
- lib/edtf/humanize/set.rb
|
100
150
|
- lib/edtf/humanize/unknown.rb
|
101
151
|
- lib/edtf/humanize/version.rb
|
102
|
-
-
|
103
|
-
-
|
104
|
-
-
|
105
|
-
-
|
106
|
-
- test/dummy/app/assets/stylesheets/application.css
|
107
|
-
- test/dummy/app/controllers/application_controller.rb
|
108
|
-
- test/dummy/app/helpers/application_helper.rb
|
109
|
-
- test/dummy/app/views/layouts/application.html.erb
|
110
|
-
- test/dummy/bin/bundle
|
111
|
-
- test/dummy/bin/rails
|
112
|
-
- test/dummy/bin/rake
|
113
|
-
- test/dummy/bin/setup
|
114
|
-
- test/dummy/config.ru
|
115
|
-
- test/dummy/config/application.rb
|
116
|
-
- test/dummy/config/boot.rb
|
117
|
-
- test/dummy/config/database.yml
|
118
|
-
- test/dummy/config/environment.rb
|
119
|
-
- test/dummy/config/environments/development.rb
|
120
|
-
- test/dummy/config/environments/production.rb
|
121
|
-
- test/dummy/config/environments/test.rb
|
122
|
-
- test/dummy/config/initializers/assets.rb
|
123
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
124
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
125
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
126
|
-
- test/dummy/config/initializers/inflections.rb
|
127
|
-
- test/dummy/config/initializers/mime_types.rb
|
128
|
-
- test/dummy/config/initializers/session_store.rb
|
129
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
130
|
-
- test/dummy/config/locales/en.yml
|
131
|
-
- test/dummy/config/routes.rb
|
132
|
-
- test/dummy/config/secrets.yml
|
133
|
-
- test/dummy/db/test.sqlite3
|
134
|
-
- test/dummy/log/test.log
|
135
|
-
- test/dummy/public/404.html
|
136
|
-
- test/dummy/public/422.html
|
137
|
-
- test/dummy/public/500.html
|
138
|
-
- test/dummy/public/favicon.ico
|
139
|
-
- test/edtf_humanize_test.rb
|
140
|
-
- test/test_helper.rb
|
152
|
+
- spec/edtf_humanize_en_spec.rb
|
153
|
+
- spec/edtf_humanize_fr_spec.rb
|
154
|
+
- spec/edtf_humanize_it_spec.rb
|
155
|
+
- spec/spec_helper.rb
|
141
156
|
homepage: https://github.com/duke-libraries/edtf-humanize
|
142
157
|
licenses:
|
143
158
|
- BSD-3-Clause
|
144
159
|
metadata: {}
|
145
|
-
post_install_message:
|
160
|
+
post_install_message:
|
146
161
|
rdoc_options: []
|
147
162
|
require_paths:
|
148
163
|
- lib
|
149
164
|
required_ruby_version: !ruby/object:Gem::Requirement
|
150
165
|
requirements:
|
151
|
-
- - "
|
166
|
+
- - "~>"
|
152
167
|
- !ruby/object:Gem::Version
|
153
|
-
version: '
|
168
|
+
version: '2.4'
|
154
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
170
|
requirements:
|
156
171
|
- - ">="
|
157
172
|
- !ruby/object:Gem::Version
|
158
173
|
version: '0'
|
159
174
|
requirements: []
|
160
|
-
|
161
|
-
|
162
|
-
signing_key:
|
175
|
+
rubygems_version: 3.0.6
|
176
|
+
signing_key:
|
163
177
|
specification_version: 4
|
164
178
|
summary: This gem adds a humanize method to EDTF dates.
|
165
179
|
test_files:
|
166
|
-
-
|
167
|
-
-
|
168
|
-
-
|
169
|
-
-
|
170
|
-
- test/dummy/app/views/layouts/application.html.erb
|
171
|
-
- test/dummy/bin/bundle
|
172
|
-
- test/dummy/bin/rails
|
173
|
-
- test/dummy/bin/rake
|
174
|
-
- test/dummy/bin/setup
|
175
|
-
- test/dummy/config/application.rb
|
176
|
-
- test/dummy/config/boot.rb
|
177
|
-
- test/dummy/config/database.yml
|
178
|
-
- test/dummy/config/environment.rb
|
179
|
-
- test/dummy/config/environments/development.rb
|
180
|
-
- test/dummy/config/environments/production.rb
|
181
|
-
- test/dummy/config/environments/test.rb
|
182
|
-
- test/dummy/config/initializers/assets.rb
|
183
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
184
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
185
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
186
|
-
- test/dummy/config/initializers/inflections.rb
|
187
|
-
- test/dummy/config/initializers/mime_types.rb
|
188
|
-
- test/dummy/config/initializers/session_store.rb
|
189
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
190
|
-
- test/dummy/config/locales/en.yml
|
191
|
-
- test/dummy/config/routes.rb
|
192
|
-
- test/dummy/config/secrets.yml
|
193
|
-
- test/dummy/config.ru
|
194
|
-
- test/dummy/db/test.sqlite3
|
195
|
-
- test/dummy/log/test.log
|
196
|
-
- test/dummy/public/404.html
|
197
|
-
- test/dummy/public/422.html
|
198
|
-
- test/dummy/public/500.html
|
199
|
-
- test/dummy/public/favicon.ico
|
200
|
-
- test/dummy/Rakefile
|
201
|
-
- test/dummy/README.rdoc
|
202
|
-
- test/edtf_humanize_test.rb
|
203
|
-
- test/test_helper.rb
|
180
|
+
- spec/spec_helper.rb
|
181
|
+
- spec/edtf_humanize_fr_spec.rb
|
182
|
+
- spec/edtf_humanize_it_spec.rb
|
183
|
+
- spec/edtf_humanize_en_spec.rb
|