torque-postgresql 0.2.7 → 0.2.8

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: 3acbe6336e50f21c522fc33c2d8681793c32d9f1
4
- data.tar.gz: a33f97c88c4a7c18791cd12b8c6e1b1fa7f85132
3
+ metadata.gz: 77fe57dba60b709f1630900c99cf9da7d79f6215
4
+ data.tar.gz: 08f084e211d6c5ad863dd05a18206be6cf20d1f4
5
5
  SHA512:
6
- metadata.gz: bfc4259f12a5e67c1edf53fae8417dc3872065167131a1727fe91737cb5610e38176650fc7b845067bd413e81572a593d1b6a4a3336f2dd9b75518ccde7d62ba
7
- data.tar.gz: 0ab22cd3aedf08ad64cd26d7a313507de38de4ab18f88cf3c6fe336f38bc0cb42b5a75a44e89377cd57f9e3966b1996371a6a81b0ffe2d642dfe303d8ddc5034
6
+ metadata.gz: 0de3b0d995bac98ac02b2a48641c087820b37e8d28508b6645e64f0d9cba418b698b1cd8279fcd92c23d51ca0d5f7732c040ed50c65d577061dcfae9fa37387b
7
+ data.tar.gz: a8d2f34d7a7b9245db779be70c73de28bd17de6e7cff36ecda2e5c0595df8fe0b03d958e5ddf16473ce46db6aa1209851ed638f9e7ac2bdfb4b5fbe409742cf0
@@ -29,6 +29,11 @@ module Torque
29
29
  cast_value(value)
30
30
  end
31
31
 
32
+ # Always use symbol value for schema dumper
33
+ def type_cast_for_schema(value)
34
+ cast_value(value).to_sym.inspect
35
+ end
36
+
32
37
  private
33
38
 
34
39
  def cast_value(value)
@@ -123,8 +123,8 @@ module Torque
123
123
  # attribute value
124
124
  def all_values
125
125
  values_methods.each do |val, list|
126
- klass.singleton_class.module_eval <<-STR, __FILE__, __LINE__ + 1
127
- def #{list[0]} # def disabled
126
+ klass.module_eval <<-STR, __FILE__, __LINE__ + 1
127
+ scope :#{list[0]}, -> do # scope :disabled, -> do
128
128
  where(#{attribute}: '#{val}') # where(status: 'disabled')
129
129
  end # end
130
130
  STR
@@ -1,5 +1,5 @@
1
1
  module Torque
2
2
  module PostgreSQL
3
- VERSION = '0.2.7'
3
+ VERSION = '0.2.8'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torque-postgresql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Silva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-11 00:00:00.000000000 Z
11
+ date: 2018-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails