nobrainer 0.34.0 → 0.34.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
- SHA1:
3
- metadata.gz: 6aeddbfcb32d5cd100bb92a6c05b6c6f5c45a15e
4
- data.tar.gz: a6e70c12de29fe7154b19254220d52b7ad803e26
2
+ SHA256:
3
+ metadata.gz: ad996bff8cfeced8ef2da26c7b989d24138bb5e4c9a7aa53738cd2cbdfdd907c
4
+ data.tar.gz: a24979230bc5d9deeb4dfbee4f353de22a61037dddff0e97521a8d72380db9af
5
5
  SHA512:
6
- metadata.gz: 997850d56ff98737d2f1c0feb498fe2c4377ee90e33eee54aeb9d574fd11c289faae0e348906b0df1d11d9f03088c5fb51a7fce4a762811b8e8323acca1ddd0c
7
- data.tar.gz: acb35bf857b08452f31618bd80b304d69f195dd94a3b42d066ce6e9957d87e5ceffd7988a272de406156a0c343c9a85ee99e094182b1705f38560b2efae71392
6
+ metadata.gz: c3fbe68aa20b186aaca5b5981c476754a9f3cb7e238d09db17340a348f983d48518e34927064cd124640b5dd47564406893613b2a39487b90712e7e02a5bcd58
7
+ data.tar.gz: 34106b6e8c1be3260dc8e6356c0658deaabff758818def9aafead00445c2ffcb8b93f8c6b261b4d1d6555d0e5dae0f8c97aad1e123c583933b79eda283849791
data/CHANGELOG.md ADDED
@@ -0,0 +1,129 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.34.1] - 2021-02-18
10
+ ### Fixed
11
+ - Defining attributes at class level (Rails 6.1 compatibity)
12
+ - Ruby 2.7 support
13
+
14
+ ## [0.34.0] - 2019-10-15
15
+ ### Added
16
+ - Rails 6 support
17
+ - Support for the nonvoting_replica_tags table option
18
+
19
+ ## [0.33.0] - 2016-11-27
20
+ ### Added
21
+ - Allow a run_options to be configured globally
22
+ - Support for username and password authentication
23
+
24
+ ### Changed
25
+ - Use URI.decode() for user and password in the RethinkDB URL
26
+ - Also comment active_record lines in the config/initializers/*.rb on gem installation
27
+ - Removed .unscoped when fetching belongs_to associations
28
+ - update_all() operates without ordering
29
+ - has_many dependent refactoring
30
+ - Default logger should be STDERR if the rails logger is not initialized
31
+ - Locking: changes lock key type from string to text in order to support more than 255 characters keys by default, the key type needs to be Text.
32
+ - field type for rql_function to :text
33
+
34
+ ### Fixed
35
+ - Model reloading with Rails5
36
+ - Rails 5 Strong Parameters: Strong parameters are not a Hash anymore in Rails 5, but support transforming into a hash
37
+
38
+ ## [0.32.0] - 2016-06-05
39
+ ### Added
40
+ - Compatiblity with Rails5
41
+ - order() as an alias of order_by()
42
+ - Provide attribute_will_change!() for compatibility
43
+
44
+ ### Changed
45
+ - Comments more active_record related configs during install
46
+
47
+ ### Fixed
48
+ - Rails 5 deprecation: Using ActiveSupport::Reloader instead of ActionDispatch::Reloader to be ready when Rails 5 hits
49
+ - config syntax
50
+
51
+ ### Removed
52
+ - JRuby and Rbx in travis-ci
53
+
54
+ ## [0.31.0] - 2016-02-07
55
+ ### Added
56
+ - Allow belongs_to association names to be used in upsert params
57
+ - `uniq` shorthand for the belongs_to association
58
+ - Allow self-referential belongs_to
59
+ - Prevent double loading of the same model
60
+ - Use index for where(XXX.defined => true)
61
+ - Guard against bad virtual attribute expressions
62
+ - Allow non existing attributes to be lazy fetched
63
+ - Added back update_attributes()
64
+
65
+ ### Fixed
66
+ - Fix join on keys that are undefined
67
+
68
+ ### Changed
69
+ - where() leverages the association translation abstraction
70
+ - Primary keys time offset should operate on fixed timezone
71
+
72
+ ### Removed
73
+ - Removing locking around sync_table_config
74
+
75
+ ## [0.30.0] - 2015-10-03
76
+ ### Added
77
+ - Add rbx-2 to .travis.yml
78
+ - Add the virtual attribute feature
79
+ - Lock: Allow find() to get locks by key
80
+ - Locks: Allow default expire/timeout values to be passed in new()
81
+ - NoBrainer::ReentrantLock implementation
82
+ - Allow compound indexes to be declared with an implicit name
83
+ - Allow polymorphic queries with first_or_create under certain conditions
84
+
85
+ ### Changed
86
+ - Prevent first_or_create() to accept block with arguments
87
+
88
+ ### Fixed
89
+ - Fix rails issue with tests and profiler
90
+ - Fix where() .include modifier with type checking
91
+ - Virtual attribute option fix
92
+ - Discard documents when join() encounter a nil join key
93
+ - Locks: bug fix: allow small timeouts in lock()
94
+ - Fix reentrant lock counter on steals
95
+
96
+ [Unreleased]: https://github.com/nobrainerorm/nobrainer/compare/v0.34.1...HEAD
97
+ [0.34.1]: https://github.com/nobrainerorm/nobrainer/compare/v0.34.0...v0.34.1
98
+ [0.34.0]: https://github.com/nobrainerorm/nobrainer/compare/v0.33.0...v0.34.0
99
+ [0.33.0]: https://github.com/nobrainerorm/nobrainer/compare/v0.32.0...v0.33.0
100
+ [0.32.0]: https://github.com/nobrainerorm/nobrainer/compare/v0.31.0...v0.32.0
101
+ [0.31.0]: https://github.com/nobrainerorm/nobrainer/compare/v0.30.0...v0.31.0
102
+ [0.30.0]: https://github.com/nobrainerorm/nobrainer/compare/v0.29.0...v0.30.0
103
+ [0.29.0]: https://github.com/nobrainerorm/nobrainer/compare/0.28.0...0.29.0
104
+ [0.28.0]: https://github.com/nobrainerorm/nobrainer/compare/0.27.0...0.28.0
105
+ [0.27.0]: https://github.com/nobrainerorm/nobrainer/compare/0.26.0...0.27.0
106
+ [0.26.0]: https://github.com/nobrainerorm/nobrainer/compare/0.25.1...0.26.0
107
+ [0.25.1]: https://github.com/nobrainerorm/nobrainer/compare/0.25.0...0.25.1
108
+ [0.25.0]: https://github.com/nobrainerorm/nobrainer/compare/0.24.0...0.25.0
109
+ [0.24.0]: https://github.com/nobrainerorm/nobrainer/compare/0.23.0...0.24.0
110
+ [0.23.0]: https://github.com/nobrainerorm/nobrainer/compare/0.22.0...0.23.0
111
+ [0.22.0]: https://github.com/nobrainerorm/nobrainer/compare/0.21.0...0.22.0
112
+ [0.21.0]: https://github.com/nobrainerorm/nobrainer/compare/0.20.0...0.21.0
113
+ [0.20.0]: https://github.com/nobrainerorm/nobrainer/compare/0.19.0...0.20.0
114
+ [0.19.0]: https://github.com/nobrainerorm/nobrainer/compare/0.18.1...0.19.0
115
+ [0.18.1]: https://github.com/nobrainerorm/nobrainer/compare/0.18.0...0.18.1
116
+ [0.18.0]: https://github.com/nobrainerorm/nobrainer/compare/0.17.0...0.18.0
117
+ [0.17.0]: https://github.com/nobrainerorm/nobrainer/compare/0.16.0...0.17.0
118
+ [0.16.0]: https://github.com/nobrainerorm/nobrainer/compare/0.15.0...0.16.0
119
+ [0.15.0]: https://github.com/nobrainerorm/nobrainer/compare/0.14.0...0.15.0
120
+ [0.15.0]: https://github.com/nobrainerorm/nobrainer/compare/0.14.0...0.15.0
121
+ [0.14.0]: https://github.com/nobrainerorm/nobrainer/compare/0.13.1...0.14.0
122
+ [0.13.1]: https://github.com/nobrainerorm/nobrainer/compare/0.13.0...0.13.1
123
+ [0.13.0]: https://github.com/nobrainerorm/nobrainer/compare/0.12.0...0.13.0
124
+ [0.12.0]: https://github.com/nobrainerorm/nobrainer/compare/0.11.0...0.12.0
125
+ [0.11.0]: https://github.com/nobrainerorm/nobrainer/compare/0.10.0...0.11.0
126
+ [0.10.0]: https://github.com/nobrainerorm/nobrainer/compare/0.9.1...0.10.0
127
+ [0.9.1]: https://github.com/nobrainerorm/nobrainer/compare/0.9.0...0.9.1
128
+ [0.9.0]: https://github.com/nobrainerorm/nobrainer/compare/0.8.0...0.9.0
129
+ [0.8.0]: https://github.com/nobrainerorm/nobrainer/releases/tag/0.8.0
@@ -19,8 +19,8 @@ class NoBrainer::Connection
19
19
  end
20
20
 
21
21
  {
22
- :user => uri.user && URI.decode(uri.user),
23
- :password => uri.password && URI.decode(uri.password),
22
+ :user => uri.user && CGI.unescape(uri.user),
23
+ :password => uri.password && CGI.unescape(uri.password),
24
24
  :host => uri.host,
25
25
  :port => uri.port || 28015,
26
26
  :db => uri.path.gsub(/^\//, ''),
@@ -1,6 +1,9 @@
1
1
  module NoBrainer::Document::Types
2
2
  extend ActiveSupport::Concern
3
3
 
4
+ mattr_accessor :loaded_extensions
5
+ self.loaded_extensions = Set.new
6
+
4
7
  included { before_validation :add_type_errors }
5
8
 
6
9
  def add_type_errors
@@ -111,8 +114,6 @@ module NoBrainer::Document::Types
111
114
  end
112
115
 
113
116
  class << self
114
- mattr_accessor :loaded_extensions
115
- self.loaded_extensions = Set.new
116
117
  def load_type_extensions(model)
117
118
  unless loaded_extensions.include?(model)
118
119
  begin
@@ -34,6 +34,16 @@ class NoBrainer::QueryRunner::TableOnDemand < NoBrainer::QueryRunner::Middleware
34
34
  r.table_create(table_name, create_options.reject { |k,_| k.in? [:name, :write_acks] })
35
35
  end
36
36
 
37
+ # Prevent duplicate table errors on a cluster.
38
+ # Workaround from https://github.com/rethinkdb/rethinkdb/issues/4898#issuecomment-270267740
39
+ NoBrainer.run(:db => 'rethinkdb') do |r|
40
+ r.table('table_config')
41
+ .filter({db: db_name, name: table_name})
42
+ .order_by('id')
43
+ .slice(1)
44
+ .delete
45
+ end
46
+
37
47
  if create_options[:write_acks] && create_options[:write_acks] != 'single'
38
48
  NoBrainer.run(:db => db_name) do |r|
39
49
  r.table(table_name).config().update(:write_acks => create_options[:write_acks])
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nobrainer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.0
4
+ version: 0.34.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Viennot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-16 00:00:00.000000000 Z
11
+ date: 2021-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rethinkdb
14
+ name: activemodel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.3.0
19
+ version: 4.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 2.3.0
26
+ version: 4.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,33 +39,33 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: 4.1.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: activemodel
42
+ name: middleware
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 4.1.0
47
+ version: 0.1.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 4.1.0
54
+ version: 0.1.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: middleware
56
+ name: rethinkdb
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 0.1.0
61
+ version: 2.3.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 0.1.0
68
+ version: 2.3.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: symbol_decoration
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -80,13 +80,15 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.1'
83
- description: ORM for RethinkDB
83
+ description: The goal of NoBrainer is to provide a similar interface compared to ActiveRecord
84
+ and Mongoid to build data models on top of RethinkDB while providing precise semantics.
84
85
  email:
85
86
  - nicolas@viennot.biz
86
87
  executables: []
87
88
  extensions: []
88
89
  extra_rdoc_files: []
89
90
  files:
91
+ - CHANGELOG.md
90
92
  - LICENSE
91
93
  - README.md
92
94
  - lib/no_brainer/autoload.rb
@@ -236,9 +238,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
238
  - !ruby/object:Gem::Version
237
239
  version: '0'
238
240
  requirements: []
239
- rubyforge_project:
240
- rubygems_version: 2.5.2.3
241
+ rubygems_version: 3.1.4
241
242
  signing_key:
242
243
  specification_version: 4
243
- summary: ORM for RethinkDB
244
+ summary: A Ruby ORM for RethinkDB
244
245
  test_files: []