active_record_query_fixer 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8f597eb38ae0d02fa5d48e4fd50fcf1268a15cd
4
- data.tar.gz: e019a708e58d4d1de136902141d2a26a64cf93a8
3
+ metadata.gz: 857a123c7746b0ebd13d93156ced020958521e5c
4
+ data.tar.gz: 77645290416e092257151a2ecc2420f4e7405fa6
5
5
  SHA512:
6
- metadata.gz: a88ce9067351caf82731cc975ac28b2dcc0ad6bf5608a41bc2b83f5dfa43be28b292463e7900f5c5a9779bf1071fe3b1c3dfa9f6cc7804cccc96ff5550abf203
7
- data.tar.gz: 45acd0bd43c74e21e240be4754b1bb54efb092ae21cbeb7121a6fb9569ace17774e4b05c8489aa4419e2ff8c1603e37d2c3e00c65a5d2d9f869ec1e2133af47a
6
+ metadata.gz: 2c362a8eda27b6c42bfeefef6af4a201800985823e7efaa08efecde260d2c08c7c1da55b41c46fcba7a05e25e7f2bcff1098a031fbc663ae47a5b91acae4f769
7
+ data.tar.gz: 1eb23a9207d260b706637e22b5ccbd9f47df50e8c4a48c5596204d163d27f9b63c78882a624aaa79b9629cdf4c72ecd8b6a07811e22bb76b19876f6fe24dcc33
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017 kaspernj
1
+ Copyright 2017 kaspernj
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -1,54 +1,32 @@
1
- # encoding: utf-8
2
-
3
- require "rubygems"
4
- require "bundler"
5
1
  begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require "rake"
13
-
14
- require "jeweler"
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
17
- gem.name = "active_record_query_fixer"
18
- gem.homepage = "http://github.com/kaspernj/active_record_query_fixer"
19
- gem.license = "MIT"
20
- gem.summary = %(A library for automatically added `.select` on a column used for `.distinct` or automatically adding `.group` for a column used for order.)
21
- gem.description =
22
- %(A library for automatically added `.select` on a column used for `.distinct` or automatically adding `.group` for a column used for order.)
23
- gem.email = "kaspernj@gmail.com"
24
- gem.authors = ["kaspernj"]
25
- # dependencies defined in Gemfile
2
+ require "bundler/setup"
3
+ rescue LoadError
4
+ puts "You must `gem install bundler` and `bundle install` to run rake tasks"
26
5
  end
27
- Jeweler::RubygemsDotOrgTasks.new
28
6
 
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
7
+ require "rdoc/task"
34
8
 
35
- desc "Code coverage detail"
36
- task :simplecov do
37
- ENV["COVERAGE"] = "true"
38
- Rake::Task["spec"].execute
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = "rdoc"
11
+ rdoc.title = "ActiveRecordQueryFixer"
12
+ rdoc.options << "--line-numbers"
13
+ rdoc.rdoc_files.include("README.md")
14
+ rdoc.rdoc_files.include("lib/**/*.rb")
39
15
  end
40
16
 
41
- task default: :spec
17
+ require "bundler/gem_tasks"
42
18
 
43
- require "rdoc/task"
44
- Rake::RDocTask.new do |rdoc|
45
- version = File.exist?("VERSION") ? File.read("VERSION") : ""
19
+ require "rake/testtask"
46
20
 
47
- rdoc.rdoc_dir = "rdoc"
48
- rdoc.title = "active_record_query_fixer #{version}"
49
- rdoc.rdoc_files.include("README*")
50
- rdoc.rdoc_files.include("lib/**/*.rb")
21
+ Rake::TestTask.new(:test) do |t|
22
+ t.libs << "lib"
23
+ t.libs << "test"
24
+ t.pattern = "test/**/*_test.rb"
25
+ t.verbose = false
51
26
  end
52
27
 
28
+
29
+ task default: :test
30
+
53
31
  require "best_practice_project"
54
32
  BestPracticeProject.load_tasks
@@ -16,15 +16,11 @@ class ActiveRecordQueryFixer
16
16
  end
17
17
 
18
18
  def fix_order_group
19
- return if @query.values[:group].empty?
19
+ return if @query.values[:joins].blank?
20
+ @query = @query.group("#{@query.model.table_name}.#{@query.model.primary_key}")
20
21
 
21
- changed = false
22
22
  @query.values[:order].each do |order|
23
- next if !order.is_a?(Arel::Nodes::Ascending) &&
24
- !order.is_a?(Arel::Nodes::Descending)
25
-
26
- @query = @query.group("#{order.expr.relation.right}.#{order.expr.name}")
27
- changed = true
23
+ @query = @query.group(extract_table_and_column_from_expression(order))
28
24
  end
29
25
 
30
26
  self
@@ -35,14 +31,27 @@ class ActiveRecordQueryFixer
35
31
 
36
32
  changed = false
37
33
  @query.values[:order].each do |order|
38
- next if !order.is_a?(Arel::Nodes::Ascending) &&
39
- !order.is_a?(Arel::Nodes::Descending)
40
-
41
- @query = @query.select("#{order.expr.relation.right}.#{order.expr.name}")
34
+ @query = @query.select(extract_table_and_column_from_expression(order))
42
35
  changed = true
43
36
  end
44
37
 
45
38
  @query = @query.select("#{@query.table_name}.*") if changed
46
39
  self
47
40
  end
41
+
42
+ private
43
+
44
+ def extract_table_and_column_from_expression(order)
45
+ if order.is_a?(Arel::Nodes::Ascending) || order.is_a?(Arel::Nodes::Descending)
46
+ if order.expr.relation.respond_to?(:right)
47
+ "#{order.expr.relation.right}.#{order.expr.name}"
48
+ else
49
+ "#{order.expr.relation.table_name}.#{order.expr.name}"
50
+ end
51
+ elsif order.is_a?(String)
52
+ order
53
+ else
54
+ raise "Couldn't extract table and column from: #{order}"
55
+ end
56
+ end
48
57
  end
@@ -0,0 +1,3 @@
1
+ class ActiveRecordQueryFixer
2
+ VERSION = "0.0.1".freeze
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :active_record_query_fixer do
3
+ # # Task goes here
4
+ # end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_query_fixer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaspernj
@@ -9,128 +9,22 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2017-04-15 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: best_practice_project
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '='
18
- - !ruby/object:Gem::Version
19
- version: 0.0.10
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '='
25
- - !ruby/object:Gem::Version
26
- version: 0.0.10
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.0'
41
- - !ruby/object:Gem::Dependency
42
- name: jeweler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '='
46
- - !ruby/object:Gem::Version
47
- version: 2.3.3
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '='
53
- - !ruby/object:Gem::Version
54
- version: 2.3.3
55
- - !ruby/object:Gem::Dependency
56
- name: rdoc
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '3.12'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3.12'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 3.5.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 3.5.0
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '='
88
- - !ruby/object:Gem::Version
89
- version: 0.48.1
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '='
95
- - !ruby/object:Gem::Version
96
- version: 0.48.1
97
- - !ruby/object:Gem::Dependency
98
- name: simplecov
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
12
+ dependencies: []
111
13
  description: A library for automatically added `.select` on a column used for `.distinct`
112
14
  or automatically adding `.group` for a column used for order.
113
- email: kaspernj@gmail.com
15
+ email:
16
+ - kaspernj@gmail.com
114
17
  executables: []
115
18
  extensions: []
116
- extra_rdoc_files:
117
- - LICENSE.txt
118
- - README.md
19
+ extra_rdoc_files: []
119
20
  files:
120
- - ".document"
121
- - ".rspec"
122
- - ".rubocop.yml"
123
- - Gemfile
124
- - Gemfile.lock
125
- - LICENSE.txt
21
+ - MIT-LICENSE
126
22
  - README.md
127
23
  - Rakefile
128
- - VERSION
129
- - active_record_query_fixer.gemspec
130
24
  - lib/active_record_query_fixer.rb
131
- - spec/active_record_query_fixer_spec.rb
132
- - spec/spec_helper.rb
133
- homepage: http://github.com/kaspernj/active_record_query_fixer
25
+ - lib/active_record_query_fixer/version.rb
26
+ - lib/tasks/active_record_query_fixer_tasks.rake
27
+ homepage: https://www.github.com/kaspernj/active_record_query_fixer
134
28
  licenses:
135
29
  - MIT
136
30
  metadata: {}
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
data/.rubocop.yml DELETED
@@ -1,83 +0,0 @@
1
- AllCops:
2
- DisplayCopNames: true
3
- DisplayStyleGuide: true
4
- Exclude:
5
- - db/schema.rb
6
- - spec/dummy/db/schema.rb
7
-
8
- # https://github.com/AtomLinter/linter-rubocop/issues/2
9
- Style/FileName:
10
- Enabled: false
11
-
12
- Metrics/CyclomaticComplexity:
13
- Max: 10
14
-
15
- Metrics/LineLength:
16
- Max: 160
17
-
18
- Metrics/MethodLength:
19
- Max: 50
20
-
21
- Metrics/AbcSize:
22
- Max: 25
23
-
24
- Metrics/ClassLength:
25
- Max: 250
26
-
27
- # .find_each is not the same as .each
28
- Rails/FindEach:
29
- Enabled: false
30
-
31
- Style/AccessModifierIndentation:
32
- EnforcedStyle: outdent
33
-
34
- Style/AlignParameters:
35
- EnforcedStyle: with_fixed_indentation
36
-
37
- Style/ClassAndModuleChildren:
38
- EnforcedStyle: compact
39
-
40
- Style/ConditionalAssignment:
41
- Enabled: false
42
-
43
- Style/Documentation:
44
- Enabled: false
45
-
46
- Style/EmptyLines:
47
- Enabled: false
48
-
49
- # Will report offences for many places that are much more readable without using a guard clause
50
- Style/GuardClause:
51
- Enabled: false
52
-
53
- Style/MultilineMethodCallIndentation:
54
- EnforcedStyle: indented
55
-
56
- Style/MultilineOperationIndentation:
57
- EnforcedStyle: indented
58
-
59
- Style/StringLiterals:
60
- EnforcedStyle: double_quotes
61
-
62
- Style/StringLiteralsInInterpolation:
63
- Enabled: false
64
-
65
- Style/NilComparison:
66
- Enabled: false
67
-
68
- Style/SignalException:
69
- EnforcedStyle: only_raise
70
-
71
- Style/MultilineOperationIndentation:
72
- EnforcedStyle: indented
73
-
74
- Style/SpaceInsideHashLiteralBraces:
75
- EnforcedStyle: no_space
76
-
77
- Style/TrivialAccessors:
78
- ExactNameMatch: true
79
- Enabled: true
80
-
81
- # Disabled on purpose: https://github.com/bbatsov/rubocop/issues/1758
82
- Style/ClosingParenthesisIndentation:
83
- Enabled: false
data/Gemfile DELETED
@@ -1,16 +0,0 @@
1
- source "https://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
-
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development, :test do
9
- gem "best_practice_project", "0.0.10", require: false
10
- gem "bundler", "~> 1.0"
11
- gem "jeweler", "2.3.3"
12
- gem "rdoc", "~> 3.12"
13
- gem "rspec", "~> 3.5.0"
14
- gem "rubocop", "0.48.1"
15
- gem "simplecov", ">= 0"
16
- end
data/Gemfile.lock DELETED
@@ -1,107 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- addressable (2.5.0)
5
- public_suffix (~> 2.0, >= 2.0.2)
6
- ast (2.3.0)
7
- auto_autoloader (0.0.5)
8
- string-cases
9
- best_practice_project (0.0.10)
10
- auto_autoloader (>= 0.0.5)
11
- builder (3.2.3)
12
- descendants_tracker (0.0.4)
13
- thread_safe (~> 0.3, >= 0.3.1)
14
- diff-lcs (1.3)
15
- docile (1.1.5)
16
- faraday (0.9.2)
17
- multipart-post (>= 1.2, < 3)
18
- git (1.3.0)
19
- github_api (0.11.3)
20
- addressable (~> 2.3)
21
- descendants_tracker (~> 0.0.1)
22
- faraday (~> 0.8, < 0.10)
23
- hashie (>= 1.2)
24
- multi_json (>= 1.7.5, < 2.0)
25
- nokogiri (~> 1.6.0)
26
- oauth2
27
- hashie (3.5.5)
28
- highline (1.7.8)
29
- jeweler (2.3.3)
30
- builder
31
- bundler (>= 1.0)
32
- git (>= 1.2.5)
33
- github_api (~> 0.11.0)
34
- highline (>= 1.6.15)
35
- nokogiri (>= 1.5.10)
36
- psych (~> 2.2)
37
- rake
38
- rdoc
39
- semver2
40
- json (1.8.6)
41
- jwt (1.5.6)
42
- mini_portile2 (2.1.0)
43
- multi_json (1.12.1)
44
- multi_xml (0.6.0)
45
- multipart-post (2.0.0)
46
- nokogiri (1.6.8.1)
47
- mini_portile2 (~> 2.1.0)
48
- oauth2 (1.3.1)
49
- faraday (>= 0.8, < 0.12)
50
- jwt (~> 1.0)
51
- multi_json (~> 1.3)
52
- multi_xml (~> 0.5)
53
- rack (>= 1.2, < 3)
54
- parser (2.4.0.0)
55
- ast (~> 2.2)
56
- powerpack (0.1.1)
57
- psych (2.2.2)
58
- public_suffix (2.0.5)
59
- rack (2.0.1)
60
- rainbow (2.2.1)
61
- rake (12.0.0)
62
- rdoc (3.12.2)
63
- json (~> 1.4)
64
- rspec (3.5.0)
65
- rspec-core (~> 3.5.0)
66
- rspec-expectations (~> 3.5.0)
67
- rspec-mocks (~> 3.5.0)
68
- rspec-core (3.5.4)
69
- rspec-support (~> 3.5.0)
70
- rspec-expectations (3.5.0)
71
- diff-lcs (>= 1.2.0, < 2.0)
72
- rspec-support (~> 3.5.0)
73
- rspec-mocks (3.5.0)
74
- diff-lcs (>= 1.2.0, < 2.0)
75
- rspec-support (~> 3.5.0)
76
- rspec-support (3.5.0)
77
- rubocop (0.48.1)
78
- parser (>= 2.3.3.1, < 3.0)
79
- powerpack (~> 0.1)
80
- rainbow (>= 1.99.1, < 3.0)
81
- ruby-progressbar (~> 1.7)
82
- unicode-display_width (~> 1.0, >= 1.0.1)
83
- ruby-progressbar (1.8.1)
84
- semver2 (3.4.2)
85
- simplecov (0.14.1)
86
- docile (~> 1.1.0)
87
- json (>= 1.8, < 3)
88
- simplecov-html (~> 0.10.0)
89
- simplecov-html (0.10.0)
90
- string-cases (0.0.4)
91
- thread_safe (0.3.6)
92
- unicode-display_width (1.2.1)
93
-
94
- PLATFORMS
95
- ruby
96
-
97
- DEPENDENCIES
98
- best_practice_project (= 0.0.10)
99
- bundler (~> 1.0)
100
- jeweler (= 2.3.3)
101
- rdoc (~> 3.12)
102
- rspec (~> 3.5.0)
103
- rubocop (= 0.48.1)
104
- simplecov
105
-
106
- BUNDLED WITH
107
- 1.13.7
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.0.0
@@ -1,71 +0,0 @@
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
- # stub: active_record_query_fixer 0.0.0 ruby lib
6
-
7
- Gem::Specification.new do |s|
8
- s.name = "active_record_query_fixer".freeze
9
- s.version = "0.0.0"
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib".freeze]
13
- s.authors = ["kaspernj".freeze]
14
- s.date = "2017-04-15"
15
- s.description = "A library for automatically added `.select` on a column used for `.distinct` or automatically adding `.group` for a column used for order.".freeze
16
- s.email = "kaspernj@gmail.com".freeze
17
- s.extra_rdoc_files = [
18
- "LICENSE.txt",
19
- "README.md"
20
- ]
21
- s.files = [
22
- ".document",
23
- ".rspec",
24
- ".rubocop.yml",
25
- "Gemfile",
26
- "Gemfile.lock",
27
- "LICENSE.txt",
28
- "README.md",
29
- "Rakefile",
30
- "VERSION",
31
- "active_record_query_fixer.gemspec",
32
- "lib/active_record_query_fixer.rb",
33
- "spec/active_record_query_fixer_spec.rb",
34
- "spec/spec_helper.rb"
35
- ]
36
- s.homepage = "http://github.com/kaspernj/active_record_query_fixer".freeze
37
- s.licenses = ["MIT".freeze]
38
- s.rubygems_version = "2.6.8".freeze
39
- s.summary = "A library for automatically added `.select` on a column used for `.distinct` or automatically adding `.group` for a column used for order.".freeze
40
-
41
- if s.respond_to? :specification_version then
42
- s.specification_version = 4
43
-
44
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
- s.add_development_dependency(%q<best_practice_project>.freeze, ["= 0.0.10"])
46
- s.add_development_dependency(%q<bundler>.freeze, ["~> 1.0"])
47
- s.add_development_dependency(%q<jeweler>.freeze, ["= 2.3.3"])
48
- s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12"])
49
- s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
50
- s.add_development_dependency(%q<rubocop>.freeze, ["= 0.48.1"])
51
- s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
52
- else
53
- s.add_dependency(%q<best_practice_project>.freeze, ["= 0.0.10"])
54
- s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
55
- s.add_dependency(%q<jeweler>.freeze, ["= 2.3.3"])
56
- s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
57
- s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
58
- s.add_dependency(%q<rubocop>.freeze, ["= 0.48.1"])
59
- s.add_dependency(%q<simplecov>.freeze, [">= 0"])
60
- end
61
- else
62
- s.add_dependency(%q<best_practice_project>.freeze, ["= 0.0.10"])
63
- s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
64
- s.add_dependency(%q<jeweler>.freeze, ["= 2.3.3"])
65
- s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
66
- s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
67
- s.add_dependency(%q<rubocop>.freeze, ["= 0.48.1"])
68
- s.add_dependency(%q<simplecov>.freeze, [">= 0"])
69
- end
70
- end
71
-
@@ -1,7 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/spec_helper")
2
-
3
- describe "ActiveRecordQueryFixer" do
4
- it "fails" do
5
- raise "hey buddy, you should probably rename this file and start specing for real"
6
- end
7
- end
data/spec/spec_helper.rb DELETED
@@ -1,28 +0,0 @@
1
- require "simplecov"
2
-
3
- module SimpleCov::Configuration
4
- def clean_filters
5
- @filters = []
6
- end
7
- end
8
-
9
- SimpleCov.configure do
10
- clean_filters
11
- load_adapter "test_frameworks"
12
- end
13
-
14
- ENV["COVERAGE"] && SimpleCov.start do
15
- add_filter "/.rvm/"
16
- end
17
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
18
- $LOAD_PATH.unshift(File.dirname(__FILE__))
19
-
20
- require "rspec"
21
- require "active_record_query_fixer"
22
-
23
- # Requires supporting files with custom matchers and macros, etc,
24
- # in ./support/ and its subdirectories.
25
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
26
-
27
- RSpec.configure do |config|
28
- end