docuseal 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: cdbe565c37f9a94a278e42dcb4369380c467ab5f06e9cdaf0c693904869c5bc5
4
- data.tar.gz: 1986099e7e5af342564dda635432a8ba17f8ce765b4da27483fd23193b27f8c2
3
+ metadata.gz: 71374b71ef11af519bb47bc0c6f0c67635726528db6ce40bcc93527d579ed96a
4
+ data.tar.gz: 9310cb9a409b912f8df388d4afae5a60376321d4859d4fb0dc0893b2fed2296d
5
5
  SHA512:
6
- metadata.gz: 878910faa3dfc3b4450985c204fabfb2f930280cf24bac6dd999c52a2e282a1341fdb83e11612db81bffb1be0288366e121f7430503c4513c90479ee712f6426
7
- data.tar.gz: 202328030706802a4d898831063a2e835c3c98797e233dad29f3feffbd3c6af03579e4bafccdb6bad3a09533d490134d7ff7db735918566bd7b985a86441aa78
6
+ metadata.gz: 1a8180b8f8a14b1db76ef934c91a33e528093881c59d147111ef3e49ae38a90ff3e653ec0cdd7a964fcb6b78dc0878c00e39608e40069579de900d5d39552389
7
+ data.tar.gz: 37b7f9d321ddd45530bb41b13b1d96446da0af20f55fa3aa7a18210e10c2b0dde57c7498207525c80d790452d58def384c0569219ebcf93d195b212c8b9b7c99
@@ -0,0 +1,11 @@
1
+ {
2
+ "rubyLsp.formatter": "none", // Use standard rbfmt instead
3
+ "editor.formatOnSave": true,
4
+ "editor.codeActionsOnSave": {
5
+ "source.organizeImports": "explicit"
6
+ },
7
+ "[ruby]": {
8
+ "editor.defaultFormatter": "testdouble.vscode-standard-ruby"
9
+ },
10
+ "standardRuby.autofix": true
11
+ }
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,3 @@
1
+ ## Contributing
2
+
3
+ Bug reports and pull requests are welcome on GitHub at https://github.com/moraki-finance/docuseal. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/moraki-finance/docuseal/blob/main/CODE_OF_CONDUCT.md).
data/Gemfile CHANGED
@@ -12,7 +12,7 @@ gem "rspec", "~> 3.0"
12
12
  gem "standard", "~> 1.3"
13
13
 
14
14
  group :development, :test do
15
- gem "webmock", "~> 3.19.1"
15
+ gem "webmock", "~> 3.22.0"
16
16
  gem "byebug", "~> 11.1"
17
17
  gem "pry", "~> 0.14.2"
18
18
  gem "pry-byebug", "~> 3.10"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- docuseal (0.1.0)
4
+ docuseal (0.1.1)
5
5
  faraday (>= 1)
6
6
  faraday_middleware (>= 1)
7
7
 
@@ -11,14 +11,16 @@ GEM
11
11
  addressable (2.8.6)
12
12
  public_suffix (>= 2.0.2, < 6.0)
13
13
  ast (2.4.2)
14
+ bigdecimal (3.1.6)
14
15
  binding_of_caller (1.0.0)
15
16
  debug_inspector (>= 0.0.1)
16
17
  byebug (11.1.3)
17
18
  coderay (1.1.3)
18
- crack (0.4.5)
19
+ crack (1.0.0)
20
+ bigdecimal
19
21
  rexml
20
22
  debug_inspector (1.2.0)
21
- diff-lcs (1.5.0)
23
+ diff-lcs (1.5.1)
22
24
  docile (1.4.0)
23
25
  faraday (1.10.3)
24
26
  faraday-em_http (~> 1.0)
@@ -51,9 +53,9 @@ GEM
51
53
  language_server-protocol (3.17.0.3)
52
54
  lint_roller (1.1.0)
53
55
  method_source (1.0.0)
54
- multipart-post (2.3.0)
56
+ multipart-post (2.4.0)
55
57
  parallel (1.24.0)
56
- parser (3.2.2.4)
58
+ parser (3.3.0.5)
57
59
  ast (~> 2.4.1)
58
60
  racc
59
61
  pry (0.14.2)
@@ -62,7 +64,7 @@ GEM
62
64
  pry-byebug (3.10.1)
63
65
  byebug (~> 11.0)
64
66
  pry (>= 0.13, < 0.15)
65
- pry-rescue (1.5.2)
67
+ pry-rescue (1.6.0)
66
68
  interception (>= 0.5)
67
69
  pry (>= 0.12.0)
68
70
  pry-stack_explorer (0.6.1)
@@ -72,40 +74,40 @@ GEM
72
74
  racc (1.7.3)
73
75
  rainbow (3.1.1)
74
76
  rake (13.1.0)
75
- regexp_parser (2.8.3)
77
+ regexp_parser (2.9.0)
76
78
  rexml (3.2.6)
77
- rspec (3.12.0)
78
- rspec-core (~> 3.12.0)
79
- rspec-expectations (~> 3.12.0)
80
- rspec-mocks (~> 3.12.0)
81
- rspec-core (3.12.2)
82
- rspec-support (~> 3.12.0)
83
- rspec-expectations (3.12.3)
79
+ rspec (3.13.0)
80
+ rspec-core (~> 3.13.0)
81
+ rspec-expectations (~> 3.13.0)
82
+ rspec-mocks (~> 3.13.0)
83
+ rspec-core (3.13.0)
84
+ rspec-support (~> 3.13.0)
85
+ rspec-expectations (3.13.0)
84
86
  diff-lcs (>= 1.2.0, < 2.0)
85
- rspec-support (~> 3.12.0)
86
- rspec-mocks (3.12.6)
87
+ rspec-support (~> 3.13.0)
88
+ rspec-mocks (3.13.0)
87
89
  diff-lcs (>= 1.2.0, < 2.0)
88
- rspec-support (~> 3.12.0)
89
- rspec-support (3.12.1)
90
- rubocop (1.57.2)
90
+ rspec-support (~> 3.13.0)
91
+ rspec-support (3.13.0)
92
+ rubocop (1.60.2)
91
93
  json (~> 2.3)
92
94
  language_server-protocol (>= 3.17.0)
93
95
  parallel (~> 1.10)
94
- parser (>= 3.2.2.4)
96
+ parser (>= 3.3.0.2)
95
97
  rainbow (>= 2.2.2, < 4.0)
96
98
  regexp_parser (>= 1.8, < 3.0)
97
99
  rexml (>= 3.2.5, < 4.0)
98
- rubocop-ast (>= 1.28.1, < 2.0)
100
+ rubocop-ast (>= 1.30.0, < 2.0)
99
101
  ruby-progressbar (~> 1.7)
100
102
  unicode-display_width (>= 2.4.0, < 3.0)
101
103
  rubocop-ast (1.30.0)
102
104
  parser (>= 3.2.1.0)
103
- rubocop-performance (1.19.1)
104
- rubocop (>= 1.7.0, < 2.0)
105
- rubocop-ast (>= 0.4.0)
105
+ rubocop-performance (1.20.2)
106
+ rubocop (>= 1.48.1, < 2.0)
107
+ rubocop-ast (>= 1.30.0, < 2.0)
106
108
  ruby-progressbar (1.13.0)
107
109
  ruby2_keywords (0.0.5)
108
- simplecov (0.21.2)
110
+ simplecov (0.22.0)
109
111
  docile (~> 1.1)
110
112
  simplecov-html (~> 0.11)
111
113
  simplecov_json_formatter (~> 0.1)
@@ -114,25 +116,26 @@ GEM
114
116
  simplecov (~> 0.19)
115
117
  simplecov-html (0.12.3)
116
118
  simplecov_json_formatter (0.1.4)
117
- standard (1.32.0)
119
+ standard (1.34.0)
118
120
  language_server-protocol (~> 3.17.0.2)
119
121
  lint_roller (~> 1.0)
120
- rubocop (~> 1.57.2)
122
+ rubocop (~> 1.60)
121
123
  standard-custom (~> 1.0.0)
122
- standard-performance (~> 1.2)
124
+ standard-performance (~> 1.3)
123
125
  standard-custom (1.0.2)
124
126
  lint_roller (~> 1.0)
125
127
  rubocop (~> 1.50)
126
- standard-performance (1.2.1)
128
+ standard-performance (1.3.1)
127
129
  lint_roller (~> 1.1)
128
- rubocop-performance (~> 1.19.1)
130
+ rubocop-performance (~> 1.20.2)
129
131
  unicode-display_width (2.5.0)
130
- webmock (3.19.1)
132
+ webmock (3.22.0)
131
133
  addressable (>= 2.8.0)
132
134
  crack (>= 0.3.2)
133
135
  hashdiff (>= 0.4.0, < 2.0.0)
134
136
 
135
137
  PLATFORMS
138
+ ruby
136
139
  x86_64-darwin-23
137
140
 
138
141
  DEPENDENCIES
@@ -147,7 +150,7 @@ DEPENDENCIES
147
150
  simplecov
148
151
  simplecov-cobertura
149
152
  standard (~> 1.3)
150
- webmock (~> 3.19.1)
153
+ webmock (~> 3.22.0)
151
154
 
152
155
  BUNDLED WITH
153
- 2.4.22
156
+ 2.5.5
data/README.md CHANGED
@@ -1,13 +1,17 @@
1
1
  # Docuseal API Connector
2
2
 
3
+ <a href="https://codecov.io/github/moraki-finance/docuseal" >
4
+ <img src="https://codecov.io/github/moraki-finance/docuseal/graph/badge.svg?token=SKTT14JJGV"/>
5
+ </a>
6
+
7
+ [![Tests](https://github.com/moraki-finance/docuseal/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/moraki-finance/docuseal/actions/workflows/main.yml)
8
+
3
9
  A lightweight API connector for docuseal. Docuseal API docs: https://www.docuseal.co/docs/api
4
10
 
5
11
  :warning: The extracted API objects don't do input parameters validations. It's a simple faraday wrapper that allows you to send as many inputs as you want. The docuseal API might fail when passing a wrong set of parameters.
6
12
 
7
13
  ## Installation
8
14
 
9
- TODO: Replace `docuseal` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
15
  Install the gem and add to the application's Gemfile by executing:
12
16
 
13
17
  $ bundle add docuseal
@@ -86,7 +90,7 @@ Reference: https://www.docuseal.co/docs/api#create-submissions-from-emails
86
90
 
87
91
  ```rb
88
92
  submission = Docuseal::Submission.create(
89
- from: :emails
93
+ from: :emails,
90
94
  template_id: 1000001,
91
95
  emails: 'hi@docuseal.co, example@docuseal.co'
92
96
  )
@@ -171,7 +175,7 @@ template = Docuseal::Template.create(
171
175
  )
172
176
  ```
173
177
 
174
- #### Create From PDf
178
+ #### Create From PDF
175
179
 
176
180
  Reference: https://www.docuseal.co/docs/api#create-a-template-from-existing-pdf
177
181
 
@@ -230,25 +234,17 @@ template = Docuseal::Template.archive(1)
230
234
 
231
235
  ## Development
232
236
 
233
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
234
-
235
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
236
-
237
- You can test any of the endpoints lively if using the following bash command:
237
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment:
238
238
 
239
239
  ```bash
240
- DOCUSEAL_API_KEY={YOUR API KEY} DOCUSEAL_BASE_URI={YOUR BASE URI} bin/console
240
+ $ DOCUSEAL_API_KEY={YOUR API KEY} DOCUSEAL_BASE_URI={YOUR BASE URI} bin/console
241
241
  ```
242
242
 
243
- Then do
244
-
245
- ```bash
246
- irb(main):002> Docuseal::Template.list
247
- ```
243
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
248
244
 
249
245
  ## Contributing
250
246
 
251
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/docuseal. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/docuseal/blob/main/CODE_OF_CONDUCT.md).
247
+ Bug reports and pull requests are welcome on GitHub at https://github.com/moraki-finance/docuseal. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/moraki-finance/docuseal/blob/main/CODE_OF_CONDUCT.md).
252
248
 
253
249
  ## License
254
250
 
@@ -18,7 +18,7 @@ module Docuseal
18
18
  CONFIG_KEYS.each do |key|
19
19
  # Set instance variables like api_type & access_token. Fall back to global config
20
20
  # if not present.
21
- instance_variable_set("@#{key}", Docuseal.configuration.send(key))
21
+ instance_variable_set(:"@#{key}", Docuseal.configuration.send(key))
22
22
  end
23
23
  end
24
24
  end
@@ -66,16 +66,18 @@ module Docuseal
66
66
 
67
67
  attrs.each do |key, value|
68
68
  if self.class.skip_coertion_for.include?(key.to_sym)
69
- instance_variable_set("@#{key}", value)
69
+ instance_variable_set(:"@#{key}", value)
70
70
  else
71
71
  coerced_value = if value.is_a?(Hash)
72
72
  Docuseal::Model.new(value)
73
73
  elsif value.is_a?(Array)
74
- value.map { |v| Docuseal::Model.new(v) }
74
+ value.map do |v|
75
+ v.is_a?(Hash) ? Docuseal::Model.new(v) : v
76
+ end
75
77
  else
76
78
  value
77
79
  end
78
- instance_variable_set("@#{key}", coerced_value)
80
+ instance_variable_set(:"@#{key}", coerced_value)
79
81
  end
80
82
  end
81
83
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Docuseal
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docuseal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Mochetti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-22 00:00:00.000000000 Z
11
+ date: 2024-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -48,8 +48,10 @@ files:
48
48
  - ".rspec"
49
49
  - ".ruby-version"
50
50
  - ".standard.yml"
51
+ - ".vscode/settings.json"
51
52
  - CHANGELOG.md
52
53
  - CODE_OF_CONDUCT.md
54
+ - CONTRIBUTING.md
53
55
  - Gemfile
54
56
  - Gemfile.lock
55
57
  - LICENSE.txt