Skip to content

Commit

Permalink
Add missing files back to Active Resource
Browse files Browse the repository at this point in the history
This will make sure that Active Resource can be run standalone as a gem.
  • Loading branch information
sikachu committed Mar 13, 2012
1 parent 8444a8a commit 8226d3c
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 5 deletions.
15 changes: 15 additions & 0 deletions .gitignore
@@ -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
48 changes: 48 additions & 0 deletions 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
10 changes: 6 additions & 4 deletions activeresource.gemspec
@@ -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.'

Expand All @@ -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
4 changes: 4 additions & 0 deletions load_paths.rb
@@ -0,0 +1,4 @@
# bust gem prelude
require 'rubygems' unless defined? Gem
require 'bundler'
Bundler.setup
2 changes: 1 addition & 1 deletion test/abstract_unit.rb
@@ -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)
Expand Down

0 comments on commit 8226d3c

Please sign in to comment.