portatext 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10fdab64b04d5eba2307886ea1a075769872c6b0
4
- data.tar.gz: 408a90a81ee6e3e23f5a65ec57ffac43606b89b2
3
+ metadata.gz: 6bcb91124b2df5df27bea7468a7092127469e3d3
4
+ data.tar.gz: b4576f0e8d25ac13183b79e8f8b750f1d1d29e76
5
5
  SHA512:
6
- metadata.gz: ccbdc005a6cd01b0e8b36b7149646c0b3a106deec94a2323f64885a30d5f22d2253e796e2326887481ad25be3ad912d3078395169ffb30e048ec7294db766794
7
- data.tar.gz: b7f63ae79b5643c43de786ca5e17ecb3bc5f880eb4e0e2bb01b45603215fa81ebb50e1baaa110a277162ed3cc97a8d53cd93f0bbeaba54114771af042a9c96e3
6
+ metadata.gz: 57c623a573e571b7e6cb83697d06631aeca778705e1e2e22132ad59deb03385ccc184619eec81b57b3af37d187256991800283cab5cd7eef4463a3f1a93b63bf
7
+ data.tar.gz: c4d5aa5f84fa85b9551978005f0f4e5d93bb838dd22371c6ebe8514a5b58d7bdf169a694ac376fcd456190ba1e7144139b5ddaef6d57be6f8f2f23afc80e84f6
@@ -21,6 +21,14 @@ module PortaText
21
21
  set :value, value
22
22
  end
23
23
 
24
+ def csv(file)
25
+ set :file, file
26
+ end
27
+
28
+ def save_to(file)
29
+ set :accept_file, file
30
+ end
31
+
24
32
  # rubocop:disable Style/AccessorMethodName
25
33
  def set_all(variables)
26
34
  variables = variables.reduce([]) do |acc, v|
@@ -31,6 +39,7 @@ module PortaText
31
39
  # rubocop:enable Style/AccessorMethodName
32
40
 
33
41
  def endpoint(_method)
42
+ return 'contacts/variables' if @args[:number].nil?
34
43
  number = @args[:number]
35
44
  @args.delete :number
36
45
  return "contacts/#{number}/variables" if @args[:name].nil?
data/portatext.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'portatext'
3
- s.version = '1.1.6'
3
+ s.version = '1.1.7'
4
4
  s.summary = 'Official PortaText API ruby client'
5
5
  s.description = 'This is the official PortaText API ruby client'
6
6
  s.authors = ['PortaText']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: portatext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - PortaText