naranya_ecm-sdk 0.0.56 → 0.0.57

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: 45b1ec3ac06a57187117d0560b8c75d690b560b2
4
- data.tar.gz: 66800e1d77798cef6882095e533d3000756bfefc
3
+ metadata.gz: b55e37ef5c34422a09b630352c05cdaf374003b2
4
+ data.tar.gz: 125d9f224dc529934e3f462360a5206136a2a685
5
5
  SHA512:
6
- metadata.gz: 8351e4377ec531396d6ba809244b16fa3d49fd16121317ccdf0227d60d55ddecf668b8fb20beac2839c3541c3e90520a67dba7cbf05e75a1a0e3b60d0a1a4542
7
- data.tar.gz: e3a9cec8672c353cd0798a877ca381eeb92dcbb807e89eeba12e5d5a5f0e6502c7249fdc9d3131d3c241a1a52cc2a8e1112b9ef10dd341b910f433dd84a66663
6
+ metadata.gz: 9b989ed80cc100968d53f9a28448e931b4d772eb1ff5564a841a0a1b1ffb0f23491698b3e3b66ac631e262cc3180976719d62f154464b70c1da9d7a9354cd3f3
7
+ data.tar.gz: 9f44623ef0b24661a16196531c40553fdd692ebbb9b95e4ff44b2ef997ded2fe90b8904ce2f0425e2d172855fbf07a2d0906abeb8106794f71bc32fe0e08e37c
@@ -47,7 +47,7 @@ module NaranyaEcm
47
47
  # Content
48
48
  # The content to which this particular version belongs:
49
49
  belongs_to :content, class_name: :Content, inverse_of: :versions
50
-
50
+
51
51
  # MediaResources:
52
52
  # A list of media - images, audio, video, etc. associated
53
53
  # directly to this particular content version. Some examples:
@@ -90,8 +90,9 @@ module NaranyaEcm
90
90
  event :publish do
91
91
  # Iniciar la transición de :draft a :published,
92
92
  # si el lifecycle es sencillo:
93
- transitions from: :draft, to: :published, guard: :simple_lifecycle?
94
- transitions from: :accepted, to: :published, guard: :validatable_lifecycle?
93
+ transitions from: :draft, to: :published, guard: :simple_lifecycle?
94
+ transitions from: :accepted, to: :published, guard: :validatable_lifecycle?
95
+ transitions from: :deactivated, to: :published
95
96
  end
96
97
 
97
98
  event :supersede do
@@ -107,6 +108,6 @@ module NaranyaEcm
107
108
 
108
109
  def simple_lifecycle?; self.lifecycle_name == 'simple'; end
109
110
  def validatable_lifecycle?; self.lifecycle_name == 'validatable'; end
110
-
111
+
111
112
  end
112
- end
113
+ end
@@ -1,3 +1,3 @@
1
1
  module NaranyaEcm
2
- VERSION = "0.0.56"
2
+ VERSION = "0.0.57"
3
3
  end
@@ -5,8 +5,6 @@ require 'active_support/dependencies/autoload'
5
5
  require 'active_support/core_ext/hash/indifferent_access.rb'
6
6
  require 'yaml'
7
7
 
8
- require 'fog/aws/storage' unless defined?(::Fog::AWS::Storage)
9
-
10
8
  require 'ncontent-sdk'
11
9
 
12
10
  module NaranyaEcm
@@ -0,0 +1,22 @@
1
+ require 'fog/aws' unless defined?(::Fog::AWS)
2
+
3
+ module NContent
4
+ module SDK
5
+
6
+ class Storage
7
+
8
+ attr_reader :aws_storage
9
+
10
+ def initialize
11
+ @aws_storage ||= Fog::Storage.new \
12
+ provider: ::NContent::SDK.config.bucket_provider,
13
+ aws_access_key_id: ::NContent::SDK.config.bucket_api_key,
14
+ aws_secret_access_key: ::NContent::SDK.config.bucket_api_secret
15
+ end
16
+
17
+ delegate :directories, to: :aws_storage
18
+
19
+ end
20
+
21
+ end
22
+ end
data/lib/ncontent-sdk.rb CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  # Require the Railtie if loaded from Rails app:
3
2
  require 'ncontent/sdk/railtie' if defined? Rails
4
3
  require 'active_support/core_ext/module'
@@ -11,6 +10,7 @@ module NContent
11
10
 
12
11
  autoload :Config, "ncontent/sdk/config"
13
12
  autoload :RESTClient, "ncontent/sdk/rest_client"
13
+ autoload :Storage, "ncontent/sdk/storage"
14
14
 
15
15
  def self.config
16
16
  @@config ||= NContent::SDK::Config.new
@@ -34,11 +34,7 @@ module NContent
34
34
  end
35
35
 
36
36
  def self.storage
37
- @@storage ||= Fog::Storage.new \
38
- provider: config.bucket_provider,
39
- aws_access_key_id: config.bucket_api_key,
40
- aws_secret_access_key: config.bucket_api_secret
41
-
37
+ @@storage ||= ::NContent::SDK::Storage.new
42
38
  end
43
39
 
44
40
  def self.root_directory
@@ -49,7 +45,7 @@ module NContent
49
45
  def self.cache
50
46
  @@cache ||= ActiveSupport::Cache.lookup_store *config.cache
51
47
  end
52
-
48
+
53
49
  end
54
50
 
55
51
  end
@@ -33,9 +33,8 @@ Gem::Specification.new do |spec|
33
33
  spec.add_dependency "oauth2", "~> 1.0"
34
34
  # which uses Faraday as it's client... we get to choose which HTTP driver to use!
35
35
 
36
- spec.add_dependency "aasm", "~> 3.2", ">= 3.2.1"
37
- spec.add_dependency "fog-core", "1.25.0"
38
- spec.add_dependency "fog", "~> 1.22", ">= 1.22.1"
36
+ spec.add_dependency "aasm", "~> 4.1"
37
+ spec.add_dependency "fog-aws", "~> 0.3"
39
38
 
40
39
  spec.add_development_dependency "bundler", "~> 1.6"
41
40
  spec.add_development_dependency "rake", "~> 10.3"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: naranya_ecm-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.56
4
+ version: 0.0.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Quintanilla
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-22 00:00:00.000000000 Z
11
+ date: 2015-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -70,54 +70,28 @@ dependencies:
70
70
  requirements:
71
71
  - - ~>
72
72
  - !ruby/object:Gem::Version
73
- version: '3.2'
74
- - - '>='
75
- - !ruby/object:Gem::Version
76
- version: 3.2.1
73
+ version: '4.1'
77
74
  type: :runtime
78
75
  prerelease: false
79
76
  version_requirements: !ruby/object:Gem::Requirement
80
77
  requirements:
81
78
  - - ~>
82
79
  - !ruby/object:Gem::Version
83
- version: '3.2'
84
- - - '>='
85
- - !ruby/object:Gem::Version
86
- version: 3.2.1
80
+ version: '4.1'
87
81
  - !ruby/object:Gem::Dependency
88
- name: fog-core
89
- requirement: !ruby/object:Gem::Requirement
90
- requirements:
91
- - - '='
92
- - !ruby/object:Gem::Version
93
- version: 1.25.0
94
- type: :runtime
95
- prerelease: false
96
- version_requirements: !ruby/object:Gem::Requirement
97
- requirements:
98
- - - '='
99
- - !ruby/object:Gem::Version
100
- version: 1.25.0
101
- - !ruby/object:Gem::Dependency
102
- name: fog
82
+ name: fog-aws
103
83
  requirement: !ruby/object:Gem::Requirement
104
84
  requirements:
105
85
  - - ~>
106
86
  - !ruby/object:Gem::Version
107
- version: '1.22'
108
- - - '>='
109
- - !ruby/object:Gem::Version
110
- version: 1.22.1
87
+ version: '0.3'
111
88
  type: :runtime
112
89
  prerelease: false
113
90
  version_requirements: !ruby/object:Gem::Requirement
114
91
  requirements:
115
92
  - - ~>
116
93
  - !ruby/object:Gem::Version
117
- version: '1.22'
118
- - - '>='
119
- - !ruby/object:Gem::Version
120
- version: 1.22.1
94
+ version: '0.3'
121
95
  - !ruby/object:Gem::Dependency
122
96
  name: bundler
123
97
  requirement: !ruby/object:Gem::Requirement
@@ -270,6 +244,7 @@ files:
270
244
  - lib/ncontent/sdk/faraday_middleware/rest_api_call_benchmark.rb
271
245
  - lib/ncontent/sdk/railtie.rb
272
246
  - lib/ncontent/sdk/rest_client.rb
247
+ - lib/ncontent/sdk/storage.rb
273
248
  - lib/ncontent/sdk/testing/server_mock.rb
274
249
  - naranya_ecm-sdk.gemspec
275
250
  homepage: http://naranya.com