safe_attributes 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Appraisals +11 -0
- data/Gemfile +9 -29
- data/NEWS.rdoc +5 -0
- data/README.rdoc +15 -5
- data/Rakefile +6 -32
- data/lib/safe_attributes.rb +4 -60
- data/lib/safe_attributes/base.rb +67 -0
- data/lib/safe_attributes/version.rb +9 -0
- data/safe_attributes.gemspec +15 -64
- data/spec/safe_attributes/safe_attributes_spec.rb +1 -1
- metadata +42 -62
- data/.document +0 -5
- data/.rspec +0 -1
- data/.rvmrc +0 -1
- data/VERSION +0 -1
data/Appraisals
ADDED
data/Gemfile
CHANGED
@@ -1,36 +1,16 @@
|
|
1
|
-
source
|
1
|
+
source :rubygems
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
gem 'activerecord', '~> 3.0.0'
|
7
|
-
elsif ENV.has_key?('SA_WITH_3_1')
|
8
|
-
gem 'activesupport', '~> 3.1.0'
|
9
|
-
gem 'activerecord', '~> 3.1.0'
|
10
|
-
else
|
11
|
-
gem 'activesupport', '>= 3.0.0'
|
12
|
-
gem 'activerecord', '>= 3.0.0'
|
13
|
-
end
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
gem 'appraisal'
|
14
6
|
|
15
|
-
|
16
|
-
gem 'simplecov', :require => false, :
|
7
|
+
group :test do
|
8
|
+
gem 'simplecov', :require => false, :platform => :mri
|
17
9
|
end
|
18
10
|
|
19
11
|
group :development do
|
20
|
-
gem 'jeweler', '>= 1.5.2'
|
21
|
-
gem 'rake', '>= 0.8.7'
|
22
|
-
gem 'rdoc'
|
23
|
-
gem 'rspec', '>= 2.3.0'
|
24
|
-
|
25
|
-
platform :ruby do
|
26
|
-
gem 'sqlite3', '>= 1.3.4'
|
27
|
-
end
|
28
|
-
platform :jruby do
|
29
|
-
gem 'activerecord-jdbcsqlite3-adapter'
|
30
|
-
gem 'jruby-openssl'
|
31
|
-
end
|
32
12
|
# For debugging under ruby 1.9 special gems are needed
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
13
|
+
#gem 'ruby-debug19', :platform => :mri
|
14
|
+
#gem 'ruby-debug-base19', '>=0.11.26'
|
15
|
+
#gem 'linecache19', '>=0.5.13'
|
36
16
|
end
|
data/NEWS.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -31,7 +31,7 @@ These largely should not run afoul of Ruby or ActiveRecord in most cases.
|
|
31
31
|
To access an attribute in ActiveRecord without its normal getter or setter
|
32
32
|
you can use a couple of different approaches.
|
33
33
|
|
34
|
-
* model_instance[:attribute] # works as both getter and setter like a hash
|
34
|
+
* \model_instance[:attribute] # works as both getter and setter like a hash
|
35
35
|
* model_instance.read_attribute('attribute')
|
36
36
|
* model_instance.write_attribute('attribute', value)
|
37
37
|
|
@@ -67,7 +67,7 @@ without issue using the recommended approach above.
|
|
67
67
|
This gem has been tested with:
|
68
68
|
|
69
69
|
* Ruby 1.8.7
|
70
|
-
* Ruby 1.9.
|
70
|
+
* Ruby 1.9.3
|
71
71
|
* JRuby 1.6.4
|
72
72
|
|
73
73
|
Note that as of Sept. 25, 2011, jruby 1.6.4 failed some tests when using
|
@@ -89,10 +89,18 @@ not to generate.
|
|
89
89
|
validates_presence_of :my_attr
|
90
90
|
end
|
91
91
|
|
92
|
+
If you do not want SafeAttributes to be automatically included into
|
93
|
+
ActiveRecord::Base, then instead add this to your Gemfile.
|
94
|
+
|
95
|
+
gem 'safe_attributes', :require => 'safe_attributes/base'
|
96
|
+
|
97
|
+
You will then need to include the SafeAttributes::Base module into any
|
98
|
+
model you wish to have this functionality.
|
99
|
+
|
92
100
|
=== Outside of Rails
|
93
|
-
require 'safe_attributes'
|
101
|
+
require 'safe_attributes/base'
|
94
102
|
class MyModel < ActiveRecord::Base
|
95
|
-
include SafeAttributes
|
103
|
+
include SafeAttributes::Base
|
96
104
|
end
|
97
105
|
|
98
106
|
== Caveats
|
@@ -115,8 +123,10 @@ get the developers of ActiveRecord to agree to a patch.
|
|
115
123
|
|
116
124
|
== Copyright
|
117
125
|
|
118
|
-
Copyright (c) 2010,2011 C. Brian Jones. See LICENSE for details.
|
126
|
+
Copyright (c) 2010,2011,2012 C. Brian Jones. See LICENSE for details.
|
119
127
|
|
120
128
|
== Thanks
|
121
129
|
|
122
130
|
* Jaime Bellmyer - http://kconrails.com
|
131
|
+
* James Brennan
|
132
|
+
* Billy Watson
|
data/Rakefile
CHANGED
@@ -1,44 +1,18 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
|
4
|
-
Bundler.setup(:default, :development)
|
5
|
-
rescue Bundler::BundlerError => e
|
6
|
-
$stderr.puts e.message
|
7
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
-
exit e.status_code
|
9
|
-
end
|
10
|
-
require 'rake'
|
11
|
-
|
12
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
13
|
-
|
14
|
-
require 'jeweler'
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
gem.name = "safe_attributes"
|
17
|
-
gem.version = version
|
18
|
-
gem.homepage = "http://github.com/bjones/safe_attributes"
|
19
|
-
gem.license = "MIT"
|
20
|
-
gem.summary = %Q{Useful for legacy database support, adds support for reserved word column names with ActiveRecord}
|
21
|
-
gem.description = %Q{Better support for legacy database schemas for ActiveRecord, such as columns named class, or any other name that conflicts with an instance method of ActiveRecord.}
|
22
|
-
gem.email = "cbj@gnu.org"
|
23
|
-
gem.authors = ["Brian Jones"]
|
24
|
-
end
|
25
|
-
Jeweler::RubygemsDotOrgTasks.new
|
26
|
-
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'appraisal'
|
3
|
+
require 'safe_attributes/version'
|
27
4
|
require 'rspec/core'
|
28
5
|
require 'rspec/core/rake_task'
|
29
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
30
|
-
end
|
31
6
|
|
32
|
-
RSpec::Core::RakeTask.new(:
|
33
|
-
spec.rcov = true
|
7
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
34
8
|
end
|
35
9
|
|
36
10
|
task :default => :spec
|
37
11
|
|
38
12
|
require 'rdoc/task'
|
39
|
-
|
13
|
+
Rake::RDocTask.new do |rdoc|
|
40
14
|
rdoc.rdoc_dir = 'rdoc'
|
41
|
-
rdoc.title = "SafeAttributes #{
|
15
|
+
rdoc.title = "SafeAttributes #{SafeAttributes::VERSION::STRING}"
|
42
16
|
rdoc.rdoc_files.include('README*')
|
43
17
|
rdoc.rdoc_files.include('NEWS*')
|
44
18
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
data/lib/safe_attributes.rb
CHANGED
@@ -1,65 +1,9 @@
|
|
1
|
+
require 'active_support'
|
2
|
+
require 'safe_attributes/base'
|
3
|
+
|
1
4
|
module SafeAttributes
|
2
5
|
extend ActiveSupport::Concern
|
3
|
-
|
4
|
-
module ClassMethods
|
5
|
-
#
|
6
|
-
# Within your model call this method once with a list of
|
7
|
-
# methods matching either attribute() or attribute=() for
|
8
|
-
# attributes (column names) you do not want to create the
|
9
|
-
# the normal method for. You should not need to do this
|
10
|
-
# but the option is there in case the default list is
|
11
|
-
# inadequate.
|
12
|
-
#
|
13
|
-
def bad_attribute_names(*attrs)
|
14
|
-
@bad_attribute_names ||= lambda {
|
15
|
-
methods = Array.new(attrs.collect { |x| x.to_sym })
|
16
|
-
methods += ActiveRecord::Base.public_instance_methods.collect { |x| x.to_sym }
|
17
|
-
methods += ActiveRecord::Base.protected_instance_methods.collect { |x| x.to_sym }
|
18
|
-
methods += ActiveRecord::Base.private_instance_methods.collect { |x| x.to_sym }
|
19
|
-
methods -= [:id]
|
20
|
-
return methods
|
21
|
-
}.call
|
22
|
-
end
|
23
|
-
|
24
|
-
#
|
25
|
-
# Override the default implementation to not create the
|
26
|
-
# attribute() method if that method name is in the list of
|
27
|
-
# bad names
|
28
|
-
#
|
29
|
-
def define_method_attribute(attr_name)
|
30
|
-
return if (bad_attribute_names.include?(attr_name.to_sym))
|
31
|
-
super(attr_name)
|
32
|
-
end
|
33
|
-
|
34
|
-
#
|
35
|
-
# Override the default implementation to not create the
|
36
|
-
# attribute= method if that method name is in the list of
|
37
|
-
# bad names
|
38
|
-
#
|
39
|
-
def define_method_attribute=(attr_name)
|
40
|
-
method = attr_name + '='
|
41
|
-
return if (bad_attribute_names.include?(method.to_sym))
|
42
|
-
super(attr_name)
|
43
|
-
end
|
44
|
-
|
45
|
-
def instance_method_already_implemented?(method_name)
|
46
|
-
begin
|
47
|
-
return super(method_name)
|
48
|
-
rescue ActiveRecord::DangerousAttributeError
|
49
|
-
return true
|
50
|
-
end
|
51
|
-
return false
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
def read_attribute_for_validation(attr)
|
56
|
-
if (self.attributes.include?(attr.to_s))
|
57
|
-
self[attr.to_sym]
|
58
|
-
else
|
59
|
-
self.send(attr.to_s) if (self.respond_to?(attr.to_sym))
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
6
|
+
include SafeAttributes::Base
|
63
7
|
end
|
64
8
|
|
65
9
|
require 'safe_attributes/railtie.rb' if defined?(Rails)
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'active_support'
|
2
|
+
|
3
|
+
module SafeAttributes
|
4
|
+
module Base
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
module ClassMethods
|
8
|
+
#
|
9
|
+
# Within your model call this method once with a list of
|
10
|
+
# methods matching either attribute() or attribute=() for
|
11
|
+
# attributes (column names) you do not want to create the
|
12
|
+
# the normal method for. You should not need to do this
|
13
|
+
# but the option is there in case the default list is
|
14
|
+
# inadequate.
|
15
|
+
#
|
16
|
+
def bad_attribute_names(*attrs)
|
17
|
+
@bad_attribute_names ||= lambda {
|
18
|
+
methods = Array.new(attrs.collect { |x| x.to_sym })
|
19
|
+
methods += ActiveRecord::Base.public_instance_methods.collect { |x| x.to_sym }
|
20
|
+
methods += ActiveRecord::Base.protected_instance_methods.collect { |x| x.to_sym }
|
21
|
+
methods += ActiveRecord::Base.private_instance_methods.collect { |x| x.to_sym }
|
22
|
+
methods -= [:id]
|
23
|
+
return methods
|
24
|
+
}.call
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Override the default implementation to not create the
|
29
|
+
# attribute() method if that method name is in the list of
|
30
|
+
# bad names
|
31
|
+
#
|
32
|
+
def define_method_attribute(attr_name)
|
33
|
+
return if (bad_attribute_names.include?(attr_name.to_sym))
|
34
|
+
super(attr_name)
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# Override the default implementation to not create the
|
39
|
+
# attribute= method if that method name is in the list of
|
40
|
+
# bad names
|
41
|
+
#
|
42
|
+
def define_method_attribute=(attr_name)
|
43
|
+
method = attr_name + '='
|
44
|
+
return if (bad_attribute_names.include?(method.to_sym))
|
45
|
+
super(attr_name)
|
46
|
+
end
|
47
|
+
|
48
|
+
def instance_method_already_implemented?(method_name)
|
49
|
+
begin
|
50
|
+
return super(method_name)
|
51
|
+
rescue ActiveRecord::DangerousAttributeError
|
52
|
+
return true
|
53
|
+
end
|
54
|
+
return false
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def read_attribute_for_validation(attr)
|
59
|
+
if (self.attributes.include?(attr.to_s))
|
60
|
+
self[attr.to_sym]
|
61
|
+
else
|
62
|
+
self.send(attr.to_s) if (self.respond_to?(attr.to_sym))
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
end
|
data/safe_attributes.gemspec
CHANGED
@@ -1,77 +1,28 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "safe_attributes/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
6
|
s.name = "safe_attributes"
|
8
|
-
s.version =
|
7
|
+
s.version = SafeAttributes::VERSION::STRING
|
9
8
|
|
10
|
-
s.required_rubygems_version =
|
9
|
+
s.required_rubygems_version = '>= 1.8.10'
|
11
10
|
s.authors = ["Brian Jones"]
|
12
|
-
s.date = "
|
11
|
+
s.date = Time.now.utc.strftime("%Y-%m-%d")
|
12
|
+
s.summary = "Useful for legacy database support, adds support for reserved word column names with ActiveRecord"
|
13
13
|
s.description = "Better support for legacy database schemas for ActiveRecord, such as columns named class, or any other name that conflicts with an instance method of ActiveRecord."
|
14
|
-
s.email = "
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".rspec",
|
22
|
-
".rvmrc",
|
23
|
-
"Gemfile",
|
24
|
-
"LICENSE",
|
25
|
-
"NEWS.rdoc",
|
26
|
-
"README.rdoc",
|
27
|
-
"Rakefile",
|
28
|
-
"VERSION",
|
29
|
-
"lib/safe_attributes.rb",
|
30
|
-
"lib/safe_attributes/railtie.rb",
|
31
|
-
"safe_attributes.gemspec",
|
32
|
-
"spec/safe_attributes/safe_attributes_spec.rb",
|
33
|
-
"spec/spec_helper.rb"
|
34
|
-
]
|
14
|
+
s.email = "cbjones1@gmail.com"
|
35
15
|
s.homepage = "http://github.com/bjones/safe_attributes"
|
36
|
-
s.
|
16
|
+
s.files = Dir.glob("{lib,spec}/**/*") + %w(README.rdoc NEWS.rdoc LICENSE Rakefile Gemfile Appraisals safe_attributes.gemspec)
|
17
|
+
s.test_files = Dir.glob("{spec}/**/*")
|
37
18
|
s.require_paths = ["lib"]
|
38
|
-
s.
|
39
|
-
s.summary = "Useful for legacy database support, adds support for reserved word column names with ActiveRecord"
|
19
|
+
s.licenses = ["MIT"]
|
40
20
|
|
41
|
-
|
42
|
-
s.specification_version = 3
|
21
|
+
s.add_runtime_dependency(%q<activerecord>, [">= 3.0.0"])
|
43
22
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
s.add_development_dependency(%q<rake>, [">= 0.8.7"])
|
49
|
-
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
50
|
-
s.add_development_dependency(%q<rspec>, [">= 2.3.0"])
|
51
|
-
s.add_development_dependency(%q<sqlite3>, [">= 1.3.4"])
|
52
|
-
s.add_development_dependency(%q<activerecord-jdbcsqlite3-adapter>, [">= 0"])
|
53
|
-
s.add_development_dependency(%q<jruby-openssl>, [">= 0"])
|
54
|
-
else
|
55
|
-
s.add_dependency(%q<activesupport>, [">= 3.0.0"])
|
56
|
-
s.add_dependency(%q<activerecord>, [">= 3.0.0"])
|
57
|
-
s.add_dependency(%q<jeweler>, [">= 1.5.2"])
|
58
|
-
s.add_dependency(%q<rake>, [">= 0.8.7"])
|
59
|
-
s.add_dependency(%q<rdoc>, [">= 0"])
|
60
|
-
s.add_dependency(%q<rspec>, [">= 2.3.0"])
|
61
|
-
s.add_dependency(%q<sqlite3>, [">= 1.3.4"])
|
62
|
-
s.add_dependency(%q<activerecord-jdbcsqlite3-adapter>, [">= 0"])
|
63
|
-
s.add_dependency(%q<jruby-openssl>, [">= 0"])
|
64
|
-
end
|
65
|
-
else
|
66
|
-
s.add_dependency(%q<activesupport>, [">= 3.0.0"])
|
67
|
-
s.add_dependency(%q<activerecord>, [">= 3.0.0"])
|
68
|
-
s.add_dependency(%q<jeweler>, [">= 1.5.2"])
|
69
|
-
s.add_dependency(%q<rake>, [">= 0.8.7"])
|
70
|
-
s.add_dependency(%q<rdoc>, [">= 0"])
|
71
|
-
s.add_dependency(%q<rspec>, [">= 2.3.0"])
|
72
|
-
s.add_dependency(%q<sqlite3>, [">= 1.3.4"])
|
73
|
-
s.add_dependency(%q<activerecord-jdbcsqlite3-adapter>, [">= 0"])
|
74
|
-
s.add_dependency(%q<jruby-openssl>, [">= 0"])
|
75
|
-
end
|
23
|
+
s.add_development_dependency(%q<rake>, [">= 0.8.7"])
|
24
|
+
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
25
|
+
s.add_development_dependency(%q<rspec>, [">= 2.3.0"])
|
26
|
+
s.add_development_dependency(%q<sqlite3>, [">= 1.3.4"])
|
76
27
|
end
|
77
28
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: safe_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement:
|
15
|
+
name: activerecord
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,43 +21,31 @@ dependencies:
|
|
21
21
|
version: 3.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: activerecord
|
27
|
-
requirement: &70237043374880 !ruby/object:Gem::Requirement
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
25
|
none: false
|
29
26
|
requirements:
|
30
27
|
- - ! '>='
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: 3.0.0
|
33
|
-
type: :runtime
|
34
|
-
prerelease: false
|
35
|
-
version_requirements: *70237043374880
|
36
30
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
38
|
-
requirement:
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
39
33
|
none: false
|
40
34
|
requirements:
|
41
35
|
- - ! '>='
|
42
36
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
37
|
+
version: 0.8.7
|
44
38
|
type: :development
|
45
39
|
prerelease: false
|
46
|
-
version_requirements:
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: rake
|
49
|
-
requirement: &70237043373200 !ruby/object:Gem::Requirement
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
41
|
none: false
|
51
42
|
requirements:
|
52
43
|
- - ! '>='
|
53
44
|
- !ruby/object:Gem::Version
|
54
45
|
version: 0.8.7
|
55
|
-
type: :development
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: *70237043373200
|
58
46
|
- !ruby/object:Gem::Dependency
|
59
47
|
name: rdoc
|
60
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
61
49
|
none: false
|
62
50
|
requirements:
|
63
51
|
- - ! '>='
|
@@ -65,10 +53,15 @@ dependencies:
|
|
65
53
|
version: '0'
|
66
54
|
type: :development
|
67
55
|
prerelease: false
|
68
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
69
62
|
- !ruby/object:Gem::Dependency
|
70
63
|
name: rspec
|
71
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
72
65
|
none: false
|
73
66
|
requirements:
|
74
67
|
- - ! '>='
|
@@ -76,64 +69,49 @@ dependencies:
|
|
76
69
|
version: 2.3.0
|
77
70
|
type: :development
|
78
71
|
prerelease: false
|
79
|
-
version_requirements:
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: sqlite3
|
82
|
-
requirement: &70237043398180 !ruby/object:Gem::Requirement
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
83
73
|
none: false
|
84
74
|
requirements:
|
85
75
|
- - ! '>='
|
86
76
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: *70237043398180
|
77
|
+
version: 2.3.0
|
91
78
|
- !ruby/object:Gem::Dependency
|
92
|
-
name:
|
93
|
-
requirement:
|
79
|
+
name: sqlite3
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
94
81
|
none: false
|
95
82
|
requirements:
|
96
83
|
- - ! '>='
|
97
84
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
85
|
+
version: 1.3.4
|
99
86
|
type: :development
|
100
87
|
prerelease: false
|
101
|
-
version_requirements:
|
102
|
-
- !ruby/object:Gem::Dependency
|
103
|
-
name: jruby-openssl
|
104
|
-
requirement: &70237043427660 !ruby/object:Gem::Requirement
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
89
|
none: false
|
106
90
|
requirements:
|
107
91
|
- - ! '>='
|
108
92
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: *70237043427660
|
93
|
+
version: 1.3.4
|
113
94
|
description: Better support for legacy database schemas for ActiveRecord, such as
|
114
95
|
columns named class, or any other name that conflicts with an instance method of
|
115
96
|
ActiveRecord.
|
116
|
-
email:
|
97
|
+
email: cbjones1@gmail.com
|
117
98
|
executables: []
|
118
99
|
extensions: []
|
119
|
-
extra_rdoc_files:
|
120
|
-
- LICENSE
|
121
|
-
- README.rdoc
|
100
|
+
extra_rdoc_files: []
|
122
101
|
files:
|
123
|
-
- .
|
124
|
-
- .rspec
|
125
|
-
- .rvmrc
|
126
|
-
- Gemfile
|
127
|
-
- LICENSE
|
128
|
-
- NEWS.rdoc
|
129
|
-
- README.rdoc
|
130
|
-
- Rakefile
|
131
|
-
- VERSION
|
132
|
-
- lib/safe_attributes.rb
|
102
|
+
- lib/safe_attributes/base.rb
|
133
103
|
- lib/safe_attributes/railtie.rb
|
134
|
-
- safe_attributes.
|
104
|
+
- lib/safe_attributes/version.rb
|
105
|
+
- lib/safe_attributes.rb
|
135
106
|
- spec/safe_attributes/safe_attributes_spec.rb
|
136
107
|
- spec/spec_helper.rb
|
108
|
+
- README.rdoc
|
109
|
+
- NEWS.rdoc
|
110
|
+
- LICENSE
|
111
|
+
- Rakefile
|
112
|
+
- Gemfile
|
113
|
+
- Appraisals
|
114
|
+
- safe_attributes.gemspec
|
137
115
|
homepage: http://github.com/bjones/safe_attributes
|
138
116
|
licenses:
|
139
117
|
- MIT
|
@@ -149,18 +127,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
149
127
|
version: '0'
|
150
128
|
segments:
|
151
129
|
- 0
|
152
|
-
hash:
|
130
|
+
hash: -522687641704913606
|
153
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
132
|
none: false
|
155
133
|
requirements:
|
156
134
|
- - ! '>='
|
157
135
|
- !ruby/object:Gem::Version
|
158
|
-
version:
|
136
|
+
version: 1.8.10
|
159
137
|
requirements: []
|
160
138
|
rubyforge_project:
|
161
|
-
rubygems_version: 1.8.
|
139
|
+
rubygems_version: 1.8.24
|
162
140
|
signing_key:
|
163
141
|
specification_version: 3
|
164
142
|
summary: Useful for legacy database support, adds support for reserved word column
|
165
143
|
names with ActiveRecord
|
166
|
-
test_files:
|
144
|
+
test_files:
|
145
|
+
- spec/safe_attributes/safe_attributes_spec.rb
|
146
|
+
- spec/spec_helper.rb
|
data/.document
DELETED
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm --create use ruby-1.9.3-p0@safe_attributes
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.0.8
|