firebase_dynamic_link 0.1.2 → 0.1.3

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: 68097ad4857f4630938203f52a41e070468ca86b
4
- data.tar.gz: 10e4a64a80f75e0f14e8ea567ccbb08615e41977
3
+ metadata.gz: 7bbe6a0cad3172b77570b15cff0e5b0f2fe7f269
4
+ data.tar.gz: ca41acc8781f8df96553abce36c10a4a17b3cf17
5
5
  SHA512:
6
- metadata.gz: 76edc91a6a5c37bbc4e5a6822523cc38c76a57fedc0ca29d0bf51900ba2e392aee4984516d89f5f88071ccb9a9d164be8a6fefbd97bf00a420d8e520e01f49aa
7
- data.tar.gz: 1e944261c7925b97325f7ab728007f5b74d208d7ddde5c6ad7c30fa8a82af62ebf2d51189c8a925a15eaf4cadcde1b447388c5727ae9bc4a31c0d9175d93d62d
6
+ metadata.gz: db1298ece8caed00932db3a5a0e3d6182e2c1284f797fc92635eccb9aa02c79c3da00bf00383928a6376c28532fecd22bfe36068b953179083ca3d95aba20920
7
+ data.tar.gz: d3b9e410ffb53da8e8b759ffe15bdd89e5764a2e5b1d104f699c3ddfc64a0328fa92e2963bc64cba32617768393f7ec140a39229bb5ae31c14b963ffb39294fd
data/.gitignore CHANGED
@@ -11,3 +11,5 @@
11
11
  .rspec_status
12
12
  .env
13
13
  spec/fixtures/vcr_cassettes/
14
+ coverage
15
+ doc
data/.travis.yml CHANGED
@@ -7,4 +7,15 @@ gemfile:
7
7
  - gemfiles/version_2016.gemfile
8
8
  - gemfiles/version_2017a.gemfile
9
9
  - gemfiles/version_2017b.gemfile
10
- - gemfiles/version_2018.gemfile
10
+ - gemfiles/version_2018.gemfile
11
+ env:
12
+ global:
13
+ - CC_TEST_REPORTER_ID=22b531be7956bd878ec8ce211da98c483c9724eebc8eb72f99d064f00aa6e985
14
+ before_script:
15
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
16
+ - chmod +x ./cc-test-reporter
17
+ - ./cc-test-reporter before-build
18
+ script:
19
+ - COVERAGE=1 bundle exec rspec
20
+ after_script:
21
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- firebase_dynamic_link (0.1.2)
4
+ firebase_dynamic_link (0.1.3)
5
5
  dry-configurable (~> 0.5, >= 0.5.0)
6
6
  faraday (~> 0.9, >= 0.9.2)
7
7
 
@@ -12,15 +12,20 @@ GEM
12
12
  bundler
13
13
  rake
14
14
  thor (>= 0.14.0)
15
+ bootsnap (1.3.0)
16
+ msgpack (~> 1.0)
15
17
  coderay (1.1.2)
16
18
  concurrent-ruby (1.0.5)
17
19
  diff-lcs (1.3)
20
+ docile (1.3.0)
18
21
  dotenv (2.2.2)
19
22
  dry-configurable (0.7.0)
20
23
  concurrent-ruby (~> 1.0)
21
- faraday (0.14.0)
24
+ faraday (0.15.0)
22
25
  multipart-post (>= 1.2, < 3)
26
+ json (2.1.0)
23
27
  method_source (0.9.0)
28
+ msgpack (1.2.4)
24
29
  multipart-post (2.0.0)
25
30
  pry (0.11.3)
26
31
  coderay (~> 1.1.0)
@@ -39,6 +44,11 @@ GEM
39
44
  diff-lcs (>= 1.2.0, < 2.0)
40
45
  rspec-support (~> 3.7.0)
41
46
  rspec-support (3.7.1)
47
+ simplecov (0.16.1)
48
+ docile (~> 1.1)
49
+ json (>= 1.8, < 3)
50
+ simplecov-html (~> 0.10.0)
51
+ simplecov-html (0.10.2)
42
52
  thor (0.20.0)
43
53
  vcr (4.0.0)
44
54
 
@@ -47,12 +57,14 @@ PLATFORMS
47
57
 
48
58
  DEPENDENCIES
49
59
  appraisal (~> 2.2.0)
60
+ bootsnap (~> 1.3.0)
50
61
  bundler (~> 1.16)
51
62
  dotenv (~> 2.2, >= 2.2.2)
52
63
  firebase_dynamic_link!
53
64
  pry (~> 0.11.3)
54
65
  rake (~> 10.0)
55
66
  rspec (~> 3.0)
67
+ simplecov (>= 0.16.1)
56
68
  vcr (~> 4.0, >= 4.0.0)
57
69
 
58
70
  BUNDLED WITH
data/README.md CHANGED
@@ -33,27 +33,42 @@ Or install it yourself as:
33
33
  FirebaseDynamicLink.configure do |config|
34
34
  # the adapter should be supported by Faraday
35
35
  # more info look at https://github.com/lostisland/faraday/tree/master/test/adapters
36
+ # Faraday.default_adapter is the default adapter
36
37
  config.adapter = :httpclient
37
38
 
39
+ # required
38
40
  config.api_key = 'API_KEY'
39
41
 
40
- config.default.suffix.option = 'SHORTEN' or 'UNGUESSABLE'
42
+ # default 'UNGUESSABLE'
43
+ config.default.suffix.option = 'SHORT' or 'UNGUESSABLE'
41
44
 
45
+ # required
42
46
  config.default.dynamic_link_domain = 'http://xyz.app.goo.gl'
43
47
 
44
- config.timeout = 3 # timeout and open timeout for global request
48
+ # default 3 seconds
49
+ config.timeout = 3
50
+
51
+ # default 3 seconds
45
52
  config.open_timeout = 3
46
53
  end
47
54
 
48
55
  client = FirebaseDynamicLink::Client.new
49
56
  options = {
50
- suffix_option: '', # to override default suffix default config
51
- dynamic_link_domain: '', # to override default dynamic_link_domain default config
52
- timeout: 10, # timeout and open timeout for each request
57
+ # optional, to override default suffix default config
58
+ suffix_option: '',
59
+
60
+ # optional, to override default dynamic_link_domain default config
61
+ dynamic_link_domain: '',
62
+
63
+ # optional, timeout of each request of this instance
64
+ timeout: 10,
65
+
66
+ # optional, open timeout of each request of this instance
53
67
  open_timeout: 10
54
68
  }
55
- result = client.shorten_link(link, options)
69
+
56
70
  # options argument is optional
71
+ result = client.shorten_link(link, options)
57
72
 
58
73
  ```
59
74
 
@@ -77,7 +92,7 @@ if request successful, then the result should be like following hash object
77
92
  }
78
93
  ```
79
94
 
80
- otherwise it raises FirebaseDynamicLink::ConnectionError exception, with message = http error message
95
+ otherwise it raises `FirebaseDynamicLink::ConnectionError`, with message = http error message
81
96
 
82
97
  # NOTE
83
98
 
@@ -10,9 +10,10 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ['saiqulhaq@gmail.com']
11
11
 
12
12
  spec.summary = 'Ruby client for Firebase Dynamic Link service'
13
- spec.description = 'Ruby client API for Firebase Dynamic Link'
13
+ spec.description = spec.summary
14
14
  spec.homepage = 'https://github.com/saiqulhaq/firebase_dynamic_link'
15
15
  spec.license = 'MIT'
16
+ spec.metadata["yard.run"] = 'yri'
16
17
 
17
18
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
19
  f.match(%r{^(test|spec|features)/})
@@ -31,4 +32,6 @@ Gem::Specification.new do |spec|
31
32
  spec.add_development_dependency 'rake', '~> 10.0'
32
33
  spec.add_development_dependency 'rspec', '~> 3.0'
33
34
  spec.add_development_dependency 'pry', '~> 0.11.3'
35
+ spec.add_development_dependency 'bootsnap', '~> 1.3.0'
36
+ spec.add_development_dependency 'simplecov', '>= 0.16.1'
34
37
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- firebase_dynamic_link (0.1.2)
4
+ firebase_dynamic_link (0.1.3)
5
5
  dry-configurable (~> 0.5, >= 0.5.0)
6
6
  faraday (~> 0.9, >= 0.9.2)
7
7
 
@@ -12,15 +12,20 @@ GEM
12
12
  bundler
13
13
  rake
14
14
  thor (>= 0.14.0)
15
+ bootsnap (1.3.0)
16
+ msgpack (~> 1.0)
15
17
  coderay (1.1.2)
16
18
  concurrent-ruby (1.0.5)
17
19
  diff-lcs (1.3)
20
+ docile (1.3.0)
18
21
  dotenv (2.2.2)
19
22
  dry-configurable (0.5.0)
20
23
  concurrent-ruby (~> 1.0)
21
24
  faraday (0.9.2)
22
25
  multipart-post (>= 1.2, < 3)
26
+ json (2.1.0)
23
27
  method_source (0.9.0)
28
+ msgpack (1.2.4)
24
29
  multipart-post (2.0.0)
25
30
  pry (0.11.3)
26
31
  coderay (~> 1.1.0)
@@ -39,6 +44,11 @@ GEM
39
44
  diff-lcs (>= 1.2.0, < 2.0)
40
45
  rspec-support (~> 3.7.0)
41
46
  rspec-support (3.7.1)
47
+ simplecov (0.16.1)
48
+ docile (~> 1.1)
49
+ json (>= 1.8, < 3)
50
+ simplecov-html (~> 0.10.0)
51
+ simplecov-html (0.10.2)
42
52
  thor (0.20.0)
43
53
  vcr (4.0.0)
44
54
 
@@ -47,6 +57,7 @@ PLATFORMS
47
57
 
48
58
  DEPENDENCIES
49
59
  appraisal (~> 2.2.0)
60
+ bootsnap (~> 1.3.0)
50
61
  bundler (~> 1.16)
51
62
  dotenv (~> 2.2, >= 2.2.2)
52
63
  dry-configurable (= 0.5.0)
@@ -55,6 +66,7 @@ DEPENDENCIES
55
66
  pry (~> 0.11.3)
56
67
  rake (~> 10.0)
57
68
  rspec (~> 3.0)
69
+ simplecov (>= 0.16.1)
58
70
  vcr (~> 4.0, >= 4.0.0)
59
71
 
60
72
  BUNDLED WITH
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- firebase_dynamic_link (0.1.2)
4
+ firebase_dynamic_link (0.1.3)
5
5
  dry-configurable (~> 0.5, >= 0.5.0)
6
6
  faraday (~> 0.9, >= 0.9.2)
7
7
 
@@ -12,15 +12,20 @@ GEM
12
12
  bundler
13
13
  rake
14
14
  thor (>= 0.14.0)
15
+ bootsnap (1.3.0)
16
+ msgpack (~> 1.0)
15
17
  coderay (1.1.2)
16
18
  concurrent-ruby (1.0.5)
17
19
  diff-lcs (1.3)
20
+ docile (1.3.0)
18
21
  dotenv (2.2.2)
19
22
  dry-configurable (0.6.0)
20
23
  concurrent-ruby (~> 1.0)
21
24
  faraday (0.10.1)
22
25
  multipart-post (>= 1.2, < 3)
26
+ json (2.1.0)
23
27
  method_source (0.9.0)
28
+ msgpack (1.2.4)
24
29
  multipart-post (2.0.0)
25
30
  pry (0.11.3)
26
31
  coderay (~> 1.1.0)
@@ -39,6 +44,11 @@ GEM
39
44
  diff-lcs (>= 1.2.0, < 2.0)
40
45
  rspec-support (~> 3.7.0)
41
46
  rspec-support (3.7.1)
47
+ simplecov (0.16.1)
48
+ docile (~> 1.1)
49
+ json (>= 1.8, < 3)
50
+ simplecov-html (~> 0.10.0)
51
+ simplecov-html (0.10.2)
42
52
  thor (0.20.0)
43
53
  vcr (4.0.0)
44
54
 
@@ -47,6 +57,7 @@ PLATFORMS
47
57
 
48
58
  DEPENDENCIES
49
59
  appraisal (~> 2.2.0)
60
+ bootsnap (~> 1.3.0)
50
61
  bundler (~> 1.16)
51
62
  dotenv (~> 2.2, >= 2.2.2)
52
63
  dry-configurable (= 0.6.0)
@@ -55,6 +66,7 @@ DEPENDENCIES
55
66
  pry (~> 0.11.3)
56
67
  rake (~> 10.0)
57
68
  rspec (~> 3.0)
69
+ simplecov (>= 0.16.1)
58
70
  vcr (~> 4.0, >= 4.0.0)
59
71
 
60
72
  BUNDLED WITH
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- firebase_dynamic_link (0.1.2)
4
+ firebase_dynamic_link (0.1.3)
5
5
  dry-configurable (~> 0.5, >= 0.5.0)
6
6
  faraday (~> 0.9, >= 0.9.2)
7
7
 
@@ -12,15 +12,20 @@ GEM
12
12
  bundler
13
13
  rake
14
14
  thor (>= 0.14.0)
15
+ bootsnap (1.3.0)
16
+ msgpack (~> 1.0)
15
17
  coderay (1.1.2)
16
18
  concurrent-ruby (1.0.5)
17
19
  diff-lcs (1.3)
20
+ docile (1.3.0)
18
21
  dotenv (2.2.2)
19
22
  dry-configurable (0.6.0)
20
23
  concurrent-ruby (~> 1.0)
21
24
  faraday (0.11.0)
22
25
  multipart-post (>= 1.2, < 3)
26
+ json (2.1.0)
23
27
  method_source (0.9.0)
28
+ msgpack (1.2.4)
24
29
  multipart-post (2.0.0)
25
30
  pry (0.11.3)
26
31
  coderay (~> 1.1.0)
@@ -39,6 +44,11 @@ GEM
39
44
  diff-lcs (>= 1.2.0, < 2.0)
40
45
  rspec-support (~> 3.7.0)
41
46
  rspec-support (3.7.1)
47
+ simplecov (0.16.1)
48
+ docile (~> 1.1)
49
+ json (>= 1.8, < 3)
50
+ simplecov-html (~> 0.10.0)
51
+ simplecov-html (0.10.2)
42
52
  thor (0.20.0)
43
53
  vcr (4.0.0)
44
54
 
@@ -47,6 +57,7 @@ PLATFORMS
47
57
 
48
58
  DEPENDENCIES
49
59
  appraisal (~> 2.2.0)
60
+ bootsnap (~> 1.3.0)
50
61
  bundler (~> 1.16)
51
62
  dotenv (~> 2.2, >= 2.2.2)
52
63
  dry-configurable (= 0.6.0)
@@ -55,6 +66,7 @@ DEPENDENCIES
55
66
  pry (~> 0.11.3)
56
67
  rake (~> 10.0)
57
68
  rspec (~> 3.0)
69
+ simplecov (>= 0.16.1)
58
70
  vcr (~> 4.0, >= 4.0.0)
59
71
 
60
72
  BUNDLED WITH
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- firebase_dynamic_link (0.1.2)
4
+ firebase_dynamic_link (0.1.3)
5
5
  dry-configurable (~> 0.5, >= 0.5.0)
6
6
  faraday (~> 0.9, >= 0.9.2)
7
7
 
@@ -12,15 +12,20 @@ GEM
12
12
  bundler
13
13
  rake
14
14
  thor (>= 0.14.0)
15
+ bootsnap (1.3.0)
16
+ msgpack (~> 1.0)
15
17
  coderay (1.1.2)
16
18
  concurrent-ruby (1.0.5)
17
19
  diff-lcs (1.3)
20
+ docile (1.3.0)
18
21
  dotenv (2.2.2)
19
22
  dry-configurable (0.7.0)
20
23
  concurrent-ruby (~> 1.0)
21
24
  faraday (0.14.0)
22
25
  multipart-post (>= 1.2, < 3)
26
+ json (2.1.0)
23
27
  method_source (0.9.0)
28
+ msgpack (1.2.4)
24
29
  multipart-post (2.0.0)
25
30
  pry (0.11.3)
26
31
  coderay (~> 1.1.0)
@@ -39,6 +44,11 @@ GEM
39
44
  diff-lcs (>= 1.2.0, < 2.0)
40
45
  rspec-support (~> 3.7.0)
41
46
  rspec-support (3.7.1)
47
+ simplecov (0.16.1)
48
+ docile (~> 1.1)
49
+ json (>= 1.8, < 3)
50
+ simplecov-html (~> 0.10.0)
51
+ simplecov-html (0.10.2)
42
52
  thor (0.20.0)
43
53
  vcr (4.0.0)
44
54
 
@@ -47,6 +57,7 @@ PLATFORMS
47
57
 
48
58
  DEPENDENCIES
49
59
  appraisal (~> 2.2.0)
60
+ bootsnap (~> 1.3.0)
50
61
  bundler (~> 1.16)
51
62
  dotenv (~> 2.2, >= 2.2.2)
52
63
  dry-configurable (= 0.7.0)
@@ -55,6 +66,7 @@ DEPENDENCIES
55
66
  pry (~> 0.11.3)
56
67
  rake (~> 10.0)
57
68
  rspec (~> 3.0)
69
+ simplecov (>= 0.16.1)
58
70
  vcr (~> 4.0, >= 4.0.0)
59
71
 
60
72
  BUNDLED WITH
@@ -24,7 +24,7 @@ module FirebaseDynamicLink
24
24
  else
25
25
  raise_error(response)
26
26
  end
27
- rescue Faraday::ConnectionFailed => e
27
+ rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e
28
28
  raise FirebaseDynamicLink::ConnectionError, e.message
29
29
  end
30
30
 
@@ -41,8 +41,8 @@ module FirebaseDynamicLink
41
41
  end
42
42
 
43
43
  def build_connection_options(c, options)
44
- c.options.timeout = 1 if options.key?(:timeout)
45
- c.options.open_timeout = 1 if options.key?(:open_timeout)
44
+ c.options.timeout = options.delete(:timeout) if options.key?(:timeout)
45
+ c.options.open_timeout = options.delete(:open_timeout) if options.key?(:open_timeout)
46
46
  c
47
47
  end
48
48
 
@@ -1,3 +1,3 @@
1
1
  module FirebaseDynamicLink
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firebase_dynamic_link
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - M Saiqul Haq
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-17 00:00:00.000000000 Z
11
+ date: 2018-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable
@@ -160,7 +160,35 @@ dependencies:
160
160
  - - "~>"
161
161
  - !ruby/object:Gem::Version
162
162
  version: 0.11.3
163
- description: Ruby client API for Firebase Dynamic Link
163
+ - !ruby/object:Gem::Dependency
164
+ name: bootsnap
165
+ requirement: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - "~>"
168
+ - !ruby/object:Gem::Version
169
+ version: 1.3.0
170
+ type: :development
171
+ prerelease: false
172
+ version_requirements: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - "~>"
175
+ - !ruby/object:Gem::Version
176
+ version: 1.3.0
177
+ - !ruby/object:Gem::Dependency
178
+ name: simplecov
179
+ requirement: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ version: 0.16.1
184
+ type: :development
185
+ prerelease: false
186
+ version_requirements: !ruby/object:Gem::Requirement
187
+ requirements:
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: 0.16.1
191
+ description: Ruby client for Firebase Dynamic Link service
164
192
  email:
165
193
  - saiqulhaq@gmail.com
166
194
  executables: []
@@ -197,7 +225,8 @@ files:
197
225
  homepage: https://github.com/saiqulhaq/firebase_dynamic_link
198
226
  licenses:
199
227
  - MIT
200
- metadata: {}
228
+ metadata:
229
+ yard.run: yri
201
230
  post_install_message:
202
231
  rdoc_options: []
203
232
  require_paths: