applinks 0.0.1 → 0.0.2

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: 2c7eff2f4ddd7c688d514f15c663eef1fdbd2efe
4
- data.tar.gz: 3e0345466f7edcd803e3c56813d0becdc80bf2d5
3
+ metadata.gz: 3ac0233504c63071dde132a9fb0e7e618b7345e2
4
+ data.tar.gz: 1d705c1624e5fafec5a0516c168550e33d2062ea
5
5
  SHA512:
6
- metadata.gz: c6a069235484397f0f2922a1ab13f56eba4e7a3e75cb97c3225634def0fd50d3d537cd5a75320fe6ec3d0c65b2c8d455422f278982bfcf8f53e2ce0769914b06
7
- data.tar.gz: 79a3d33e477016e2ac0b5af4fbc1f4aaec138d7d04b9d18f404562d01e2f554a91c42225e9511e0cdab2420cd54953f980eff8206ed0b60be36d11e352d766e7
6
+ metadata.gz: 577587b9f9c9727335d4829ba9027be5e2c04c59b0c306a86005d3476ebb8c19cd9344c3d2191f7e2e77a03dde11a3ddefc1e055fe396bd66d5d1715ef6f8961
7
+ data.tar.gz: fe6b5795a11f5a24dee4033930c97988e4cd3550b2412a3e6828ee5e3dce76f60bc427fc693e372d5330ecfeefe55f55439d6c37cf8ed3dd02a57f099f6cd9f0
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ .DS_Store
2
+ Gemfile.lock
3
+ coverage/
4
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --color
2
+ --format progress
3
+ --format documentation -o rspec_output.txt
4
+
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ - 2.0.0
5
+ - jruby-19mode
6
+ - rbx
7
+ - ruby-head
8
+ - jruby-head
9
+ script: bundle exec rspec
10
+
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in omdbgateway.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,23 @@
1
+ Copyright (c) 2014 Stuart Jones
2
+ Copyright (c) 2013 Casey Scarborough
3
+
4
+ MIT License
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining
7
+ a copy of this software and associated documentation files (the
8
+ "Software"), to deal in the Software without restriction, including
9
+ without limitation the rights to use, copy, modify, merge, publish,
10
+ distribute, sublicense, and/or sell copies of the Software, and to
11
+ permit persons to whom the Software is furnished to do so, subject to
12
+ the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ #applinks
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/applinks.svg)](http://badge.fury.io/rb/applinks)
4
+
5
+ [![Build Status](https://travis-ci.org/stujo/applinks.svg?branch=master)](https://travis-ci.org/stujo/applinks)
6
+
7
+ [![Code Climate](https://codeclimate.com/github/stujo/applinks.png)](https://codeclimate.com/github/stujo/applinks)
8
+
9
+ #Overview
10
+ A Helper to add applinks to pages
11
+
12
+ #Installation
13
+
14
+ ##Install the gem
15
+ ```
16
+
17
+ gem install applinks
18
+
19
+ ```
20
+
21
+ ##Use it in your gemfile
22
+ ```
23
+ gem "applinks"
24
+
25
+ ```
26
+
27
+
28
+ #Usage
29
+
30
+
31
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/applinks.gemspec ADDED
@@ -0,0 +1,36 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+
6
+ require "applinks/version"
7
+
8
+ Gem::Specification.new do |spec|
9
+ spec.name = "applinks"
10
+ spec.version = Applinks::VERSION
11
+ spec.authors = ["Stuart Jones"]
12
+ spec.email = ["applinks@skillbox.com"]
13
+ spec.description = 'A gem to add and read applinks'
14
+ spec.summary = ''
15
+ spec.homepage = "https://github.com/stujo/applinks/"
16
+ spec.license = "MIT"
17
+
18
+ spec.files = `git ls-files`.split($/)
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.required_ruby_version = '~> 2.0'
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.3"
26
+ spec.add_development_dependency "simplecov", "~> 0.8"
27
+ spec.add_development_dependency "vcr", "~> 2.9"
28
+
29
+ spec.add_development_dependency "rake", "~> 0"
30
+ spec.add_development_dependency "rspec", "~> 2.14"
31
+ spec.add_development_dependency "webmock", "~> 1.17"
32
+
33
+ spec.add_dependency 'faraday', '~> 0.8.9'
34
+ spec.add_dependency 'faraday-http-cache', '~> 0.4'
35
+ spec.add_dependency "faraday_middleware", '~> 0.8'
36
+ end
@@ -0,0 +1,43 @@
1
+ require 'erb'
2
+
3
+ module Applinks
4
+
5
+ class Helper
6
+
7
+ def demo_data
8
+ {
9
+ ios:{
10
+ url: 'applinks://docs',
11
+ app_store_id: '12345',
12
+ app_name: 'App Links'
13
+ },
14
+ android:{
15
+ url: 'applinks://docs',
16
+ package: 'org.applinks',
17
+ app_name: 'App Links'
18
+ }
19
+ }
20
+ end
21
+
22
+ def render data = demo_data, template = 'applinks_default'
23
+ templates_dir = "#{Rails.root}/app/lib/applinks"
24
+ template_file = "#{template}.html.erb"
25
+ ActionView::Base.new(templates_dir).render \
26
+ :file => template_file,
27
+ :locals => {applinks: data }
28
+ end
29
+
30
+ # def applinks_header data
31
+ # <<-eos
32
+ # <meta property="al:ios:url" content="applinks://docs" />
33
+ # <meta property="al:ios:app_store_id" content="12345" />
34
+ # <meta property="al:ios:app_name" content="App Links" />
35
+ # <meta property="al:android:url" content="applinks://docs" />
36
+ # <meta property="al:android:app_name" content="App Links" />
37
+ # <meta property="al:android:package" content="org.applinks" />
38
+ # <meta property="al:web:url" content="http://applinks.org/documentation" />
39
+ # eos
40
+ # end
41
+ end
42
+
43
+ end
@@ -0,0 +1,6 @@
1
+
2
+ module Applinks
3
+
4
+ VERSION = '0.0.2'
5
+
6
+ end
data/lib/applinks.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'applinks/helper'
2
+ require 'applinks/version'
3
+
4
+ module Applinks
5
+
6
+
7
+ end
8
+
data/npm-debug.log ADDED
@@ -0,0 +1,21 @@
1
+ 0 info it worked if it ends with ok
2
+ 1 verbose cli [ '/usr/local/Cellar/node/0.10.21/bin/node',
3
+ 1 verbose cli '/usr/local/bin/npm',
4
+ 1 verbose cli 'install' ]
5
+ 2 info using npm@1.3.11
6
+ 3 info using node@v0.10.21
7
+ 4 error install Couldn't read dependencies
8
+ 5 error Error: ENOENT, open '/work/projects/omdbgateway/package.json'
9
+ 6 error If you need help, you may report this log at:
10
+ 6 error <http://github.com/isaacs/npm/issues>
11
+ 6 error or email it to:
12
+ 6 error <npm-@googlegroups.com>
13
+ 7 error System Darwin 13.1.0
14
+ 8 error command "/usr/local/Cellar/node/0.10.21/bin/node" "/usr/local/bin/npm" "install"
15
+ 9 error cwd /work/projects/omdbgateway
16
+ 10 error node -v v0.10.21
17
+ 11 error npm -v 1.3.11
18
+ 12 error path /work/projects/omdbgateway/package.json
19
+ 13 error code ENOENT
20
+ 14 error errno 34
21
+ 15 verbose exit [ 34, true ]
data/rspec_output.txt ADDED
@@ -0,0 +1,95 @@
1
+ Run options: include {:focus=>true}
2
+
3
+ All examples were filtered out; ignoring {:focus=>true}
4
+
5
+ OMDBGateway::Gateway
6
+ With invalid Endpoint URI
7
+ should have the correct API endpoint
8
+ with a movie that exists
9
+ #success
10
+ should note failure
11
+ #error_message
12
+ should note failure
13
+ With invalid Endpoint URI
14
+ should have the correct API endpoint
15
+ with a movie that exists
16
+ #success
17
+ should note failure
18
+ #error_message
19
+ should note failure
20
+ With Valid Endpoint
21
+ should have the correct API endpoint
22
+ #title_search
23
+ with a movie that exists
24
+ should return a hash of movie attributes
25
+ should contain a title
26
+ should have tomatoes
27
+ should contain a not have tomatoes
28
+ should have a longer plot
29
+ with the year parameter
30
+ should not be the same title
31
+ with the plot parameter
32
+ should have different plots
33
+ with a movie that doesnt exist
34
+ should return a hash
35
+ should return a hash with a false response
36
+ should return a hash with an error message
37
+ #find_by_id
38
+ with a title that exists
39
+ should return a hash of movie attributes
40
+ should contain a title
41
+ with a movie that does not exist
42
+ should return nil
43
+ #free_search
44
+ with search results
45
+ should return an ResponseWrapper
46
+ should return an array with hash contents
47
+ with a single search result
48
+ should return an array
49
+ should return an array with 1 element
50
+ should have a title
51
+ with no search results
52
+ should return an ResponseWrapper
53
+ should show app failed
54
+ Allows Faraday Connection Customization
55
+ should call the config block with a connection
56
+
57
+ OMDBGateway::ResponseWrapper
58
+ #error_message
59
+ should be nil
60
+ should be 'X500 Error'
61
+ should be 'X500 Error'
62
+ #success?
63
+ should be true
64
+ should be true
65
+ should be false
66
+ #as_hash
67
+ should be {}
68
+ should be {}
69
+ should be {}
70
+ should be {'a' => 'A'}
71
+ #as_hash
72
+ should be []
73
+ should be []
74
+ should be []
75
+ should be []
76
+ should be [{'a' => 'A', 'b' => 'B'}]
77
+ #prune_hash
78
+ should be nil for empty array
79
+ should be 5
80
+ should not expose Error or Report
81
+ should be return hash element
82
+ should be nil for any array
83
+ #prune_array
84
+ should be nil for empty array
85
+ should be default 700
86
+ should not expose Error or Report
87
+ should not return hash element but the default
88
+ should be {'a' => 'A', 'b' => 'B'} for any array
89
+ should be default (500) for out of bound index for any array
90
+ #array_first
91
+ should be nil for empty array
92
+ should be {'a' => 'A', 'b' => 'B'} for any array
93
+
94
+ Finished in 0.24853 seconds
95
+ 56 examples, 0 failures
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ module Applinks
4
+
5
+ end
@@ -0,0 +1,15 @@
1
+ require 'applinks'
2
+ require 'vcr'
3
+
4
+ VCR.configure do |c|
5
+ c.cassette_library_dir = 'fixtures/vcr_cassettes'
6
+ c.hook_into :webmock # or :fakeweb
7
+ c.default_cassette_options = { :record => :new_episodes }
8
+ c.configure_rspec_metadata!
9
+ end
10
+
11
+ RSpec.configure do |config|
12
+ config.treat_symbols_as_metadata_keys_with_true_values = true
13
+ config.run_all_when_everything_filtered = true
14
+ config.filter_run :focus
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: applinks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Jones
@@ -142,7 +142,22 @@ email:
142
142
  executables: []
143
143
  extensions: []
144
144
  extra_rdoc_files: []
145
- files: []
145
+ files:
146
+ - ".gitignore"
147
+ - ".rspec"
148
+ - ".travis.yml"
149
+ - Gemfile
150
+ - LICENSE.txt
151
+ - README.md
152
+ - Rakefile
153
+ - applinks.gemspec
154
+ - lib/applinks.rb
155
+ - lib/applinks/helper.rb
156
+ - lib/applinks/version.rb
157
+ - npm-debug.log
158
+ - rspec_output.txt
159
+ - spec/applinks/applink_spec.rb
160
+ - spec/spec_helper.rb
146
161
  homepage: https://github.com/stujo/applinks/
147
162
  licenses:
148
163
  - MIT
@@ -167,5 +182,7 @@ rubygems_version: 2.2.2
167
182
  signing_key:
168
183
  specification_version: 4
169
184
  summary: ''
170
- test_files: []
185
+ test_files:
186
+ - spec/applinks/applink_spec.rb
187
+ - spec/spec_helper.rb
171
188
  has_rdoc: