fus 0.0.2 → 0.0.3

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: cfcacd9d75754dbe979b47f6c6499be68711dc6c
4
- data.tar.gz: 08a9509df0f86f9a604d269430d501f7f257af2d
3
+ metadata.gz: 2211fee7ba4155f7183f876fff63b1cdfdd4af98
4
+ data.tar.gz: 7a6218ae68c1e9f76f850d084498e3f875399826
5
5
  SHA512:
6
- metadata.gz: 384a22d13e0350ec977e6c3725cb38d90aea0fba0bee6be28c991a6a5f69d6d8416a95ebcd3182b8120bd8bf2e3dda488137dbbc803dad0ef9173ab6cc5eb0b1
7
- data.tar.gz: 043cec1b9e239c2febbef1b32aeda5b193635309dec175220cd1025617d63aad28eb72a36a2db18f8caaa8224b46bd6a70a72a658811d9b3fb336e69df738425
6
+ metadata.gz: 1d2d1cc6e88f76ba76994f4cbd3407201fef1c496674ee8bfd952ca07bf9254df5899a6b93ff342ae33e9ec49af4b7df4dceb275784eff32cc1178c005ef11b2
7
+ data.tar.gz: 4c0a9f30d994e57e0b8ca3cd3acc1d98191cc02fc9c8e04ed30355ce73c55cb92bc88cea5411880ee41880ca03f5864badbf620ea4c80a71e4b149d8aae2f643
@@ -9,6 +9,7 @@ module Fus
9
9
  @swift_paths = Dir
10
10
  .glob("#{path}/**/*.swift")
11
11
  .select {|path| path.scan(/\/Pods\//).empty? }
12
+ .select {|path| path.scan(/\/Carthage\//).empty? }
12
13
  @obj_c_paths = Dir.glob("#{path}/**/*.m") + Dir.glob("#{path}/**/*.h")
13
14
  .select {|path| path.scan(/-Swift.h/).empty? }
14
15
  @ib_paths = (Dir.glob("#{path}/**/*.xib") +
@@ -51,7 +52,7 @@ module Fus
51
52
  # Given some text, identify Swift classes
52
53
  def find(swift_text)
53
54
  swift_text
54
- .scan(/class\s+([^func][^var][a-zA-Z_]+)\s*:?\s[a-zA-Z_]*\b?\s*{/)
55
+ .scan(/class\s+([^func][^var][a-zA-Z_]+)(?:<.+>)?\s*:?\s[a-zA-Z_<>]*\b?\s*{/)
55
56
  .flatten
56
57
  end
57
58
 
@@ -3,7 +3,7 @@ module Fus
3
3
  class SwiftClass
4
4
  attr_reader :name
5
5
  def initialize(name)
6
- @name = name
6
+ @name = name.sub(/<.+>/, "")
7
7
  end
8
8
 
9
9
  # Is this class a test class
@@ -28,7 +28,7 @@ module Fus
28
28
 
29
29
  # Is this class used in this Swift text
30
30
  def used_in_swift?(text)
31
- text.match(/(\b#{name}.?[.:(])|([:].?#{name})|((typealias|associatedType)\s+.*=.+#{name})/)
31
+ text.match(/(\b#{name}(<.+>)?.?[.(])|([:].?#{name})|((typealias|associatedType)\s+.*=.+#{name})/)
32
32
  end
33
33
  end
34
34
  end
@@ -1,3 +1,3 @@
1
1
  module Fus
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - tsabend
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-20 00:00:00.000000000 Z
11
+ date: 2017-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor