p4ruby 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +4 -15
- data/README +0 -19
- data/Rakefile +107 -9
- data/install.rb +7 -11
- data/p4ruby.gemspec +4 -4
- metadata +17 -7
data/CHANGES
CHANGED
@@ -1,24 +1,13 @@
|
|
1
1
|
|
2
2
|
= p4ruby
|
3
3
|
|
4
|
-
== version 1.0.
|
5
|
-
|
6
|
-
**** NOTE ****
|
7
|
-
|
8
|
-
This is a temporary fork of the p4ruby gem which works around an
|
9
|
-
ongoing problem of missing files on the Perforce server.
|
4
|
+
== version 1.0.11
|
10
5
|
|
11
|
-
|
6
|
+
* remove previous workaround; now uses list of hosed versions to avoid
|
12
7
|
|
13
|
-
|
14
|
-
Since these issues are ongoing and beyond my control, I have
|
15
|
-
transferred ownership of the gem to Perforce, who may or may not
|
16
|
-
resolve the matter. Please send bug reports to them.
|
17
|
-
|
18
|
-
Sincerely,
|
19
|
-
James M. Lawrence
|
8
|
+
== version 1.0.10
|
20
9
|
|
21
|
-
|
10
|
+
* perforce ftp site has hosed 11.1 directory -- workaround hardcoded for 10.2
|
22
11
|
|
23
12
|
== version 1.0.9
|
24
13
|
|
data/README
CHANGED
@@ -1,23 +1,4 @@
|
|
1
1
|
|
2
|
-
**** NOTE ****
|
3
|
-
|
4
|
-
This is a temporary fork of the p4ruby gem which works around an
|
5
|
-
ongoing problem of missing files on the Perforce server.
|
6
|
-
|
7
|
-
This fork is hard-coded to download version r10.2 only.
|
8
|
-
|
9
|
-
In the past Perforce has ignored such problems with their ftp server.
|
10
|
-
Since these issues are ongoing and beyond my control, I have
|
11
|
-
transferred ownership of the gem to Perforce, who may or may not
|
12
|
-
resolve the matter. Please send bug reports to them.
|
13
|
-
|
14
|
-
Sincerely,
|
15
|
-
James M. Lawrence
|
16
|
-
|
17
|
-
**** NOTE ****
|
18
|
-
|
19
|
-
=============================================================
|
20
|
-
|
21
2
|
= P4Ruby -- Ruby interface to the Perforce API
|
22
3
|
|
23
4
|
This is only an installer for the P4Ruby package by Perforce Software.
|
data/Rakefile
CHANGED
@@ -1,11 +1,109 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
begin
|
3
|
+
require 'rubygems'
|
4
|
+
gem 'rdoc'
|
5
|
+
rescue LoadError
|
6
|
+
end
|
7
|
+
|
8
|
+
require 'rubygems/package_task'
|
9
|
+
require 'rdoc/task'
|
10
|
+
require 'rake/contrib/rubyforgepublisher'
|
11
|
+
require 'fileutils'
|
12
|
+
|
13
|
+
include FileUtils
|
14
|
+
|
15
|
+
README = "README"
|
16
|
+
GEMSPEC = eval(File.read("p4ruby.gemspec"))
|
17
|
+
RAKEFILE = "Rakefile"
|
18
|
+
RAKEFILE_ORIG = "Rakefile.orig"
|
19
|
+
|
20
|
+
default_task_definition = %{
|
21
|
+
INSTALLER = './install.rb'
|
22
|
+
|
23
|
+
#
|
24
|
+
# default task compiles for the gem
|
25
|
+
#
|
26
|
+
task :default do
|
27
|
+
ARGV.clear
|
28
|
+
ARGV.push "--gem"
|
29
|
+
load INSTALLER
|
30
|
+
end
|
31
|
+
}
|
32
|
+
|
33
|
+
eval(default_task_definition)
|
34
|
+
|
35
|
+
task :clean => :clobber do
|
36
|
+
rm_rf ["work", "lib", "ext"]
|
37
|
+
end
|
38
|
+
|
39
|
+
task :update_docs do
|
40
|
+
ruby_path = File.join(
|
41
|
+
Config::CONFIG["bindir"],
|
42
|
+
Config::CONFIG["RUBY_INSTALL_NAME"])
|
43
|
+
|
44
|
+
help = "--help"
|
45
|
+
command = "ruby #{File.basename(INSTALLER)} #{help}"
|
46
|
+
output = `#{ruby_path} #{INSTALLER} #{help}`
|
47
|
+
|
48
|
+
# insert help output into README
|
49
|
+
replace_file(README) { |contents|
|
50
|
+
contents.sub(%r!#{command}.*?==!m) {
|
51
|
+
command + "\n\n " +
|
52
|
+
output + "\n=="
|
53
|
+
}
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
task :doc => :update_docs
|
58
|
+
task :doc => :rdoc
|
59
|
+
|
60
|
+
task :package => [:clean, :doc]
|
61
|
+
task :gem => :clean
|
62
|
+
|
63
|
+
RDoc::Task.new { |t|
|
64
|
+
t.main = README
|
65
|
+
t.rdoc_files.include([README])
|
66
|
+
t.rdoc_dir = "html"
|
67
|
+
t.title = "P4Ruby: #{GEMSPEC.summary}"
|
68
|
+
}
|
69
|
+
|
70
|
+
Gem::PackageTask.new(GEMSPEC) { |t|
|
71
|
+
t.need_tar = true
|
72
|
+
}
|
73
|
+
|
74
|
+
task :publish => :doc do
|
75
|
+
Rake::RubyForgePublisher.new('p4ruby', 'quix').upload
|
76
|
+
end
|
77
|
+
|
78
|
+
task :release do
|
79
|
+
mv(RAKEFILE, RAKEFILE_ORIG)
|
80
|
+
begin
|
81
|
+
File.open(RAKEFILE, "w") { |out|
|
82
|
+
out.puts default_task_definition.gsub(%r!^ !m, "")
|
83
|
+
}
|
84
|
+
Rake::Task[:package].invoke
|
85
|
+
ensure
|
86
|
+
mv(RAKEFILE_ORIG, RAKEFILE)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
##################################################
|
91
|
+
# util
|
92
|
+
|
93
|
+
unless respond_to? :tap
|
94
|
+
module Kernel
|
95
|
+
def tap
|
96
|
+
yield self
|
97
|
+
self
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def replace_file(file)
|
103
|
+
old_contents = File.read(file)
|
104
|
+
yield(old_contents).tap { |new_contents|
|
105
|
+
File.open(file, "w") { |output|
|
106
|
+
output.print(new_contents)
|
107
|
+
}
|
108
|
+
}
|
11
109
|
end
|
data/install.rb
CHANGED
@@ -9,10 +9,6 @@ require 'fileutils'
|
|
9
9
|
require 'optparse'
|
10
10
|
require 'pathname'
|
11
11
|
|
12
|
-
def main
|
13
|
-
Installer.new.run
|
14
|
-
end
|
15
|
-
|
16
12
|
class Installer
|
17
13
|
include FileUtils
|
18
14
|
|
@@ -35,6 +31,9 @@ class Installer
|
|
35
31
|
SERVER = "ftp.perforce.com"
|
36
32
|
SERVER_TOP_DIR = Pathname.new "perforce"
|
37
33
|
|
34
|
+
# Mysterious "ghost" releases which lack files
|
35
|
+
HOSED_VERSIONS = %w[09.3 11.1]
|
36
|
+
|
38
37
|
P4API_REMOTE_BASENAME = Pathname.new "p4api.tgz"
|
39
38
|
P4RUBY_REMOTE_BASENAME = Pathname.new "p4ruby.tgz"
|
40
39
|
|
@@ -141,12 +140,7 @@ class Installer
|
|
141
140
|
end
|
142
141
|
|
143
142
|
@s.attribute(:version_dir) {
|
144
|
-
#
|
145
|
-
# **** NOTE ****
|
146
|
-
#
|
147
|
-
# TODO: remove this workaround for missing files on the server
|
148
|
-
#
|
149
|
-
SERVER_TOP_DIR + "r10.2" # "r#{@s.version}"
|
143
|
+
SERVER_TOP_DIR + "r#{@s.version}"
|
150
144
|
}
|
151
145
|
|
152
146
|
@s.p4api.attribute(:remote) {
|
@@ -299,6 +293,8 @@ class Installer
|
|
299
293
|
def versions
|
300
294
|
remote_files_matching(SERVER_TOP_DIR, %r!r([0-8]\d\.\d)!) { |match|
|
301
295
|
match.captures.first
|
296
|
+
}.reject { |version|
|
297
|
+
HOSED_VERSIONS.include? version
|
302
298
|
}.sort
|
303
299
|
end
|
304
300
|
|
@@ -480,4 +476,4 @@ module Kernel
|
|
480
476
|
end
|
481
477
|
end
|
482
478
|
|
483
|
-
|
479
|
+
Installer.new.run
|
data/p4ruby.gemspec
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
|
2
2
|
Gem::Specification.new { |t|
|
3
3
|
t.name = "p4ruby"
|
4
|
-
t.version = "1.0.
|
4
|
+
t.version = "1.0.11"
|
5
5
|
t.summary = "Ruby interface to the Perforce API"
|
6
|
-
t.
|
7
|
-
t.
|
6
|
+
t.description = t.summary + "."
|
7
|
+
t.author = "Perforce Software (ruby gem by James M. Lawrence)"
|
8
|
+
t.email = "quixoticsycophant@gmail.com"
|
8
9
|
t.homepage = "http://p4ruby.rubyforge.org"
|
9
10
|
t.rubyforge_project = "p4ruby"
|
10
11
|
t.extensions << "Rakefile"
|
@@ -19,7 +20,6 @@ Gem::Specification.new { |t|
|
|
19
20
|
p4ruby.gemspec
|
20
21
|
]
|
21
22
|
|
22
|
-
t.has_rdoc = true
|
23
23
|
t.extra_rdoc_files = ["README"]
|
24
24
|
rdoc_exclude = t.files - t.extra_rdoc_files
|
25
25
|
t.rdoc_options +=
|
metadata
CHANGED
@@ -1,16 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: p4ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 0
|
8
|
+
- 11
|
9
|
+
version: 1.0.11
|
6
10
|
platform: ruby
|
7
11
|
authors:
|
8
|
-
- Perforce Software
|
12
|
+
- Perforce Software (ruby gem by James M. Lawrence)
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
16
|
|
13
|
-
date: 2011-
|
17
|
+
date: 2011-08-02 00:00:00 -04:00
|
14
18
|
default_executable:
|
15
19
|
dependencies:
|
16
20
|
- !ruby/object:Gem::Dependency
|
@@ -21,11 +25,13 @@ dependencies:
|
|
21
25
|
requirements:
|
22
26
|
- - ">="
|
23
27
|
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
24
30
|
version: "0"
|
25
31
|
type: :runtime
|
26
32
|
version_requirements: *id001
|
27
|
-
description:
|
28
|
-
email:
|
33
|
+
description: Ruby interface to the Perforce API.
|
34
|
+
email: quixoticsycophant@gmail.com
|
29
35
|
executables: []
|
30
36
|
|
31
37
|
extensions:
|
@@ -64,17 +70,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
64
70
|
requirements:
|
65
71
|
- - ">="
|
66
72
|
- !ruby/object:Gem::Version
|
73
|
+
segments:
|
74
|
+
- 0
|
67
75
|
version: "0"
|
68
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
77
|
none: false
|
70
78
|
requirements:
|
71
79
|
- - ">="
|
72
80
|
- !ruby/object:Gem::Version
|
81
|
+
segments:
|
82
|
+
- 0
|
73
83
|
version: "0"
|
74
84
|
requirements: []
|
75
85
|
|
76
86
|
rubyforge_project: p4ruby
|
77
|
-
rubygems_version: 1.
|
87
|
+
rubygems_version: 1.3.7
|
78
88
|
signing_key:
|
79
89
|
specification_version: 3
|
80
90
|
summary: Ruby interface to the Perforce API
|