p4util 0.1.0 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45a2fa04d57ee5b6aca04b509acc1705dffb1f35
4
- data.tar.gz: 0561143880e7350548859aa309f2c499d3ac3d70
3
+ metadata.gz: 8e13e10a9b31fb12e34d23ee7f6495eca21ce5e6
4
+ data.tar.gz: 2bf3006c190afaf1d19d0c2e216c6812d585f28f
5
5
  SHA512:
6
- metadata.gz: 1c01e49961c05d2fe79b25c504e7748349e014407ef0975c6f1dc1434b24e02a344512d840758f68601fcb3dcd434769bcd2281eb36ed5e700de064a25039292
7
- data.tar.gz: d4e3bc148311ae182387bfe3db5541d10e5a1dae0c26fe8d8bd12a432f8749d181adfcbfc5ac27b766b18b0d38b07645f15bfd0e22267eec613254c63d8f1be2
6
+ metadata.gz: 621d7626122bd7e2517191a45570c6f0e62bc93ecbb989f4f61cd475b4236c37259c624fad705e208b30897810a095b148383edae583eea109cb5e4988b6c936
7
+ data.tar.gz: d8882a9dedc2b56fa15f4ea1a3fc6c81181785b5542548c57546060eff3e0a17f0bd53fbe6dfd46920e237f60eabe67fb28839004ba1da0e1ef5341935a451e8
data/README.md CHANGED
@@ -35,6 +35,8 @@ Or install it yourself as:
35
35
 
36
36
  ## Changes
37
37
 
38
+ * 0.1.1: Added documentation for Rake tasks and version string output
39
+
38
40
  * 0.1.0: Added `p4util init` command that can do some common p4d configurations,
39
41
  like setting unicode and security settings, along with users and basic
40
42
  adds and edits of files.
data/lib/commands/help.rb CHANGED
@@ -25,6 +25,10 @@ module Commands
25
25
  init - Seed the local p4d instance using local configuration files
26
26
  kill - Shutdown p4d processes using SIGTERM
27
27
  start - Spawn the p4d process in your working directory
28
+
29
+ Additional 'commands' you can use for more information:
30
+ version - Print the version string
31
+ rake - Some notes on how to use the Rake tasks
28
32
  END
29
33
  end
30
34
  end
@@ -0,0 +1,38 @@
1
+
2
+ module Commands
3
+
4
+ def Commands.rake(options)
5
+ print_rake_help
6
+ end
7
+
8
+ private
9
+
10
+ def Commands.print_rake_help
11
+ puts <<-END.gsub(/^ {6}/, '')
12
+ Use rake to drive p4util commands
13
+
14
+ Example usage in your Rakefile:
15
+
16
+ require 'p4util/tasks'
17
+
18
+ P4Util::Tasks.new do |p4util|
19
+ p4util.version = 'r14.2'
20
+ p4util.p4_init_dir = 'spec/init.base'
21
+ end
22
+
23
+ This defines three tasks for you:
24
+
25
+ * `p4init` - See 'p4util help init'
26
+ * `p4kill` - See 'p4util help kill'
27
+ * `p4reset` - Calls p4kill then removes the work/p4droot folder
28
+
29
+ (This assumes you have installed p4util or setup the p4util gem dependency.)
30
+
31
+ The `version` property specifies the version of p4d to download and run.
32
+ It mirrors the version directory names of ftp.perforce.com at the moment.
33
+
34
+ The `p4_init_dir` property indicates a directory of ruby scripts that
35
+ define the script files for the p4util init command.
36
+ END
37
+ end
38
+ end
@@ -0,0 +1,17 @@
1
+
2
+ require 'p4util/version'
3
+
4
+ module Commands
5
+
6
+ def Commands.version(options)
7
+ print_version_help
8
+ end
9
+
10
+ private
11
+
12
+ def Commands.print_version_help
13
+ puts <<-END.gsub(/^ {6}/, '')
14
+ p4util #{P4Util::VERSION}
15
+ END
16
+ end
17
+ end
data/lib/commands.rb CHANGED
@@ -2,4 +2,6 @@ require 'commands/download'
2
2
  require 'commands/init'
3
3
  require 'commands/help'
4
4
  require 'commands/kill'
5
- require 'commands/start'
5
+ require 'commands/rake'
6
+ require 'commands/start'
7
+ require 'commands/version'
@@ -1,3 +1,3 @@
1
1
  module P4Util
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: p4util
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tristan Juricek
@@ -92,8 +92,10 @@ files:
92
92
  - "./lib/commands/init/system_settings_model.rb"
93
93
  - "./lib/commands/init/user_model.rb"
94
94
  - "./lib/commands/kill.rb"
95
+ - "./lib/commands/rake.rb"
95
96
  - "./lib/commands/start.rb"
96
97
  - "./lib/commands/util.rb"
98
+ - "./lib/commands/version.rb"
97
99
  - "./lib/conventions.rb"
98
100
  - "./lib/osutil.rb"
99
101
  - "./lib/p4util.rb"