datts_right 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +5 -0
- data/.document +5 -0
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/Gemfile +19 -0
- data/Gemfile.lock +108 -0
- data/LICENSE.txt +20 -0
- data/README.textile +178 -0
- data/Rakefile +50 -0
- data/VERSION +1 -0
- data/datts_right.gemspec +236 -0
- data/lib/datts_right.rb +98 -0
- data/lib/datts_right/datt.rb +40 -0
- data/lib/datts_right/exceptions.rb +10 -0
- data/lib/datts_right/instance_methods.rb +214 -0
- data/lib/datts_right/page.rb +3 -0
- data/lib/datts_right/query_methods.rb +15 -0
- data/lib/generators/migration/USAGE +8 -0
- data/lib/generators/migration/migration_generator.rb +3 -0
- data/spec/datt_spec.rb +20 -0
- data/spec/datts_right_spec.rb +299 -0
- data/spec/has_datts_migration_generator_spec.rb +13 -0
- data/spec/spec_helper.rb +43 -0
- metadata +948 -0
data/.autotest
ADDED
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm ree-1.8.7-2011.03@datts_right
|
data/Gemfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
gemspec
|
3
|
+
# Add dependencies required to use your gem here.
|
4
|
+
# Example:
|
5
|
+
# gem "activesupport", ">= 2.3.5"
|
6
|
+
|
7
|
+
# Add dependencies to develop your gem here.
|
8
|
+
# Include everything needed to run rake, tests, features, etc.
|
9
|
+
|
10
|
+
gem 'rails', '>= 3.0.0'
|
11
|
+
|
12
|
+
group :development do
|
13
|
+
gem 'autotest'
|
14
|
+
gem "sqlite3"
|
15
|
+
gem "rspec", "~> 2.3.0"
|
16
|
+
gem "bundler", "~> 1.0.0"
|
17
|
+
gem "jeweler", "~> 1.5.2"
|
18
|
+
gem "rcov", ">= 0"
|
19
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
datts_right (0.0.1)
|
5
|
+
datts_right
|
6
|
+
rails (>= 3.0.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
ZenTest (4.5.0)
|
12
|
+
abstract (1.0.0)
|
13
|
+
actionmailer (3.0.5)
|
14
|
+
actionpack (= 3.0.5)
|
15
|
+
mail (~> 2.2.15)
|
16
|
+
actionpack (3.0.5)
|
17
|
+
activemodel (= 3.0.5)
|
18
|
+
activesupport (= 3.0.5)
|
19
|
+
builder (~> 2.1.2)
|
20
|
+
erubis (~> 2.6.6)
|
21
|
+
i18n (~> 0.4)
|
22
|
+
rack (~> 1.2.1)
|
23
|
+
rack-mount (~> 0.6.13)
|
24
|
+
rack-test (~> 0.5.7)
|
25
|
+
tzinfo (~> 0.3.23)
|
26
|
+
activemodel (3.0.5)
|
27
|
+
activesupport (= 3.0.5)
|
28
|
+
builder (~> 2.1.2)
|
29
|
+
i18n (~> 0.4)
|
30
|
+
activerecord (3.0.5)
|
31
|
+
activemodel (= 3.0.5)
|
32
|
+
activesupport (= 3.0.5)
|
33
|
+
arel (~> 2.0.2)
|
34
|
+
tzinfo (~> 0.3.23)
|
35
|
+
activeresource (3.0.5)
|
36
|
+
activemodel (= 3.0.5)
|
37
|
+
activesupport (= 3.0.5)
|
38
|
+
activesupport (3.0.5)
|
39
|
+
arel (2.0.9)
|
40
|
+
autotest (4.4.6)
|
41
|
+
ZenTest (>= 4.4.1)
|
42
|
+
builder (2.1.2)
|
43
|
+
diff-lcs (1.1.2)
|
44
|
+
erubis (2.6.6)
|
45
|
+
abstract (>= 1.0.0)
|
46
|
+
git (1.2.5)
|
47
|
+
i18n (0.5.0)
|
48
|
+
jeweler (1.5.2)
|
49
|
+
bundler (~> 1.0.0)
|
50
|
+
git (>= 1.2.5)
|
51
|
+
rake
|
52
|
+
mail (2.2.15)
|
53
|
+
activesupport (>= 2.3.6)
|
54
|
+
i18n (>= 0.4.0)
|
55
|
+
mime-types (~> 1.16)
|
56
|
+
treetop (~> 1.4.8)
|
57
|
+
mime-types (1.16)
|
58
|
+
polyglot (0.3.1)
|
59
|
+
rack (1.2.2)
|
60
|
+
rack-mount (0.6.14)
|
61
|
+
rack (>= 1.0.0)
|
62
|
+
rack-test (0.5.7)
|
63
|
+
rack (>= 1.0)
|
64
|
+
rails (3.0.5)
|
65
|
+
actionmailer (= 3.0.5)
|
66
|
+
actionpack (= 3.0.5)
|
67
|
+
activerecord (= 3.0.5)
|
68
|
+
activeresource (= 3.0.5)
|
69
|
+
activesupport (= 3.0.5)
|
70
|
+
bundler (~> 1.0)
|
71
|
+
railties (= 3.0.5)
|
72
|
+
railties (3.0.5)
|
73
|
+
actionpack (= 3.0.5)
|
74
|
+
activesupport (= 3.0.5)
|
75
|
+
rake (>= 0.8.7)
|
76
|
+
thor (~> 0.14.4)
|
77
|
+
rake (0.8.7)
|
78
|
+
rcov (0.9.9)
|
79
|
+
rspec (2.3.0)
|
80
|
+
rspec-core (~> 2.3.0)
|
81
|
+
rspec-expectations (~> 2.3.0)
|
82
|
+
rspec-mocks (~> 2.3.0)
|
83
|
+
rspec-core (2.3.1)
|
84
|
+
rspec-expectations (2.3.0)
|
85
|
+
diff-lcs (~> 1.1.2)
|
86
|
+
rspec-mocks (2.3.0)
|
87
|
+
rubigen (1.5.6)
|
88
|
+
activesupport (>= 2.3.5)
|
89
|
+
i18n
|
90
|
+
sqlite3 (1.3.3)
|
91
|
+
thor (0.14.6)
|
92
|
+
treetop (1.4.9)
|
93
|
+
polyglot (>= 0.3.1)
|
94
|
+
tzinfo (0.3.26)
|
95
|
+
|
96
|
+
PLATFORMS
|
97
|
+
ruby
|
98
|
+
|
99
|
+
DEPENDENCIES
|
100
|
+
autotest
|
101
|
+
bundler (~> 1.0.0)
|
102
|
+
datts_right!
|
103
|
+
jeweler (~> 1.5.2)
|
104
|
+
rails (>= 3.0.0)
|
105
|
+
rcov
|
106
|
+
rspec (~> 2.3.0)
|
107
|
+
rubigen (= 1.5.6)
|
108
|
+
sqlite3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Ramon Tayag
|
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
|
+
NONINFRINGEMENT. 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.textile
ADDED
@@ -0,0 +1,178 @@
|
|
1
|
+
h1. Datts Right
|
2
|
+
|
3
|
+
bq. Dynamic Attributes Done Right
|
4
|
+
|
5
|
+
Well, maybe it's done right. This gem is more of an experiment at the moment. I also did this to learn more about metaprogramming.
|
6
|
+
|
7
|
+
I would like input from you guys. Is this something that is too messy?
|
8
|
+
|
9
|
+
h2. Why make this?
|
10
|
+
|
11
|
+
# I needed to allow users to create their own dynamic attributes on certain records. I was already running PostgreSQL. My database and code was designed largely on relational structures. I was thinking of moving to MongoDB but saw that I'd pretty much have to rewrite all the models. Creating this gem was the first step to using dynamic attributes on my app.
|
12
|
+
# The "available":http://codaset.com/joelmoss/dynamic-attributes "plugins":https://github.com/moiristo/dynamic_attributes out there that did something like this stuffed the dynamic attributes in a column in the model that had dynamic attributes. Because of this, you:
|
13
|
+
** Could not order things by dynamic columns straight with SQL
|
14
|
+
** Could not (as far as I know) chain scopes, like so: @MyModel.where(:name_which_is_a_real_attribute => "Joe").where_datt(:phone_which_is_dynamic => "23218793")@
|
15
|
+
** Could not find by dynamic attribute straight with SQL, like so: @MyModel.find_by_phone_which_is_dynamic("2398291308")@
|
16
|
+
** Had to add migrations to each model that you wanted to have dynamic attributes
|
17
|
+
|
18
|
+
h2. Installation
|
19
|
+
|
20
|
+
Create a migration:
|
21
|
+
|
22
|
+
pre. create_table :datts do |t|
|
23
|
+
t.string :attr_key, :null => false
|
24
|
+
t.string :object_type, :null => false
|
25
|
+
t.string :attributable_type, :null => false
|
26
|
+
t.integer :attributable_id, :null => false
|
27
|
+
%w(integer string boolean text float).each do |type|
|
28
|
+
t.send(type, "#{type}_value".to_sym)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
Add this to your Gemfile:
|
33
|
+
|
34
|
+
@gem 'datts_right'@
|
35
|
+
|
36
|
+
Add this to the model that you want to have dynamic attributes:
|
37
|
+
|
38
|
+
@has_datts@
|
39
|
+
|
40
|
+
h2. Usage
|
41
|
+
|
42
|
+
First, you should know _when_ to use it.
|
43
|
+
|
44
|
+
* Definitely more expensive than normal attributes
|
45
|
+
* Can easily complicate your app if overused
|
46
|
+
|
47
|
+
Knowing that, read on...
|
48
|
+
|
49
|
+
h3. Adding a dynamic attribute to a record
|
50
|
+
|
51
|
+
pre. @user = User.create :name => "Roland Deschain"
|
52
|
+
@user.add_dynamic_attribute(:age, "integer")
|
53
|
+
@user.age = 820
|
54
|
+
@user.save
|
55
|
+
|
56
|
+
h3. @instance.dynamic_attributes
|
57
|
+
|
58
|
+
Given the @user above, this prints out the dynamic_attributes just like AR::Base#attributes prints out the attributes
|
59
|
+
|
60
|
+
pre. @user.dynamic_attributes # {:name => 820}
|
61
|
+
|
62
|
+
h3. @instance.dynamic_columns
|
63
|
+
|
64
|
+
However, dynamic_attributes doesn't give us much information. What if we want to find out the list of dynamic attributes already available?
|
65
|
+
|
66
|
+
@user.dynamic_columns # {:age => {:object_type => "integer", :value => 820}}
|
67
|
+
|
68
|
+
h3. dynamic_attribute?(:some_attribute)
|
69
|
+
|
70
|
+
Returns true or false
|
71
|
+
|
72
|
+
h2. Stuff that make things faster
|
73
|
+
|
74
|
+
The dynamic attributes are only actually saved when save is called on the record that has them.
|
75
|
+
|
76
|
+
pre. @user.add_dynamic_attribute(:gunslinger, "boolean") # a column is already written on the "datts" table, with a null value.
|
77
|
+
@user.add_dynamic_attribute(:middle_name, "string") # a column is already written on the "datts" table, with a null value.
|
78
|
+
|
79
|
+
@user.gunslinger = true # saves into memory
|
80
|
+
@user.middle_name = "Unknown" # saves into memory
|
81
|
+
|
82
|
+
@user.save # the respective dynamic attribute columns are written in the datts table
|
83
|
+
|
84
|
+
h2. Structure of the datts table
|
85
|
+
|
86
|
+
Although you probably shouldn't work with it directly, the datts table looks like this:
|
87
|
+
|
88
|
+
pre. ActiveRecord::Base.connection.create_table(:datts) do |t|
|
89
|
+
t.string :attr_key, :null => false
|
90
|
+
t.string :object_type, :null => false
|
91
|
+
t.string :attributable_type, :null => false
|
92
|
+
t.integer :attributable_id, :null => false
|
93
|
+
%w(integer string boolean text float).each do |type|
|
94
|
+
t.send(type, "#{type}_value".to_sym)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
This means that depending on the type of dynamic attribute you're creating, things will get saved in the respective column in the datts table.
|
99
|
+
|
100
|
+
pre. @user.add_dynamic_attribute(:gunslinger, "boolean")
|
101
|
+
adds this to the datts table:
|
102
|
+
|
103
|
+
pre. {
|
104
|
+
:attr_key => "gunslinger",
|
105
|
+
:attributable_id => [the user's id],
|
106
|
+
:attributable_type => "User",
|
107
|
+
:object_type => "boolean",
|
108
|
+
:boolean_value => true
|
109
|
+
}
|
110
|
+
|
111
|
+
*Why have different value columns?* Because I couldn't find any other way to perform SQL operations/calculations on a generic "value" column. Besides, what kind of column would that be? A text blob?
|
112
|
+
|
113
|
+
h2. Dynamic attribute "type"
|
114
|
+
|
115
|
+
Here are the different types of dynamic attributes you can save:
|
116
|
+
|
117
|
+
* string
|
118
|
+
* text
|
119
|
+
* integer
|
120
|
+
* float
|
121
|
+
* boolean
|
122
|
+
|
123
|
+
If you assign a value to a dynamic attribute that isn't the original type, it is ignored.
|
124
|
+
|
125
|
+
pre. @user.gunslinger = true
|
126
|
+
@user.save
|
127
|
+
@user.gunslinger # true
|
128
|
+
@user.gunslinger = "hey there"
|
129
|
+
@user.save
|
130
|
+
@user.gunslinger # true
|
131
|
+
|
132
|
+
h2. Removing a dynamic attribute
|
133
|
+
|
134
|
+
pre. @user.remove_dynamic_attribute(:gunslinger)
|
135
|
+
@user.gunslinger # NoMethodError
|
136
|
+
@user.dynamic_columns # will not include :gunslinger => {...}
|
137
|
+
|
138
|
+
h2. Ordering
|
139
|
+
|
140
|
+
You can call
|
141
|
+
|
142
|
+
pre. Product.order_datt("price", "float") # returns all users with their dynamic attribute "name" in ascending order
|
143
|
+
|
144
|
+
Why pass the "float" in the order method? Because what if 2 different user records both have the dynamic attribute "price", but for one it's a float, and for the other it's an integer? How would you know which to order things by?
|
145
|
+
|
146
|
+
h2. Where
|
147
|
+
|
148
|
+
You can do:
|
149
|
+
|
150
|
+
pre. Product.where_datt(:price => 200.0, :rating => 5)
|
151
|
+
|
152
|
+
As of now it accepts a hash only. If you want to search normal attributes, use the normal @where@ method.
|
153
|
+
|
154
|
+
h2. Contributing to datts_right
|
155
|
+
|
156
|
+
There are definitely things that don't work, and could be done better. For example, it would be nice to:
|
157
|
+
|
158
|
+
# Do away with the special scopes, such as @where_datt@ and @order_datt@. I've tried to override ActiveRecord to make the normal @where@ and @order@ methods to see if the attributes being passed were dynamic, and do the changes necessary to the resulting SQL, but my head "started to hurt":http://stackoverflow.com/q/5590191/61018.
|
159
|
+
# Have smarter caching, so that finds with dynamic attributes aren't very expensive.
|
160
|
+
# Have configurable "datts" table
|
161
|
+
|
162
|
+
Warning: the code is full of comments because I needed to visualize the code running.
|
163
|
+
|
164
|
+
If you want to contribute:
|
165
|
+
|
166
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
167
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
168
|
+
* Fork the project
|
169
|
+
* Start a feature/bugfix branch
|
170
|
+
* Commit and push until you are happy with your contribution
|
171
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
172
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
173
|
+
|
174
|
+
== Copyright
|
175
|
+
|
176
|
+
Copyright (c) 2011 Ramon Tayag. See LICENSE.txt for
|
177
|
+
further details.
|
178
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
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
|
+
require 'jeweler'
|
13
|
+
Jeweler::Tasks.new do |gem|
|
14
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
|
+
gem.name = "datts_right"
|
16
|
+
gem.homepage = "http://github.com/ramontayag/datts_right"
|
17
|
+
gem.license = "MIT"
|
18
|
+
gem.summary = %Q{Allows saving of dynamic attributes in your ActiveRecord model}
|
19
|
+
gem.description = %Q{Creates a separate table that saves all your dynamic attributes.}
|
20
|
+
gem.email = "ramon@tayag.net"
|
21
|
+
gem.authors = ["ramontayag"]
|
22
|
+
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
23
|
+
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
24
|
+
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
25
|
+
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
26
|
+
end
|
27
|
+
Jeweler::RubygemsDotOrgTasks.new
|
28
|
+
|
29
|
+
require 'rspec/core'
|
30
|
+
require 'rspec/core/rake_task'
|
31
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
32
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
33
|
+
end
|
34
|
+
|
35
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
36
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
37
|
+
spec.rcov = true
|
38
|
+
end
|
39
|
+
|
40
|
+
task :default => :spec
|
41
|
+
|
42
|
+
require 'rake/rdoctask'
|
43
|
+
Rake::RDocTask.new do |rdoc|
|
44
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
45
|
+
|
46
|
+
rdoc.rdoc_dir = 'rdoc'
|
47
|
+
rdoc.title = "datts_right #{version}"
|
48
|
+
rdoc.rdoc_files.include('README*')
|
49
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
50
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
data/datts_right.gemspec
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{datts_right}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["ramontayag"]
|
12
|
+
s.date = %q{2011-04-08}
|
13
|
+
s.description = %q{Creates a separate table that saves all your dynamic attributes.}
|
14
|
+
s.email = %q{ramon@tayag.net}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.textile"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".autotest",
|
21
|
+
".document",
|
22
|
+
".rspec",
|
23
|
+
".rvmrc",
|
24
|
+
"Gemfile",
|
25
|
+
"Gemfile.lock",
|
26
|
+
"LICENSE.txt",
|
27
|
+
"README.textile",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"datts_right.gemspec",
|
31
|
+
"lib/datts_right.rb",
|
32
|
+
"lib/datts_right/datt.rb",
|
33
|
+
"lib/datts_right/exceptions.rb",
|
34
|
+
"lib/datts_right/instance_methods.rb",
|
35
|
+
"lib/datts_right/page.rb",
|
36
|
+
"lib/datts_right/query_methods.rb",
|
37
|
+
"lib/generators/migration/USAGE",
|
38
|
+
"lib/generators/migration/migration_generator.rb",
|
39
|
+
"spec/datt_spec.rb",
|
40
|
+
"spec/datts_right_spec.rb",
|
41
|
+
"spec/has_datts_migration_generator_spec.rb",
|
42
|
+
"spec/spec_helper.rb"
|
43
|
+
]
|
44
|
+
s.homepage = %q{http://github.com/ramontayag/datts_right}
|
45
|
+
s.licenses = ["MIT"]
|
46
|
+
s.require_paths = ["lib"]
|
47
|
+
s.rubygems_version = %q{1.6.2}
|
48
|
+
s.summary = %q{Allows saving of dynamic attributes in your ActiveRecord model}
|
49
|
+
s.test_files = [
|
50
|
+
"spec/datt_spec.rb",
|
51
|
+
"spec/datts_right_spec.rb",
|
52
|
+
"spec/has_datts_migration_generator_spec.rb",
|
53
|
+
"spec/spec_helper.rb"
|
54
|
+
]
|
55
|
+
|
56
|
+
if s.respond_to? :specification_version then
|
57
|
+
s.specification_version = 3
|
58
|
+
|
59
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
60
|
+
s.add_runtime_dependency(%q<datts_right>, [">= 0"])
|
61
|
+
s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
|
62
|
+
s.add_development_dependency(%q<autotest>, [">= 0"])
|
63
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
64
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
65
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
66
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
67
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
68
|
+
s.add_development_dependency(%q<autotest>, [">= 0"])
|
69
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
70
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
71
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
72
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
73
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
74
|
+
s.add_development_dependency(%q<autotest>, [">= 0"])
|
75
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
76
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
77
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
78
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
79
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
80
|
+
s.add_development_dependency(%q<rubigen>, ["= 1.5.6"])
|
81
|
+
s.add_development_dependency(%q<autotest>, [">= 0"])
|
82
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
83
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
84
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
85
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
86
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
87
|
+
s.add_development_dependency(%q<autotest>, [">= 0"])
|
88
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
89
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
90
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
91
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
92
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
93
|
+
s.add_development_dependency(%q<autotest>, [">= 0"])
|
94
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
95
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
96
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
97
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
98
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
99
|
+
s.add_development_dependency(%q<autotest>, [">= 0"])
|
100
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
101
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
102
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
103
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
104
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
105
|
+
s.add_development_dependency(%q<autotest>, [">= 0"])
|
106
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
107
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
108
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
109
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
110
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
111
|
+
s.add_development_dependency(%q<autotest>, [">= 0"])
|
112
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
113
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
114
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
115
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
116
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
117
|
+
else
|
118
|
+
s.add_dependency(%q<datts_right>, [">= 0"])
|
119
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
120
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
121
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
122
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
123
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
124
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
125
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
126
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
127
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
128
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
129
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
130
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
131
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
132
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
133
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
134
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
135
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
136
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
137
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
138
|
+
s.add_dependency(%q<rubigen>, ["= 1.5.6"])
|
139
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
140
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
141
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
142
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
143
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
144
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
145
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
146
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
147
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
148
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
149
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
150
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
151
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
152
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
153
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
154
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
155
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
156
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
157
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
158
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
159
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
160
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
161
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
162
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
163
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
164
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
165
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
166
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
167
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
168
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
169
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
170
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
171
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
172
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
173
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
174
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
175
|
+
end
|
176
|
+
else
|
177
|
+
s.add_dependency(%q<datts_right>, [">= 0"])
|
178
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
179
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
180
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
181
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
182
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
183
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
184
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
185
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
186
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
187
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
188
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
189
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
190
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
191
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
192
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
193
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
194
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
195
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
196
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
197
|
+
s.add_dependency(%q<rubigen>, ["= 1.5.6"])
|
198
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
199
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
200
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
201
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
202
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
203
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
204
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
205
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
206
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
207
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
208
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
209
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
210
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
211
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
212
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
213
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
214
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
215
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
216
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
217
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
218
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
219
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
220
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
221
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
222
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
223
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
224
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
225
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
226
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
227
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
228
|
+
s.add_dependency(%q<autotest>, [">= 0"])
|
229
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
230
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
231
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
232
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
233
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|