calabash-common 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ calabash-common
2
+
3
+ Copyright (c) Xamarin (http://www.xamarin.com). All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,7 @@
1
+ What?
2
+ =====
3
+ Share code between Calabash iOS and Android.
4
+
5
+ License
6
+ =======
7
+ calabash-common is available under the MIT license. See the LICENSE file for more info.
@@ -0,0 +1,2 @@
1
+ require 'calabash/common/version'
2
+ require 'calabash/formatters/html'
@@ -0,0 +1,5 @@
1
+ module Calabash
2
+ module Common
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
@@ -0,0 +1,34 @@
1
+ require 'cucumber/formatter/html'
2
+ require 'uri'
3
+ require 'pathname'
4
+
5
+ module Calabash
6
+ module Formatters
7
+ class Html < ::Cucumber::Formatter::Html
8
+ def embed_image(src, label)
9
+ if _output_relative? && _relative_uri?(src)
10
+ output_dir = Pathname.new(File.dirname(@io.path))
11
+ src_path = Pathname.new(src)
12
+ embed_relative_path = src_path.relative_path_from(output_dir)
13
+ super(embed_relative_path.to_s, label)
14
+ else
15
+ super(src, label)
16
+ end
17
+ end
18
+
19
+ def _relative_uri?(src)
20
+ uri = URI.parse(src)
21
+ return false if uri.scheme
22
+ not Pathname.new(src).absolute?
23
+ end
24
+
25
+
26
+ def _output_relative?
27
+ if @io.is_a?(File)
28
+ path = @io.path
29
+ _relative_uri?(path)
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: calabash-common
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Karl Krukow
9
+ - Jonas Maturana Larsen
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2013-05-14 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: cucumber
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 1.3.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: 1.3.0
31
+ description: Contains shared functionality and extentions to various Calabash sub-projects.
32
+ email:
33
+ - karl@xamarin.com
34
+ - jonas@xamarin.com
35
+ executables: []
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - lib/calabash/common/version.rb
40
+ - lib/calabash/formatters/html.rb
41
+ - lib/calabash-common.rb
42
+ - LICENSE
43
+ - README.md
44
+ homepage: http://calaba.sh
45
+ licenses: []
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 1.8.23
65
+ signing_key:
66
+ specification_version: 3
67
+ summary: Tools related to running Calabash
68
+ test_files: []