arel-helpers 2.4.0 → 2.5.0

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: 6356cdb2e00758c2e17276118d916f727a1be308
4
- data.tar.gz: 26faaf1834fd66939b376ef0caa88f7e85d6bc41
3
+ metadata.gz: f1009f54fd7f6ec015f38a4c4c37321b74aa5a23
4
+ data.tar.gz: 4d7b85881fc754aa00ad80b869ca3abf6c14c6d1
5
5
  SHA512:
6
- metadata.gz: e07f4c676161cd241f861b48aef16411f262f09fc53d9773432e185804e062c41d117d196f553b2fb3fff834c42ec7fbd3e081ad42ed741a6ced87f66d7c1a73
7
- data.tar.gz: 9a72da308ac57e7df7dab0fce3c2909d6478f8c96170ede5c98fcf940f51f415c529838150dca14fd83ced259846c84601d312fb406b59a1545d120c43fa46c1
6
+ metadata.gz: 130ce322efa3f3cde98f37ce8312487f64bf9b80f597893dc98e4ca0df5ab89b1aabe9173015b45baf869388a8a5386b1fbb8797ffbe7c4b34260ce6f691e53f
7
+ data.tar.gz: 75deca0bf9ac64644da21446eda134b3815627650bfd52c6087551ede0ef9369025b2dccc64cf8650e53eaeb882e938e8fdb67dfdbe0cc5ebf1200dfb08f8eec
data/History.txt CHANGED
@@ -41,3 +41,9 @@
41
41
  == 2.4.0
42
42
 
43
43
  * Adding support for Rails 5.1 (@hasghari #30)
44
+
45
+ == 2.5.0
46
+
47
+ * Add license information to gemspec so it is parsed by verifiers (@petergoldstein #31)
48
+ * Update QueryBuilder#reflect to create deep copy of builder (@wycleffsean #32)
49
+
data/arel-helpers.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.authors = ["Cameron Dutro"]
8
8
  s.email = ["camertron@gmail.com"]
9
9
  s.homepage = "http://github.com/camertron"
10
-
10
+ s.license = 'MIT'
11
11
  s.description = s.summary = "Useful tools to help construct database queries with ActiveRecord and Arel."
12
12
 
13
13
  s.platform = Gem::Platform::RUBY
@@ -23,7 +23,7 @@ module ArelHelpers
23
23
  protected
24
24
 
25
25
  def reflect(query)
26
- self.class.new(query)
26
+ dup.tap { |obj| obj.instance_variable_set('@query'.freeze, query) }
27
27
  end
28
28
  end
29
29
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ArelHelpers
4
- VERSION = '2.4.0'
4
+ VERSION = '2.5.0'
5
5
  end
@@ -3,6 +3,9 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  class TestQueryBuilder < ArelHelpers::QueryBuilder
6
+ attr_accessor :params
7
+ alias_method :params?, :params
8
+
6
9
  def initialize(query = nil)
7
10
  super(query || Post.unscoped)
8
11
  end
@@ -17,7 +20,10 @@ describe ArelHelpers::QueryBuilder do
17
20
 
18
21
  it "returns (i.e. reflects) new instances of QueryBuilder" do
19
22
  builder.tap do |original_builder|
20
- original_builder.noop.object_id.should_not == original_builder.object_id
23
+ original_builder.params = true
24
+ new_builder = original_builder.noop
25
+ new_builder.object_id.should_not == original_builder.object_id
26
+ new_builder.params?.should == true
21
27
  end
22
28
  end
23
29
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arel-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-16 00:00:00.000000000 Z
11
+ date: 2017-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -57,7 +57,8 @@ files:
57
57
  - spec/query_builder_spec.rb
58
58
  - spec/spec_helper.rb
59
59
  homepage: http://github.com/camertron
60
- licenses: []
60
+ licenses:
61
+ - MIT
61
62
  metadata: {}
62
63
  post_install_message:
63
64
  rdoc_options: []
@@ -75,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
76
  version: '0'
76
77
  requirements: []
77
78
  rubyforge_project:
78
- rubygems_version: 2.4.5.1
79
+ rubygems_version: 2.6.11
79
80
  signing_key:
80
81
  specification_version: 4
81
82
  summary: Useful tools to help construct database queries with ActiveRecord and Arel.