codespicuous 0.0.5 → 0.0.6
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
- data/lib/codespicuous/svn_client.rb +8 -1
- data/lib/codespicuous/svn_data_collector.rb +1 -2
- data/lib/codespicuous/version.rb +1 -1
- data/spec/svn_client_spec.rb +13 -2
- data/spec/svn_data_collector_spec.rb +1 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec7510457ef28f2fd25293319ce4133539d0c48a
|
4
|
+
data.tar.gz: c1834d532ca831750a5857d2c6fec75fc158ab5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e89bf3bce4e16ebcf4b660224d97bedd1993cfb89ec202cdaeff38360b51ec9d159ec6f0ef570c91735ef4234d634071cce3b7e6a0afb95b7faecdddd0810671
|
7
|
+
data.tar.gz: 3e8af2b1578c5a23ee32c3ed80fc8634819f66a60df139cd3c6d660f3a4238d0e9ffd9b8b3ced2c80de1cc46b19be6415e734fd98a58e2a5ddc9abf4637cb417
|
@@ -6,7 +6,14 @@ class SVNClient
|
|
6
6
|
@repository = repository
|
7
7
|
end
|
8
8
|
|
9
|
-
def log_xml
|
9
|
+
def log_xml
|
10
|
+
AttemptTo.attempt_to('svn log: "' + @repository + '"', 5) {
|
11
|
+
CommandRunner.run("svn log #{@repository} --xml --non-interactive ")
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
def log_xml_for_timeframe(from, to)
|
10
17
|
AttemptTo.attempt_to('svn log: "' + @repository + '"', 5) {
|
11
18
|
CommandRunner.run("svn log #{@repository} -r{#{from.strftime("%Y-%m-%d")}}:{#{to.strftime("%Y-%m-%d")}} --xml --non-interactive ")
|
12
19
|
}
|
data/lib/codespicuous/version.rb
CHANGED
data/spec/svn_client_spec.rb
CHANGED
@@ -1,7 +1,18 @@
|
|
1
1
|
|
2
2
|
describe "Interface towards the command line svn" do
|
3
3
|
|
4
|
-
it "Should be able to retrieve an xml log" do
|
4
|
+
it "Should be able to retrieve an xml log for entire repository" do
|
5
|
+
svn = SVNClient.new
|
6
|
+
xmllog = double(:xmllog)
|
7
|
+
|
8
|
+
expect(AttemptTo).to receive(:attempt_to).with('svn log: "Heh"', 5).and_yield
|
9
|
+
expect(CommandRunner).to receive(:run).with("svn log Heh --xml --non-interactive ").and_return(xmllog)
|
10
|
+
|
11
|
+
svn.repository("Heh")
|
12
|
+
expect(svn.log_xml).to eq(xmllog)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "Should be able to retrieve an xml log for timeframe" do
|
5
16
|
svn = SVNClient.new
|
6
17
|
xmllog = double(:xmllog)
|
7
18
|
|
@@ -11,6 +22,6 @@ describe "Interface towards the command line svn" do
|
|
11
22
|
expect(CommandRunner).to receive(:run).with("svn log Heh -r{1977-01-01}:{1978-01-01} --xml --non-interactive ").and_return(xmllog)
|
12
23
|
|
13
24
|
svn.repository("Heh")
|
14
|
-
expect(svn.
|
25
|
+
expect(svn.log_xml_for_timeframe(now.prev_year, now)).to eq(xmllog)
|
15
26
|
end
|
16
27
|
end
|
@@ -12,10 +12,9 @@ describe "Collecting data from SVN" do
|
|
12
12
|
svnclient = double(:svnclient)
|
13
13
|
|
14
14
|
expect(SVNClient).to receive(:new).and_return(svnclient)
|
15
|
-
expect(DateTime).to receive(:now).and_return(DateTime.new(2001))
|
16
15
|
|
17
16
|
expect(svnclient).to receive(:repository).with(@heh_repository.url)
|
18
|
-
expect(svnclient).to receive(:log_xml).
|
17
|
+
expect(svnclient).to receive(:log_xml).and_return(@xmllog)
|
19
18
|
|
20
19
|
expect(subject.retrieve_svn_log_from(@heh_repository)).to eq @xmllog
|
21
20
|
end
|