Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename Easies to Easy.

  • Loading branch information...
commit 0266649be912824e03a6cf28afc1f14eac2cb32f 1 parent 79abad9
@i0rek i0rek authored
Showing with 93 additions and 93 deletions.
  1. +18 −18 lib/ethon/easy.rb
  2. +1 −1  lib/ethon/{easies → easy}/callbacks.rb
  3. +5 −5 lib/ethon/{easies → easy}/form.rb
  4. +1 −1  lib/ethon/{easies → easy}/header.rb
  5. +10 −10 lib/ethon/{easies → easy}/http.rb
  6. +3 −3 lib/ethon/{easies → easy}/http/actionable.rb
  7. +3 −3 lib/ethon/{easies → easy}/http/delete.rb
  8. +3 −3 lib/ethon/{easies → easy}/http/get.rb
  9. +3 −3 lib/ethon/{easies → easy}/http/head.rb
  10. +3 −3 lib/ethon/{easies → easy}/http/options.rb
  11. +3 −3 lib/ethon/{easies → easy}/http/patch.rb
  12. +3 −3 lib/ethon/{easies → easy}/http/post.rb
  13. +1 −1  lib/ethon/{easies → easy}/http/postable.rb
  14. +3 −3 lib/ethon/{easies → easy}/http/put.rb
  15. +1 −1  lib/ethon/{easies → easy}/http/putable.rb
  16. +1 −1  lib/ethon/{easies → easy}/informations.rb
  17. +1 −1  lib/ethon/{easies → easy}/operations.rb
  18. +1 −1  lib/ethon/{easies → easy}/options.rb
  19. +5 −5 lib/ethon/{easies → easy}/params.rb
  20. +1 −1  lib/ethon/{easies → easy}/queryable.rb
  21. +1 −1  lib/ethon/{easies → easy}/response_callbacks.rb
  22. +1 −1  lib/ethon/{easies → easy}/util.rb
  23. +1 −1  spec/ethon/{easies → easy}/callbacks_spec.rb
  24. +2 −2 spec/ethon/{easies → easy}/form_spec.rb
  25. +1 −1  spec/ethon/{easies → easy}/header_spec.rb
  26. +1 −1  spec/ethon/{easies → easy}/http/delete_spec.rb
  27. +1 −1  spec/ethon/{easies → easy}/http/get_spec.rb
  28. +1 −1  spec/ethon/{easies → easy}/http/head_spec.rb
  29. +1 −1  spec/ethon/{easies → easy}/http/options_spec.rb
  30. +1 −1  spec/ethon/{easies → easy}/http/patch_spec.rb
  31. +1 −1  spec/ethon/{easies → easy}/http/post_spec.rb
  32. +1 −1  spec/ethon/{easies → easy}/http/put_spec.rb
  33. +2 −2 spec/ethon/{easies → easy}/http_spec.rb
  34. +1 −1  spec/ethon/{easies → easy}/informations_spec.rb
  35. +1 −1  spec/ethon/{easies → easy}/operations_spec.rb
  36. +1 −1  spec/ethon/{easies → easy}/options_spec.rb
  37. +2 −2 spec/ethon/{easies → easy}/queryable_spec.rb
  38. +1 −1  spec/ethon/{easies → easy}/response_callbacks_spec.rb
  39. +2 −2 spec/ethon/{easies → easy}/util_spec.rb
View
36 lib/ethon/easy.rb
@@ -1,13 +1,13 @@
-require 'ethon/easies/informations'
-require 'ethon/easies/callbacks'
-require 'ethon/easies/options'
-require 'ethon/easies/header'
-require 'ethon/easies/util'
-require 'ethon/easies/params'
-require 'ethon/easies/form'
-require 'ethon/easies/http'
-require 'ethon/easies/operations'
-require 'ethon/easies/response_callbacks'
+require 'ethon/easy/informations'
+require 'ethon/easy/callbacks'
+require 'ethon/easy/options'
+require 'ethon/easy/header'
+require 'ethon/easy/util'
+require 'ethon/easy/params'
+require 'ethon/easy/form'
+require 'ethon/easy/http'
+require 'ethon/easy/operations'
+require 'ethon/easy/response_callbacks'
module Ethon
@@ -32,13 +32,13 @@ module Ethon
#
# @see initialize
class Easy
- include Ethon::Easies::Informations
- include Ethon::Easies::Callbacks
- include Ethon::Easies::Options
- include Ethon::Easies::Header
- include Ethon::Easies::Http
- include Ethon::Easies::Operations
- include Ethon::Easies::ResponseCallbacks
+ include Ethon::Easy::Informations
+ include Ethon::Easy::Callbacks
+ include Ethon::Easy::Options
+ include Ethon::Easy::Header
+ include Ethon::Easy::Http
+ include Ethon::Easy::Operations
+ include Ethon::Easy::ResponseCallbacks
# Returns the curl return code.
#
@@ -844,7 +844,7 @@ def to_hash
:response_header => response_header,
:response_body => response_body
}
- Easies::Informations::AVAILABLE_INFORMATIONS.keys.each do |info|
+ Easy::Informations::AVAILABLE_INFORMATIONS.keys.each do |info|
@hash[info] = method(info).call
end
@hash
View
2  lib/ethon/easies/callbacks.rb → lib/ethon/easy/callbacks.rb
@@ -1,5 +1,5 @@
module Ethon
- module Easies
+ class Easy
# This module contains all the logic around the callbacks,
# which are needed to interact with libcurl.
View
10 lib/ethon/easies/form.rb → lib/ethon/easy/form.rb
@@ -1,15 +1,15 @@
-require 'ethon/easies/util'
-require 'ethon/easies/queryable'
+require 'ethon/easy/util'
+require 'ethon/easy/queryable'
module Ethon
- module Easies
+ class Easy
# This class represents a form and is used to send a payload in the
# request body via POST/PUT.
# It handles multipart forms, too.
class Form
- include Ethon::Easies::Util
- include Ethon::Easies::Queryable
+ include Ethon::Easy::Util
+ include Ethon::Easy::Queryable
# Return a new Form.
#
View
2  lib/ethon/easies/header.rb → lib/ethon/easy/header.rb
@@ -1,5 +1,5 @@
module Ethon
- module Easies
+ class Easy
# This module contains the logic around adding headers to libcurl.
module Header
View
20 lib/ethon/easies/http.rb → lib/ethon/easy/http.rb
@@ -1,14 +1,14 @@
-require 'ethon/easies/http/actionable'
-require 'ethon/easies/http/post'
-require 'ethon/easies/http/get'
-require 'ethon/easies/http/head'
-require 'ethon/easies/http/put'
-require 'ethon/easies/http/delete'
-require 'ethon/easies/http/patch'
-require 'ethon/easies/http/options'
+require 'ethon/easy/http/actionable'
+require 'ethon/easy/http/post'
+require 'ethon/easy/http/get'
+require 'ethon/easy/http/head'
+require 'ethon/easy/http/put'
+require 'ethon/easy/http/delete'
+require 'ethon/easy/http/patch'
+require 'ethon/easy/http/options'
module Ethon
- module Easies
+ class Easy
# This module contains logic about making valid http requests.
module Http
@@ -42,7 +42,7 @@ def http_request(url, action_name, options = {})
#
# @return [ Class ] The action class.
def fabricate(action_name)
- Ethon::Easies::Http.const_get(action_name.to_s.capitalize)
+ Ethon::Easy::Http.const_get(action_name.to_s.capitalize)
end
end
end
View
6 lib/ethon/easies/http/actionable.rb → lib/ethon/easy/http/actionable.rb
@@ -1,8 +1,8 @@
-require 'ethon/easies/http/putable'
-require 'ethon/easies/http/postable'
+require 'ethon/easy/http/putable'
+require 'ethon/easy/http/postable'
module Ethon
- module Easies
+ class Easy
module Http
# This module represents a Http Action and is a factory
# for more real actions like GET, HEAD, POST and PUT.
View
6 lib/ethon/easies/http/delete.rb → lib/ethon/easy/http/delete.rb
@@ -1,11 +1,11 @@
module Ethon
- module Easies
+ class Easy
module Http
# This class knows everything about making DELETE requests.
class Delete
- include Ethon::Easies::Http::Actionable
- include Ethon::Easies::Http::Postable
+ include Ethon::Easy::Http::Actionable
+ include Ethon::Easy::Http::Postable
# Setup easy to make a DELETE request.
#
View
6 lib/ethon/easies/http/get.rb → lib/ethon/easy/http/get.rb
@@ -1,11 +1,11 @@
module Ethon
- module Easies
+ class Easy
module Http
# This class knows everything about making GET requests.
class Get
- include Ethon::Easies::Http::Actionable
- include Ethon::Easies::Http::Postable
+ include Ethon::Easy::Http::Actionable
+ include Ethon::Easy::Http::Postable
# Setup easy to make a GET request.
#
View
6 lib/ethon/easies/http/head.rb → lib/ethon/easy/http/head.rb
@@ -1,11 +1,11 @@
module Ethon
- module Easies
+ class Easy
module Http
# This class knows everything about making HEAD requests.
class Head
- include Ethon::Easies::Http::Actionable
- include Ethon::Easies::Http::Postable
+ include Ethon::Easy::Http::Actionable
+ include Ethon::Easy::Http::Postable
# Setup easy to make a HEAD request.
#
View
6 lib/ethon/easies/http/options.rb → lib/ethon/easy/http/options.rb
@@ -1,11 +1,11 @@
module Ethon
- module Easies
+ class Easy
module Http
# This class knows everything about making OPTIONS requests.
class Options
- include Ethon::Easies::Http::Actionable
- include Ethon::Easies::Http::Postable
+ include Ethon::Easy::Http::Actionable
+ include Ethon::Easy::Http::Postable
# Setup easy to make a OPTIONS request.
#
View
6 lib/ethon/easies/http/patch.rb → lib/ethon/easy/http/patch.rb
@@ -1,11 +1,11 @@
module Ethon
- module Easies
+ class Easy
module Http
# This class knows everything about making PATCH requests.
class Patch
- include Ethon::Easies::Http::Actionable
- include Ethon::Easies::Http::Postable
+ include Ethon::Easy::Http::Actionable
+ include Ethon::Easy::Http::Postable
# Setup easy to make a PATCH request.
#
View
6 lib/ethon/easies/http/post.rb → lib/ethon/easy/http/post.rb
@@ -1,10 +1,10 @@
module Ethon
- module Easies
+ class Easy
module Http
# This class knows everything about making POST requests.
class Post
- include Ethon::Easies::Http::Actionable
- include Ethon::Easies::Http::Postable
+ include Ethon::Easy::Http::Actionable
+ include Ethon::Easy::Http::Postable
# Setup easy to make a POST request.
#
View
2  lib/ethon/easies/http/postable.rb → lib/ethon/easy/http/postable.rb
@@ -1,5 +1,5 @@
module Ethon
- module Easies
+ class Easy
module Http
# This module contains logic for setting up a [multipart] POST body.
View
6 lib/ethon/easies/http/put.rb → lib/ethon/easy/http/put.rb
@@ -1,11 +1,11 @@
module Ethon
- module Easies
+ class Easy
module Http
# This class knows everything about making PUT requests.
class Put
- include Ethon::Easies::Http::Actionable
- include Ethon::Easies::Http::Putable
+ include Ethon::Easy::Http::Actionable
+ include Ethon::Easy::Http::Putable
# Setup easy to make a PUT request.
#
View
2  lib/ethon/easies/http/putable.rb → lib/ethon/easy/http/putable.rb
@@ -1,5 +1,5 @@
module Ethon
- module Easies
+ class Easy
module Http
# This module contains logic about setting up a PUT body.
View
2  lib/ethon/easies/informations.rb → lib/ethon/easy/informations.rb
@@ -1,5 +1,5 @@
module Ethon
- module Easies
+ class Easy
# This module contains the methods to return informations
# from the easy handle. See http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html
View
2  lib/ethon/easies/operations.rb → lib/ethon/easy/operations.rb
@@ -1,5 +1,5 @@
module Ethon
- module Easies
+ class Easy
# This module contains the logic to prepare and perform
# an easy.
module Operations
View
2  lib/ethon/easies/options.rb → lib/ethon/easy/options.rb
@@ -1,5 +1,5 @@
module Ethon
- module Easies
+ class Easy
# This module contains the logic and knowledge about the
# available options on easy.
View
10 lib/ethon/easies/params.rb → lib/ethon/easy/params.rb
@@ -1,13 +1,13 @@
-require 'ethon/easies/util'
-require 'ethon/easies/queryable'
+require 'ethon/easy/util'
+require 'ethon/easy/queryable'
module Ethon
- module Easies
+ class Easy
# This class represents http request parameters.
class Params
- include Ethon::Easies::Util
- include Ethon::Easies::Queryable
+ include Ethon::Easy::Util
+ include Ethon::Easy::Queryable
# Create a new Params.
#
View
2  lib/ethon/easies/queryable.rb → lib/ethon/easy/queryable.rb
@@ -1,5 +1,5 @@
module Ethon
- module Easies
+ class Easy
# This module contains logic about building
# query parameters for url or form.
View
2  lib/ethon/easies/response_callbacks.rb → lib/ethon/easy/response_callbacks.rb
@@ -1,5 +1,5 @@
module Ethon
- module Easies
+ class Easy
# This module contains the logic for the response callbacks.
# The on_complete callback is the only one at the moment.
View
2  lib/ethon/easies/util.rb → lib/ethon/easy/util.rb
@@ -1,5 +1,5 @@
module Ethon
- module Easies # :nodoc:
+ class Easy # :nodoc:
# This module contains small helpers.
module Util
View
2  spec/ethon/easies/callbacks_spec.rb → spec/ethon/easy/callbacks_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Callbacks do
+describe Ethon::Easy::Callbacks do
let(:easy) { Ethon::Easy.new }
describe "#set_callbacks" do
View
4 spec/ethon/easies/form_spec.rb → spec/ethon/easy/form_spec.rb
@@ -1,9 +1,9 @@
require 'spec_helper'
-describe Ethon::Easies::Form do
+describe Ethon::Easy::Form do
let(:hash) { {} }
let!(:easy) { Ethon::Easy.new }
- let(:form) { Ethon::Easies::Form.new(easy, hash) }
+ let(:form) { Ethon::Easy::Form.new(easy, hash) }
describe ".new" do
it "defines finalizer" do
View
2  spec/ethon/easies/header_spec.rb → spec/ethon/easy/header_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Header do
+describe Ethon::Easy::Header do
let(:easy) { Ethon::Easy.new }
describe "#set_headers" do
View
2  spec/ethon/easies/http/delete_spec.rb → spec/ethon/easy/http/delete_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Http::Delete do
+describe Ethon::Easy::Http::Delete do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
View
2  spec/ethon/easies/http/get_spec.rb → spec/ethon/easy/http/get_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Http::Get do
+describe Ethon::Easy::Http::Get do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
View
2  spec/ethon/easies/http/head_spec.rb → spec/ethon/easy/http/head_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Http::Head do
+describe Ethon::Easy::Http::Head do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
View
2  spec/ethon/easies/http/options_spec.rb → spec/ethon/easy/http/options_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Http::Options do
+describe Ethon::Easy::Http::Options do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
View
2  spec/ethon/easies/http/patch_spec.rb → spec/ethon/easy/http/patch_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Http::Patch do
+describe Ethon::Easy::Http::Patch do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
View
2  spec/ethon/easies/http/post_spec.rb → spec/ethon/easy/http/post_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Http::Post do
+describe Ethon::Easy::Http::Post do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
View
2  spec/ethon/easies/http/put_spec.rb → spec/ethon/easy/http/put_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Http::Put do
+describe Ethon::Easy::Http::Put do
let(:easy) { Ethon::Easy.new }
let(:url) { "http://localhost:3001/" }
let(:params) { nil }
View
4 spec/ethon/easies/http_spec.rb → spec/ethon/easy/http_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Http do
+describe Ethon::Easy::Http do
let(:easy) { Ethon::Easy.new }
describe "#http_request" do
@@ -9,7 +9,7 @@
let(:options) { {} }
let(:get) { mock(:setup) }
- let(:get_class) { Ethon::Easies::Http::Get }
+ let(:get_class) { Ethon::Easy::Http::Get }
it "instanciates action" do
get.should_receive(:setup)
View
2  spec/ethon/easies/informations_spec.rb → spec/ethon/easy/informations_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Informations do
+describe Ethon::Easy::Informations do
let(:easy) { Ethon::Easy.new }
before do
View
2  spec/ethon/easies/operations_spec.rb → spec/ethon/easy/operations_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Operations do
+describe Ethon::Easy::Operations do
let(:easy) { Ethon::Easy.new }
describe "#handle" do
View
2  spec/ethon/easies/options_spec.rb → spec/ethon/easy/options_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::Options do
+describe Ethon::Easy::Options do
let(:easy) { Ethon::Easy.new }
describe "options" do
View
4 spec/ethon/easies/queryable_spec.rb → spec/ethon/easy/queryable_spec.rb
@@ -1,10 +1,10 @@
# encoding: utf-8
require 'spec_helper'
-describe Ethon::Easies::Queryable do
+describe Ethon::Easy::Queryable do
let(:hash) { {} }
let!(:easy) { Ethon::Easy.new }
- let(:params) { Ethon::Easies::Params.new(easy, hash) }
+ let(:params) { Ethon::Easy::Params.new(easy, hash) }
describe "#to_s" do
context "when query_pairs empty" do
View
2  spec/ethon/easies/response_callbacks_spec.rb → spec/ethon/easy/response_callbacks_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Ethon::Easies::ResponseCallbacks do
+describe Ethon::Easy::ResponseCallbacks do
let(:easy) { Ethon::Easy.new }
describe "#on_complete" do
View
4 spec/ethon/easies/util_spec.rb → spec/ethon/easy/util_spec.rb
@@ -1,8 +1,8 @@
require 'spec_helper'
-describe Ethon::Easies::Util do
+describe Ethon::Easy::Util do
class Dummy
- include Ethon::Easies::Util
+ include Ethon::Easy::Util
end
let(:klass) { Dummy.new }
Please sign in to comment.
Something went wrong with that request. Please try again.