iframely 0.0.4 → 0.1.0

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: 99ed3be38678e776627a35aa4fc57870ce0dd92c
4
- data.tar.gz: cf99f8c301b374ff2c7f6b3779cb35452a753ee5
3
+ metadata.gz: 2ed7dd3f851cfe4788f00809f404d143d8abc29e
4
+ data.tar.gz: 52e92a03f1a7800f7fcdab6924d65bc53a4dc53e
5
5
  SHA512:
6
- metadata.gz: 2517be5c5d1d57199c597ab8b7c213cb87124b855b1f1557bd6de4450e292f7aa86f7558ccd02d25bad66d48685ad5f0f34e7a4fe4c093f530cfe579085e176a
7
- data.tar.gz: de700e43c206848d2d0f1079851c7cef2cbf01d42e54c4892cb13e6496d776f8f4a068654b107d3e2433db4608766e7a4a130124644aa3dfffa0ca0bc6bc1226
6
+ metadata.gz: b1fcd75615aa2c34785cd8803a224b0aa97bb8c8a347073bd2b41b7a195b12242d3255acf0c5f6baa2040c142ec0e44ab7d71dadee9c7a0044f19baad766ab12
7
+ data.tar.gz: 9a72c13f648807796fd99181a0a7128c28e2717c2e9225f530b10b00ea8d8634f7c7f8944c2d426618a8d3c1418192f6d0b88647c6e897e3b650fa11807be63f
@@ -1 +1 @@
1
- 2.1.2
1
+ 2.2.2
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency 'hashie', '~> 2.0'
21
+ spec.add_dependency 'hashie'
22
22
  spec.add_dependency 'faraday'
23
23
 
24
24
  spec.add_development_dependency "minitest"
@@ -1,9 +1,9 @@
1
1
  require 'hashie'
2
2
 
3
3
  module Iframely
4
- class Model < Hashie::Dash
4
+ class Model < Hashie::Trash
5
5
 
6
- property :id, required: true
6
+ property :id # Оказывается бывает не всегда
7
7
  property :url, required: true
8
8
 
9
9
  property :meta
@@ -11,6 +11,8 @@ module Iframely
11
11
 
12
12
  property :rel
13
13
 
14
+ property :status
15
+
14
16
  # Может не быть. Например по ссылке:
15
17
  # https://github.com/imakewebthings/jquery-waypoints
16
18
  property :html
@@ -18,7 +20,7 @@ module Iframely
18
20
  def self.build json
19
21
  if json.is_a? Hash
20
22
  if json.include?('error')
21
- Iframely::ErrorModel.new json
23
+ Iframely::ErrorModel.new error: json['error'], json: json
22
24
  else
23
25
  new json
24
26
  end
@@ -26,7 +28,7 @@ module Iframely
26
28
  Iframely::ErrorModel.new error: 'no data'
27
29
  end
28
30
  rescue StandardError => e
29
- Iframely::ErrorModel.new error: e.message
31
+ Iframely::ErrorModel.new error: e.message, source: e
30
32
  end
31
33
 
32
34
  end
@@ -34,6 +36,8 @@ module Iframely
34
36
  class ErrorModel < Hashie::Dash
35
37
  # Если он установлен, значит это ошибка и больше смотреть нечего
36
38
  property :error, required: true
39
+ property :json
40
+ property :source
37
41
  end
38
42
 
39
43
  end
@@ -1,3 +1,3 @@
1
1
  module Iframely
2
- VERSION = "0.0.4"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iframely
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danil Pismenny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-18 00:00:00.000000000 Z
11
+ date: 2015-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubyforge_project:
139
- rubygems_version: 2.2.2
139
+ rubygems_version: 2.4.5
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: iframe.ly ruby client