xcodeproj_utils 0.1.2 → 0.1.3

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: 5eaf899741ae5603a86ed4343bf3ef77ff099ccd
4
- data.tar.gz: 68f8512591c8998109d201cc6c9eb452491a3b9d
3
+ metadata.gz: 5e2bd370d6188f2ed6a712db876fbbdedcb3d42d
4
+ data.tar.gz: b27e71db3b0f1a6d45a5c20c8e4d9daf90fd87a2
5
5
  SHA512:
6
- metadata.gz: 2aa4f288216992176daebea2f0785974d03c20197f1a94a1f2240d45b6955545e4dda6b2cf99dc8e76c917a5dfd85ad768c768aa7d2c2d28efc9b748fa19d51a
7
- data.tar.gz: 4c2546ce9042cf53b0b9836fa342f70450ee0f5a20c2054af03fdb8271c2f8f6081663250bfdb2a018290ed42d8abe9bec7e80e6a3e6e60da21dbcbce296a0ab
6
+ metadata.gz: c3fc43db23774bf30adfd4fc7d386002812aa798c8fb75e8987bd847837a45f2e635d4293273ead6db979f0994fc35450b02363bfb847dc8669cd894c329ff27
7
+ data.tar.gz: 1b67f7a500f053c5c080d5706630a70cd83827be00c5c97dfff48b5402cc6fb3b4e3867ab24c1b1cbdf1042f623a5b7b5ac20ec6d3bfbcc83037ea8d7c22330c
@@ -1,3 +1,3 @@
1
1
  module XcodeprojUtils
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -6,12 +6,8 @@ module XcodeprojUtils
6
6
  def initialize(proj_name, target_name)
7
7
  @proj = Xcodeproj::Project::open(proj_name)
8
8
  @target = @proj.targets.select {|target| target.name == target_name}
9
- for t in @proj.targets
10
- next if t.name != target_name
11
- @target = t
12
- break
13
- end
14
9
  raise ArgumentError, "#{target_name} is not found in #{proj_name}" if @target.empty?
10
+ @target = @target.first
15
11
  end
16
12
 
17
13
  def wc(header_only=false, source_only=false)
@@ -14,6 +14,14 @@ describe XcodeprojUtils do
14
14
  expect { XcodeprojUtils::Project.new(fixture_path('RSpecTest/RSpecTest.xcodeproj'),
15
15
  'Non-Existing Target') }.to raise_error(ArgumentError)
16
16
  end
17
+
18
+ it "return total lines of source code" do
19
+ proj = XcodeprojUtils::Project.new(fixture_path('RSpecTest/RSpecTest.xcodeproj'), 'RSpecTest')
20
+ total = proj.wc
21
+ header = proj.wc(true)
22
+ source = proj.wc(false, true)
23
+ expect(total).to eq(header + source)
24
+ end
17
25
  end
18
26
 
19
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcodeproj_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matsumoto Taichi