embedly 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,4 +1,49 @@
1
+ *embedly-1.3.0 (12 Sep 2011)
2
+
3
+ 12 Sep 2011: Russ Bradberry, Bob Corsaro <bob@embed.ly>
4
+ Adds Typhoeus support
5
+
6
+ 12 Sep 2011: Russ Bradberry
7
+ Adds timeout support
8
+
9
+ *embedly-1.2.0 (12 Sep 2011)
10
+
11
+ 12 Sep 2011: Felipe Elias Philipp <j@felipeelias.info>
12
+ Adds Configuration class to make configuration Embedly simpler
13
+
14
+ *embedly-1.1.0 (7 Sep 2011)
15
+
16
+ 7 Sep 2011: Felipe Elias Philipp <j@felipeelias.info>
17
+ Improves CLI
18
+
19
+ 7 Sep 2011: Bob Corsaro <bob@embed.ly>
20
+ Support OAuth
21
+
22
+ 7 Sep 2011: Bob Corsaro <bob@embed.ly>
23
+ Update specs
24
+
25
+
26
+ *embedly-1.0.0 (22 Jun 2011)
27
+
28
+ 22 Jun 2011: Bob Corsaro <bob@embed.ly>
29
+ Support changes to API
30
+
31
+ 22 Jun 2011: Bob Corsaro <bob@embed.ly>
32
+ Adds header, host and no-key CLI args
33
+
34
+ 22 Jun 2011: Bob Corsaro <bob@embed.ly>
35
+ Better exception handling
36
+
37
+ *embedly-0.4.0 (20 May 2011)
38
+
39
+ 20 May 2011: Bob Corsaro <bob@embed.ly>
40
+ Support hostnames without tlds
41
+
42
+ 20 May 2011: Bob Corsaro <bob@embed.ly>
43
+ Bug fixes
44
+
1
45
  *embedly-0.3.3 (20 Feb 2011)
46
+
2
47
  20 Feb 2011: Bob Corsaro <bob@embed.ly>
3
48
  Fixes namespace issue
4
49
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.4.0
data/lib/embedly/api.rb CHANGED
@@ -152,7 +152,7 @@ class Embedly::API
152
152
  end
153
153
  else
154
154
  logger.debug { response }
155
- raise Embedly::BadResponseException.new response
155
+ raise Embedly::BadResponseException.new(response, path)
156
156
  end
157
157
 
158
158
  # re-insert rejects into response
@@ -1,5 +1,6 @@
1
1
  require "optparse"
2
2
 
3
+ Embedly.configuration.typhoeus = true
3
4
  module Embedly
4
5
  class CommandLine
5
6
 
@@ -31,6 +32,7 @@ module Embedly
31
32
  {
32
33
  :key => ENV['EMBEDLY_KEY'],
33
34
  :secret => ENV['EMBEDLY_SECRET'],
35
+ :timeout => nil,
34
36
  :headers => {},
35
37
  :query => {},
36
38
  :typhoeus => true
@@ -81,6 +83,10 @@ Usage [OPTIONS] <url> [url] ..
81
83
  options[:secret] = nil
82
84
  end
83
85
 
86
+ parser.on("--timeout TIMEOUT", "Request timeout") do |timeout|
87
+ options[:timeout] = timeout.to_i
88
+ end
89
+
84
90
  parser.on("-o", "--option NAME=VALUE", "Set option to be passed as query param.") do |option|
85
91
  key, value = option.split('=')
86
92
  options[:query][key.to_sym] = value
@@ -1,7 +1,20 @@
1
1
  class Embedly::BadResponseException < RuntimeError
2
- attr_accessor :response
2
+ attr_accessor :response, :path
3
3
 
4
- def initialize response
4
+ def initialize(response, path = nil)
5
5
  @response ||= response
6
+ @path ||= path
7
+ end
8
+
9
+ def message
10
+ "Bad Response : #{@response.inspect} for path: #{@path.inspect}"
11
+ end
12
+
13
+ def inspect
14
+ self.message
15
+ end
16
+
17
+ def to_s
18
+ self.message
6
19
  end
7
20
  end
metadata CHANGED
@@ -1,127 +1,128 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: embedly
3
- version: !ruby/object:Gem::Version
4
- version: 1.3.0
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 1.4.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Bob Corsaro
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-12 00:00:00.000000000 -04:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+
13
+ date: 2011-11-17 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
16
  name: querystring
17
- requirement: &71434060 !ruby/object:Gem::Requirement
17
+ requirement: &id001 !ruby/object:Gem::Requirement
18
18
  none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
22
- version: '0'
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: "0"
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *71434060
26
- - !ruby/object:Gem::Dependency
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
27
  name: oauth
28
- requirement: &71433770 !ruby/object:Gem::Requirement
28
+ requirement: &id002 !ruby/object:Gem::Requirement
29
29
  none: false
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *71433770
37
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
38
  name: typhoeus
39
- requirement: &71433500 !ruby/object:Gem::Requirement
39
+ requirement: &id003 !ruby/object:Gem::Requirement
40
40
  none: false
41
- requirements:
42
- - - ! '>='
43
- - !ruby/object:Gem::Version
44
- version: '0'
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: "0"
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *71433500
48
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
49
49
  name: jeweler
50
- requirement: &71433250 !ruby/object:Gem::Requirement
50
+ requirement: &id004 !ruby/object:Gem::Requirement
51
51
  none: false
52
- requirements:
53
- - - ! '>='
54
- - !ruby/object:Gem::Version
55
- version: '0'
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: "0"
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *71433250
59
- - !ruby/object:Gem::Dependency
58
+ version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
60
60
  name: cucumber
61
- requirement: &71432930 !ruby/object:Gem::Requirement
61
+ requirement: &id005 !ruby/object:Gem::Requirement
62
62
  none: false
63
- requirements:
64
- - - ! '>='
65
- - !ruby/object:Gem::Version
66
- version: '0'
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: "0"
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *71432930
70
- - !ruby/object:Gem::Dependency
69
+ version_requirements: *id005
70
+ - !ruby/object:Gem::Dependency
71
71
  name: rake
72
- requirement: &71432640 !ruby/object:Gem::Requirement
72
+ requirement: &id006 !ruby/object:Gem::Requirement
73
73
  none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *71432640
81
- - !ruby/object:Gem::Dependency
80
+ version_requirements: *id006
81
+ - !ruby/object:Gem::Dependency
82
82
  name: rspec
83
- requirement: &71432350 !ruby/object:Gem::Requirement
83
+ requirement: &id007 !ruby/object:Gem::Requirement
84
84
  none: false
85
- requirements:
86
- - - ! '>='
87
- - !ruby/object:Gem::Version
88
- version: '0'
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: "0"
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *71432350
92
- - !ruby/object:Gem::Dependency
91
+ version_requirements: *id007
92
+ - !ruby/object:Gem::Dependency
93
93
  name: yard
94
- requirement: &71432060 !ruby/object:Gem::Requirement
94
+ requirement: &id008 !ruby/object:Gem::Requirement
95
95
  none: false
96
- requirements:
97
- - - ! '>='
98
- - !ruby/object:Gem::Version
99
- version: '0'
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: "0"
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *71432060
103
- - !ruby/object:Gem::Dependency
102
+ version_requirements: *id008
103
+ - !ruby/object:Gem::Dependency
104
104
  name: aruba
105
- requirement: &71431780 !ruby/object:Gem::Requirement
105
+ requirement: &id009 !ruby/object:Gem::Requirement
106
106
  none: false
107
- requirements:
108
- - - ! '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: "0"
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *71431780
113
+ version_requirements: *id009
114
114
  description: Ruby Embedly client library
115
115
  email: bob@embed.ly
116
- executables:
116
+ executables:
117
117
  - embedly_objectify
118
118
  - embedly_oembed
119
119
  - embedly_preview
120
120
  extensions: []
121
- extra_rdoc_files:
121
+
122
+ extra_rdoc_files:
122
123
  - ChangeLog
123
124
  - README.rdoc
124
- files:
125
+ files:
125
126
  - .rvmrc
126
127
  - ChangeLog
127
128
  - Gemfile
@@ -148,33 +149,35 @@ files:
148
149
  - spec/embedly/command_line_spec.rb
149
150
  - spec/embedly/configuration_spec.rb
150
151
  - spec/spec_helper.rb
151
- has_rdoc: true
152
152
  homepage: http://github.com/embedly/embedly-ruby
153
- licenses:
153
+ licenses:
154
154
  - MIT
155
155
  post_install_message:
156
156
  rdoc_options: []
157
- require_paths:
157
+
158
+ require_paths:
158
159
  - lib
159
- required_ruby_version: !ruby/object:Gem::Requirement
160
+ required_ruby_version: !ruby/object:Gem::Requirement
160
161
  none: false
161
- requirements:
162
- - - ! '>='
163
- - !ruby/object:Gem::Version
164
- version: '0'
165
- segments:
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ hash: 3045233416894458240
166
+ segments:
166
167
  - 0
167
- hash: 990086959
168
- required_rubygems_version: !ruby/object:Gem::Requirement
168
+ version: "0"
169
+ required_rubygems_version: !ruby/object:Gem::Requirement
169
170
  none: false
170
- requirements:
171
- - - ! '>='
172
- - !ruby/object:Gem::Version
173
- version: '0'
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: "0"
174
175
  requirements: []
176
+
175
177
  rubyforge_project:
176
- rubygems_version: 1.6.2
178
+ rubygems_version: 1.8.11
177
179
  signing_key:
178
180
  specification_version: 3
179
181
  summary: Ruby Embedly client library
180
182
  test_files: []
183
+