xamarin-test-cloud 2.0.0.pre2 → 2.0.0.pre4

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: a5fb53a5aad5e3006ce408c5bcdc838fc9710b27
4
- data.tar.gz: 08f838fe24bacc453b7b6b3479a3a23e467c376e
3
+ metadata.gz: c5abd84d95ae2a746e1d70bb479542db758b27af
4
+ data.tar.gz: eadbec669fdee84204a4ce744dc9685ff5979795
5
5
  SHA512:
6
- metadata.gz: 7715a00158c011e57f6671c25590577113bece273948659f9f01037147ab95a04d65546c7ee81515ad556a05a044412c65eca920598dc9cb6021aa35e87f3ed2
7
- data.tar.gz: ff1dcb9dae040573210204b0dad1cc1a5343368b5148bceb477e9a1c9ea797ea836301715b9220d1c5327932ec91a15808524bb9195c62f9f681dcce429a9328
6
+ metadata.gz: dc8a5c6fab7135a1d7094e2d347068c3c833185df051462c86042a1ffec92129d5a7d2ca8ef1df398fa1f96542c064864dc44ea626c0b5bbc69d94011a299a53
7
+ data.tar.gz: f5e28ac7df1c1a5dae4a2d7aca10a031d933bf5dc866c9f090ec7161a190f3296143fa1174510db1fa15ad443541569fbae9862f3bdce3ddb26b59c6e3c0860d
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Test Cloud Command Line
2
2
 
3
- [![Build Status](https://magnum.travis-ci.com/xamarin/test-cloud-command-line.svg?token=y4VsoGUG24WhMo7qoBu3&branch=master)](https://magnum.travis-ci.com/xamarin/test-cloud-command-line)
3
+ [![Build Status](https://travis-ci.com/xamarinhq/test-cloud-command-line.svg?token=fsyxqhAht7X7tLURqAAp&branch=master)](https://travis-ci.com/xamarinhq/test-cloud-command-line)
4
4
 
5
5
  ### Requirements
6
6
 
@@ -153,7 +153,6 @@ module XamarinTestCloud
153
153
  :required => false,
154
154
  :type => :string
155
155
 
156
-
157
156
  def submit(app, api_key)
158
157
 
159
158
  self.pretty = options[:pretty]
@@ -620,9 +619,59 @@ module XamarinTestCloud
620
619
  app.end_with? '.ipa'
621
620
  end
622
621
 
623
- def calabash_android_version
622
+ def is_calabash_2?
623
+ detect_calabash_2
624
+ end
625
+
626
+ def get_calabash_version_from_bundler
627
+ cmd = "bundle exec ruby -e \"begin; require 'calabash/version';puts Calabash::VERSION;rescue LoadError => e; puts '';end\""
628
+
629
+ `#{cmd}`.strip
630
+ end
631
+
632
+ def detect_calabash_2
633
+ @detected_calabash_2 ||= lambda do
634
+ log "Auto-detecting if Calabash 2.0 testsuite" if debug?
635
+
636
+ # Implicitly detect
637
+ if File.exist?(workspace_gemfile)
638
+ FileUtils.cd(self.workspace) do
639
+ version = get_calabash_version_from_bundler
640
+
641
+ if version.split('.').first.to_i >= 2
642
+ log "It is a Calabash 2.0 testsuite" if debug?
643
+ return true
644
+ end
645
+ end
646
+ end
647
+
648
+ false
649
+ end.call
650
+ end
651
+
652
+ def calabash_2_version
624
653
  version = nil
625
654
 
655
+ if File.exist?(workspace_gemfile)
656
+ FileUtils.cd(self.workspace) do
657
+ version = get_calabash_version_from_bundler
658
+ end
659
+ end
660
+
661
+ unless version
662
+ require 'calabash'
663
+ version = Calabash::VERSION
664
+ end
665
+
666
+ version.strip
667
+ end
668
+
669
+ def calabash_android_version
670
+ if is_calabash_2?
671
+ return calabash_2_version
672
+ end
673
+
674
+ version = nil
626
675
 
627
676
  if File.exist?(workspace_gemfile)
628
677
  FileUtils.cd(self.workspace) do
@@ -630,27 +679,35 @@ module XamarinTestCloud
630
679
  version = version && version.strip
631
680
  end
632
681
  end
682
+
633
683
  unless version
634
684
  require 'calabash-android'
635
685
  version = Calabash::Android::VERSION
636
686
  end
637
687
 
638
- version = version.strip
688
+ version.strip
639
689
  end
640
690
 
641
691
  def calabash_ios_version
692
+ if is_calabash_2?
693
+ return calabash_2_version
694
+ end
695
+
642
696
  version = nil
697
+
643
698
  if File.exist?(workspace_gemfile)
644
699
  FileUtils.cd(self.workspace) do
645
700
  version = `bundle exec ruby -e "require 'calabash-cucumber/version'; puts Calabash::Cucumber::VERSION"`
646
701
  version = version && version.strip
647
702
  end
648
703
  end
704
+
649
705
  unless version
650
706
  require 'calabash-cucumber'
651
707
  version = Calabash::Cucumber::VERSION
652
708
  end
653
- version = version.strip
709
+
710
+ version.strip
654
711
  end
655
712
 
656
713
  def test_server_path
@@ -838,17 +895,30 @@ module XamarinTestCloud
838
895
  end
839
896
  end
840
897
 
841
-
842
898
  def verify_dependencies(path)
843
899
  if is_android?
844
900
  abort_unless(File.exist?(test_server_path)) do
845
- puts 'No test server found. Please run:'
846
- puts " calabash-android build #{app}"
901
+ puts "No test server '#{test_server_path}' found. Please run:"
902
+
903
+ if is_calabash_2?
904
+ puts " calabash build #{app}"
905
+ else
906
+ puts " calabash-android build #{app}"
907
+ end
847
908
  end
848
- calabash_gem = Dir.glob("#{path}/vendor/cache/calabash-android-*").first
849
- abort_unless(calabash_gem) do
850
- puts 'calabash-android was not packaged correct.'
851
- puts 'Please tell testcloud@xamarin.com about this bug.'
909
+
910
+ if is_calabash_2?
911
+ calabash_gem = Dir.glob("#{path}/vendor/cache/calabash-*").first
912
+ abort_unless(calabash_gem) do
913
+ puts 'calabash was not packaged correct.'
914
+ puts 'Please tell testcloud@xamarin.com about this bug.'
915
+ end
916
+ else
917
+ calabash_gem = Dir.glob("#{path}/vendor/cache/calabash-android-*").first
918
+ abort_unless(calabash_gem) do
919
+ puts 'calabash-android was not packaged correct.'
920
+ puts 'Please tell testcloud@xamarin.com about this bug.'
921
+ end
852
922
  end
853
923
  end
854
924
  end
@@ -1,3 +1,3 @@
1
1
  module XamarinTestCloud
2
- VERSION = "2.0.0.pre2"
2
+ VERSION = "2.0.0.pre4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xamarin-test-cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre2
4
+ version: 2.0.0.pre4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-07 00:00:00.000000000 Z
12
+ date: 2016-04-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -297,9 +297,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
297
297
  version: 1.3.1
298
298
  requirements: []
299
299
  rubyforge_project:
300
- rubygems_version: 2.4.8
300
+ rubygems_version: 2.5.2
301
301
  signing_key:
302
302
  specification_version: 4
303
303
  summary: Command-line interface to Xamarin Test Cloud
304
304
  test_files: []
305
- has_rdoc: