Permalink
Browse files

Add missing files back to Active Resource

This will make sure that Active Resource can be run standalone as a gem.
  • Loading branch information...
1 parent 8444a8a commit 8226d3c77dda0d3772b60eee88d714ad9036abe5 @sikachu sikachu committed Mar 13, 2012
Showing with 74 additions and 5 deletions.
  1. +15 −0 .gitignore
  2. +48 −0 Gemfile
  3. +6 −4 activeresource.gemspec
  4. +4 −0 load_paths.rb
  5. +1 −1 test/abstract_unit.rb
View
@@ -0,0 +1,15 @@
+# Don't put *.swp, *.bak, etc here; those belong in a global ~/.gitignore.
+# Check out http://help.github.com/ignore-files/ for how to set that up.
+
+debug.log
+.Gemfile
+/.bundle
+/.rbenv-version
+/.rvmrc
+/Gemfile.lock
+/pkg
+/dist
+/doc/rdoc
+/*/doc
+/*/test/tmp
+/RDOC_MAIN.rdoc
View
48 Gemfile
@@ -0,0 +1,48 @@
+source 'https://rubygems.org'
+
+gemspec
+
+local_rails_path = File.expand_path(File.dirname(__FILE__) + '/../rails')
+if File.exists?(local_rails_path)
+ rails_gem_source = { :path => local_rails_path }
+else
+ rails_gem_source = { :git => "git://github.com/rails/rails.git" }
+end
+
+gem 'activesupport', rails_gem_source.dup
+gem 'activemodel', rails_gem_source.dup
+
+group :doc do
+ # The current sdoc cannot generate GitHub links due
+ # to a bug, but the PR that fixes it has been there
+ # for some weeks unapplied. As a temporary solution
+ # this is our own fork with the fix.
+ gem 'sdoc', :git => 'git://github.com/fxn/sdoc.git'
+ gem 'RedCloth', '~> 4.2'
+ gem 'w3c_validators'
+end
+
+# Add your own local bundler stuff
+local_gemfile = File.dirname(__FILE__) + "/.Gemfile"
+instance_eval File.read local_gemfile if File.exists? local_gemfile
+
+platforms :mri do
+ group :test do
+ gem 'ruby-prof'
+ end
+end
+
+platforms :ruby do
+ gem 'json'
+ gem 'yajl-ruby'
+ gem 'nokogiri', '>= 1.4.5'
+end
+
+platforms :jruby do
+ gem 'json'
+
+ # This is needed by now to let tests work on JRuby
+ # TODO: When the JRuby guys merge jruby-openssl in
+ # jruby this will be removed
+ gem 'jruby-openssl'
+end
View
@@ -1,9 +1,10 @@
-version = File.read(File.expand_path("../../RAILS_VERSION", __FILE__)).strip
+$LOAD_PATH.push File.expand_path("../lib", __FILE__)
+require 'active_resource/version'
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'activeresource'
- s.version = version
+ s.version = ActiveResource::VERSION::STRING
s.summary = 'REST modeling framework (part of Rails).'
s.description = 'REST on Rails. Wrap your RESTful web app with Ruby classes and work with them like Active Record models.'
@@ -19,6 +20,7 @@ Gem::Specification.new do |s|
s.extra_rdoc_files = %w( README.rdoc )
s.rdoc_options.concat ['--main', 'README.rdoc']
- s.add_dependency('activesupport', version)
- s.add_dependency('activemodel', version)
+ s.add_dependency('activesupport', '~> 4.0.0.beta')
+ s.add_dependency('activemodel', '~> 4.0.0.beta')
+ s.add_development_dependency('mocha', '>= 0.9.8')
end
View
@@ -0,0 +1,4 @@
+# bust gem prelude
+require 'rubygems' unless defined? Gem
+require 'bundler'
+Bundler.setup
View
@@ -1,4 +1,4 @@
-require File.expand_path('../../../load_paths', __FILE__)
+require File.expand_path('../../load_paths', __FILE__)
lib = File.expand_path("#{File.dirname(__FILE__)}/../lib")
$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib)

0 comments on commit 8226d3c

Please sign in to comment.