p4util 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/commands/init/init_model.rb +2 -1
- data/lib/commands/init.rb +5 -3
- data/lib/p4util/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd44d36a39c704a989054b91c66f3480c3ff3da0
|
4
|
+
data.tar.gz: f1114069900aa1518b58df8f9067e662740a42c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7332c6b0104de70035fc6098dc98c52b12ee81a4a8ca32b9741aa835ff23d337c651ee2cf48cba98c9e34bf40055d0ab5ef13577a596c87a42dc384d1ec0bcf2
|
7
|
+
data.tar.gz: 23dc876ed087e73c468527570764cd122ddb7e2778eb4001720c3509119aafab1ce91027b42662b105bea14d08c6c9b0e7575ff43bd54419bca02515900ee3f5
|
@@ -58,7 +58,7 @@ module Commands
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
def self.run(p4port)
|
61
|
+
def self.run(p4port, auto)
|
62
62
|
system_settings = nil
|
63
63
|
super_user = nil
|
64
64
|
models = []
|
@@ -88,6 +88,7 @@ module Commands
|
|
88
88
|
p4.port = p4port
|
89
89
|
p4.connect
|
90
90
|
p4.exception_level = P4::RAISE_ERRORS
|
91
|
+
p4.charset = 'auto' if auto
|
91
92
|
|
92
93
|
if system_settings
|
93
94
|
system_settings.execute(p4, super_user)
|
data/lib/commands/init.rb
CHANGED
@@ -14,11 +14,13 @@ module Commands
|
|
14
14
|
|
15
15
|
p4port = '127.0.0.1:1666'
|
16
16
|
version = nil
|
17
|
+
auto = false
|
17
18
|
|
18
19
|
if options and !options.params.empty?
|
19
20
|
|
20
21
|
op = OptionParser.new do |op|
|
21
22
|
op.on('-p PORT', '--port PORT', 'P4PORT setting') { |x| p4port = x }
|
23
|
+
op.on('-a', '--auto', 'Force charset to be auto') { |x| auto = true }
|
22
24
|
op.on('-v VERSION', '--version VERSION', 'ftp.perforce.com version') do |v|
|
23
25
|
version = v
|
24
26
|
end
|
@@ -35,7 +37,7 @@ module Commands
|
|
35
37
|
init_dir = options.params.shift
|
36
38
|
end
|
37
39
|
|
38
|
-
initialize_p4d(init_dir, p4port)
|
40
|
+
initialize_p4d(init_dir, p4port, auto)
|
39
41
|
end
|
40
42
|
|
41
43
|
def Commands.print_init_help
|
@@ -166,7 +168,7 @@ module Commands
|
|
166
168
|
|
167
169
|
private
|
168
170
|
|
169
|
-
def Commands.initialize_p4d(init_dir, p4port)
|
171
|
+
def Commands.initialize_p4d(init_dir, p4port, auto)
|
170
172
|
# Go through our init_dir, and evaluate each script as if it were defined
|
171
173
|
# in the Commands::Init module.
|
172
174
|
Dir.glob("#{init_dir}/**/*.rb") do |file|
|
@@ -177,6 +179,6 @@ module Commands
|
|
177
179
|
# Note that nothing is actually done until this line. This allows classes
|
178
180
|
# to re-define methods and do fancy shit, like, 'oh in security_settings 0
|
179
181
|
# this guy actually doesn't have a password'.
|
180
|
-
Commands::Init::InitModel.run(p4port)
|
182
|
+
Commands::Init::InitModel.run(p4port, auto)
|
181
183
|
end
|
182
184
|
end
|
data/lib/p4util/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: p4util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tristan Juricek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|