my_plugin 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDlkOTY3ODFkOTNmZTUyMzNjY2ZjNTZkM2M3ODNjMjBhZjE4N2I0YQ==
4
+ MTg3NTFiYjYzNmMzYzM5MjkwOWQxYTU0NmI2YjNiZjQyZGMwOTY0MQ==
5
5
  data.tar.gz: !binary |-
6
- NzdhYmFkMzg1NjA1NzViMGNiNmQ4MjY2OTIzMDJmMWQ4MjQ4ZDZkZQ==
6
+ ODZlZTEyZWNmNTAxYWVhMDI2YjRmMWMyNWU3NDc3MzdlMDk1MGE4OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTI2MGI2ZDBlNGQxYWJhYWI5Yjk5OGQ4OGY0NGI1NGI4MWU0ZDY4NGU3ZWNi
10
- ZjMzM2IwNzM0YjkzODI5MTlmYzgyMTIxYmJlMjFiMzk0NGRmNmNlNDQ5YjQz
11
- ZDg1ZDA1MjFlM2NjNDA5Yjg4N2Q3NGE0ZjhlYmMxNzI5ZDNmMzU=
9
+ OGQzZTZiMjc5ODM2ZWYwNDFlZWU1YWJlODg0MjdmNGU2YzZiZjg0Nzc2MmZh
10
+ MTk0NTBiZjZkNjBiNDVlODE3OWQ3NWMxOGJmM2UxNjU4MjAxZDU2NjM2ZjUz
11
+ ZDQzOTI3Zjc2ZDljMjQyNGE1MjQzNzU5NGFhMWJlZjEwNGIyOTI=
12
12
  data.tar.gz: !binary |-
13
- YWU0Nzc5NDVmNDBkNzUyZjY1NTY5ODY1M2UxZmFkY2E5YTc0ZjY0NjY2NGVk
14
- YWZjNTA4YWQzNGM0ODBhNmM0ZmFhMjlkZmRmY2U0YmY3ZDI0YmRlNDhhYmFm
15
- ZjU0Y2I5YjczMTY1YWMwMWU3YjczNzAyNjQxZWM0NWM3MTIzN2Y=
13
+ NDQxNjAzNTY4ZjlkMzFmNjg5OWFiMTJmMDUxODRkNDY5Nzk1Mzk5NTcyZWVm
14
+ ODAyNjY2NzgzY2I0ZmQ2MGVjNGQwMjc1YWZiZWEzYWZhYTA0MmI2MGMxNWVl
15
+ MTE4OTg4ZTRkNjg2ZDRlNzY2ZWRlNDg4OWZiNDljMTY3YmYxNzU=
@@ -1,3 +1,3 @@
1
1
  module MyPlugin
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
@@ -10,6 +10,7 @@ namespace :db do
10
10
 
11
11
  found_by_id = found_by_id.to_i
12
12
  model_class = model_class.constantize
13
+ field = field.to_sym
13
14
 
14
15
  puts "#{pick(model_class).username}"
15
16
  puts "#{set(model_class, field, found_by_id, key_pair)}"
@@ -21,7 +22,7 @@ namespace :db do
21
22
  def set(model_class, field, found_by_id, key_pair)
22
23
  puts "putting value in model attribute"
23
24
  obj = model_class.find(found_by_id)
24
- obj.send(field.to_sym) = Hash[*key_pair.split(',')]
25
+ obj.send(field+'=', Hash[*key_pair.split(',')])
25
26
  obj.save
26
27
  end
27
28
 
@@ -30,7 +31,7 @@ namespace :db do
30
31
  def get(model_class, field, found_by_id, key_pair)
31
32
  puts "getting value in model attribute"
32
33
  obj = model_class.find(found_by_id)
33
- obj.send(field.to_sym)
34
+ obj.send(field)
34
35
  end
35
36
 
36
37
  desc "Pick model attribute"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sohair Ahmad