hola_milind_patel 0.1.3 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hola_milind_patel.rb +13 -16
- metadata +29 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23bad1918baca470ebf1d5fa903637a84ed691a2546f168c697506dfb6661a05
|
4
|
+
data.tar.gz: 8c6f99ea9347cd84442dbf7a42a53b8d6f5666eedd3f93a384330ee58f130682
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8de69600cdd111985121bbdfcde9ccaa7b84d5a45fec48cb7757b78debf8a216c184a096bd853126f237ef096230814587a9a5f9c81a6c01b9ce880ea1981ad8
|
7
|
+
data.tar.gz: 0aae83a435889eff83f2d9c16cc7c4b431f93d457c194a3db562a89e35ad9d501ec85ee0083eb8060ca9616594d31360e2b5931e50e6690e2354d484b1018bb0
|
data/lib/hola_milind_patel.rb
CHANGED
@@ -27,8 +27,8 @@ module HolaMilindPatel
|
|
27
27
|
center.as_json.each do |key,value|
|
28
28
|
record = data.klass.find(center['id'])
|
29
29
|
if (record.send("#{key}_backend") rescue "false") != "false"
|
30
|
-
|
31
|
-
|
30
|
+
center[key] = record.send(key.parameterize.underscore.to_sym,fallback: false)
|
31
|
+
end
|
32
32
|
end
|
33
33
|
center
|
34
34
|
end
|
@@ -43,9 +43,10 @@ module HolaMilindPatel
|
|
43
43
|
if ENV['LANGUAGE'] == "all"
|
44
44
|
center = data
|
45
45
|
c = center.as_json
|
46
|
-
center.
|
47
|
-
center.
|
48
|
-
|
46
|
+
center.as_json.each do |key,value|
|
47
|
+
if (center.send("#{key}_backend") rescue "false") != "false"
|
48
|
+
concat_attribute = key + "_backend"
|
49
|
+
center.send(concat_attribute.parameterize.underscore.to_sym).locales.each do |locale|
|
49
50
|
c["#{key}_#{locale}"] = center.send("#{key}_backend").read(locale)
|
50
51
|
end
|
51
52
|
end
|
@@ -54,13 +55,13 @@ module HolaMilindPatel
|
|
54
55
|
else
|
55
56
|
HolaMilindPatel.locale = ENV['LANGUAGE']
|
56
57
|
#Mobility.locale = language
|
57
|
-
center = data
|
58
|
+
center = data.as_json
|
58
59
|
if ENV['STRICT'] == "true"
|
59
|
-
center.
|
60
|
-
record = data.
|
61
|
-
if (
|
62
|
-
|
63
|
-
|
60
|
+
center.each do |key,value|
|
61
|
+
record = data.class.find(center['id'])
|
62
|
+
if (data.send("#{key}_backend") rescue "false") != "false"
|
63
|
+
center[key] = record.send(key.parameterize.underscore.to_sym,fallback: false)
|
64
|
+
end
|
64
65
|
end
|
65
66
|
end
|
66
67
|
return center
|
@@ -76,9 +77,5 @@ module HolaMilindPatel
|
|
76
77
|
Mobility.locale = locale
|
77
78
|
puts "Locale has been set to " + locale
|
78
79
|
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def self.configure
|
82
|
-
|
83
|
-
end
|
80
|
+
end
|
84
81
|
end
|
metadata
CHANGED
@@ -1,15 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hola_milind_patel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Milind Patel
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5.1'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5.1'
|
13
33
|
- !ruby/object:Gem::Dependency
|
14
34
|
name: mobility
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,6 +79,9 @@ dependencies:
|
|
59
79
|
- - "~>"
|
60
80
|
- !ruby/object:Gem::Version
|
61
81
|
version: 3.2.0
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 3.2.0
|
62
85
|
type: :development
|
63
86
|
prerelease: false
|
64
87
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -66,6 +89,9 @@ dependencies:
|
|
66
89
|
- - "~>"
|
67
90
|
- !ruby/object:Gem::Version
|
68
91
|
version: 3.2.0
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 3.2.0
|
69
95
|
description: A simple hello world gem
|
70
96
|
email: 66.milind@gmail.com
|
71
97
|
executables: []
|