historical_dating 1.0.0 → 1.1.0

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: 52e37df032c7bec594220049a78d9948f84c19636c6cd7024cc254b4ecdf3d93
4
- data.tar.gz: 1669cf029983cf0753305f9b719f7533d6c541cfe1b0a80183ac13d4558342b6
3
+ metadata.gz: 61c2761f143332e112b83166ce6625fa43290563bf54c5f7e7657c13b2436a84
4
+ data.tar.gz: 27a4cf50e18e236c2a4ef28c7c414dd157d564c832a58e45de851557a7240521
5
5
  SHA512:
6
- metadata.gz: 9dcaf8f69b1b8261228945eb6fa2797853b8f36591ed2bb43be6f31c345b2d7f89524e3db2ea7743f0937deb289ef119314f15d55f852cead9d8039df963de00
7
- data.tar.gz: 9710644a1f488711f1d4520df46551201410ee104b7d17c63251cdbcf34fbf3b17304f0cf453703cbb604dcea5ca76f8df31cf188dbda039faf789ee969eb164
6
+ metadata.gz: c924bc2b924f9618ac9f0cebe5c74a1af9c2aaa41223476a72294576e8fcda5c948aeabc3b44823b23cb7e413a6ad2efd2ea3229d2758e765481629eadb5d52b
7
+ data.tar.gz: 89af9de4952185120151316468db777565f0c44d9081009627bc6d4e4f4a7dc450397432507a433a58fc7a20459db7a6e583cd2bb2e4036b6df12867efbcda57
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- historical_dating (1.0.0)
4
+ historical_dating (1.1.0)
5
5
  activesupport (>= 3.0.0)
6
6
  parslet (~> 1.8)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (6.0.2.1)
11
+ activesupport (6.0.3.1)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 0.7, < 2)
14
14
  minitest (~> 5.1)
15
15
  tzinfo (~> 1.1)
16
- zeitwerk (~> 2.2)
16
+ zeitwerk (~> 2.2, >= 2.2.2)
17
17
  coderay (1.1.2)
18
18
  concurrent-ruby (1.1.6)
19
19
  diff-lcs (1.3)
@@ -40,9 +40,9 @@ GEM
40
40
  rspec-support (~> 3.9.0)
41
41
  rspec-support (3.9.2)
42
42
  thread_safe (0.3.6)
43
- tzinfo (1.2.6)
43
+ tzinfo (1.2.7)
44
44
  thread_safe (~> 0.1)
45
- zeitwerk (2.2.2)
45
+ zeitwerk (2.3.0)
46
46
 
47
47
  PLATFORMS
48
48
  ruby
@@ -8,14 +8,14 @@ Gem::Specification.new do |spec|
8
8
 
9
9
  spec.summary = "Parse human historical datings"
10
10
  spec.description = "Parse human historical datings and convert them to Julian day ranges"
11
- spec.homepage = "https://github.com/wendig-ou/historical-dating"
11
+ spec.homepage = "https://github.com/wendig-ou/historical_dating"
12
12
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
13
 
14
14
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
15
15
 
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
- spec.metadata["source_code_uri"] = "https://github.com/wendig-ou/historical-dating"
18
- spec.metadata["changelog_uri"] = "https://github.com/wendig-ou/historical-dating/blob/master/CHANGELOG.md"
17
+ spec.metadata["source_code_uri"] = "https://github.com/wendig-ou/historical_dating"
18
+ spec.metadata["changelog_uri"] = "https://github.com/wendig-ou/historical_dating/blob/master/CHANGELOG.md"
19
19
 
20
20
  # Specify which files should be added to the gem when it is released.
21
21
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -22,7 +22,7 @@ class HistoricalDating::Parser < Parslet::Parser
22
22
  rule(:before){ str('vor') >> space }
23
23
  rule(:after){ str('nach') >> space }
24
24
  rule(:negate){ str('nicht') >> space }
25
- rule(:part){ str('Anfang') | str('Mitte') | str('Ende') | str('1. Hälfte') | str('2. Hälfte') | str('1. Drittel') | str('2. Drittel') | str('3. Drittel') }
25
+ rule(:part){ str('Anfang') | str('Mitte') | str('Ende') | str('1. Hälfte') | str('2. Hälfte') | str('1. Drittel') | str('2. Drittel') | str('3. Drittel') | str('1. Viertel') | str('2. Viertel') | str('3. Viertel') | str('4. Viertel') }
26
26
 
27
27
  # Dating
28
28
 
@@ -9,4 +9,12 @@ class HistoricalDating::Range
9
9
  def julian_range
10
10
  [from.jd, to.jd]
11
11
  end
12
- end
12
+
13
+ def from_time
14
+ Time.mktime(from.year, from.month, from.day)
15
+ end
16
+
17
+ def to_time
18
+ Time.mktime(to.year, to.month, to.day, 23, 59, 59)
19
+ end
20
+ end
@@ -6,9 +6,13 @@ class HistoricalDating::Transform < Parslet::Transform
6
6
  when "Ende" then [75, 0]
7
7
  when "1. Hälfte" then [0, 50]
8
8
  when "2. Hälfte" then [50, 0]
9
- when "1. Drittel" then [0, 66]
10
- when "2. Drittel" then [33, 33]
9
+ when "1. Drittel" then [0, 67]
10
+ when "2. Drittel" then [33, 34]
11
11
  when "3. Drittel" then [66, 0]
12
+ when "1. Viertel" then [0, 75]
13
+ when "2. Viertel" then [25, 50]
14
+ when "3. Viertel" then [50, 25]
15
+ when "4. Viertel" then [75, 0]
12
16
  end
13
17
 
14
18
  if bc.nil?
@@ -1,3 +1,3 @@
1
1
  module HistoricalDating
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: historical_dating
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moritz Schepp
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-18 00:00:00.000000000 Z
11
+ date: 2020-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet
@@ -92,13 +92,13 @@ files:
92
92
  - lib/historical_dating/range.rb
93
93
  - lib/historical_dating/transform.rb
94
94
  - lib/historical_dating/version.rb
95
- homepage: https://github.com/wendig-ou/historical-dating
95
+ homepage: https://github.com/wendig-ou/historical_dating
96
96
  licenses: []
97
97
  metadata:
98
98
  allowed_push_host: https://rubygems.org
99
- homepage_uri: https://github.com/wendig-ou/historical-dating
100
- source_code_uri: https://github.com/wendig-ou/historical-dating
101
- changelog_uri: https://github.com/wendig-ou/historical-dating/blob/master/CHANGELOG.md
99
+ homepage_uri: https://github.com/wendig-ou/historical_dating
100
+ source_code_uri: https://github.com/wendig-ou/historical_dating
101
+ changelog_uri: https://github.com/wendig-ou/historical_dating/blob/master/CHANGELOG.md
102
102
  post_install_message:
103
103
  rdoc_options: []
104
104
  require_paths:
@@ -114,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubyforge_project:
118
- rubygems_version: 2.7.6.2
117
+ rubygems_version: 3.0.3
119
118
  signing_key:
120
119
  specification_version: 4
121
120
  summary: Parse human historical datings