ammado 1.0.5 → 1.0.6

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: 2bb3e1ffa7d4f68433a541ff08283cf464ae87ec
4
- data.tar.gz: 4d9fc5da8b89a5198a20432f17a23d90a82ce27c
3
+ metadata.gz: ff943d1699f0db1675fe00f855d0b9a8ac0eeba0
4
+ data.tar.gz: d82d1732aef0af5f1bc3a917a7a0e2944f4a04a4
5
5
  SHA512:
6
- metadata.gz: a74da8db7fb92343d7c5b0ef92ed6497b5c87340042418eb58c4a515ba88c594094fcd9c84534e350f8206076b8cff51aa9569392c9f4f12a4520638f3c6e531
7
- data.tar.gz: fb9d66337d5da79d654baa1b8867ba0b5b5fbe314467cb515903c071dd2665857838b70e629e7b64aa633751d874b42fa863060e342bcefde7982767491accfa
6
+ metadata.gz: c37c2dba6112aa7dedbe30c30ea282c70ecbce15364aaeac2a65f57de93dc56c115cd3921c00d5e82151340bef2ad8d2598c47355cfc0542a61698ad7f5ed08d
7
+ data.tar.gz: 5586a43cbd742d1f06e17012765cc963980cab55e573bbade0fe436680c1c1e1390fd1e982fc7d17e2f6bf2b00a6880c5ae9d25fea2bc1d4cfd18a8203114c10
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ammado"
8
- s.version = "1.0.5"
8
+ s.version = "1.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Margus Pärt"]
@@ -8,17 +8,21 @@ module Ammado
8
8
  return resource
9
9
  end
10
10
 
11
+ def initialize(params)
12
+ update_params(params)
13
+ end
11
14
 
12
- attr_accessor :params
15
+ def params
16
+ @params ||= {}
17
+ end
13
18
 
14
19
  def create
15
20
  code, response = api.post(resource_create_path, params.merge(signature: calculate_signature, apiKey: api.key))
16
- @params.merge!(response)
21
+ update_params(response)
17
22
  return code == '201'
18
23
  end
19
24
 
20
- def initialize(params)
21
- @params = {}
25
+ def update_params(params)
22
26
  params.each do |k, v|
23
27
  send("#{k}=", v)
24
28
  end
@@ -30,7 +34,7 @@ module Ammado
30
34
  assign_meth = meth[0..-2]
31
35
  params[assign_meth.underscore] = params[assign_meth.camelize(:lower)] = value
32
36
  else
33
- return params[meth.underscore] || params[meth.camelize(:lower)]
37
+ return params[meth]
34
38
  end
35
39
  end
36
40
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ammado
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Margus Pärt
@@ -113,12 +113,12 @@ files:
113
113
  - lib/ammado/api.rb
114
114
  - lib/ammado/api_error.rb
115
115
  - lib/ammado/api_resource.rb
116
+ - lib/ammado/beneficiary.rb
116
117
  - lib/ammado/categories.rb
117
118
  - lib/ammado/fundraiser.rb
118
119
  - lib/ammado/fundraiser_avatar.rb
119
120
  - lib/ammado/fundraiser_cover.rb
120
121
  - lib/ammado/fundraiser_moderator.rb
121
- - lib/ammado/beneficiary.rb
122
122
  - lib/ammado/search.rb
123
123
  - test/helper.rb
124
124
  - test/test_ammado.rb
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.0.14
145
+ rubygems_version: 2.5.1
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Using Ammado API with Ruby (and Rails). https://api.ammado.com/