simple_eav 0.5.0 → 1.0.0

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/.rvmrc CHANGED
@@ -1 +1 @@
1
- rvm use --create ruby-1.9.2-p180@simple_eav
1
+ rvm use --create ruby-1.9.2-p290@simple_eav
data/.travis.yml ADDED
@@ -0,0 +1,12 @@
1
+ rvm:
2
+ - 1.8.7
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - ree
6
+ - jruby
7
+ - rbx-2.0
8
+ notifications:
9
+ recipients:
10
+ - tim.linquist@gmail.com
11
+ - amerine@gmail.com
12
+
data/Rakefile CHANGED
@@ -1 +1,4 @@
1
1
  require 'bundler/gem_tasks'
2
+
3
+ task :default => [:spec]
4
+
data/lib/simple_eav.rb CHANGED
@@ -47,7 +47,7 @@ module SimpleEav
47
47
  self.send("#{simple_eav_column}=", attributes)
48
48
  end
49
49
 
50
- def attributes=(_attributes={})
50
+ def assign_attributes(_attributes={}, options={})
51
51
  #Iterate over each attribute:
52
52
  # - skip columns that are actually defined in the db
53
53
  # - remove undefined columns to prevent UnknownAttribute::Error from being thrown
@@ -58,7 +58,7 @@ module SimpleEav
58
58
  _attributes.delete(column)
59
59
  end
60
60
  self.simple_eav_attributes = simple_eav_attrs
61
- super(_attributes)
61
+ super(_attributes, options)
62
62
  end
63
63
 
64
64
  def respond_to?(method, include_private=false)
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module SimpleEav
2
- VERSION = "0.5.0"
2
+ VERSION = "1.0.0"
3
3
  end
data/simple_eav.gemspec CHANGED
@@ -17,12 +17,15 @@ Gem::Specification.new do |s|
17
17
  s.extra_rdoc_files = [ "README.rdoc" ]
18
18
  s.require_path = "lib"
19
19
 
20
- s.add_dependency 'activerecord', '~> 3.0.7'
21
- if RUBY_VERSION < '1.9'
22
- s.add_development_dependency 'ruby-debug'
23
- else
24
- s.add_development_dependency 'ruby-debug19'
20
+ s.add_dependency 'activerecord', '~> 3.1'
21
+ unless ENV["CI"]
22
+ if RUBY_VERSION <= '1.9.1'
23
+ s.add_development_dependency 'ruby-debug'
24
+ else
25
+ s.add_development_dependency 'ruby-debug19'
26
+ end
25
27
  end
26
28
  s.add_development_dependency 'sqlite3', '~> 1.3.3'
29
+ s.add_development_dependency 'rake'
27
30
  s.add_development_dependency 'rspec', '~> 2.6.0'
28
31
  end
@@ -73,7 +73,7 @@ describe SimpleEav do
73
73
  child = Child.create :name=>'Joe Jr.'
74
74
  person = Person.create :child=>child
75
75
  lambda{
76
- person.update_attributes :child_attributes=>{:name=>'John Jr.'}
76
+ person.update_attributes :child_attributes=>{:id => child.id, :name=>'John Jr.'}
77
77
  }.should change(person.child, :name).from('Joe Jr.').to('John Jr.')
78
78
  end
79
79
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: simple_eav
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.0
5
+ version: 1.0.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Tim Linquist
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-03 00:00:00 -07:00
14
- default_executable:
13
+ date: 2011-10-17 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: activerecord
@@ -21,7 +20,7 @@ dependencies:
21
20
  requirements:
22
21
  - - ~>
23
22
  - !ruby/object:Gem::Version
24
- version: 3.0.7
23
+ version: "3.1"
25
24
  type: :runtime
26
25
  version_requirements: *id001
27
26
  - !ruby/object:Gem::Dependency
@@ -47,16 +46,27 @@ dependencies:
47
46
  type: :development
48
47
  version_requirements: *id003
49
48
  - !ruby/object:Gem::Dependency
50
- name: rspec
49
+ name: rake
51
50
  prerelease: false
52
51
  requirement: &id004 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
57
+ type: :development
58
+ version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
60
+ name: rspec
61
+ prerelease: false
62
+ requirement: &id005 !ruby/object:Gem::Requirement
53
63
  none: false
54
64
  requirements:
55
65
  - - ~>
56
66
  - !ruby/object:Gem::Version
57
67
  version: 2.6.0
58
68
  type: :development
59
- version_requirements: *id004
69
+ version_requirements: *id005
60
70
  description: A simple alternative to acts_as_eav_model that works with ActiveRecord without any monkey patching needed. Acts_as_eav_model's gives a model the ability to have any number of custom attributes. This project has the same goal. The difference being maintaining utmost compatability with ActiveRecord::Base.
61
71
  email:
62
72
  - tim.linquist@gmail.com
@@ -69,6 +79,7 @@ extra_rdoc_files:
69
79
  files:
70
80
  - .gitignore
71
81
  - .rvmrc
82
+ - .travis.yml
72
83
  - Gemfile
73
84
  - LICENSE
74
85
  - README.rdoc
@@ -81,7 +92,6 @@ files:
81
92
  - spec/spec_helper.rb
82
93
  - spec/support/child.rb
83
94
  - spec/support/person.rb
84
- has_rdoc: true
85
95
  homepage: http://github.com/timo3377/simple_eav
86
96
  licenses: []
87
97
 
@@ -105,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
115
  requirements: []
106
116
 
107
117
  rubyforge_project:
108
- rubygems_version: 1.5.0
118
+ rubygems_version: 1.8.10
109
119
  signing_key:
110
120
  specification_version: 3
111
121
  summary: A simple alternative to acts_as_eav_model.