1+ #
2+ # Copyright (c) nexB Inc. and others. All rights reserved.
3+ # http://nexb.com and https://github.com/nexB/scancode-toolkit/
4+ # The ScanCode software is licensed under the Apache License version 2.0.
5+ # Data generated with ScanCode require an acknowledgment.
6+ # ScanCode is a trademark of nexB Inc.
7+ #
8+ # You may not use this software except in compliance with the License.
9+ # You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0
10+ # Unless required by applicable law or agreed to in writing, software distributed
11+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+ # specific language governing permissions and limitations under the License.
14+ #
15+ # When you publish or redistribute any data created with ScanCode or any ScanCode
16+ # derivative work, you must accompany this data with the following acknowledgment:
17+ #
18+ # Generated with ScanCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES
19+ # OR CONDITIONS OF ANY KIND, either express or implied. No content created from
20+ # ScanCode should be considered or used as legal advice. Consult an Attorney
21+ # for any legal advice.
22+ # ScanCode is a free software code scanning tool from nexB Inc. and others.
23+ # Visit https://github.com/nexB/scancode-toolkit/ for support and download.
24+
25+ from __future__ import absolute_import
26+ from __future__ import print_function
27+ from __future__ import unicode_literals
28+
29+ import os
30+
31+ from packagedcode import cocoapods
32+ from packages_test_utils import PackageTester
33+
34+
35+ class TestRubyGemspec (PackageTester ):
36+ test_data_dir = os .path .join (os .path .dirname (__file__ ), 'data' )
37+
38+ def test_rubygems_can_parse_BadgeHub (self ):
39+ test_file = self .get_test_loc ('cocoapods/podspec/BadgeHub.podspec' )
40+ expected_loc = self .get_test_loc ('cocoapods/podspec/BadgeHub.podspec.expected.json' )
41+ packages = cocoapods .parse (test_file )
42+ self .check_package (packages , expected_loc , regen = False )
43+
44+ def test_rubygems_can_parse_LoadingShimmer (self ):
45+ test_file = self .get_test_loc ('cocoapods/podspec/LoadingShimmer.podspec' )
46+ expected_loc = self .get_test_loc ('cocoapods/podspec/LoadingShimmer.podspec.expected.json' )
47+ packages = cocoapods .parse (test_file )
48+ self .check_package (packages , expected_loc , regen = False )
49+
50+ def test_rubygems_can_parse_nanopb (self ):
51+ test_file = self .get_test_loc ('cocoapods/podspec/nanopb.podspec' )
52+ expected_loc = self .get_test_loc ('cocoapods/podspec/nanopb.podspec.expected.json' )
53+ packages = cocoapods .parse (test_file )
54+ self .check_package (packages , expected_loc , regen = False )
55+
56+ def test_rubygems_can_parse_Starscream (self ):
57+ test_file = self .get_test_loc ('cocoapods/podspec/Starscream.podspec' )
58+ expected_loc = self .get_test_loc ('cocoapods/podspec/Starscream.podspec.expected.json' )
59+ packages = cocoapods .parse (test_file )
60+ self .check_package (packages , expected_loc , regen = False )
61+
62+ def test_rubygems_can_parse_SwiftLib (self ):
63+ test_file = self .get_test_loc ('cocoapods/podspec/SwiftLib.podspec' )
64+ expected_loc = self .get_test_loc ('cocoapods/podspec/SwiftLib.podspec.expected.json' )
65+ packages = cocoapods .parse (test_file )
66+ self .check_package (packages , expected_loc , regen = False )
0 commit comments