hglib 0.2.0 → 0.3.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.md +27 -0
- data/README.md +15 -7
- data/lib/hglib.rb +47 -2
- data/lib/hglib/config.rb +60 -0
- data/lib/hglib/mixins.rb +77 -0
- data/lib/hglib/repo.rb +187 -16
- data/lib/hglib/repo/bookmark.rb +74 -0
- data/lib/hglib/repo/id.rb +38 -24
- data/lib/hglib/repo/log_entry.rb +12 -12
- data/lib/hglib/repo/tag.rb +52 -0
- data/lib/hglib/server.rb +23 -6
- data/spec/hglib/config_spec.rb +36 -0
- data/spec/hglib/mixins_spec.rb +80 -0
- data/spec/hglib/repo/id_spec.rb +69 -107
- data/spec/hglib/repo/log_entry_spec.rb +12 -12
- data/spec/hglib/repo_spec.rb +245 -51
- data/spec/hglib_spec.rb +43 -1
- data/spec/spec_helper.rb +7 -2
- metadata +22 -85
- metadata.gz.sig +0 -0
- data/.simplecov +0 -9
- data/ChangeLog +0 -128
- data/Manifest.txt +0 -22
- data/Rakefile +0 -99
- data/examples/clone.rb +0 -13
- data/integration/commands/clone_spec.rb +0 -52
- data/integration/spec_helper.rb +0 -29
- data/spec/.status +0 -42
data/spec/hglib_spec.rb
CHANGED
@@ -66,11 +66,53 @@ RSpec.describe Hglib do
|
|
66
66
|
|
67
67
|
|
68
68
|
it "knows a repo dir is a repo dir", :requires_binary do
|
69
|
-
|
69
|
+
described_class.init( repo_dir )
|
70
70
|
expect( described_class.is_repo?(repo_dir) ).to be_truthy
|
71
71
|
end
|
72
72
|
|
73
73
|
end
|
74
74
|
|
75
|
+
|
76
|
+
describe "command error" do
|
77
|
+
|
78
|
+
### Rescue any (runtime) exception raised when yielding and return it. If no
|
79
|
+
### exception is raised, return nil.
|
80
|
+
def rescued
|
81
|
+
yield
|
82
|
+
return nil
|
83
|
+
rescue => err
|
84
|
+
return err
|
85
|
+
end
|
86
|
+
|
87
|
+
|
88
|
+
it "can be created with a single error message" do
|
89
|
+
exception = rescued {
|
90
|
+
raise Hglib::CommandError, [:status, "no_status: No such file or directory\n"]
|
91
|
+
}
|
92
|
+
|
93
|
+
expect( exception ).to_not be_multiple
|
94
|
+
expect( exception.message ).to eq( "`status`: no_status: No such file or directory" )
|
95
|
+
end
|
96
|
+
|
97
|
+
|
98
|
+
it "can be created with multiple error messages" do
|
99
|
+
exception = rescued {
|
100
|
+
raise Hglib::CommandError, [
|
101
|
+
:status,
|
102
|
+
"no_status: No such file or directory\n",
|
103
|
+
"unknown: No such file or directory\n"
|
104
|
+
]
|
105
|
+
}
|
106
|
+
|
107
|
+
expect( exception ).to be_multiple
|
108
|
+
expect( exception.message ).to eq( <<~ERROR_MESSAGE )
|
109
|
+
`status`:
|
110
|
+
- no_status: No such file or directory
|
111
|
+
- unknown: No such file or directory
|
112
|
+
ERROR_MESSAGE
|
113
|
+
end
|
114
|
+
|
115
|
+
end
|
116
|
+
|
75
117
|
end
|
76
118
|
|
data/spec/spec_helper.rb
CHANGED
@@ -26,9 +26,14 @@ RSpec.configure do |config|
|
|
26
26
|
config.profile_examples = 5
|
27
27
|
config.order = :random
|
28
28
|
|
29
|
-
config.filter_run_excluding( :requires_binary ) unless Hglib.hg_path.executable?
|
30
|
-
|
31
29
|
Kernel.srand( config.seed )
|
32
30
|
|
31
|
+
# Try environment variables if `hg` isn't in the PATH
|
32
|
+
if !Hglib.hg_path.executable?
|
33
|
+
Hglib.hg_path = ENV['HG_BINARY'] if ENV['HG_BINARY']
|
34
|
+
Hglib.hg_path = ENV['TM_HG'] if ENV['TM_HG']
|
35
|
+
end
|
36
|
+
config.filter_run_excluding( :requires_binary ) unless Hglib.hg_path.executable?
|
37
|
+
|
33
38
|
config.include( Loggability::SpecHelpers )
|
34
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hglib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
v4qqqa27Bs468d6SoPxjSm8a2mM9HZ4OdWhq4tFsbTeXDVquCfi64OTEaTt2xQdR
|
35
35
|
JnC4lpJfCP6aCXa5h2XAQfPSH636cQap
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2019-
|
37
|
+
date: 2019-10-12 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: loggability
|
@@ -51,47 +51,19 @@ dependencies:
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0.11'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
|
-
name:
|
54
|
+
name: rake-deveiate
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: '1
|
60
|
-
type: :development
|
61
|
-
prerelease: false
|
62
|
-
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
requirements:
|
64
|
-
- - "~>"
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '1.4'
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: hoe-deveiate
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '0.10'
|
74
|
-
type: :development
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '0.10'
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: hoe-highline
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '0.2'
|
59
|
+
version: '0.1'
|
88
60
|
type: :development
|
89
61
|
prerelease: false
|
90
62
|
version_requirements: !ruby/object:Gem::Requirement
|
91
63
|
requirements:
|
92
64
|
- - "~>"
|
93
65
|
- !ruby/object:Gem::Version
|
94
|
-
version: '0.
|
66
|
+
version: '0.1'
|
95
67
|
- !ruby/object:Gem::Dependency
|
96
68
|
name: simplecov
|
97
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,106 +79,71 @@ dependencies:
|
|
107
79
|
- !ruby/object:Gem::Version
|
108
80
|
version: '0.7'
|
109
81
|
- !ruby/object:Gem::Dependency
|
110
|
-
name: rdoc-generator-
|
82
|
+
name: rdoc-generator-sixfish
|
111
83
|
requirement: !ruby/object:Gem::Requirement
|
112
84
|
requirements:
|
113
85
|
- - "~>"
|
114
86
|
- !ruby/object:Gem::Version
|
115
|
-
version: '0
|
87
|
+
version: '0'
|
116
88
|
type: :development
|
117
89
|
prerelease: false
|
118
90
|
version_requirements: !ruby/object:Gem::Requirement
|
119
91
|
requirements:
|
120
92
|
- - "~>"
|
121
93
|
- !ruby/object:Gem::Version
|
122
|
-
version: '0
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: rdoc
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - "~>"
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '6.0'
|
130
|
-
type: :development
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - "~>"
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '6.0'
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: hoe
|
139
|
-
requirement: !ruby/object:Gem::Requirement
|
140
|
-
requirements:
|
141
|
-
- - "~>"
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: '3.18'
|
144
|
-
type: :development
|
145
|
-
prerelease: false
|
146
|
-
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
requirements:
|
148
|
-
- - "~>"
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: '3.18'
|
94
|
+
version: '0'
|
151
95
|
description: |-
|
152
96
|
This is a client library for the Mercurial distributed revision control tool
|
153
|
-
that uses the
|
97
|
+
that uses the {Command Server}[https://www.mercurial-scm.org/wiki/CommandServer] for efficiency.
|
154
98
|
email:
|
155
99
|
- ged@FaerieMUD.org
|
156
100
|
executables: []
|
157
101
|
extensions: []
|
158
|
-
extra_rdoc_files:
|
159
|
-
- History.md
|
160
|
-
- LICENSE.txt
|
161
|
-
- Manifest.txt
|
162
|
-
- README.md
|
102
|
+
extra_rdoc_files: []
|
163
103
|
files:
|
164
|
-
- ".simplecov"
|
165
|
-
- ChangeLog
|
166
104
|
- History.md
|
167
105
|
- LICENSE.txt
|
168
|
-
- Manifest.txt
|
169
106
|
- README.md
|
170
|
-
- Rakefile
|
171
|
-
- examples/clone.rb
|
172
|
-
- integration/commands/clone_spec.rb
|
173
|
-
- integration/spec_helper.rb
|
174
107
|
- lib/hglib.rb
|
108
|
+
- lib/hglib/config.rb
|
109
|
+
- lib/hglib/mixins.rb
|
175
110
|
- lib/hglib/repo.rb
|
111
|
+
- lib/hglib/repo/bookmark.rb
|
176
112
|
- lib/hglib/repo/id.rb
|
177
113
|
- lib/hglib/repo/log_entry.rb
|
114
|
+
- lib/hglib/repo/tag.rb
|
178
115
|
- lib/hglib/server.rb
|
179
|
-
- spec
|
116
|
+
- spec/hglib/config_spec.rb
|
117
|
+
- spec/hglib/mixins_spec.rb
|
180
118
|
- spec/hglib/repo/id_spec.rb
|
181
119
|
- spec/hglib/repo/log_entry_spec.rb
|
182
120
|
- spec/hglib/repo_spec.rb
|
183
121
|
- spec/hglib/server_spec.rb
|
184
122
|
- spec/hglib_spec.rb
|
185
123
|
- spec/spec_helper.rb
|
186
|
-
homepage:
|
124
|
+
homepage: https://hg.sr.ht/~ged/hglib
|
187
125
|
licenses:
|
188
126
|
- BSD-3-Clause
|
189
127
|
metadata: {}
|
190
128
|
post_install_message:
|
191
|
-
rdoc_options:
|
192
|
-
- "--main"
|
193
|
-
- README.md
|
129
|
+
rdoc_options: []
|
194
130
|
require_paths:
|
195
131
|
- lib
|
196
132
|
required_ruby_version: !ruby/object:Gem::Requirement
|
197
133
|
requirements:
|
198
134
|
- - ">="
|
199
135
|
- !ruby/object:Gem::Version
|
200
|
-
version:
|
136
|
+
version: '0'
|
201
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
138
|
requirements:
|
203
139
|
- - ">="
|
204
140
|
- !ruby/object:Gem::Version
|
205
141
|
version: '0'
|
206
142
|
requirements: []
|
207
|
-
rubygems_version: 3.0.
|
143
|
+
rubygems_version: 3.0.6
|
208
144
|
signing_key:
|
209
145
|
specification_version: 4
|
210
146
|
summary: This is a client library for the Mercurial distributed revision control tool
|
211
|
-
that uses the
|
147
|
+
that uses the {Command Server}[https://www.mercurial-scm.org/wiki/CommandServer]
|
148
|
+
for efficiency.
|
212
149
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|
data/.simplecov
DELETED
data/ChangeLog
DELETED
@@ -1,128 +0,0 @@
|
|
1
|
-
2019-06-26 Michael Granger <ged@FaerieMUD.org>
|
2
|
-
|
3
|
-
@ * .hgtags:
|
4
|
-
| Added tag v0.2.0 for changeset f6b0928a58c6
|
5
|
-
| [26735e788a0d] [tip]
|
6
|
-
|
|
7
|
-
o * .hgsigs:
|
8
|
-
| Added signature for changeset e05206de50ed
|
9
|
-
| [f6b0928a58c6] [v0.2.0]
|
10
|
-
|
|
11
|
-
o * History.md, lib/hglib.rb:
|
12
|
-
| Bump minor version, update history
|
13
|
-
| [e05206de50ed]
|
14
|
-
|
|
15
|
-
o * .hgtags:
|
16
|
-
| Added tag v0.1.0 for changeset e4dc675f47f3
|
17
|
-
| [0a80612185f0]
|
18
|
-
|
|
19
|
-
o * .hgsigs:
|
20
|
-
| Added signature for changeset e4dc675f47f3
|
21
|
-
| [c19d67daf0cb]
|
22
|
-
|
|
23
|
-
2019-04-03 Michael Granger <ged@FaerieMUD.org>
|
24
|
-
|
25
|
-
o * Rakefile:
|
26
|
-
| Make the project public
|
27
|
-
| [8c56f3131fb7]
|
28
|
-
|
|
29
|
-
2019-05-14 Michael Granger <ged@FaerieMUD.org>
|
30
|
-
|
31
|
-
o * hglib.gemspec, lib/hglib.rb, spec/hglib_spec.rb:
|
32
|
-
| Added is_repo? and init methods to Hglib
|
33
|
-
|
|
34
|
-
| Also improved test coverage of top-level module.
|
35
|
-
| [938b0de05aed]
|
36
|
-
|
|
37
|
-
2019-04-03 Michael Granger <ged@FaerieMUD.org>
|
38
|
-
|
39
|
-
o * History.md, lib/hglib.rb:
|
40
|
-
| Bump the minor version and update history.
|
41
|
-
| [e4dc675f47f3] [v0.1.0]
|
42
|
-
|
|
43
|
-
o * lib/hglib/repo/log_entry.rb, spec/hglib/repo/log_entry_spec.rb:
|
44
|
-
| Add a #files attribute to log entries.
|
45
|
-
|
|
46
|
-
| This will be populated if you run #log with `verbose: true`.
|
47
|
-
| [a66f9ba07f99]
|
48
|
-
|
|
49
|
-
o * lib/hglib/repo.rb:
|
50
|
-
| Add Repo#status -> #stat alias
|
51
|
-
| [f8308d34a0e1]
|
52
|
-
|
|
53
|
-
2019-01-16 Michael Granger <ged@FaerieMUD.org>
|
54
|
-
|
55
|
-
o * .hoerc, .ruby-version, lib/hglib/repo.rb, spec/hglib/repo_spec.rb:
|
56
|
-
| Use Ruby 2.6, add Repo#pull and #pull_update.
|
57
|
-
|
|
58
|
-
| Also fixes the Repo#log spec.
|
59
|
-
| [b84a356151a3]
|
60
|
-
|
|
61
|
-
2018-11-28 Michael Granger <ged@FaerieMUD.org>
|
62
|
-
|
63
|
-
o * lib/hglib/repo.rb, lib/hglib/repo/log_entry.rb,
|
64
|
-
| spec/hglib/repo/log_entry_spec.rb:
|
65
|
-
| Improve repo.log, add repo.commit
|
66
|
-
| [399d83897663]
|
67
|
-
|
|
68
|
-
o * lib/hglib/server.rb, spec/hglib/server_spec.rb:
|
69
|
-
| Improve server option-mangling
|
70
|
-
| [8ffd61bb3183]
|
71
|
-
|
|
72
|
-
o * Rakefile, certs/ged.pem, hglib.gemspec:
|
73
|
-
| =Update my gem-signing cert
|
74
|
-
| [05a8abeeec84]
|
75
|
-
|
|
76
|
-
2018-05-22 Michael Granger <ged@FaerieMUD.org>
|
77
|
-
|
78
|
-
o * .assemblies/commit:
|
79
|
-
| Add Assemblage commit script
|
80
|
-
| [4a1cbb9f8d56]
|
81
|
-
|
|
82
|
-
o * Manifest.txt, lib/hglib/repo/log_entry.rb, lib/hglib/server.rb,
|
83
|
-
| spec/hglib/repo/log_entry_spec.rb, spec/spec_helper.rb:
|
84
|
-
| Finish up log command/log entry class.
|
85
|
-
| [ac2b07cce0fc]
|
86
|
-
|
|
87
|
-
2018-05-15 Michael Granger <ged@FaerieMUD.org>
|
88
|
-
|
89
|
-
o * .gems, .hgignore, integration/commands/clone_spec.rb,
|
90
|
-
| integration/spec_helper.rb, lib/hglib.rb, lib/hglib/repo.rb,
|
91
|
-
| lib/hglib/repo/id.rb, lib/hglib/repo/log_entry.rb,
|
92
|
-
| lib/hglib/server.rb, spec/hglib/repo/id_spec.rb,
|
93
|
-
| spec/hglib/repo/log_entry_spec.rb, spec/hglib/repo_spec.rb,
|
94
|
-
| spec/hglib/server_spec.rb, spec/spec_helper.rb:
|
95
|
-
| Flesh out the features of Repo objects
|
96
|
-
| [d4af915821de]
|
97
|
-
|
|
98
|
-
2018-03-13 Michael Granger <ged@FaerieMUD.org>
|
99
|
-
|
100
|
-
o * .hgignore, .pryrc, README.md, Rakefile, examples/clone.rb,
|
101
|
-
| hglib.gemspec, lib/hglib.rb, lib/hglib/repo.rb,
|
102
|
-
| lib/hglib/repo/log_entry.rb, lib/hglib/server.rb,
|
103
|
-
| spec/hglib/server_spec.rb, spec/hglib_spec.rb, spec/spec_helper.rb:
|
104
|
-
| =Added repo class, fixed a bunch of stuff.
|
105
|
-
| [a366819bd05b]
|
106
|
-
|
|
107
|
-
2018-01-24 Michael Granger <ged@FaerieMUD.org>
|
108
|
-
|
109
|
-
o * .document, .hgignore, .hoerc, .rdoc_options, Manifest.txt,
|
110
|
-
| README.md, hglib.gemspec:
|
111
|
-
| Update project metadata, build files
|
112
|
-
| [5881275661a7]
|
113
|
-
|
|
114
|
-
o * lib/hglib.rb, spec/hglib_spec.rb:
|
115
|
-
| Add configurable binpath to the top-level module
|
116
|
-
| [da8322c8b033]
|
117
|
-
|
|
118
|
-
o * .ruby-version:
|
119
|
-
| Make ruby-version less specific
|
120
|
-
| [81f357f730d9]
|
121
|
-
|
|
122
|
-
o * .document, .editorconfig, .gems, .hg_archival.txt, .hgignore,
|
123
|
-
.pryrc, .rdoc_options, .ruby-gemset, .ruby-version, .simplecov,
|
124
|
-
Gemfile, History.md, LICENSE.txt, Manifest.txt, README.md, Rakefile,
|
125
|
-
certs/ged.pem, lib/hglib.rb, spec/hglib_spec.rb,
|
126
|
-
spec/spec_helper.rb:
|
127
|
-
Initial commit.
|
128
|
-
[d6c97f99b012]
|
data/Manifest.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
.simplecov
|
2
|
-
ChangeLog
|
3
|
-
History.md
|
4
|
-
LICENSE.txt
|
5
|
-
Manifest.txt
|
6
|
-
README.md
|
7
|
-
Rakefile
|
8
|
-
examples/clone.rb
|
9
|
-
integration/commands/clone_spec.rb
|
10
|
-
integration/spec_helper.rb
|
11
|
-
lib/hglib.rb
|
12
|
-
lib/hglib/repo.rb
|
13
|
-
lib/hglib/repo/id.rb
|
14
|
-
lib/hglib/repo/log_entry.rb
|
15
|
-
lib/hglib/server.rb
|
16
|
-
spec/.status
|
17
|
-
spec/hglib/repo/id_spec.rb
|
18
|
-
spec/hglib/repo/log_entry_spec.rb
|
19
|
-
spec/hglib/repo_spec.rb
|
20
|
-
spec/hglib/server_spec.rb
|
21
|
-
spec/hglib_spec.rb
|
22
|
-
spec/spec_helper.rb
|
data/Rakefile
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'hoe'
|
5
|
-
rescue LoadError
|
6
|
-
abort "This Rakefile requires hoe (gem install hoe)"
|
7
|
-
end
|
8
|
-
|
9
|
-
GEMSPEC = 'hglib.gemspec'
|
10
|
-
|
11
|
-
|
12
|
-
Hoe.plugin :mercurial
|
13
|
-
Hoe.plugin :signing
|
14
|
-
Hoe.plugin :deveiate
|
15
|
-
|
16
|
-
Hoe.plugins.delete :rubyforge
|
17
|
-
|
18
|
-
hoespec = Hoe.spec 'hglib' do |spec|
|
19
|
-
spec.readme_file = 'README.md'
|
20
|
-
spec.history_file = 'History.md'
|
21
|
-
|
22
|
-
spec.extra_rdoc_files = FileList[ '*.rdoc', '*.md' ]
|
23
|
-
spec.license 'BSD-3-Clause'
|
24
|
-
|
25
|
-
spec.urls = {
|
26
|
-
home: 'http://deveiate.org/projects/hglib',
|
27
|
-
code: 'http://bitbucket.org/ged/hglib',
|
28
|
-
docs: 'http://deveiate.org/code/hglib',
|
29
|
-
github: 'http://github.com/ged/hglib',
|
30
|
-
}
|
31
|
-
|
32
|
-
spec.developer 'Michael Granger', 'ged@FaerieMUD.org'
|
33
|
-
|
34
|
-
spec.dependency 'loggability', '~> 0.11'
|
35
|
-
|
36
|
-
spec.dependency 'hoe-deveiate', '~> 0.10', :developer
|
37
|
-
spec.dependency 'simplecov', '~> 0.7', :developer
|
38
|
-
spec.dependency 'rdoc-generator-fivefish', '~> 0.1', :developer
|
39
|
-
spec.dependency 'rdoc', '~> 6.0', :developer
|
40
|
-
|
41
|
-
spec.require_ruby_version( '>=2.5.0' )
|
42
|
-
spec.hg_sign_tags = true if spec.respond_to?( :hg_sign_tags= )
|
43
|
-
spec.check_history_on_release = true if spec.respond_to?( :check_history_on_release= )
|
44
|
-
|
45
|
-
self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
|
46
|
-
end
|
47
|
-
|
48
|
-
|
49
|
-
ENV['VERSION'] ||= hoespec.spec.version.to_s
|
50
|
-
|
51
|
-
# Run the tests before checking in
|
52
|
-
task 'hg:precheckin' => [ :check_history, :check_manifest, :gemspec, :spec ]
|
53
|
-
|
54
|
-
task :test => :spec
|
55
|
-
|
56
|
-
# Rebuild the ChangeLog immediately before release
|
57
|
-
task :prerelease => 'ChangeLog'
|
58
|
-
CLOBBER.include( 'ChangeLog' )
|
59
|
-
|
60
|
-
desc "Build a coverage report"
|
61
|
-
task :coverage do
|
62
|
-
ENV["COVERAGE"] = 'yes'
|
63
|
-
Rake::Task[:spec].invoke
|
64
|
-
end
|
65
|
-
CLOBBER.include( 'coverage' )
|
66
|
-
|
67
|
-
|
68
|
-
# Use the fivefish formatter for docs generated from development checkout
|
69
|
-
if File.directory?( '.hg' )
|
70
|
-
require 'rdoc/task'
|
71
|
-
|
72
|
-
Rake::Task[ 'docs' ].clear
|
73
|
-
RDoc::Task.new( 'docs' ) do |rdoc|
|
74
|
-
rdoc.main = "README.rdoc"
|
75
|
-
rdoc.markup = 'markdown'
|
76
|
-
rdoc.rdoc_files.include( "*.rdoc", "ChangeLog", "lib/**/*.rb" )
|
77
|
-
rdoc.generator = :fivefish
|
78
|
-
rdoc.title = 'hglib'
|
79
|
-
rdoc.rdoc_dir = 'doc'
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
task :gemspec => GEMSPEC
|
84
|
-
file GEMSPEC => __FILE__
|
85
|
-
task GEMSPEC do |task|
|
86
|
-
Rake.application.trace "Rebuilding gemspec."
|
87
|
-
spec = $hoespec.spec
|
88
|
-
spec.files.delete( '.gemtest' )
|
89
|
-
spec.signing_key = nil
|
90
|
-
spec.cert_chain = ['certs/ged.pem']
|
91
|
-
spec.version = "#{spec.version.bump}.pre#{Time.now.strftime("%Y%m%d%H%M%S")}"
|
92
|
-
File.open( task.name, 'w' ) do |fh|
|
93
|
-
fh.write( spec.to_ruby )
|
94
|
-
end
|
95
|
-
end
|
96
|
-
CLOBBER.include( GEMSPEC.to_s )
|
97
|
-
|
98
|
-
task :default => :gemspec
|
99
|
-
|