ruby-miradore 2.2.5 → 2.2.9

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: 957fa5bcfbd84a0d68ea4d4fcc45ca479c2eef1d4532b7f0155801de27174d79
4
- data.tar.gz: ce5258ae7400fb82a1d7f106089db18ccd0b1e84a0bbb7b300f1d32da7c73886
3
+ metadata.gz: 32cd1130d315e189325c8d73590b1ce1d5889734b50d157dd3495cdd1f3ea229
4
+ data.tar.gz: 6aa9217dedeb2b880035d6067ffa4e1934167fb5e07b99d62cc16f85e7e01f23
5
5
  SHA512:
6
- metadata.gz: b5ddaf5220a34afa59c88bc32762ced3a75255ecf668ccccd77207ddf546f825a26f3594d008eeb4e9f69ed843e40f8035da2d40a1e8e326e35c066ecba182f2
7
- data.tar.gz: d8637b3f168eea8d7afc29e550630291c4ccbfbab73da79800c498cd7f065bbe46b7055f62da837256fc37861a13f83be2b1a9c63e4cc5ea58519fe38c4573b6
6
+ metadata.gz: b72485967e471d2e5245e0274176c10d16ed76965fc688aaf5cc9f836e27ef2cc39a6384378993a048714334312b35467e5128c46d759ba16ac302584c439c5e
7
+ data.tar.gz: cf835f493a6be0b063bcb34e5acc883e15b30ced00f9a1f691e3848c4397b93c9c6c2723920bbe004e4597cc9ba672a3dad381645441a633d8780dbfad47276c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-miradore (2.2.5)
4
+ ruby-miradore (2.2.8)
5
5
  activesupport (~> 6.1)
6
6
  builder (~> 3.1)
7
7
  crack (~> 0.4)
@@ -28,7 +28,7 @@ GEM
28
28
  crack (0.4.5)
29
29
  rexml
30
30
  diff-lcs (1.4.4)
31
- finest-builder (1.0.1)
31
+ finest-builder (1.1.1)
32
32
  hashdiff (1.0.1)
33
33
  httparty (0.20.0)
34
34
  mime-types (~> 3.0)
@@ -70,7 +70,7 @@ GEM
70
70
  rubocop-ast (>= 1.12.0, < 2.0)
71
71
  ruby-progressbar (~> 1.7)
72
72
  unicode-display_width (>= 1.4.0, < 3.0)
73
- rubocop-ast (1.12.0)
73
+ rubocop-ast (1.13.0)
74
74
  parser (>= 3.0.1.1)
75
75
  ruby-progressbar (1.11.0)
76
76
  tzinfo (2.0.4)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module Miradore
5
- VERSION = "2.2.5"
5
+ VERSION = "2.2.9"
6
6
  end
7
7
  end
data/lib/ruby/miradore.rb CHANGED
@@ -24,16 +24,21 @@ module Ruby
24
24
  include HTTParty
25
25
  format :json
26
26
 
27
- attr_writer :subdomain, :auth
27
+ attr_writer :subdomain, :auth, :json
28
28
 
29
29
  def initialize(json = {})
30
30
  super json
31
31
  @subdomain ||= json[:subdomain]
32
32
  @auth ||= json[:auth]
33
+ @json ||= json.to_json
33
34
  remove_instance_variable(:@subdomain) if @subdomain.nil?
34
35
  remove_instance_variable(:@auth) if @auth.nil?
35
36
  end
36
37
 
38
+ def as_json(options = nil)
39
+ @json
40
+ end
41
+
37
42
  class << self
38
43
  #
39
44
  # This call will perform all GET calls regardless the API version that it's calling.
@@ -49,10 +54,10 @@ module Ruby
49
54
  )
50
55
  end
51
56
 
52
- def add(**args)
57
+ def call(**args)
53
58
  transform(
54
59
  Crack::XML.parse(
55
- http_method(args.merge(method: :post, attribute: "ID")).body
60
+ http_method(args.merge( attribute: "ID")).body
56
61
  )["Content"]
57
62
  )
58
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-miradore
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.5
4
+ version: 2.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduard Garcia Castelló
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-03 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport