update_plist_build_version 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a35f268fcf91ac1882398dc037b5c35bba041b91
|
4
|
+
data.tar.gz: 0c69ebd1e1207ef5772e513a613c04247e7500e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a111a9531f6b21328237c73a138231f28fdddfff8660dd0e36bc4a81dc3fc37552763d94798a8dbf23d635aa292941778f442de575f55d76cca705aca115902
|
7
|
+
data.tar.gz: 5a7710df3d5d13b0e6f3c6af91571de4e6098973ce60a63015e2f81de692dd0641983574f0e773c03c420983682894e43707ad409018fb873e03a2f97036706e
|
@@ -18,7 +18,7 @@ module UpdatePlistBuildVersion
|
|
18
18
|
# バージョンのインクリメント処理を開始します.
|
19
19
|
def run
|
20
20
|
pos = get_version_position(@xml)
|
21
|
-
version = @xml.elements["plist/dict
|
21
|
+
version = @xml.elements["plist/dict/*[#{pos}]"].text
|
22
22
|
date,index = version.split(/\./)
|
23
23
|
|
24
24
|
next_version = if today?(date)
|
@@ -27,7 +27,7 @@ module UpdatePlistBuildVersion
|
|
27
27
|
"#{today_str}.0"
|
28
28
|
end
|
29
29
|
|
30
|
-
@xml.elements["plist/dict
|
30
|
+
@xml.elements["plist/dict/*[#{pos}]"].text = next_version
|
31
31
|
write(@xml)
|
32
32
|
return next_version, @xml
|
33
33
|
end
|
@@ -43,7 +43,7 @@ module UpdatePlistBuildVersion
|
|
43
43
|
xml.elements["plist/dict"].each do |dict|
|
44
44
|
if dict.class == REXML::Element and dict.name == "key"
|
45
45
|
pos += 1
|
46
|
-
return pos if dict.text == "CFBundleVersion"
|
46
|
+
return (pos * 2) if dict.text == "CFBundleVersion"
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: update_plist_build_version
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shin Hiroe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|