edge_rider 0.3.0 → 0.3.1

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/.gitignore CHANGED
@@ -5,4 +5,5 @@ pkg
5
5
  app_root/log/*
6
6
  spec/shared/app_root/db/*.db
7
7
  spec/shared/app_root/config/database.yml
8
+ spec/*/.bundle
8
9
 
data/.travis.yml CHANGED
@@ -14,3 +14,4 @@ notifications:
14
14
  branches:
15
15
  only:
16
16
  - master
17
+ - travis-testing
data/Rakefile CHANGED
@@ -7,14 +7,13 @@ task :default => 'all:spec'
7
7
  namespace :travis_ci do
8
8
 
9
9
  desc 'Things to do before Travis CI begins'
10
- task :prepare => :slimgems do
11
- Rake::Task['travis_ci:create_database'].invoke &&
12
- Rake::Task['travis_ci:create_database_yml'].invoke
13
- end
10
+ task :prepare => [:compatible_rubygems, :create_database, :create_database_yml]
14
11
 
15
- desc 'Install slimgems'
16
- task :slimgems do
17
- system('gem install slimgems')
12
+ desc 'Ensure compatible Rubygems version for Ruby 1.8'
13
+ task :compatible_rubygems do
14
+ if RUBY_VERSION == '1.8.7'
15
+ system "rvm rubygems latest-1.8 --force"
16
+ end
18
17
  end
19
18
 
20
19
  desc 'Creates a test database'
@@ -45,7 +44,7 @@ namespace :all do
45
44
  desc "Bundle all spec apps"
46
45
  task :bundle do
47
46
  for_each_directory_of('spec/**/Gemfile') do |directory|
48
- system("cd #{directory} && bundle install")
47
+ system("cd #{directory} && bundle install --without development")
49
48
  end
50
49
  end
51
50
 
@@ -22,7 +22,7 @@ module EdgeRider
22
22
  relation
23
23
  end
24
24
 
25
- if Rails.version.to_i >= 4
25
+ if ActiveRecord::VERSION::MAJOR >= 4
26
26
  ActiveRecord::Base.extend(self)
27
27
  end
28
28
 
@@ -29,8 +29,8 @@ module EdgeRider
29
29
  end
30
30
 
31
31
  def define_scope(klass, name, lambda)
32
- if Rails.version.to_i < 4 # Rails 2/3
33
- scope_definition = Rails.version.to_i < 3 ? :named_scope : :scope
32
+ if ActiveRecord::VERSION::MAJOR < 4 # Rails 2/3
33
+ scope_definition = ActiveRecord::VERSION::MAJOR < 3 ? :named_scope : :scope
34
34
  klass.send scope_definition, name, lambda
35
35
  else
36
36
  klass.send :scope, name, lambda { |*args|
@@ -1,3 +1,3 @@
1
1
  module EdgeRider
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -5,9 +5,12 @@ gem 'rspec'
5
5
  gem 'rspec-rails'
6
6
  gem 'mysql2'
7
7
  gem 'rspec_candy'
8
- gem 'ruby-debug', :platforms => :ruby_18
9
8
  gem 'database_cleaner', '=1.0.1'
10
9
  gem 'andand'
11
10
  gem 'has_defaults'
12
11
 
13
12
  gem 'edge_rider', :path => '../..'
13
+
14
+ group :development do
15
+ gem 'ruby-debug', :platforms => :ruby_18
16
+ end
@@ -5,10 +5,13 @@ gem 'rspec'
5
5
  gem 'rspec-rails'
6
6
  gem 'mysql2'
7
7
  gem 'rspec_candy'
8
- gem 'debugger', platform: 'ruby_19'
9
8
  gem 'database_cleaner', '=1.0.1'
10
9
  gem 'andand'
11
10
  gem 'has_defaults'
12
11
  gem 'minitest' # fix MiniTest deprecation warnings
13
12
 
14
13
  gem 'edge_rider', :path => '../..'
14
+
15
+ group :development do
16
+ gem 'debugger', platform: 'ruby_19'
17
+ end
@@ -11,7 +11,7 @@ module AllowSettingIdOnCreate
11
11
  end
12
12
 
13
13
  def self.included(base)
14
- if Rails.version < '3' # Rails 2 has this as an instance method
14
+ if ActiveRecord::VERSION::MAJOR < 3 # Rails 2 has this as an instance method
15
15
  base.send(:include, RemoveIdFromProtectedAttributes)
16
16
  else # Rails 3 has this as a class method
17
17
  base.send(:extend, RemoveIdFromProtectedAttributes)
@@ -46,7 +46,7 @@ describe EdgeRider::Scoped do
46
46
  has_many_scope = forum.active_topics
47
47
  # In Rails 3, #scoped on associations does not take parameters but turns
48
48
  # an association into a real scope.
49
- has_many_scope = has_many_scope.scoped if Rails.version.to_i == 3
49
+ has_many_scope = has_many_scope.scoped if ActiveRecord::VERSION::MAJOR == 3
50
50
  has_many_scope.scoped(:conditions => { :subject => 'Thema' }).should =~ [ thema ]
51
51
  end
52
52
 
metadata CHANGED
@@ -1,35 +1,45 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: edge_rider
3
- version: !ruby/object:Gem::Version
4
- version: 0.3.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 17
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 1
10
+ version: 0.3.1
5
11
  platform: ruby
6
- authors:
12
+ authors:
7
13
  - Henning Koch
8
14
  autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
- date: 2014-06-03 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2015-06-11 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
14
21
  name: activerecord
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ! '>='
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
22
  prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ! '>='
25
- - !ruby/object:Gem::Version
26
- version: '0'
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :runtime
33
+ version_requirements: *id001
27
34
  description: Power tools for ActiveRecord relations (scopes)
28
35
  email: henning.koch@makandra.de
29
36
  executables: []
37
+
30
38
  extensions: []
39
+
31
40
  extra_rdoc_files: []
32
- files:
41
+
42
+ files:
33
43
  - .gitignore
34
44
  - .ruby-version
35
45
  - .travis.yml
@@ -150,127 +160,38 @@ files:
150
160
  - spec/shared/spec/edge_rider/traverse_association_spec.rb
151
161
  - spec/shared/spec/edge_rider/util_spec.rb
152
162
  homepage: https://github.com/makandra/edge_rider
153
- licenses:
163
+ licenses:
154
164
  - MIT
155
- metadata: {}
156
165
  post_install_message:
157
166
  rdoc_options: []
158
- require_paths:
167
+
168
+ require_paths:
159
169
  - lib
160
- required_ruby_version: !ruby/object:Gem::Requirement
161
- requirements:
162
- - - ! '>='
163
- - !ruby/object:Gem::Version
164
- version: '0'
165
- required_rubygems_version: !ruby/object:Gem::Requirement
166
- requirements:
167
- - - ! '>='
168
- - !ruby/object:Gem::Version
169
- version: '0'
170
+ required_ruby_version: !ruby/object:Gem::Requirement
171
+ none: false
172
+ requirements:
173
+ - - ">="
174
+ - !ruby/object:Gem::Version
175
+ hash: 3
176
+ segments:
177
+ - 0
178
+ version: "0"
179
+ required_rubygems_version: !ruby/object:Gem::Requirement
180
+ none: false
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ hash: 3
185
+ segments:
186
+ - 0
187
+ version: "0"
170
188
  requirements: []
189
+
171
190
  rubyforge_project:
172
- rubygems_version: 2.2.1
191
+ rubygems_version: 1.8.25
173
192
  signing_key:
174
- specification_version: 4
193
+ specification_version: 3
175
194
  summary: Power tools for ActiveRecord relations (scopes)
176
- test_files:
177
- - spec/rails-2.3/.ruby-version
178
- - spec/rails-2.3/Gemfile
179
- - spec/rails-2.3/Gemfile.lock
180
- - spec/rails-2.3/Rakefile
181
- - spec/rails-2.3/app_root/config/boot.rb
182
- - spec/rails-2.3/app_root/config/environment.rb
183
- - spec/rails-2.3/app_root/config/environments/test.rb
184
- - spec/rails-2.3/app_root/config/initializers/fix_missing_source_file.rb
185
- - spec/rails-2.3/app_root/config/preinitializer.rb
186
- - spec/rails-2.3/app_root/config/routes.rb
187
- - spec/rails-2.3/app_root/log/.gitignore
188
- - spec/rails-2.3/rcov.opts
189
- - spec/rails-2.3/spec.opts
190
- - spec/rails-2.3/spec/spec_helper.rb
191
- - spec/rails-3.0/.rspec
192
- - spec/rails-3.0/.ruby-version
193
- - spec/rails-3.0/Gemfile
194
- - spec/rails-3.0/Gemfile.lock
195
- - spec/rails-3.0/Rakefile
196
- - spec/rails-3.0/app_root/.gitignore
197
- - spec/rails-3.0/app_root/config/application.rb
198
- - spec/rails-3.0/app_root/config/boot.rb
199
- - spec/rails-3.0/app_root/config/environment.rb
200
- - spec/rails-3.0/app_root/config/environments/test.rb
201
- - spec/rails-3.0/app_root/config/initializers/backtrace_silencers.rb
202
- - spec/rails-3.0/app_root/config/initializers/inflections.rb
203
- - spec/rails-3.0/app_root/config/initializers/mime_types.rb
204
- - spec/rails-3.0/app_root/config/initializers/secret_token.rb
205
- - spec/rails-3.0/app_root/config/initializers/session_store.rb
206
- - spec/rails-3.0/app_root/config/routes.rb
207
- - spec/rails-3.0/app_root/lib/tasks/.gitkeep
208
- - spec/rails-3.0/app_root/log/.gitkeep
209
- - spec/rails-3.0/app_root/script/rails
210
- - spec/rails-3.0/rcov.opts
211
- - spec/rails-3.0/spec/spec_helper.rb
212
- - spec/rails-3.2/.rspec
213
- - spec/rails-3.2/.ruby-version
214
- - spec/rails-3.2/Gemfile
215
- - spec/rails-3.2/Gemfile.lock
216
- - spec/rails-3.2/Rakefile
217
- - spec/rails-3.2/app_root/.gitignore
218
- - spec/rails-3.2/app_root/config/application.rb
219
- - spec/rails-3.2/app_root/config/boot.rb
220
- - spec/rails-3.2/app_root/config/environment.rb
221
- - spec/rails-3.2/app_root/config/environments/test.rb
222
- - spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb
223
- - spec/rails-3.2/app_root/config/initializers/inflections.rb
224
- - spec/rails-3.2/app_root/config/initializers/mime_types.rb
225
- - spec/rails-3.2/app_root/config/initializers/secret_token.rb
226
- - spec/rails-3.2/app_root/config/initializers/session_store.rb
227
- - spec/rails-3.2/app_root/config/routes.rb
228
- - spec/rails-3.2/app_root/log/.gitignore
229
- - spec/rails-3.2/rcov.opts
230
- - spec/rails-3.2/spec/spec_helper.rb
231
- - spec/rails-4.1/.rspec
232
- - spec/rails-4.1/.ruby-version
233
- - spec/rails-4.1/Gemfile
234
- - spec/rails-4.1/Gemfile.lock
235
- - spec/rails-4.1/Rakefile
236
- - spec/rails-4.1/app_root/.gitignore
237
- - spec/rails-4.1/app_root/bin/bundle
238
- - spec/rails-4.1/app_root/bin/rails
239
- - spec/rails-4.1/app_root/bin/rake
240
- - spec/rails-4.1/app_root/bin/spring
241
- - spec/rails-4.1/app_root/config/application.rb
242
- - spec/rails-4.1/app_root/config/boot.rb
243
- - spec/rails-4.1/app_root/config/environment.rb
244
- - spec/rails-4.1/app_root/config/environments/development.rb
245
- - spec/rails-4.1/app_root/config/environments/production.rb
246
- - spec/rails-4.1/app_root/config/environments/test.rb
247
- - spec/rails-4.1/app_root/config/initializers/backtrace_silencers.rb
248
- - spec/rails-4.1/app_root/config/initializers/cookies_serializer.rb
249
- - spec/rails-4.1/app_root/config/initializers/filter_parameter_logging.rb
250
- - spec/rails-4.1/app_root/config/initializers/inflections.rb
251
- - spec/rails-4.1/app_root/config/initializers/mime_types.rb
252
- - spec/rails-4.1/app_root/config/initializers/session_store.rb
253
- - spec/rails-4.1/app_root/config/initializers/wrap_parameters.rb
254
- - spec/rails-4.1/app_root/config/routes.rb
255
- - spec/rails-4.1/app_root/config/secrets.yml
256
- - spec/rails-4.1/rcov.opts
257
- - spec/rails-4.1/spec/spec_helper.rb
258
- - spec/shared/app_root/app/controllers/application_controller.rb
259
- - spec/shared/app_root/app/models/allow_setting_id_on_create.rb
260
- - spec/shared/app_root/app/models/forum.rb
261
- - spec/shared/app_root/app/models/post.rb
262
- - spec/shared/app_root/app/models/profile.rb
263
- - spec/shared/app_root/app/models/topic.rb
264
- - spec/shared/app_root/app/models/user.rb
265
- - spec/shared/app_root/config/database.sample.yml
266
- - spec/shared/app_root/config/database.travis_ci.yml
267
- - spec/shared/app_root/db/migrate/001_create_test_tables.rb
268
- - spec/shared/spec/edge_rider/collect_column_spec.rb
269
- - spec/shared/spec/edge_rider/collect_ids_spec.rb
270
- - spec/shared/spec/edge_rider/origin_class_spec.rb
271
- - spec/shared/spec/edge_rider/preload_associations_spec.rb
272
- - spec/shared/spec/edge_rider/scoped_spec.rb
273
- - spec/shared/spec/edge_rider/to_id_query_spec.rb
274
- - spec/shared/spec/edge_rider/to_sql_spec.rb
275
- - spec/shared/spec/edge_rider/traverse_association_spec.rb
276
- - spec/shared/spec/edge_rider/util_spec.rb
195
+ test_files: []
196
+
197
+ has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODY2ODc4YmNlY2UxYjI4ZDBjMTRiZjg5ZGY1ZjM4Y2JhNzkyNDg2OA==
5
- data.tar.gz: !binary |-
6
- MGZhMTUwMWQxYWViNTQwMjVkMGQzZDE2YjljYTI1MmVlZThmNGFiYQ==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- MjYyZDFkZWM4NDYzNmVlNjEwNTk1NjdhMWUyNzc3YmUxNTZjOTVjZTMxOTZh
10
- MTQxMjBlMDdlMjQ4NmFmNWMxYWY4ZWFlMjA4MTQ2Y2UzNjQ2NmMyMDY1OTI3
11
- ZTljOGE4NmQ3MzU3MzBhM2U2Y2UxZGQ3NmM3YzA2MThhZTM5NzE=
12
- data.tar.gz: !binary |-
13
- NzQ4NTM3NWIwN2EyYjcyZWM5ZjgwZjNiYzVjZDc0NjBmZjc4OTM5NDBiZTg3
14
- NGI5NDU2MjM1MGU0MzI0MGE2YmQ1MGE1YzBkMDQwOGI4ODczMjE4NGEzNWJk
15
- MTA5NDg2NzVlYTkyNTI3NTkyODI2ZjQ1ODQyOThiZTgxNjRiMTg=