cocoapods-sync-podspecs 0.1.9 → 0.1.10

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
  SHA256:
3
- metadata.gz: 1b1b2b81372c2ca12b4259f1a260873f3de93e8649945c39ae3cb891787d65ea
4
- data.tar.gz: 6b1372504d4f1e31b1f124da1a32a4c7fa117b53b89cfffc707c4f1c00bfeab8
3
+ metadata.gz: 1bc4299d0cf481c90f94ce883854a33422a784fe7198839d73d3aea38cc9c484
4
+ data.tar.gz: d728a82ab94e78bc206e02f68dad9c5aa64d8c3852f4542a191835db55885249
5
5
  SHA512:
6
- metadata.gz: '0413886e0cccff9a7bb3d669a90df6c1f34e28d432b19c117f8b4cd1c9fd5d2089468bfd908538271c37089f1f504c39afaf1002e372b5d1cd4531bf24c131c9'
7
- data.tar.gz: d5b2d4d06718c4f40614b87932270f3ee7b9cc2b48f9c596b37c5a53e1994cad8b8b85ee607e21749defcb9c14b42a13fba96ce17f5755d6c6abcf6ff566bb08
6
+ metadata.gz: 3404d5303a94a6747df3d4678805ac6e14e27c051e6731310335cf1ad9fd5d3b9c8b3bdf243899f55a01d834159499f059aaaf42bd562a47452584a1ef5133e5
7
+ data.tar.gz: f2094f2d8f1234db3f820cab0a21cec3e7e6866a019847e6b1f662c18ec35a17051868cb8dc9ac651eb1ae17d12fb93e6f2a8aafe7c79581a96cb76a9a865134
@@ -48,10 +48,11 @@ module Pod
48
48
  end
49
49
 
50
50
  def modify_podspec(path, version)
51
- unless version =~ /^\d{1,}.\d.\d$|^\d{1,}.\d$|^\d{1,}$/
52
- UI.puts "s.version: not found"
51
+ unless version =~ /^(\d+\.)?(\d+\.)?(\*|\d+)$/
52
+ UI.puts "Invalid version #{version}"
53
53
  return
54
54
  end
55
+
55
56
  unless File.exist?path
56
57
  UI.puts "Podspec file not found"
57
58
  return
@@ -60,13 +61,8 @@ module Pod
60
61
  File.open(path, "r+") do |f|
61
62
  s = ""
62
63
  f.each_line do |line|
63
- if line.to_s =~ /s\.version\s*=\s*"(\d{1,}.\d.\d|\d{1,}.\d|\d{1,})"/
64
- line = line.sub(/\d{1,}.\d.\d|\d{1,}.\d|\d{1,}/) do |match|
65
- version.to_s
66
- end
67
- end
68
- if line.to_s =~ /s\.version\s*=\s*'(\d{1,}.\d.\d|\d{1,}.\d|\d{1,})'/
69
- line = line.sub(/\d{1,}.\d.\d|\d{1,}.\d|\d{1,}/) do |match|
64
+ if line.to_s =~ /s\.version\s*=\s*'|"(\d+\.)?(\d+\.)?(\*|\d+)'|"/
65
+ line = line.sub(/(\d+\.)?(\d+\.)?(\*|\d+)/) do |match|
70
66
  version.to_s
71
67
  end
72
68
  end
@@ -74,7 +70,6 @@ module Pod
74
70
  end
75
71
  File.open(path, "w+") do |f| f.write(s) end
76
72
  end
77
-
78
73
  end
79
74
 
80
75
  # @return [Array<Pathname>] The path of the specifications to push.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-sync-podspecs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - quangmv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-05 00:00:00.000000000 Z
11
+ date: 2021-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods