firebase_dynamic_link 1.0.1 → 1.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: 5d63e95b652d20a351bd1c567691cad2cfdcbb9b
4
- data.tar.gz: 800ad1cf39180ae8a98b8acd85792e429d99990c
3
+ metadata.gz: c024a5cb680324228333abab047b268e18c55a85
4
+ data.tar.gz: faf6f465b8c8d0c7d31f27eb229679980d1a1123
5
5
  SHA512:
6
- metadata.gz: 2bb29943010794f900ae870c59ea83ee70e0ebde93ffec0646f9197c93c02ffd1e4ca823ca9a4b5773766b68c16e8f9f087fac5faa7a1a749cf19cb54bed0213
7
- data.tar.gz: 44caf3bd1302aa063fbc57bfc6f9513de7df9a17c0cb3c3b066dbf83e3a259988ddc6ab196e23ed2c9a197f4577222243c9849ac84aac4b9edbe994d304bd1cc
6
+ metadata.gz: 1b6e9ae5bb44c1c62954e09d35999b0120729ed0e8ee2c8161aeedb1d5fca1b548df399242d2691c426b79065a069c398d85df987dab19b3247273506b2a0e4b
7
+ data.tar.gz: 0ef1f4a80adc89a61aeb2ce5cff91498e3146f6a7c08f3f1790ca2bd52a6afe481e8b20abf6f8c52d59ce1eb58c50db22519295d1536afcf5f68013e8602ce89
data/.gitignore CHANGED
@@ -13,3 +13,4 @@
13
13
  spec/fixtures/vcr_cassettes/
14
14
  coverage
15
15
  doc
16
+ Gemfile.lock
data/README.md CHANGED
@@ -1,3 +1,19 @@
1
+
2
+ <!-- vim-markdown-toc GFM -->
3
+
4
+ + [FirebaseDynamicLink](#firebasedynamiclink)
5
+ * [Installation](#installation)
6
+ * [Usage](#usage)
7
+ - [Configure the HTTP client](#configure-the-http-client)
8
+ - [Shorten a link](#shorten-a-link)
9
+ - [Shorten parameters](#shorten-parameters)
10
+ * [Development](#development)
11
+ * [Contributing](#contributing)
12
+ * [License](#license)
13
+ * [Code of Conduct](#code-of-conduct)
14
+
15
+ <!-- vim-markdown-toc -->
16
+
1
17
  # FirebaseDynamicLink
2
18
 
3
19
  [![Build Status](https://travis-ci.org/saiqulhaq/firebase_dynamic_link.svg?branch=master)](https://travis-ci.org/saiqulhaq/firebase_dynamic_link)
@@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_runtime_dependency "dry-configurable", "~> 0.6", ">= 0.6.0"
28
28
  spec.add_runtime_dependency "faraday", "~> 0.9", ">= 0.9.2"
29
+ spec.add_runtime_dependency "case_transform2", "~> 0.2"
29
30
 
30
31
  spec.add_development_dependency "appraisal", "~> 2.2.0"
31
32
  spec.add_development_dependency "bootsnap", "~> 1.3.0"
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
+ gem "case_transform2", "~> 0.2"
5
6
  gem "dry-configurable", "0.6.0"
6
7
  gem "faraday", "0.9.2"
7
8
 
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- firebase_dynamic_link (1.0.1)
4
+ firebase_dynamic_link (1.0.2)
5
+ case_transform2 (~> 0.2)
5
6
  dry-configurable (~> 0.6, >= 0.6.0)
6
7
  faraday (~> 0.9, >= 0.9.2)
7
8
 
@@ -14,6 +15,7 @@ GEM
14
15
  thor (>= 0.14.0)
15
16
  bootsnap (1.3.0)
16
17
  msgpack (~> 1.0)
18
+ case_transform2 (0.2)
17
19
  coderay (1.1.2)
18
20
  concurrent-ruby (1.0.5)
19
21
  diff-lcs (1.3)
@@ -59,6 +61,7 @@ DEPENDENCIES
59
61
  appraisal (~> 2.2.0)
60
62
  bootsnap (~> 1.3.0)
61
63
  bundler (~> 1.16)
64
+ case_transform2 (~> 0.2)
62
65
  dotenv (~> 2.2, >= 2.2.2)
63
66
  dry-configurable (= 0.6.0)
64
67
  faraday (= 0.9.2)
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
+ gem "case_transform2", "~> 0.2"
5
6
  gem "dry-configurable", "0.6.0"
6
7
  gem "faraday", "0.10.1"
7
8
 
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- firebase_dynamic_link (1.0.1)
4
+ firebase_dynamic_link (1.0.2)
5
+ case_transform2 (~> 0.2)
5
6
  dry-configurable (~> 0.6, >= 0.6.0)
6
7
  faraday (~> 0.9, >= 0.9.2)
7
8
 
@@ -14,6 +15,7 @@ GEM
14
15
  thor (>= 0.14.0)
15
16
  bootsnap (1.3.0)
16
17
  msgpack (~> 1.0)
18
+ case_transform2 (0.2)
17
19
  coderay (1.1.2)
18
20
  concurrent-ruby (1.0.5)
19
21
  diff-lcs (1.3)
@@ -59,6 +61,7 @@ DEPENDENCIES
59
61
  appraisal (~> 2.2.0)
60
62
  bootsnap (~> 1.3.0)
61
63
  bundler (~> 1.16)
64
+ case_transform2 (~> 0.2)
62
65
  dotenv (~> 2.2, >= 2.2.2)
63
66
  dry-configurable (= 0.6.0)
64
67
  faraday (= 0.10.1)
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
+ gem "case_transform2", "~> 0.2"
5
6
  gem "dry-configurable", "0.6.0"
6
7
  gem "faraday", "0.11.0"
7
8
 
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- firebase_dynamic_link (1.0.1)
4
+ firebase_dynamic_link (1.0.2)
5
+ case_transform2 (~> 0.2)
5
6
  dry-configurable (~> 0.6, >= 0.6.0)
6
7
  faraday (~> 0.9, >= 0.9.2)
7
8
 
@@ -14,6 +15,7 @@ GEM
14
15
  thor (>= 0.14.0)
15
16
  bootsnap (1.3.0)
16
17
  msgpack (~> 1.0)
18
+ case_transform2 (0.2)
17
19
  coderay (1.1.2)
18
20
  concurrent-ruby (1.0.5)
19
21
  diff-lcs (1.3)
@@ -59,6 +61,7 @@ DEPENDENCIES
59
61
  appraisal (~> 2.2.0)
60
62
  bootsnap (~> 1.3.0)
61
63
  bundler (~> 1.16)
64
+ case_transform2 (~> 0.2)
62
65
  dotenv (~> 2.2, >= 2.2.2)
63
66
  dry-configurable (= 0.6.0)
64
67
  faraday (= 0.11.0)
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
+ gem "case_transform2", "~> 0.2"
5
6
  gem "dry-configurable", "0.7.0"
6
7
  gem "faraday", "0.14.0"
7
8
 
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- firebase_dynamic_link (1.0.1)
4
+ firebase_dynamic_link (1.0.2)
5
+ case_transform2 (~> 0.2)
5
6
  dry-configurable (~> 0.6, >= 0.6.0)
6
7
  faraday (~> 0.9, >= 0.9.2)
7
8
 
@@ -14,6 +15,7 @@ GEM
14
15
  thor (>= 0.14.0)
15
16
  bootsnap (1.3.0)
16
17
  msgpack (~> 1.0)
18
+ case_transform2 (0.2)
17
19
  coderay (1.1.2)
18
20
  concurrent-ruby (1.0.5)
19
21
  diff-lcs (1.3)
@@ -59,6 +61,7 @@ DEPENDENCIES
59
61
  appraisal (~> 2.2.0)
60
62
  bootsnap (~> 1.3.0)
61
63
  bundler (~> 1.16)
64
+ case_transform2 (~> 0.2)
62
65
  dotenv (~> 2.2, >= 2.2.2)
63
66
  dry-configurable (= 0.7.0)
64
67
  faraday (= 0.14.0)
@@ -3,6 +3,7 @@
3
3
  require "uri"
4
4
  require "firebase_dynamic_link/connection"
5
5
  require "firebase_dynamic_link/link_renderer"
6
+ require "case_transform2"
6
7
 
7
8
  module FirebaseDynamicLink
8
9
  # Main class that responsible to shorten link or parameters
@@ -28,12 +29,11 @@ module FirebaseDynamicLink
28
29
 
29
30
  suffix_option = options[:suffix_option] if options.key?(:suffix_option)
30
31
 
31
- response = connection.post(nil, {
32
- longDynamicLink: build_link(link, options),
33
- suffix: {
34
- option: suffix_option || config.suffix_option
35
- }
36
- }.to_json)
32
+ params = CaseTransform.camel_lower(long_dynamic_link: build_link(link, options),
33
+ suffix: {
34
+ option: suffix_option || config.suffix_option
35
+ })
36
+ response = connection.post(nil, params.to_json)
37
37
  link_renderer.render(response)
38
38
  rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e
39
39
  raise FirebaseDynamicLink::ConnectionError, e.message
@@ -133,12 +133,11 @@ module FirebaseDynamicLink
133
133
 
134
134
  dynamic_link_domain = URI.parse(dynamic_link_domain).host
135
135
 
136
- response = connection.post(nil, {
137
- dynamicLinkInfo: params.merge(dynamicLinkDomain: dynamic_link_domain),
138
- suffix: {
139
- option: suffix_option || config.suffix_option
140
- }
141
- }.to_json)
136
+ params = CaseTransform.camel_lower(dynamic_link_info: params.merge(dynamicLinkDomain: dynamic_link_domain),
137
+ suffix: {
138
+ option: suffix_option || config.suffix_option
139
+ })
140
+ response = connection.post(nil, params.to_json)
142
141
  link_renderer.render(response)
143
142
  rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e
144
143
  raise FirebaseDynamicLink::ConnectionError, e.message
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FirebaseDynamicLink
4
- VERSION = "1.0.1".freeze
4
+ VERSION = "1.0.2".freeze
5
5
  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: 1.0.1
4
+ version: 1.0.2
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-05-04 00:00:00.000000000 Z
11
+ date: 2018-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable
@@ -50,6 +50,20 @@ dependencies:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
52
  version: 0.9.2
53
+ - !ruby/object:Gem::Dependency
54
+ name: case_transform2
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '0.2'
60
+ type: :runtime
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '0.2'
53
67
  - !ruby/object:Gem::Dependency
54
68
  name: appraisal
55
69
  requirement: !ruby/object:Gem::Requirement
@@ -203,7 +217,6 @@ files:
203
217
  - Appraisals
204
218
  - CODE_OF_CONDUCT.md
205
219
  - Gemfile
206
- - Gemfile.lock
207
220
  - Guardfile
208
221
  - LICENSE.txt
209
222
  - README.md
@@ -1,71 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- firebase_dynamic_link (1.0.1)
5
- dry-configurable (~> 0.6, >= 0.6.0)
6
- faraday (~> 0.9, >= 0.9.2)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- appraisal (2.2.0)
12
- bundler
13
- rake
14
- thor (>= 0.14.0)
15
- bootsnap (1.3.0)
16
- msgpack (~> 1.0)
17
- coderay (1.1.2)
18
- concurrent-ruby (1.0.5)
19
- diff-lcs (1.3)
20
- docile (1.3.0)
21
- dotenv (2.2.2)
22
- dry-configurable (0.7.0)
23
- concurrent-ruby (~> 1.0)
24
- faraday (0.15.0)
25
- multipart-post (>= 1.2, < 3)
26
- json (2.1.0)
27
- method_source (0.9.0)
28
- msgpack (1.2.4)
29
- multipart-post (2.0.0)
30
- pry (0.11.3)
31
- coderay (~> 1.1.0)
32
- method_source (~> 0.9.0)
33
- rake (10.5.0)
34
- rspec (3.7.0)
35
- rspec-core (~> 3.7.0)
36
- rspec-expectations (~> 3.7.0)
37
- rspec-mocks (~> 3.7.0)
38
- rspec-core (3.7.1)
39
- rspec-support (~> 3.7.0)
40
- rspec-expectations (3.7.0)
41
- diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.7.0)
43
- rspec-mocks (3.7.0)
44
- diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.7.0)
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)
52
- thor (0.20.0)
53
- vcr (4.0.0)
54
-
55
- PLATFORMS
56
- ruby
57
-
58
- DEPENDENCIES
59
- appraisal (~> 2.2.0)
60
- bootsnap (~> 1.3.0)
61
- bundler (~> 1.16)
62
- dotenv (~> 2.2, >= 2.2.2)
63
- firebase_dynamic_link!
64
- pry (~> 0.11.3)
65
- rake (~> 10.0)
66
- rspec (~> 3.0)
67
- simplecov (>= 0.16.1)
68
- vcr (~> 4.0, >= 4.0.0)
69
-
70
- BUNDLED WITH
71
- 1.16.1