aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource')
-rw-r--r--activeresource/README.rdoc24
-rwxr-xr-xactiveresource/Rakefile4
-rw-r--r--activeresource/activeresource.gemspec2
-rw-r--r--activeresource/lib/active_resource/base.rb2
-rw-r--r--activeresource/lib/active_resource/schema.rb10
-rw-r--r--activeresource/lib/active_resource/version.rb4
-rw-r--r--activeresource/test/cases/base/load_test.rb1
-rw-r--r--activeresource/test/cases/finder_test.rb2
-rw-r--r--activeresource/test/cases/log_subscriber_test.rb2
-rw-r--r--activeresource/test/cases/observing_test.rb2
10 files changed, 40 insertions, 13 deletions
diff --git a/activeresource/README.rdoc b/activeresource/README.rdoc
index afa25e1676..b03e8c4c25 100644
--- a/activeresource/README.rdoc
+++ b/activeresource/README.rdoc
@@ -20,6 +20,16 @@ Model classes are mapped to remote REST resources by Active Resource much the sa
tables. When a request is made to a remote resource, a REST XML request is generated, transmitted, and the result
received and serialized into a usable Ruby object.
+== Download and installation
+
+The latest version of Active Support can be installed with Rubygems:
+
+ % [sudo] gem install activeresource
+
+Source code can be downloaded as part of the Rails project on GitHub
+
+* https://github.com/rails/rails/tree/master/activeresource/
+
=== Configuration and Usage
Putting Active Resource to use is very similar to Active Record. It's as simple as creating a model class
@@ -160,6 +170,18 @@ Destruction of a resource can be invoked as a class and instance method of the r
Person.delete(2) # => true
Person.exists?(2) # => false
+== License
-You can find more usage information in the ActiveResource::Base documentation.
+Active Support is released under the MIT license.
+== Support
+
+API documentation is at
+
+* http://api.rubyonrails.org
+
+Bug reports and feature requests can be filed with the rest for the Ruby on Rails project here:
+
+* https://github.com/rails/rails/issues
+
+You can find more usage information in the ActiveResource::Base documentation.
diff --git a/activeresource/Rakefile b/activeresource/Rakefile
index 42e450da66..b1c18ff189 100755
--- a/activeresource/Rakefile
+++ b/activeresource/Rakefile
@@ -1,7 +1,7 @@
#!/usr/bin/env rake
require 'rake/testtask'
require 'rake/packagetask'
-require 'rake/gempackagetask'
+require 'rubygems/package_task'
desc "Default Task"
task :default => [ :test ]
@@ -26,7 +26,7 @@ end
spec = eval(File.read('activeresource.gemspec'))
-Rake::GemPackageTask.new(spec) do |p|
+Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec
end
diff --git a/activeresource/activeresource.gemspec b/activeresource/activeresource.gemspec
index 400a0d851d..a8772ecf8c 100644
--- a/activeresource/activeresource.gemspec
+++ b/activeresource/activeresource.gemspec
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
s.email = 'david@loudthinking.com'
s.homepage = 'http://www.rubyonrails.org'
- s.files = Dir['CHANGELOG', 'README.rdoc', 'examples/**/*', 'lib/**/*']
+ s.files = Dir['CHANGELOG', 'MIT-LICENSE', 'README.rdoc', 'examples/**/*', 'lib/**/*']
s.require_path = 'lib'
s.extra_rdoc_files = %w( README.rdoc )
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 0c272fa093..74730ca01f 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -283,7 +283,7 @@ module ActiveResource
# attribute 'name', :string
#
# # or use the convenience methods and pass >=1 attribute names
- # string 'eye_colour', 'hair_colour'
+ # string 'eye_color', 'hair_color'
# integer 'age'
# float 'height', 'weight'
#
diff --git a/activeresource/lib/active_resource/schema.rb b/activeresource/lib/active_resource/schema.rb
index 3fd37a9bb6..5957969aa2 100644
--- a/activeresource/lib/active_resource/schema.rb
+++ b/activeresource/lib/active_resource/schema.rb
@@ -20,8 +20,8 @@ module ActiveResource # :nodoc:
# end
#
# The schema stores the name and type of each attribute. That is then
- # read out by the schema method to populate the actual
- # Resource's schema
+ # read out by the schema method to populate the schema of the actual
+ # resource.
def initialize
@attrs = {}
end
@@ -40,6 +40,12 @@ module ActiveResource # :nodoc:
# The following are the attribute types supported by Active Resource
# migrations.
KNOWN_ATTRIBUTE_TYPES.each do |attr_type|
+ # def string(*args)
+ # options = args.extract_options!
+ # attr_names = args
+ #
+ # attr_names.each { |name| attribute(name, 'string', options) }
+ # end
class_eval <<-EOV, __FILE__, __LINE__ + 1
def #{attr_type.to_s}(*args)
options = args.extract_options!
diff --git a/activeresource/lib/active_resource/version.rb b/activeresource/lib/active_resource/version.rb
index 440b504344..d53374b261 100644
--- a/activeresource/lib/active_resource/version.rb
+++ b/activeresource/lib/active_resource/version.rb
@@ -1,9 +1,9 @@
module ActiveResource
module VERSION #:nodoc:
MAJOR = 3
- MINOR = 1
+ MINOR = 2
TINY = 0
- PRE = "rc1"
+ PRE = "beta"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
diff --git a/activeresource/test/cases/base/load_test.rb b/activeresource/test/cases/base/load_test.rb
index d6b04cfaa8..0d030148d0 100644
--- a/activeresource/test/cases/base/load_test.rb
+++ b/activeresource/test/cases/base/load_test.rb
@@ -72,7 +72,6 @@ class BaseLoadTest < Test::Unit::TestCase
def test_after_load_attributes_are_accessible_via_indifferent_access
assert_equal Hash.new, @person.attributes
- matz_attributes = @matz.values.first
assert_equal @matz.stringify_keys, @person.load(@matz).attributes
assert_equal @matz[:name], @person.attributes['name']
assert_equal @matz[:name], @person.attributes[:name]
diff --git a/activeresource/test/cases/finder_test.rb b/activeresource/test/cases/finder_test.rb
index 9c51f2a390..5fbbfeef6e 100644
--- a/activeresource/test/cases/finder_test.rb
+++ b/activeresource/test/cases/finder_test.rb
@@ -95,7 +95,7 @@ class FinderTest < Test::Unit::TestCase
def test_find_all_sub_objects_not_found
assert_nothing_raised do
- addys = StreetAddress.find(:all, :params => { :person_id => 2 })
+ StreetAddress.find(:all, :params => { :person_id => 2 })
end
end
diff --git a/activeresource/test/cases/log_subscriber_test.rb b/activeresource/test/cases/log_subscriber_test.rb
index b9143f5b67..ab5c22a783 100644
--- a/activeresource/test/cases/log_subscriber_test.rb
+++ b/activeresource/test/cases/log_subscriber_test.rb
@@ -23,7 +23,7 @@ class LogSubscriberTest < ActiveSupport::TestCase
end
def test_request_notification
- matz = Person.find(1)
+ Person.find(1)
wait
assert_equal 2, @logger.logged(:info).size
assert_equal "GET http://37s.sunrise.i:3000/people/1.json", @logger.logged(:info)[0]
diff --git a/activeresource/test/cases/observing_test.rb b/activeresource/test/cases/observing_test.rb
index ca3ab5d03d..58d3d389ff 100644
--- a/activeresource/test/cases/observing_test.rb
+++ b/activeresource/test/cases/observing_test.rb
@@ -37,7 +37,7 @@ class ObservingTest < Test::Unit::TestCase
end
def test_create_fires_save_and_create_notifications
- rick = Person.create(:name => 'Rick')
+ Person.create(:name => 'Rick')
assert_equal [:before_save, :before_create, :after_create, :after_save], self.history
end