lib/cloudkick/base.rb in cloudkick-0.2.3 vs lib/cloudkick/base.rb in cloudkick-0.2.4

- old
+ new

@@ -10,24 +10,24 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'oauth' +require 'openssl' module Cloudkick class Base + OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE - BASE_URL = 'https://api.cloudkick.com' - def initialize(consumer_key, consumer_secret) @@key = consumer_key @@secret = consumer_secret end def consumer @@consumer ||= OAuth::Consumer.new(@@key, @@secret, - :site => BASE_URL, + :site => 'https://api.cloudkick.com', :http_method => :get) end def access_token @@access_token ||= OAuth::AccessToken.new(consumer) @@ -36,8 +36,7 @@ def get(type, query=nil) if type == 'nodes' Cloudkick::Nodes.new(query) end end - end end