naranya_ecm-sdk 0.0.5 → 0.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0c8aaacc8e0fbc47e432d4d6a5f6ec004b124f4
4
- data.tar.gz: 09b4b60c83199ec5ac43f4267fb41a3c9b3a2b1f
3
+ metadata.gz: 051efab878ede03ba71216439d6aa4985f02b2c3
4
+ data.tar.gz: c3ca3396182aa10c7fc226d171a6a7864abc8ac7
5
5
  SHA512:
6
- metadata.gz: 7e98869cbd0795b57246c48f20fb1ff50e8a201993e62c908dc6ca3b113bad42ff08a961afe492cacc29fb9890de2ead37045f99b60294092e62cdca3e5fe6c6
7
- data.tar.gz: 731a62501dccff68974ddfc63b0ec84627e259ff436a242881173d4814238b34d54dfe089da425b397ce4ae67eef839d559624b337885126dabbcdd8d8554ec0
6
+ metadata.gz: 5a98037ffa90b8061bc867c208d06af0ad805b3fe01502ba01234192a66ff17794bfdc0a74f2faed3a5ab97e76721d18acf30b3fc5984765df317a47dd29fe55
7
+ data.tar.gz: 47dbd509de94213649a729266e374ba3f0d1fdde04d579f2f043e7bfb8c3d8bd3fd2348a9cc2e5b250ddc4f43440a7e9c3c9f230f419f83d5406ec3f57c04c5d
@@ -33,11 +33,11 @@ module NaranyaEcm
33
33
  class << self
34
34
 
35
35
  def storage
36
- @storage ||= Fog::Storage.new options['storage'].except('root_directory').symbolize_keys!
36
+ @storage ||= Fog::Storage.new options[:storage].except(:root_directory)
37
37
  end
38
38
 
39
39
  def root_directory
40
- @root_directory ||= storage.directories.get(options['storage']['root_directory'])
40
+ @root_directory ||= storage.directories.get(options[:storage][:root_directory])
41
41
  end
42
42
 
43
43
  def setup
@@ -56,6 +56,7 @@ module NaranyaEcm
56
56
  def load_config_from_yml(yml_path, env="production")
57
57
  raise "YAML file doesn't extst" unless File.exist?(yml_path)
58
58
  yml_config = DEFAULT_CONFIG.merge(YAML::load(ERB.new(File.read(yml_path)).result)[env])
59
+ .with_indifferent_access
59
60
  setup { |config| yml_config.each { |key, val| config.send "#{key}=".to_sym, val } }
60
61
  end
61
62
 
@@ -1,3 +1,3 @@
1
1
  module NaranyaEcm
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -40,7 +40,7 @@ module NaranyaEcm
40
40
  schema do
41
41
  # define each attribute separately
42
42
  string :id, :type, :lifecycle_name, :lifecycle_state, :content_rating, :created_at, :updated_at
43
-
43
+ string :category, :category_id
44
44
  string :author
45
45
  string :main_url
46
46
 
@@ -75,6 +75,12 @@ module NaranyaEcm
75
75
 
76
76
  delegate :title, to: :title_translations
77
77
  delegate :description, to: :description_translations
78
+
79
+ def initialize(attributes = {}, persisted = false)
80
+ attributes[:title_translations] = TitleTranslations.new unless attributes[:title_translations].present?
81
+ attributes[:description_translations] = DescriptionTranslations.new unless attributes[:description_translations].present?
82
+ super
83
+ end
78
84
 
79
85
  include NaranyaEcm::Behaviors::Timestampable
80
86
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: naranya_ecm-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Quintanilla