git-ged 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/git-ged.gemspec +1 -2
- data/layout.txt +2 -1
- data/lib/git-ged/cli.rb +3 -1
- data/lib/git-ged/init.rb +1 -1
- data/lib/git-ged.rb +32 -7
- metadata +8 -8
data/git-ged.gemspec
CHANGED
@@ -8,8 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
|
9
9
|
s.name = 'git-ged'
|
10
10
|
s.version = GitGed::VERSION
|
11
|
-
s.date = '2012-01-
|
12
|
-
#s.rubyforge_project = 'git-ged'
|
11
|
+
s.date = '2012-01-09'
|
13
12
|
|
14
13
|
s.summary = "GEDCOM plugin for Git"
|
15
14
|
s.description = "git-ged is a Ruby toolset for managing genealogical data (GEDCOM) inside a Git repository."
|
data/layout.txt
CHANGED
@@ -105,8 +105,9 @@ GIT-GED CONCEPTS
|
|
105
105
|
- each of the following link attributes refers to another record via permaname+state reference
|
106
106
|
- "supersedes" indicates that a person (or family) is a full, identical replacement for another (used to be able to react to remote merges)
|
107
107
|
- "superseded-by" indicates that a static, not-to-be-further-edited person (or family) is left behind after having been merged into the canonical record (used to detect conflicts between local edits & remote merge or vice versa)
|
108
|
-
- "derived-from" indicates a clone-and-mutate to disambiguate a fully-merged record that represents two distinct historical persons or families (used to document manual record reconstruction efforts)
|
109
108
|
- "same-as" indicates a more-tentative-than-merge attempt at establishing identity to allow for disparate efforts to proceed before attempting a full merge
|
109
|
+
- "disambiguated-by" indicates a forward-reference from a person/family that has no useful future except for providing opportunity for fruitful permaname collision & disambiguation hints to users on subsequent imports
|
110
|
+
- "derived-from" indicates a record that took a significant amount of data from another record, from which an identity was extracted
|
110
111
|
- "not-same-as" indicates a definitive statement that one person (or family) is NOT the same as another (used when extracting a half-merged entity that collided on a permaname)
|
111
112
|
- "prior-family" indicates that a family has many of the same members of a prior family, but temporal household dissolution & recomposition require two different families to be tracked (allows for "current family" computations based on a directed graph of prior-family edges)
|
112
113
|
|
data/lib/git-ged/cli.rb
CHANGED
@@ -11,6 +11,9 @@ module GitGed
|
|
11
11
|
|
12
12
|
# patch until subcommand 1.0.7 comes out
|
13
13
|
attr_accessor :appname
|
14
|
+
def print_actions
|
15
|
+
super.sub(/See '.* help COMMAND'/, "See '#{appname} help COMMAND'")
|
16
|
+
end
|
14
17
|
|
15
18
|
def initialize
|
16
19
|
@options = {}
|
@@ -22,7 +25,6 @@ module GitGed
|
|
22
25
|
opts.separator "Global options are:"
|
23
26
|
opts.on("-v", "--[no-]verbose", "Show git-ged & grit debug") do |v|
|
24
27
|
GitGed.debug = v
|
25
|
-
GitGed.grit_debug = v
|
26
28
|
end
|
27
29
|
end
|
28
30
|
add_help_option
|
data/lib/git-ged/init.rb
CHANGED
data/lib/git-ged.rb
CHANGED
@@ -23,7 +23,7 @@ require 'git-ged/init'
|
|
23
23
|
# internal support classes
|
24
24
|
|
25
25
|
module GitGed
|
26
|
-
VERSION = '0.0.
|
26
|
+
VERSION = '0.0.3'
|
27
27
|
|
28
28
|
class << self
|
29
29
|
|
@@ -33,21 +33,46 @@ module GitGed
|
|
33
33
|
|
34
34
|
attr_accessor :debug
|
35
35
|
|
36
|
-
def
|
36
|
+
def debug= onoff
|
37
37
|
Grit.debug = onoff
|
38
|
+
@debug = onoff
|
39
|
+
@logger.level = onoff ? ::Logger::DEBUG : ::Logger::INFO
|
38
40
|
end
|
39
41
|
|
40
42
|
# The standard +logger+ for debugging git-ged calls - this defaults to a plain STDOUT logger
|
41
43
|
attr_accessor :logger
|
42
44
|
|
43
|
-
def log(str)
|
44
|
-
|
45
|
+
def log(str, &block)
|
46
|
+
if block_given?
|
47
|
+
logger.debug &block
|
48
|
+
else
|
49
|
+
logger.debug str
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def message(str)
|
54
|
+
logger.info str
|
55
|
+
end
|
56
|
+
|
57
|
+
private
|
58
|
+
|
59
|
+
def new_logger
|
60
|
+
logger = ::Logger.new STDOUT
|
61
|
+
default_formatter = ::Logger::Formatter.new
|
62
|
+
logger.formatter = lambda do |severity, datetime, progname, msg|
|
63
|
+
if severity == "DEBUG"
|
64
|
+
default_formatter.call(severity, datetime, progname, msg)
|
65
|
+
else
|
66
|
+
msg
|
67
|
+
end
|
68
|
+
end
|
69
|
+
logger
|
45
70
|
end
|
46
71
|
end
|
47
72
|
|
48
|
-
|
49
|
-
self.grit_debug = false
|
73
|
+
@logger ||= new_logger
|
50
74
|
|
51
|
-
|
75
|
+
# turn debug logging off by default
|
76
|
+
self.debug = false
|
52
77
|
|
53
78
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-ged
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01-
|
12
|
+
date: 2012-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: grit
|
16
|
-
requirement: &
|
16
|
+
requirement: &23602420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.4.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *23602420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: subcommand
|
27
|
-
requirement: &
|
27
|
+
requirement: &23601940 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.0.6
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *23601940
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: mocha
|
38
|
-
requirement: &
|
38
|
+
requirement: &23601560 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *23601560
|
47
47
|
description: git-ged is a Ruby toolset for managing genealogical data (GEDCOM) inside
|
48
48
|
a Git repository.
|
49
49
|
email: jdsumsion@gmail.com
|