remote_db 0.0.7 → 0.0.8
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.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/CHANGELOG.md +4 -0
- data/lib/remote_db/concerns/configurable.rb +4 -3
- data/lib/remote_db/concerns/restricted_columns_mock.rb +11 -0
- data/lib/remote_db/version.rb +1 -1
- data/lib/remote_db.rb +1 -0
- data/spec/concerns/configurable_spec.rb +10 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e825f0a0f855f9e13e2e0a853e5c3b953a7fa604
|
4
|
+
data.tar.gz: e851fd91b0844519e59db00879475a4982e3f858
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 972201bcb4d619fa850f00babf03146e71ed117d997d2d9ea7cfdbda2e393df8b8fb9746aacd0d5f206c9d7577951388b7b2ce98db184275d23a6f0b0941abcd
|
7
|
+
data.tar.gz: 6fc148e306fc88d83e9ec3fc78f04cf48beb7734206314f0be09f927c49e90433e04d3b35242bfe3e79918bfc842f5a7272d6cc0c766dc0aab9e5ced5fa8b2df
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -63,10 +63,11 @@ module RemoteDb
|
|
63
63
|
# Force model to be ready-only
|
64
64
|
if options[:readonly]
|
65
65
|
include Concerns::ReadOnlyModel
|
66
|
+
# Scope which columns are exposed
|
67
|
+
include Concerns::RestrictedColumns
|
68
|
+
else
|
69
|
+
include Concerns::RestrictedColumnsMock
|
66
70
|
end
|
67
|
-
|
68
|
-
# Scope which columns are exposed
|
69
|
-
include Concerns::RestrictedColumns
|
70
71
|
end
|
71
72
|
|
72
73
|
self.const_set 'BaseRecord', klass
|
data/lib/remote_db/version.rb
CHANGED
data/lib/remote_db.rb
CHANGED
@@ -157,6 +157,16 @@ describe RemoteDb do
|
|
157
157
|
expect(TestDb::Person.first.first_name).to eq('John')
|
158
158
|
expect(TestDb::Person.last.first_name).to eq('Bob')
|
159
159
|
end
|
160
|
+
|
161
|
+
it 'should not raise error and successfully create with hidden column' do
|
162
|
+
expect(TestDb::Person.count).to eq(1)
|
163
|
+
TestDb.without_readonly do
|
164
|
+
TestDb::Person.create(first_name: 'Alice', last_name: 'Smith')
|
165
|
+
end
|
166
|
+
expect(TestDb::Person.count).to eq(2)
|
167
|
+
expect(TestDb::Person.last.first_name).to eq('Alice')
|
168
|
+
end
|
169
|
+
|
160
170
|
end
|
161
171
|
end
|
162
172
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remote_db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Omar Skalli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- lib/remote_db/concerns/configurable.rb
|
83
83
|
- lib/remote_db/concerns/read_only_model.rb
|
84
84
|
- lib/remote_db/concerns/restricted_columns.rb
|
85
|
+
- lib/remote_db/concerns/restricted_columns_mock.rb
|
85
86
|
- lib/remote_db/configuration.rb
|
86
87
|
- lib/remote_db/version.rb
|
87
88
|
- remote_db.gemspec
|
@@ -108,8 +109,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
109
|
version: '0'
|
109
110
|
requirements: []
|
110
111
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.4.4
|
112
113
|
signing_key:
|
113
114
|
specification_version: 4
|
114
115
|
summary: Easily create a gem for consuming remote database tables/columns.
|
115
116
|
test_files: []
|
117
|
+
has_rdoc:
|