izi_plagiarism_client 0.1.1 → 0.1.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: 1e6b4742533450a49dd534548a7e2824337c4a22
4
- data.tar.gz: 4f87a9f0e3c2b12e1da51052dc6cbcb78e133cc8
3
+ metadata.gz: 25d975f1f8e7485d3dfca9a94106f7e9fdbd707e
4
+ data.tar.gz: 43dc6e2eb435a4deb052f7d8751fcd13a803d4b6
5
5
  SHA512:
6
- metadata.gz: 7f9898bbf5b2add889c6f02f142504a917b6d9e2a3ec780e84ed1c93f27a3e134d18ad61a1f469760582f266f61841693247c1a5506d4b6cf6920a9d7515e43b
7
- data.tar.gz: 8187b72f8c14b4a19b80c9783ee87a17833c696cb3b051499085e219c57bb98e41fd53a6fe95e0f87a91bd4a67219a9b7d33a952b86ccca829ed1d5ce1cdb720
6
+ metadata.gz: d4ef8a9c3eca1401fbdce951371a2b462a074d8087afcfb0886bb0ac743c2238f9590b04a7ced2ddb8eb68c01a2bf5920e434e913862e36d0715c67e4b863668
7
+ data.tar.gz: bf2e7e75055c93e80c4913fb39652420495b6ff0ced4fcd9865598ce0cee95d600cc6929911a466db772a3351ca7be96c09a1f34f6d8fe6359698e53d1442cca
@@ -21,27 +21,21 @@ module Plagiarism
21
21
  structed get("/api/v1/reports/#{report_id}")
22
22
  end
23
23
 
24
- class << self
25
- def from_params(params)
26
- structed(data)
27
- end
28
-
29
- def structed(data = {})
30
- obj = OpenStruct.new(data)
31
-
32
- DATETIME_FIELDS.each do |field|
33
- next if obj[field].blank? || !obj[field].is_a?(String)
34
- obj[field] = Time.zone.parse(obj[field])
35
- end
36
-
37
- obj
38
- end
24
+ def from_params(params)
25
+ structed params
39
26
  end
40
27
 
41
28
  private
42
29
 
43
30
  def structed(data = {})
44
- self.class.structed(data)
31
+ obj = OpenStruct.new(data)
32
+
33
+ DATETIME_FIELDS.each do |field|
34
+ next if obj[field].blank? || !obj[field].is_a?(String)
35
+ obj[field] = Time.zone.parse(obj[field])
36
+ end
37
+
38
+ obj
45
39
  end
46
40
  end
47
41
  end
@@ -1,5 +1,5 @@
1
1
  module Plagiarism
2
2
  module Client
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: izi_plagiarism_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - IzikAJ