domoscio_rails 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/domoscio_rails/adaptative/path_rule.rb +1 -0
- data/lib/domoscio_rails/adaptative/recommendation.rb +7 -0
- data/lib/domoscio_rails/admin/instance.rb +9 -0
- data/lib/domoscio_rails/http_calls.rb +12 -0
- data/lib/domoscio_rails/resource.rb +9 -7
- data/lib/domoscio_rails/version.rb +1 -1
- data/lib/domoscio_rails.rb +1 -0
- metadata +43 -36
- checksums.yaml +0 -7
- data/lib/domoscio_rails/admin/company.rb +0 -7
@@ -25,6 +25,18 @@ module DomoscioRails
|
|
25
25
|
base.extend(ClassMethods)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
|
29
|
+
module UpdateSelf
|
30
|
+
module ClassMethods
|
31
|
+
def update_self(params = {})
|
32
|
+
DomoscioRails.request(:put, url(nil, nil, true), params)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.included(base)
|
37
|
+
base.extend(ClassMethods)
|
38
|
+
end
|
39
|
+
end
|
28
40
|
|
29
41
|
module Fetch
|
30
42
|
module ClassMethods
|
@@ -6,18 +6,20 @@ module DomoscioRails
|
|
6
6
|
name.split('::')[-1]
|
7
7
|
end
|
8
8
|
|
9
|
-
def url(id = nil, util_name = nil)
|
9
|
+
def url(id = nil, util_name = nil, on_self = nil )
|
10
10
|
if self == Resource
|
11
11
|
raise NotImplementedError.new('Resource is an abstract class. Do not use it directly.')
|
12
12
|
end
|
13
13
|
|
14
14
|
build_url = "/v1/instances/#{DomoscioRails.configuration.client_id}"
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
if !on_self
|
16
|
+
build_url << "/#{class_name.underscore}s"
|
17
|
+
if util_name
|
18
|
+
build_url << "/#{util_name}"
|
19
|
+
end
|
20
|
+
if id
|
21
|
+
build_url << "/#{CGI.escape(id.to_s)}"
|
22
|
+
end
|
21
23
|
end
|
22
24
|
return build_url
|
23
25
|
end
|
data/lib/domoscio_rails.rb
CHANGED
@@ -16,6 +16,7 @@ require 'domoscio_rails/adaptative/path_rule'
|
|
16
16
|
require 'domoscio_rails/adaptative/rule_input'
|
17
17
|
require 'domoscio_rails/adaptative/rule_output'
|
18
18
|
require 'domoscio_rails/adaptative/rule_condition'
|
19
|
+
require 'domoscio_rails/adaptative/recommendation'
|
19
20
|
require 'domoscio_rails/admin/user'
|
20
21
|
require 'domoscio_rails/student/student'
|
21
22
|
require 'domoscio_rails/knowledge/knowledge_graph'
|
metadata
CHANGED
@@ -1,41 +1,43 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: domoscio_rails
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Benoit Praly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
|
12
|
+
date: 2016-01-26 00:00:00 +01:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
14
16
|
name: rails
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '3.2'
|
20
17
|
type: :runtime
|
21
|
-
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- -
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version:
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "3.2"
|
24
|
+
version:
|
27
25
|
description: Description of DomoscioRails.
|
28
|
-
email:
|
26
|
+
email:
|
29
27
|
- benoit.praly@domoscio.com
|
30
28
|
executables: []
|
29
|
+
|
31
30
|
extensions: []
|
31
|
+
|
32
32
|
extra_rdoc_files: []
|
33
|
-
|
33
|
+
|
34
|
+
files:
|
34
35
|
- lib/domoscio_rails/adaptative/path_rule.rb
|
36
|
+
- lib/domoscio_rails/adaptative/recommendation.rb
|
35
37
|
- lib/domoscio_rails/adaptative/rule_condition.rb
|
36
38
|
- lib/domoscio_rails/adaptative/rule_input.rb
|
37
39
|
- lib/domoscio_rails/adaptative/rule_output.rb
|
38
|
-
- lib/domoscio_rails/admin/
|
40
|
+
- lib/domoscio_rails/admin/instance.rb
|
39
41
|
- lib/domoscio_rails/admin/user.rb
|
40
42
|
- lib/domoscio_rails/authorization_token.rb
|
41
43
|
- lib/domoscio_rails/data/event.rb
|
@@ -61,28 +63,33 @@ files:
|
|
61
63
|
- MIT-LICENSE
|
62
64
|
- Rakefile
|
63
65
|
- README.rdoc
|
66
|
+
has_rdoc: true
|
64
67
|
homepage: http://www.domoscio.com
|
65
|
-
licenses:
|
68
|
+
licenses:
|
66
69
|
- MIT
|
67
|
-
metadata: {}
|
68
70
|
post_install_message:
|
69
71
|
rdoc_options: []
|
70
|
-
|
72
|
+
|
73
|
+
require_paths:
|
71
74
|
- lib
|
72
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version:
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: "0"
|
80
|
+
version:
|
81
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: "0"
|
86
|
+
version:
|
82
87
|
requirements: []
|
88
|
+
|
83
89
|
rubyforge_project:
|
84
|
-
rubygems_version:
|
90
|
+
rubygems_version: 1.3.5
|
85
91
|
signing_key:
|
86
|
-
specification_version:
|
92
|
+
specification_version: 3
|
87
93
|
summary: Summary of DomoscioRails.
|
88
94
|
test_files: []
|
95
|
+
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: a8620ed7d1ce4cb7262b621f0492e8450c9a0992
|
4
|
-
data.tar.gz: 606f88d153e24b954035636a8760d3f5c81785dd
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 86e3bca543bd1288c151558803c8bf81ee9d2aee4868fe9a1b2bd801975978aea4c819ef56112b8b2a69b9fc05a812f7dfb1458e0c358bb4de72cf52a2d66496
|
7
|
-
data.tar.gz: 92c8e748ce3ee27e8d83f8fb7d24642edce62cf6d82b1087ae0564c9c263586d74acd26332d15f5fb9b39d5cc666331fe7f0ed7fd600cbfecee05f631066800e
|