FiXato-active_resource_patches 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +15 -0
- data/Rakefile +50 -0
- data/active_resource_patches.gemspec +30 -0
- data/lib/active_resource_patches.rb +11 -0
- data/spec/spec.opts +3 -0
- data/spec/spec_helper.rb +4 -0
- metadata +73 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Filip H.F. "FiXato" Slagter
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
The software is provided "as is", without warranty of any kind,
|
15
|
+
express or implied, including but not limited to the warranties of
|
16
|
+
merchantability, fitness for a particular purpose and
|
17
|
+
non-infringement. In no event shall the authors or copyright holders be
|
18
|
+
liable for any claim, damages or other liability, whether in an action
|
19
|
+
of contract, tort or otherwise, arising from, out of or in connection
|
20
|
+
with the software or the use or other dealings in the software.
|
data/README.rdoc
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
= ActiveResourcePatches
|
2
|
+
|
3
|
+
A set of patches for ActiveResource that haven't made it into Rails (yet).
|
4
|
+
Any update of Rails means that this gem needs to be modified to verify it still needs the patches.
|
5
|
+
|
6
|
+
|
7
|
+
== Recent Changes
|
8
|
+
|
9
|
+
=== 0.0.1
|
10
|
+
* Added patch to ActiveResource::Connection#head that prevents failure of ActiveResource::Base.exists? requests. More info, see: http://github.com/FiXato/rails/commit/36bb1a604a74eaff6c01fd1f5c3accb16a512124
|
11
|
+
|
12
|
+
== Plans
|
13
|
+
|
14
|
+
|
15
|
+
Copyright (c) 2009 Filip H.F. "FiXato" Slagter, released under the MIT license
|
data/Rakefile
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
require "rake"
|
2
|
+
require "rake/clean"
|
3
|
+
require "rake/gempackagetask"
|
4
|
+
require 'rubygems'
|
5
|
+
|
6
|
+
################################################################################
|
7
|
+
### Gem
|
8
|
+
################################################################################
|
9
|
+
|
10
|
+
begin
|
11
|
+
# Parse gemspec using the github safety level.
|
12
|
+
file = Dir['*.gemspec'].first
|
13
|
+
data = File.read(file)
|
14
|
+
spec = nil
|
15
|
+
# FIXME: Lowered SAFE from 3 to 2 to work with Ruby 1.9 due to rubygems
|
16
|
+
# performing a require internally
|
17
|
+
Thread.new { spec = eval("$SAFE = 2\n%s" % data)}.join
|
18
|
+
|
19
|
+
# Create the gem tasks
|
20
|
+
Rake::GemPackageTask.new(spec) do |package|
|
21
|
+
package.gem_spec = spec
|
22
|
+
end
|
23
|
+
rescue Exception => e
|
24
|
+
printf "WARNING: Error caught (%s): %s\n%s", e.class.name, e.message, e.backtrace[0...5].map {|l| ' %s' % l}.join("\n")
|
25
|
+
end
|
26
|
+
|
27
|
+
desc 'Package and install the gem for the current version'
|
28
|
+
task :install => :gem do
|
29
|
+
system "sudo gem install -l pkg/%s-%s.gem" % [spec.name, spec.version]
|
30
|
+
end
|
31
|
+
|
32
|
+
desc 'Show files missing from gemspec'
|
33
|
+
task :diff do
|
34
|
+
files = %w[
|
35
|
+
Rakefile
|
36
|
+
*README*
|
37
|
+
*LICENSE*
|
38
|
+
*.gemspec
|
39
|
+
bin/*
|
40
|
+
lib/**/*
|
41
|
+
spec/**/*
|
42
|
+
test/**/*
|
43
|
+
].map {|pattern| Dir.glob(pattern)}.flatten.select{|f| File.file?(f)}
|
44
|
+
missing_files = files - spec.files
|
45
|
+
extra_files = spec.files - files
|
46
|
+
puts "Missing files:"
|
47
|
+
puts missing_files.join(" ")
|
48
|
+
puts "Extra files:"
|
49
|
+
puts extra_files.join(" ")
|
50
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
# Project
|
3
|
+
s.name = 'active_resource_patches'
|
4
|
+
s.summary = "ActiveResourcePatches contains a set of patches that haven't made it into Rails (yet)."
|
5
|
+
s.description = "ActiveResourcePatches contains a set of patches that haven't made it into Rails (yet)."
|
6
|
+
s.version = '0.0.2'
|
7
|
+
s.date = '2009-07-30'
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Filip H.F. Slagter"]
|
10
|
+
s.email = "fixato@gmail.com"
|
11
|
+
s.homepage = "http://www.github.com/FiXato/active_resource_patches"
|
12
|
+
|
13
|
+
# Files
|
14
|
+
spec_files = %w[]
|
15
|
+
root_files = %w[active_resource_patches.gemspec MIT-LICENSE README.rdoc Rakefile]
|
16
|
+
lib_files = %w[active_resource_patches]
|
17
|
+
other_files = %w[spec/spec_helper.rb spec/spec.opts]
|
18
|
+
s.require_path = "lib"
|
19
|
+
s.test_files = spec_files.map {|f| 'spec/%s_spec.rb' % f}
|
20
|
+
s.files = root_files + s.test_files + lib_files.map {|f| 'lib/%s.rb' % f} + other_files
|
21
|
+
|
22
|
+
# rdoc
|
23
|
+
s.has_rdoc = true
|
24
|
+
s.extra_rdoc_files = %w[ README.rdoc MIT-LICENSE ]
|
25
|
+
s.rdoc_options << '--inline-source' << '--line-numbers' << '--main' << 'README.rdoc'
|
26
|
+
|
27
|
+
# Requirements
|
28
|
+
s.add_dependency 'activeresource', '= 2.3.3'
|
29
|
+
s.required_ruby_version = ">= 1.8.0"
|
30
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module ActiveResource
|
2
|
+
class Connection
|
3
|
+
HTTP_FORMAT_HEADER_NAMES[:head] = 'Content-Type'
|
4
|
+
|
5
|
+
# Execute a HEAD request.
|
6
|
+
# Used to obtain meta-information about resources, such as whether they exist and their size (via response headers).
|
7
|
+
def head(path, headers = {})
|
8
|
+
request(:head, path, build_request_headers(headers, :head))
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: FiXato-active_resource_patches
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Filip H.F. Slagter
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-07-30 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: activeresource
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - "="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.3.3
|
24
|
+
version:
|
25
|
+
description: ActiveResourcePatches contains a set of patches that haven't made it into Rails (yet).
|
26
|
+
email: fixato@gmail.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- README.rdoc
|
33
|
+
- MIT-LICENSE
|
34
|
+
files:
|
35
|
+
- active_resource_patches.gemspec
|
36
|
+
- MIT-LICENSE
|
37
|
+
- README.rdoc
|
38
|
+
- Rakefile
|
39
|
+
- lib/active_resource_patches.rb
|
40
|
+
- spec/spec_helper.rb
|
41
|
+
- spec/spec.opts
|
42
|
+
has_rdoc: true
|
43
|
+
homepage: http://www.github.com/FiXato/active_resource_patches
|
44
|
+
licenses:
|
45
|
+
post_install_message:
|
46
|
+
rdoc_options:
|
47
|
+
- --inline-source
|
48
|
+
- --line-numbers
|
49
|
+
- --main
|
50
|
+
- README.rdoc
|
51
|
+
require_paths:
|
52
|
+
- lib
|
53
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 1.8.0
|
58
|
+
version:
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: "0"
|
64
|
+
version:
|
65
|
+
requirements: []
|
66
|
+
|
67
|
+
rubyforge_project:
|
68
|
+
rubygems_version: 1.3.5
|
69
|
+
signing_key:
|
70
|
+
specification_version: 2
|
71
|
+
summary: ActiveResourcePatches contains a set of patches that haven't made it into Rails (yet).
|
72
|
+
test_files: []
|
73
|
+
|