frenetic 0.0.20.alpha.0 → 0.0.20.alpha.1

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.
data/README.md CHANGED
@@ -99,6 +99,29 @@ more information.
99
99
 
100
100
 
101
101
 
102
+ ## New in Version 0.0.20
103
+
104
+ Version 0.0.20 features a complete top-to-bottom rewrite. Mostly this removes
105
+ a lot of the meta-programming magic that I previously used to created Ruby
106
+ object representations of resources.
107
+
108
+ The overall API should remain pretty similar, but there may be some spots that
109
+ are different.
110
+
111
+ In general, writing custom `Frenetic::Resource`s should require *a lot* less
112
+ code now as Frenetic handles the common use cases for you.
113
+
114
+ ### TODO Items
115
+
116
+ * Support `POST`
117
+ * Support `PUT`
118
+ * Support `PATCH`
119
+ * Support `DELETE`
120
+
121
+
122
+
123
+
124
+
102
125
  ## Configuring
103
126
 
104
127
  ### Client Initialization
@@ -210,6 +233,23 @@ the Rack::Cache middleware.
210
233
  **TODO**
211
234
 
212
235
 
236
+ #### Faraday Adapters
237
+
238
+ By default, Frenetic is configured to use Faraday's default adapter (usually
239
+ Net::HTTP). You can change this with the `adapter` option:
240
+
241
+ ```ruby
242
+ Frenetic.new( url:url, adapter: :patron )
243
+ ```
244
+
245
+ Frenetic accepts any of the [Faraday adapter shortcuts][adapters], or an instance
246
+ of the adapter itself:
247
+
248
+ ```ruby
249
+ Frenetic.new( url:url, adapter:Faraday::Adapter::Patron )
250
+ ```
251
+
252
+
213
253
  #### Faraday Middleware
214
254
 
215
255
  Frenetic will yield its internal Faraday connection during initialization:
@@ -301,5 +341,6 @@ ideas on how to support other Hypermedia formats like [Collection+JSON][coll_jso
301
341
  [spire.io]: http://api.spire.io/
302
342
  [caching]: #response-caching
303
343
  [faraday]: https://github.com/technoweenie/faraday
344
+ [adapters]: https://github.com/lostisland/faraday/blob/c26a060acdd9eae356409c2ca79f1c22f8263de9/lib/faraday/adapter.rb#L7-L17
304
345
  [rack_cache]: https://github.com/rtomayko/rack-cache
305
346
  [coll_json]: http://amundsen.com/media-types/collection/
@@ -2,11 +2,11 @@ require 'socket'
2
2
  require 'faraday'
3
3
  require 'faraday_middleware'
4
4
 
5
+ require 'frenetic/version'
5
6
  require 'frenetic/concerns/configurable'
6
7
  require 'frenetic/middleware/hal_json'
7
8
  require 'frenetic/resource'
8
9
  require 'frenetic/resource_collection'
9
- require 'frenetic/version'
10
10
 
11
11
  class Frenetic
12
12
  extend Forwardable
@@ -16,7 +16,7 @@ class Frenetic
16
16
  end
17
17
 
18
18
  def adapter
19
- @_cfg[:adapter] || :net_http
19
+ @_cfg[:adapter] || Faraday.default_adapter
20
20
  end
21
21
 
22
22
  def api_token
@@ -1,3 +1,3 @@
1
1
  class Frenetic
2
- VERSION = '0.0.20.alpha.0'
2
+ VERSION = '0.0.20.alpha.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frenetic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20.alpha.0
4
+ version: 0.0.20.alpha.1
5
5
  prerelease: 7
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-10 00:00:00.000000000 Z
12
+ date: 2013-05-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -193,7 +193,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
193
193
  version: '0'
194
194
  segments:
195
195
  - 0
196
- hash: 1697722815283438357
196
+ hash: 3155215012815263773
197
197
  required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  none: false
199
199
  requirements: