5 files changed, 35 insertions(+), 35 deletions(-)
M README.rdoc
M Rakefile
R lib/{wufoo_party.rb => wuparty.rb}
R test/{wufoo_party_test.rb => wuparty_test.rb}
R wufoo_party.gemspec => wuparty.gemspec
M README.rdoc => README.rdoc +10 -10
@@ 1,6 1,6 @@
-= WufooParty
+= WuParty
-WufooParty is a fairly lightweight wrapper for Wufoo's REST API[http://wufoo.com/docs/api/v3]
+WuParty is a fairly lightweight wrapper for Wufoo's REST API[http://wufoo.com/docs/api/v3]
using HTTParty[http://httparty.rubyforge.org].
== API Support
@@ 15,23 15,23 @@ Make sure you have latest version installed (1.0.0 or higher).
== Source & Download
-* {Homepage & Demo}[http://wufooparty.71m.us]
-* {Source Code}[http://github.com/seven1m/wufoo_party]
-* {RDoc Documentation}[http://seven1m.github.com/wufoo_party]
+* {Homepage & Demo}[http://wuparty.71m.us]
+* {Source Code}[http://github.com/seven1m/wuparty]
+* {RDoc Documentation}[http://seven1m.github.com/wuparty]
== Installation
- gem install wufoo_party
+ gem install wuparty
== Usage
- require 'wufoo_party'
+ require 'wuparty'
ACCOUNT = 'accountname'
API_KEY = 'AAAA-BBBB-CCCC-DDDD'
FORM_ID = 'my-form-id'
- wufoo = WufooParty.new(ACCOUNT, API_KEY)
+ wufoo = WuParty.new(ACCOUNT, API_KEY)
wufoo.forms # list all accessible forms and details
form = wufoo.form(FORM_ID) # or details for a specific form
@@ 54,7 54,7 @@ Make sure you have latest version installed (1.0.0 or higher).
== Feedback
I’d love to hear from you if you have suggestions for improvement, bug fixes, or whatever.
-Email me at mailto:tim@timmorgan.org or fork the project[http://github.com/seven1m/wufoo_party] and send a pull request.
+Email me at mailto:tim@timmorgan.org or fork the project[http://github.com/seven1m/wuparty] and send a pull request.
http://timmorgan.org
@@ 67,7 67,7 @@ Make the name field required. Then run:
WUFOO_ACCOUNT=accountname \
WUFOO_API_KEY=AAAA-BBBB-CCCC-DDDD \
WUFOO_FORM_ID=test-form \
- ruby -rrubygems test/wufoo_party_test.rb
+ ruby -rrubygems test/wuparty_test.rb
== License
M Rakefile => Rakefile +3 -3
@@ 1,10 1,10 @@
require 'hanna/rdoctask'
Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_files.include('README.rdoc', 'lib/wufoo_party.rb')
+ rdoc.rdoc_files.include('README.rdoc', 'lib/wuparty.rb')
rdoc.main = "README.rdoc"
- rdoc.title = "WufooParty"
+ rdoc.title = "WuParty"
rdoc.rdoc_dir = 'doc'
- rdoc.options << '--webcvs=http://github.com/seven1m/wufoo_party/tree/master/%s'
+ rdoc.options << '--webcvs=http://github.com/seven1m/wuparty/tree/master/%s'
end
R lib/wufoo_party.rb => lib/wuparty.rb +13 -13
@@ 70,11 70,11 @@ module HTTParty
end
# :startdoc:
-class WufooParty
+class WuParty
include HTTParty
format :json
- VERSION = '1.0.1'
+ VERSION = '1.0.2'
# Represents a general error connecting to the Wufoo service
class ConnectionError < RuntimeError; end
@@ 93,7 93,7 @@ class WufooParty
ENDPOINT = 'https://%s.wufoo.com/api/v3'
API_VERSION = '3.0'
- # Create a new WufooParty object
+ # Create a new WuParty object
def initialize(account, api_key)
@account = account
@api_key = api_key
@@ 180,9 180,9 @@ class WufooParty
if options[:party]
@party = options[:party]
elsif options[:account] and options[:api_key]
- @party = WufooParty.new(options[:account], options[:api_key])
+ @party = WuParty.new(options[:account], options[:api_key])
else
- raise WufooParty::InitializationException, "You must either specify a :party object or pass the :account and :api_key options. Please see the README."
+ raise WuParty::InitializationException, "You must either specify a :party object or pass the :account and :api_key options. Please see the README."
end
@details = options[:details]
end
@@ 193,12 193,12 @@ class WufooParty
# Wraps an individual Wufoo Form.
# == Instantiation
# There are two ways to instantiate a Form object:
- # 1. Via the parent WufooParty object that represents the account.
- # 2. Via the WufooParty::Form class directly.
- # wufoo = WufooParty.new(ACCOUNT, API_KEY)
+ # 1. Via the parent WuParty object that represents the account.
+ # 2. Via the WuParty::Form class directly.
+ # wufoo = WuParty.new(ACCOUNT, API_KEY)
# form = wufoo.form(FORM_ID)
# # or...
- # form = WufooParty::Form.new(FORM_ID, :account => ACCOUNT, :api_key => API_KEY)
+ # form = WuParty::Form.new(FORM_ID, :account => ACCOUNT, :api_key => API_KEY)
# The first technique makes a call to the Wufoo API to get the form details,
# while the second technique lazily loads the form details, once something is accessed via [].
# == \Form Details
@@ 297,12 297,12 @@ class WufooParty
# Wraps an individual Wufoo Report.
# == Instantiation
# There are two ways to instantiate a Report object:
- # 1. Via the parent WufooParty object that represents the account.
- # 2. Via the WufooParty::Report class directly.
- # wufoo = WufooParty.new(ACCOUNT, API_KEY)
+ # 1. Via the parent WuParty object that represents the account.
+ # 2. Via the WuParty::Report class directly.
+ # wufoo = WuParty.new(ACCOUNT, API_KEY)
# report = wufoo.report(REPORT_ID)
# # or...
- # report = WufooParty::Report.new(REPORT_ID, :account => ACCOUNT, :api_key => API_KEY)
+ # report = WuParty::Report.new(REPORT_ID, :account => ACCOUNT, :api_key => API_KEY)
# The first technique makes a call to the Wufoo API to get the report details,
# while the second technique lazily loads the report details, once something is accessed via [].
# == \Report Details
R test/wufoo_party_test.rb => test/wuparty_test.rb +5 -5
@@ 1,7 1,7 @@
-require File.dirname(__FILE__) + '/../lib/wufoo_party'
+require File.dirname(__FILE__) + '/../lib/wuparty'
require 'test/unit'
-class WufooPartyTest < Test::Unit::TestCase
+class WuPartyTest < Test::Unit::TestCase
# Must create a form called "Test Form" and pass in its id
# via the ENV variable WUFOO_FORM_ID.
@@ 10,7 10,7 @@ class WufooPartyTest < Test::Unit::TestCase
def setup
if ENV['WUFOO_ACCOUNT'] and ENV['WUFOO_API_KEY'] and ENV['WUFOO_FORM_ID']
- @wufoo = WufooParty.new(ENV['WUFOO_ACCOUNT'], ENV['WUFOO_API_KEY'])
+ @wufoo = WuParty.new(ENV['WUFOO_ACCOUNT'], ENV['WUFOO_API_KEY'])
@form_id = ENV['WUFOO_FORM_ID']
else
puts 'Must set WUFOO_ACCOUNT, WUFOO_API_KEY and WUFOO_FORM_ID env variables before running.'
@@ 34,12 34,12 @@ class WufooPartyTest < Test::Unit::TestCase
end
def test_form_directly
- form = WufooParty::Form.new(@form_id, :account => ENV['WUFOO_ACCOUNT'], :api_key => ENV['WUFOO_API_KEY'])
+ form = WuParty::Form.new(@form_id, :account => ENV['WUFOO_ACCOUNT'], :api_key => ENV['WUFOO_API_KEY'])
assert_equal 'Test Form', form['Name']
end
def test_non_existent_form
- assert_raise WufooParty::HTTPError do
+ assert_raise WuParty::HTTPError do
@wufoo.form('does-not-exist')
end
end
R wufoo_party.gemspec => wuparty.gemspec +4 -4
@@ 1,11 1,11 @@
Gem::Specification.new do |s|
- s.name = "wufoo_party"
- s.version = "1.0.1"
+ s.name = "wuparty"
+ s.version = "1.0.2"
s.author = "Tim Morgan"
s.email = "tim@timmorgan.org"
- s.homepage = "http://seven1m.github.com/wufoo_party"
+ s.homepage = "http://seven1m.github.com/wuparty"
s.summary = "Ruby wrapper for Wufoo's REST API v3."
- s.files = %w(README.rdoc lib/wufoo_party.rb test/wufoo_party_test.rb)
+ s.files = %w(README.rdoc lib/wuparty.rb test/wuparty_test.rb)
s.require_path = "lib"
s.has_rdoc = true
s.add_dependency("httparty", ">= 0.6.1")