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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hola_milind_patel.rb +13 -16
  3. metadata +29 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1099678892e68d95880f0f0e9816f8db928d71d652e381e3def26921d7c4f049
4
- data.tar.gz: 43c01c538248011c6f066999e6868a48629c93387c8c3b35cbaed4db35586902
3
+ metadata.gz: 23bad1918baca470ebf1d5fa903637a84ed691a2546f168c697506dfb6661a05
4
+ data.tar.gz: 8c6f99ea9347cd84442dbf7a42a53b8d6f5666eedd3f93a384330ee58f130682
5
5
  SHA512:
6
- metadata.gz: 5c131e9a74a25a944b2ffe2a34c1d5012192aff6bd49ff6f1747369a350d2e2d33b3487352a04e17e220fc253b61cddf0cd043c1b67fbdeb92ad07c69b7256a8
7
- data.tar.gz: 150447d78c7e1e3af7ce97cb41a9edd7a15ca1ef9d88321f56b74f40bc1950ce5b0a0a560bc5f1eff7ebd1c6527a4b22a72ff63a914421bbbaa0213bd1e2b1b4
6
+ metadata.gz: 8de69600cdd111985121bbdfcde9ccaa7b84d5a45fec48cb7757b78debf8a216c184a096bd853126f237ef096230814587a9a5f9c81a6c01b9ce880ea1981ad8
7
+ data.tar.gz: 0aae83a435889eff83f2d9c16cc7c4b431f93d457c194a3db562a89e35ad9d501ec85ee0083eb8060ca9616594d31360e2b5931e50e6690e2354d484b1018bb0
@@ -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
- center[key] = record.send(key.parameterize.underscore.to_sym,fallback: false)
31
- end
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.short_title_backend.locales.each do |locale|
47
- center.as_json.each do |key,value|
48
- if (center.send("#{key}_backend") rescue "false") != "false"
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.as_json.each do |key,value|
60
- record = data.klass.find(center['id'])
61
- if (record.send("#{key}_backend") rescue "false") != "false"
62
- center[key] = record.send(key.parameterize.underscore.to_sym,fallback: false)
63
- end
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.3
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Milind Patel
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-04 00:00:00.000000000 Z
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: []