rscm-accurev 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -34,6 +34,8 @@ end
34
34
 
35
35
  test_files = FileList.new( "test/**/t_*.rb" )
36
36
  TEST_OUTPUT = "html/test"
37
+ # cumulative test results over time
38
+ TEST_TRACKING = "doc/tests.tab"
37
39
 
38
40
  Rake::TestTask.new( :plaintest ) do |t|
39
41
  t.libs << "test"
@@ -69,6 +71,72 @@ task :backup_testresults do
69
71
  #puts "...Backing up previous test results to #{new}"
70
72
  mv( old, new )
71
73
  end
74
+ xslt = 'lib/test/unit/ui/xml/xmltestrunner.xslt'
75
+ copy( xslt, TEST_OUTPUT )
76
+ end
77
+
78
+ task :post_test do
79
+ results = "#{TEST_OUTPUT}/testresults.xml"
80
+ # //result[@testcount,@assertcount,@errors,@failures,@passed=true]
81
+ require 'rexml/document'
82
+ include REXML
83
+ d = Document.new( File.open( results ) )
84
+ res = d.elements['//result']
85
+ testcount = res.attributes['testcount'].to_i
86
+ failed = res.attributes['errors'].to_i + res.attributes['failures'].to_i
87
+ pct_passed = 100 * (testcount-failed).to_f / testcount.to_f
88
+ unless File.exists?( TEST_TRACKING )
89
+ File.open( TEST_TRACKING, "w" ) do |out|
90
+ out.puts "# " + %w(
91
+ epoch tests asserts errors failures failedtests pct_success
92
+ ).join("\t")
93
+ end
94
+ end
95
+ File.open( TEST_TRACKING, "a" ) do |out|
96
+ out.puts [
97
+ Time.now.to_i,
98
+ testcount,
99
+ res.attributes['assertcount'],
100
+ res.attributes['errors'],
101
+ res.attributes['failures'],
102
+ failed,
103
+ pct_passed
104
+ ].join("\t")
105
+ end
106
+ end
107
+
108
+ task :rrdcreate do
109
+ sh "rrdtool create doc/tests.rrd " +
110
+ "-s 1800 " +
111
+ "DS:testcount:GAUGE:7200:0:U " +
112
+ "DS:passcount:GAUGE:7200:0:U " +
113
+ "RRA:AVERAGE:0.5:1:1440"
114
+ end
115
+
116
+ task :rrdupdate do
117
+ t = Time.now
118
+ count = 18
119
+ passing = 10
120
+ (1..30).each do
121
+ t += 1800
122
+ count += rand(5)
123
+ passing += rand(3)+1
124
+ passing = count if passing > count
125
+ sh "rrdtool update doc/tests.rrd " +
126
+ "#{t.to_i}:#{count}:#{passing}"
127
+ end
128
+ end
129
+
130
+ task :rrdgraph do
131
+ sh "rrdtool graph doc/tests.png " +
132
+ "--start 1125756000 --end 1125810000 " +
133
+ "DEF:tests=doc/tests.rrd:testcount:AVERAGE " +
134
+ "DEF:passed=doc/tests.rrd:passcount:AVERAGE " +
135
+ "LINE2:tests#FF0000 AREA:passed#00FF00"
136
+ end
137
+
138
+ task :rrdclean do
139
+ rm FileList[ 'doc/tests.png', 'doc/*.rrd' ]
72
140
  end
73
141
 
74
142
  # define a task to create rdocs
@@ -96,9 +164,10 @@ else
96
164
  s.version = PKG_VERSION
97
165
  s.summary = PKG_SUMMARY
98
166
  s.description = "RSCM::Accurev is an RSCM API for the SCM tool Accurev (http://www.accurev.com/)."
167
+ s.add_dependency( 'rscm', '>= 0.3.0' )
99
168
  s.files = PKG_FILES.to_a
100
169
  s.require_path = 'lib'
101
- s.autorequire = 'rscm/scm/accurev'
170
+ s.autorequire = 'rscm/accurev'
102
171
  s.has_rdoc = true
103
172
  rd_task.options.each {|opt| s.rdoc_options << opt }
104
173
  s.author = "Greg Fast"
data/STATUS CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  [checkout()] supported
9
9
 
10
- - basic checkouts should work
10
+ - basic checkouts work, with pop and with workspace stream
11
11
 
12
12
  - time-based checkouts do not work
13
13
 
@@ -21,36 +21,33 @@
21
21
 
22
22
  [edit()] supported (no-op)
23
23
 
24
- [revisions()] supported
25
-
26
- - time-based limits do not work
27
-
28
- - should be history-based
24
+ [revisions()] supported: basic and time-based limits
29
25
 
30
26
  -------------------------------------------
31
27
 
32
28
  == Accurev-specific API (RSCM::Accurev::API)
33
29
 
34
- [ac_update()] unsupported, todo
35
-
36
30
  [ac_files()] supported
37
31
 
38
- [ac_info()] supported
32
+ [ac_info()] supported - need to check vs popped workspace
39
33
 
40
- [ac_stat()] unsupported, use ac_files().
34
+ [ac_stat()] supported
41
35
 
42
- [ac_move()] unsupported, todo
36
+ [ac_hist()] supported
43
37
 
44
- [ac_pop()] unsupported, todo
38
+ [checkout_pop()] supported, at backing stream only (but backing stream
39
+ could be a version...
45
40
 
46
41
  [ac_purge()] unsupported, todo
47
42
 
48
- [ac_hist()] unsupported, todo
49
-
50
43
  [ac_keep()] unsupported, todo
51
44
 
52
45
  [ac_promote()] unsupported, todo
53
46
 
47
+ [ac_move()] unsupported, todo
48
+
49
+ [ac_update()] unsupported, todo
50
+
54
51
  -------------------------------------------
55
52
 
56
53
  == Other Items
data/TODO CHANGED
@@ -1,11 +1,11 @@
1
1
  # todo for rscm/scm/accurev.rb
2
2
 
3
- api - checkout
4
- - there is no rscm-api update() (only checkout-to-existing-ws)
5
- - `pop`, `update`
3
+ #api - checkout
4
+ # - there is no rscm-api update() (only checkout-to-existing-ws)
5
+ # - `pop`, `update`
6
6
 
7
- **api - revisions
8
- - `hist` (others?)
7
+ #**api - revisions
8
+ # - `hist` (others?)
9
9
 
10
10
  api - diff
11
11
  - `diff` (yukx)
@@ -18,14 +18,14 @@ api - api-specific commands to manage streams
18
18
 
19
19
  api - triggers?
20
20
 
21
- **api - identifiers (Time or revision) to ac format
22
- - is this even always applicable? does stat/update take limits?
21
+ #**api - identifiers (Time or revision) to ac format
22
+ # - is this even always applicable? does stat/update take limits?
23
23
 
24
24
  # xml - s/FileStatus/FileData/
25
25
 
26
- api - checkout(Time.infinite) just does update
27
- checkout(x) only works if ws not exist
28
- unless it implies nuke-and-re-checkout (slow)
26
+ #api - checkout(Time.infinite) just does update
27
+ # checkout(x) only works if ws not exist
28
+ # unless it implies nuke-and-re-checkout (slow)
29
29
 
30
30
  api - need ac_update which returns an acresponse
31
31
 
@@ -35,7 +35,7 @@ api - update: elements list should probably not include removed files
35
35
 
36
36
  # command - Command.working_dir is bad: should use with_working_dir()
37
37
 
38
- *** api - checkout() should use `pop` instead of `mkws`, unless
39
- user *really* wants it
40
- - yeargh... how does update work with pop? just nuke and/or overwrite?
38
+ #*** api - checkout() should use `pop` instead of `mkws`, unless
39
+ # user *really* wants it
40
+ # - yeargh... how does update work with pop? just nuke and/or overwrite?
41
41
 
@@ -8,6 +8,6 @@ MINOR=$(( $LAST + 1 ))
8
8
  perl -i~~ -pe "s/VERSION = '0.0.\d+'/VERSION = '0.0.$MINOR'/" \
9
9
  lib/rscm/accurev.rb
10
10
 
11
- PKG_BUILD=$MINOR rake package gem && \
11
+ PKG_BUILD=$MINOR rake verify package gem && \
12
12
  echo $MINOR > .version.minor
13
13
 
@@ -13,6 +13,6 @@ module RSCM
13
13
  # See RSCM::Accurev::API.
14
14
  #
15
15
  module Accurev
16
- VERSION = '0.0.6'
16
+ VERSION = '0.0.7'
17
17
  end
18
18
  end
@@ -33,11 +33,20 @@ module RSCM::Accurev
33
33
  #
34
34
  # === Example
35
35
  #
36
+ # # Checkout a new workspace:
36
37
  # api = RSCM::Accurev::API.new( "./ws/proj-1", "proj", "proj-1" )
37
38
  # api.checkout() each do |file|
38
39
  # puts "Updated #{file}..."
39
40
  # end
40
41
  #
42
+ # # Checkout a new (read-only) stream:
43
+ # api = RSCM::Accurev::API.new( "./ws/proj-1", "proj" )
44
+ # api.checkout() each {|f| ...}
45
+ #
46
+ # # Update a checked-out workspace or copy:
47
+ # api = RSCM::Accurev::API.new( "./ws/proj-1" )
48
+ # api.checkout() each{|f| ... }
49
+ #
41
50
  class API < RSCM::Base
42
51
  register self
43
52
 
@@ -324,6 +333,9 @@ module RSCM::Accurev
324
333
  end
325
334
  end
326
335
 
336
+ #
337
+ # Updates an existing workspace stream checked out to @checkout_dir
338
+ #
327
339
  def update( to_identifier=Time.infinite )
328
340
  co = RSCM::PathConverter.nativepath_to_filepath( @checkout_dir )
329
341
  unless File.exists?( co )
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: rscm-accurev
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.6
7
- date: 2005-09-02 00:00:00 -05:00
6
+ version: 0.0.7
7
+ date: 2005-09-06 00:00:00 -05:00
8
8
  summary: "RSCM::Accurev - RSCM API for Accurev"
9
9
  require_paths:
10
10
  - lib
@@ -12,7 +12,7 @@ email: gdf@speakeasy.net
12
12
  homepage: http://rscm-accurev.rubyforge.org
13
13
  rubyforge_project:
14
14
  description: RSCM::Accurev is an RSCM API for the SCM tool Accurev (http://www.accurev.com/).
15
- autorequire: rscm/scm/accurev
15
+ autorequire: rscm/accurev
16
16
  default_executable:
17
17
  bindir: bin
18
18
  has_rdoc: true
@@ -32,6 +32,7 @@ files:
32
32
  - bumprelease.sh
33
33
  - doc
34
34
  - eg
35
+ - html
35
36
  - lib
36
37
  - LICENSE
37
38
  - Rakefile
@@ -100,4 +101,14 @@ extra_rdoc_files: []
100
101
  executables: []
101
102
  extensions: []
102
103
  requirements: []
103
- dependencies: []
104
+ dependencies:
105
+ - !ruby/object:Gem::Dependency
106
+ name: rscm
107
+ version_requirement:
108
+ version_requirements: !ruby/object:Gem::Version::Requirement
109
+ requirements:
110
+ -
111
+ - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: 0.3.0
114
+ version: