Skip to content

Commit 946b1d3

Browse files
Update test config.
1 parent a6f5c69 commit 946b1d3

3 files changed

Lines changed: 24 additions & 10 deletions

File tree

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ env:
66
before_install:
77
- gem install xcpretty
88
script:
9-
- rake clean
10-
- rake test
9+
- rake "clean[JavaScriptBridge.xcworkspace, 'JavaScriptBridge UICatalog Tests HelloWorld']"
10+
- rake "build[JavaScriptBridge.xcworkspace, 'JavaScriptBridge UICatalog Tests HelloWorld']"
11+
- rake "test[JavaScriptBridge.xcworkspace, 'Tests']"
1112

JavaScriptBridge.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Pod::Spec.new do |s|
33
s.version = "0.0.1"
44
s.summary = "Write iOS apps in Javascript! JavaScriptBridge provides the way to write iOS apps with JavaScript."
55
s.homepage = "https://github.com/kishikawakatsumi/JavaScriptBridge"
6+
s.social_media_url = 'https://twitter.com/k_katsumi'
67
s.license = 'MIT'
78
s.author = { "kishikawa katsumi" => "[email protected]" }
89
s.source = { :git => "https://github.com/kishikawakatsumi/JavaScriptBridge.git", :tag => "v#{s.version.to_s}" }

Rakefile

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
1-
WORKSPASE = "JavaScriptBridge.xcworkspace"
2-
SCHEME = "Tests"
31
DESTINATIONS = ["name=iPhone Retina (3.5-inch),OS=7.0",
42
"name=iPhone Retina (4-inch),OS=7.0",
53
"name=iPhone Retina (4-inch 64-bit),OS=7.0"]
64

7-
task :default => [:clean, :test]
5+
task :default => [:build, :clean, :test]
6+
7+
desc "build"
8+
task :build, :workspace, :schemes do |t, args|
9+
schemes = args[:schemes].gsub(/'/, '').split(' ')
10+
schemes.each do |scheme|
11+
system("xcodebuild -workspace #{args[:workspace]} -scheme #{scheme} | xcpretty -c")
12+
end
13+
end
814

915
desc "clean"
10-
task :clean do
11-
system("xcodebuild clean -workspace #{WORKSPASE} -scheme #{SCHEME} | xcpretty -c")
16+
task :clean, :workspace, :schemes do |t, args|
17+
schemes = args[:schemes].gsub(/'/, '').split(' ')
18+
schemes.each do |scheme|
19+
system("xcodebuild clean -workspace #{args[:workspace]} -scheme #{scheme} | xcpretty -c")
20+
end
1221
end
1322

1423
desc "run unit tests"
15-
task :test do
16-
DESTINATIONS.each do |destination|
17-
system("xcodebuild test -workspace #{WORKSPASE} -scheme #{SCHEME} -configuration Debug -sdk iphonesimulator -destination \"#{destination}\" | xcpretty -c")
24+
task :test, :workspace, :schemes do |t, args|
25+
schemes = args[:schemes].gsub(/'/, '').split(' ')
26+
schemes.each do |scheme|
27+
DESTINATIONS.each do |destination|
28+
system("xcodebuild test -workspace #{args[:workspace]} -scheme #{scheme} -configuration Debug -sdk iphonesimulator -destination \"#{destination}\" | xcpretty -c")
29+
end
1830
end
1931
end

0 commit comments

Comments
 (0)