fossgit 1.0.0 → 1.0.1

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -9
  3. data/bin/fossgit +2 -49
  4. data/lib/fossgit.rb +52 -1
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ff8a4c882972941862c63ab14c1a6a7612523c3e
4
- data.tar.gz: f7057fc31c57762a4d3ff715a66a8c0a9ef23eb8
3
+ metadata.gz: 2f89e1271f8492c9e3b00cb7dc853624f4a8d45f
4
+ data.tar.gz: 5bfde8253a5a00e3b589734ff913ef87b7881020
5
5
  SHA512:
6
- metadata.gz: 46fc13e318b8ae5bcf8303e2f6ea6e6868894c3537d5eeed767a8f98fda325af781a3ff8dfc4de111da9001f9542830772db02258abaec5e63e968d99da4bc77
7
- data.tar.gz: 065d66e51b3073b7cec46bc8bbf238a555a5af678634f1b45d568ad558e47d84502a5faa73a3a6e8a59fbea3bd34b51fbd6a4bd627cfea4fc2baeb8c0354be09
6
+ metadata.gz: 2403e9e4bc37f9dd76679dffdac327d114296038385af9da4c91f580ade69864497c2e61e5318d57cdda5973dacdca3a955300db5368083b39f822ed90e4fb7f
7
+ data.tar.gz: 402e5d4d0379c38db310bcdad31e789b9f388c010965b3fb1f20538d564b17f023d276396543536c88a6c5be1899f06ae72a90e06c9f495ab9beaa457f6eb44f
data/README.md CHANGED
@@ -1,17 +1,24 @@
1
1
  # fossgit
2
2
 
3
- This is a simple command line utility for creating and updating Git
3
+ FossGit provides a simple command line utility for creating and updating Git
4
4
  repositories as (one-way) mirrors of Fossil repositories.
5
5
 
6
6
  ## Installation
7
7
 
8
- Clone it from the [Fossil repository](https://fossrec.com/u/apotheon/fossgit/)
9
- or the [GitHub mirror](https://github.com/apotheon/fossgit/).
8
+ Install the [Ruby Gem][gem]:
10
9
 
11
- Copy the `fossgit` file to a directory in your execution path, create a symlink
12
- or hardlink to the repository's `fossgit` file in a directory in your execution
13
- path, add its location in this repository to your execution path, or execute it
14
- by entering the explicit path to the `fossgit` file at a shell prompt.
10
+ $ gem install fossgit
11
+
12
+ If, for some reason, that is not an available option for you or you wish to do
13
+ things the hard way, there is another installation method:
14
+
15
+ 1. Clone it from the [Fossil repository][frepo] or the [GitHub mirror][grepo].
16
+
17
+ 2. Copy the `fossgit` file to a directory in your execution path, create a
18
+ symlink or hardlink to the repository's `fossgit` file in a directory in
19
+ your execution path, add its location in this repository to your execution
20
+ path, or execute it by entering the explicit path to the `fossgit` file at a
21
+ shell prompt.
15
22
 
16
23
  ## Usage
17
24
 
@@ -37,9 +44,7 @@ In order from most preferred to least preferred:
37
44
 
38
45
  ## Roadmap
39
46
 
40
- * Make this a stand-alone Ruby Gem some day, maybe.
41
47
  * Add tests, maybe.
42
- * Add automatic GitHub publishing, maybe.
43
48
  * Incorporate this functionality into FossRec, a more comprehensive tool.
44
49
 
45
50
  ## Development
@@ -55,3 +60,7 @@ unrecognizable by then.
55
60
 
56
61
  Much of this work was done on Christmas weekend 2016. That may or may not be
57
62
  significant.
63
+
64
+ [gem]: https://rubygems.org/gems/fossgit
65
+ [frepo]: https://fossrec.com/u/apotheon/fossgit
66
+ [grepo]: https://github.com/apotheon/fossgit
@@ -76,57 +76,10 @@ end
76
76
 
77
77
  name = File.basename $0
78
78
 
79
- help = <<-EOF
80
-
81
- FossGit provides a simple tool for creating Git mirrors of Fossil
82
- repositories. To use it, you need:
83
-
84
- 1. both Fossil SCM and Git installed
85
- 2. a Fossil repository to mirror with an open checkout
86
- 3. a Git repository to use as a mirror
87
-
88
- USAGE: #{name} -h
89
- #{name} [-c <CHECKOUT>] [-l] <GITREPO>
90
- #{name} -t
91
-
92
- By default, when exporting to local Git repository GITREPO, #{name}
93
- attempts to push updates to a configured upstream Git repository. It
94
- harmlessly fails to push if no upstream repository is configured for the
95
- local Git repository.
96
-
97
- OPTIONS/ARGUMENTS:
98
-
99
- -h Display this help text and exit, ignoring all other
100
- arguments.
101
-
102
- -c CHECKOUT Specify the location of your Fossil repository's open
103
- checkout, CHECKOUT. This is optional; you may simply use
104
- this tool from within an open checkout of your Fossil
105
- repository instead.
106
-
107
- -l Perform local-only mirror operations, without trying to
108
- push Git updates to a remote repository. By default,
109
- #{name} tries to push to an upstream Git repository
110
- whenever it exports from Fossil to Git.
111
-
112
- -t Dump export to STDOUT rather than sending it to Git.
113
- This overrides the `-l` option and GITREPO argument, if
114
- present.
115
-
116
- GITREPO Specify the location of your local Git repository.
117
-
118
- EXAMPLES:
119
-
120
- $ fossgit -h
121
-
122
- $ fossgit -c ~/fossil_checkouts/projectname ~/git/projectname
123
-
124
- $ cd ~/fossil_checkouts/projectname && fossgit ~/git/projectname
125
-
126
- EOF
79
+ fg = FossGit.new
127
80
 
128
81
  if option_switch? 'help'
129
- puts help
82
+ puts fg.help_text name
130
83
  exit
131
84
  elsif option_switch? 'version'
132
85
  puts [name, FossGit.version].join ' '
@@ -1,5 +1,56 @@
1
1
  class FossGit
2
2
  def self.version
3
- '1.0.0'
3
+ '1.0.1'
4
+ end
5
+
6
+ def help_text name='fossgit'
7
+ help = <<-EOF
8
+
9
+ FossGit provides a simple tool for creating Git mirrors of Fossil
10
+ repositories. To use it, you need:
11
+
12
+ 1. both Fossil SCM and Git installed
13
+ 2. a Fossil repository to mirror with an open checkout
14
+ 3. a Git repository to use as a mirror
15
+
16
+ USAGE: #{name} -h
17
+ #{name} [-c <CHECKOUT>] [-l] <GITREPO>
18
+ #{name} -t
19
+
20
+ By default, when exporting to local Git repository GITREPO, #{name}
21
+ attempts to push updates to a configured upstream Git repository. It
22
+ harmlessly fails to push if no upstream repository is configured for the
23
+ local Git repository.
24
+
25
+ OPTIONS/ARGUMENTS:
26
+
27
+ -h Display this help text and exit, ignoring all other
28
+ arguments.
29
+
30
+ -c CHECKOUT Specify the location of your Fossil repository's open
31
+ checkout, CHECKOUT. This is optional; you may simply use
32
+ this tool from within an open checkout of your Fossil
33
+ repository instead.
34
+
35
+ -l Perform local-only mirror operations, without trying to
36
+ push Git updates to a remote repository. By default,
37
+ #{name} tries to push to an upstream Git repository
38
+ whenever it exports from Fossil to Git.
39
+
40
+ -t Dump export to STDOUT rather than sending it to Git.
41
+ This overrides the `-l` option and GITREPO argument, if
42
+ present.
43
+
44
+ GITREPO Specify the location of your local Git repository.
45
+
46
+ EXAMPLES:
47
+
48
+ $ fossgit -h
49
+
50
+ $ fossgit -c ~/fossil_checkouts/projectname ~/git/projectname
51
+
52
+ $ cd ~/fossil_checkouts/projectname && fossgit ~/git/projectname
53
+
54
+ EOF
4
55
  end
5
56
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fossgit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Perrin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-25 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Maintain a presence in Git hosting for Fossil projects.
@@ -36,7 +36,7 @@ post_install_message: |2
36
36
 
37
37
  Run "fossgit -h" for usage information.
38
38
 
39
- Version 1.0.0 of FossGit is dedicated to my wife. Happy holidays.
39
+ Version 1.0.1 of FossGit starts the process of extracting a library.
40
40
  rdoc_options: []
41
41
  require_paths:
42
42
  - lib