Permalink
Browse files

renamed zendesk-api.rb file to zendesk_api.rb. fixes bug with bundler…

… replacing dashes with slashes for files names
  • Loading branch information...
jordanandree
jordanandree committed Oct 11, 2012
1 parent 86e03e8 commit 5bb1b9e2fd407786d4ca37ecea3fe0e862bc3263
View
@@ -3,7 +3,7 @@ README.markdown
Rakefile
geminstaller.yml
lib/console.rb
-lib/zendesk-api.rb
+lib/zendesk_api.rb
lib/zendesk.rb
lib/zendesk/attachment.rb
lib/zendesk/entry.rb
View
@@ -1,4 +1,4 @@
-require 'lib/zendesk-api'
+require 'lib/zendesk_api'
puts <<-TXT
Stuff here to explain what it does
TXT
File renamed without changes.
@@ -1,5 +1,5 @@
require "spec"
-require 'zendesk-api'
+require 'zendesk_api'
describe Zendesk::Main do
describe "basic" do
@@ -106,18 +106,18 @@
describe "#self.to_xml" do
context "comments" do
it "should output correctly formatted XML" do
- input = {"value" => "new comment", "public" => true}
+ input = {"public" => true,"value" => "new comment"}
xml = Zendesk::Main.to_xml('comment', input)
xml.should =~ /<comment>\s*<public type=\"boolean\">true<\/public>\s*<value>new comment<\/value>\s*<\/comment>/
end
end
context "tickets" do
it "should output correctly formatted XML" do
- input = {"subject" => "rspec rulez", "description" => "description", "status_id"=>1}
+ input = {"subject" => "rspec rulez","status_id"=>1,"description" => "description"}
xml = Zendesk::Main.to_xml('ticket', input)
xml.should =~ /<ticket>\s*<subject>rspec rulez<\/subject>\s*<status-id type=\"integer\">1<\/status-id>\s*<description>description<\/description>\s*<\/ticket>/
end
end
end
-end
+end
View
@@ -1,5 +1,5 @@
require "spec"
-require 'zendesk-api'
+require 'zendesk_api'
describe Zendesk::Main, 'user api' do
# before do
@@ -34,40 +34,40 @@
body=Zendesk::Main.to_xml('user', data)
curl.should_receive(:http_post).with(body)
curl.stub!(:header_str) { "\r\ntest: blah"}
- curl.stub!(:response_code).and_return(200)
+ curl.stub!(:response_code).and_return(200)
curl
- end
+ end
zendesk = Zendesk::Main.new('my_company', "some_login", "some_password")
response = zendesk.update_user(39,data)
response.curl.headers["X-Http-Method-Override"].should == "put"
response.url.should =~ %r{/users/39.xml$}
response.status.should == 200
end
-
- it "should be able to get" do
+
+ it "should be able to get" do
curl_object = Curl::Easy.method(:new)
Curl::Easy.stub!(:new).and_return do |*args|
curl = curl_object.call(*args)
curl.stub!(:perform)
curl.stub!(:header_str) { "\r\ntest: blah"}
- curl.stub!(:response_code).and_return(200)
+ curl.stub!(:response_code).and_return(200)
curl
- end
+ end
zendesk = Zendesk::Main.new('my_company', "some_login", "some_password")
response = zendesk.get_user(13)
response.url.should =~ %r{/users/13.xml$}
response.status.should == 200
end
-
+
it "should be able to list all" do
curl_object = Curl::Easy.method(:new)
Curl::Easy.stub!(:new).and_return do |*args|
curl = curl_object.call(*args)
curl.stub!(:perform)
curl.stub!(:header_str) { "\r\ntest: blah"}
- curl.stub!(:response_code).and_return(200)
+ curl.stub!(:response_code).and_return(200)
curl
- end
+ end
zendesk = Zendesk::Main.new('my_company', "some_login", "some_password")
response = zendesk.get_users
response.url.should =~ %r{/users.xml$}
@@ -80,13 +80,13 @@
curl = curl_object.call(*args)
curl.stub!(:http_delete)
curl.stub!(:perform)
- curl.stub!(:response_code).and_return(200)
+ curl.stub!(:response_code).and_return(200)
curl.stub!(:header_str) { "\r\nadsf\r\ndsaf"}
curl
- end
+ end
zendesk = Zendesk::Main.new('my_company', "some_login", "some_password")
response = zendesk.delete_user(12)
response.url.should =~ %r{/users/12.xml}
response.status.should == 200
end
-end
+end
View
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
s.date = %q{2010-12-27}
s.description = %q{RubyGem wrapper for REST API to http://zendesk.com}
s.email = %q{pg.ericson@gmail.com}
- s.extra_rdoc_files = ["README.markdown", "lib/console.rb", "lib/zendesk-api.rb", "lib/zendesk.rb", "lib/zendesk/attachment.rb", "lib/zendesk/comment.rb", "lib/zendesk/entry.rb", "lib/zendesk/forum.rb", "lib/zendesk/group.rb", "lib/zendesk/main.rb", "lib/zendesk/organization.rb", "lib/zendesk/search.rb", "lib/zendesk/tag.rb", "lib/zendesk/ticket.rb", "lib/zendesk/user.rb", "lib/zendesk/user_identity.rb"]
- s.files = ["Manifest", "README.markdown", "Rakefile", "geminstaller.yml", "lib/console.rb", "lib/zendesk-api.rb", "lib/zendesk.rb", "lib/zendesk/attachment.rb", "lib/zendesk/comment.rb", "lib/zendesk/entry.rb", "lib/zendesk/forum.rb", "lib/zendesk/group.rb", "lib/zendesk/main.rb", "lib/zendesk/organization.rb", "lib/zendesk/search.rb", "lib/zendesk/tag.rb", "lib/zendesk/ticket.rb", "lib/zendesk/user.rb", "lib/zendesk/user_identity.rb", "spec/zendesk/main_spec.rb", "spec/zendesk/user_spec.rb", "zendesk-api.gemspec"]
+ s.extra_rdoc_files = ["README.markdown", "lib/console.rb", "lib/zendesk_api.rb", "lib/zendesk.rb", "lib/zendesk/attachment.rb", "lib/zendesk/comment.rb", "lib/zendesk/entry.rb", "lib/zendesk/forum.rb", "lib/zendesk/group.rb", "lib/zendesk/main.rb", "lib/zendesk/organization.rb", "lib/zendesk/search.rb", "lib/zendesk/tag.rb", "lib/zendesk/ticket.rb", "lib/zendesk/user.rb", "lib/zendesk/user_identity.rb"]
+ s.files = ["Manifest", "README.markdown", "Rakefile", "geminstaller.yml", "lib/console.rb", "lib/zendesk_api.rb", "lib/zendesk.rb", "lib/zendesk/attachment.rb", "lib/zendesk/comment.rb", "lib/zendesk/entry.rb", "lib/zendesk/forum.rb", "lib/zendesk/group.rb", "lib/zendesk/main.rb", "lib/zendesk/organization.rb", "lib/zendesk/search.rb", "lib/zendesk/tag.rb", "lib/zendesk/ticket.rb", "lib/zendesk/user.rb", "lib/zendesk/user_identity.rb", "spec/zendesk/main_spec.rb", "spec/zendesk/user_spec.rb", "zendesk-api.gemspec"]
s.homepage = %q{http://github.com/pgericson/zendesk-api}
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Zendesk-api", "--main", "README.markdown"]
s.require_paths = ["lib"]

1 comment on commit 5bb1b9e

Contributor

yyyc514 commented on 5bb1b9e Jan 30, 2013

Can a new gem please be pushed so I don't have to pull this gem from github?

Please sign in to comment.