lce 0.0.4 → 0.0.5
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 +4 -4
- data/lce.gemspec +8 -6
- data/lib/lce.rb +7 -8
- data/lib/lce/client.rb +10 -10
- data/lib/lce/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f66a8353e9c3ef2f8f6624cfc10bce33019b4320
|
|
4
|
+
data.tar.gz: 29cba7cc45209eddce4f495649e386ae0e343187
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7f7e48ba6d247188f998160ab62b1eaba994633773a5f744c006d476193fbcbf4420fb4c66061e22dadaccd9716fa8762670ec503b24e08b774ef47639be478
|
|
7
|
+
data.tar.gz: 1ead89936e576767b44489a5baf7cd05687ec860603842e5df629572955eb2f402cc3b4f9934fc718a63dc4666a623ed2719204ceae84ac684d4790dd850a86f
|
data/lce.gemspec
CHANGED
|
@@ -7,10 +7,12 @@ Gem::Specification.new do |spec|
|
|
|
7
7
|
spec.name = "lce"
|
|
8
8
|
spec.version = Lce::VERSION
|
|
9
9
|
spec.authors = ["Florent Piteau", "Thomas Belliard"]
|
|
10
|
-
spec.email = ["info@
|
|
11
|
-
spec.summary =
|
|
12
|
-
spec.homepage = "http://
|
|
13
|
-
spec.
|
|
10
|
+
spec.email = ["info@myflyingbox"]
|
|
11
|
+
spec.summary = "A Ruby library that provides an interface to the LCE web services."
|
|
12
|
+
spec.homepage = "http://www.myflyingbox.com/"
|
|
13
|
+
spec.metadata = { "source_code_uri" => "https://github.com/myflyingbox/ruby-lce" }
|
|
14
|
+
|
|
15
|
+
spec.licenses = ["MIT"]
|
|
14
16
|
|
|
15
17
|
spec.files = `git ls-files`.split($/)
|
|
16
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
@@ -24,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
|
24
26
|
|
|
25
27
|
spec.add_dependency "faraday", "~> 0.9"
|
|
26
28
|
spec.add_dependency "faraday_middleware", "~> 0.9.1"
|
|
27
|
-
spec.add_dependency "faraday_middleware-parse_oj", "~> 0.3.0"
|
|
28
|
-
spec.add_dependency "hashie", "~> 3.2.0"
|
|
29
|
+
spec.add_dependency "faraday_middleware-parse_oj", "~> 0.3.0"
|
|
30
|
+
spec.add_dependency "hashie", "~> 3.2.0"
|
|
29
31
|
|
|
30
32
|
end
|
data/lib/lce.rb
CHANGED
|
@@ -29,11 +29,11 @@ module Lce
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def self.check
|
|
32
|
-
begin
|
|
32
|
+
begin
|
|
33
33
|
client.get
|
|
34
34
|
rescue Lce::Client::Errors::LceError => e
|
|
35
35
|
if configuration.raise_lce_errors
|
|
36
|
-
raise e
|
|
36
|
+
raise e
|
|
37
37
|
else
|
|
38
38
|
configuration.logger.warn(e.to_s)
|
|
39
39
|
end
|
|
@@ -47,20 +47,20 @@ module Lce
|
|
|
47
47
|
|
|
48
48
|
def initialize
|
|
49
49
|
@environment = :staging
|
|
50
|
-
@api_version =
|
|
50
|
+
@api_version = 2
|
|
51
51
|
@http_adapter = Faraday.default_adapter
|
|
52
52
|
@raise_lce_errors = true
|
|
53
53
|
@logger = Logger.new(STDOUT)
|
|
54
|
-
@logger.level = Logger::DEBUG
|
|
55
|
-
@application = 'ruby-lce'
|
|
54
|
+
@logger.level = Logger::DEBUG
|
|
55
|
+
@application = 'ruby-lce'
|
|
56
56
|
@version = Lce::VERSION
|
|
57
57
|
end
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
def environment=(value)
|
|
60
60
|
raise 'Environment must be :staging or :production' unless [:staging, :production].include?(value)
|
|
61
61
|
@environment = value
|
|
62
62
|
end
|
|
63
|
-
|
|
63
|
+
|
|
64
64
|
def application=(app)
|
|
65
65
|
@application = "#{app} (ruby-lce)"
|
|
66
66
|
end
|
|
@@ -70,4 +70,3 @@ module Lce
|
|
|
70
70
|
end
|
|
71
71
|
end
|
|
72
72
|
end
|
|
73
|
-
|
data/lib/lce/client.rb
CHANGED
|
@@ -4,29 +4,29 @@ require 'lce/client/request'
|
|
|
4
4
|
|
|
5
5
|
module Lce
|
|
6
6
|
class Client
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
HOSTS = {
|
|
9
9
|
development: "http://localhost:9000",
|
|
10
|
-
staging: "https://test.
|
|
11
|
-
production: "https://api.
|
|
10
|
+
staging: "https://test.myflyingbox.com",
|
|
11
|
+
production: "https://api.myflyingbox.com"
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
include Connection
|
|
15
|
-
include Request
|
|
15
|
+
include Request
|
|
16
16
|
include Errors
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
attr_accessor :http_adapter
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
def initialize
|
|
21
21
|
@http_adapter = Lce.configuration.http_adapter
|
|
22
22
|
end
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
def host
|
|
25
25
|
HOSTS[Lce.configuration.environment]
|
|
26
26
|
end
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
def api_version
|
|
29
|
-
raise VersionError.new("Wrong API version",' wrong_api_version', "Version must be 1.")
|
|
29
|
+
raise VersionError.new("Wrong API version",' wrong_api_version', "Version must be 1 or 2.") unless [1, 2].include?(Lce.configuration.api_version)
|
|
30
30
|
'v'+Lce.configuration.api_version.to_s
|
|
31
31
|
end
|
|
32
32
|
|
data/lib/lce/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lce
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florent Piteau
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2018-06-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|
|
@@ -125,7 +125,7 @@ dependencies:
|
|
|
125
125
|
version: 3.2.0
|
|
126
126
|
description:
|
|
127
127
|
email:
|
|
128
|
-
- info@
|
|
128
|
+
- info@myflyingbox
|
|
129
129
|
executables: []
|
|
130
130
|
extensions: []
|
|
131
131
|
extra_rdoc_files: []
|
|
@@ -182,10 +182,11 @@ files:
|
|
|
182
182
|
- spec/paginated_array_spec.rb
|
|
183
183
|
- spec/spec_helper.rb
|
|
184
184
|
- tasks/rspec.rake
|
|
185
|
-
homepage: http://
|
|
185
|
+
homepage: http://www.myflyingbox.com/
|
|
186
186
|
licenses:
|
|
187
187
|
- MIT
|
|
188
|
-
metadata:
|
|
188
|
+
metadata:
|
|
189
|
+
source_code_uri: https://github.com/myflyingbox/ruby-lce
|
|
189
190
|
post_install_message:
|
|
190
191
|
rdoc_options: []
|
|
191
192
|
require_paths:
|
|
@@ -202,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
202
203
|
version: '0'
|
|
203
204
|
requirements: []
|
|
204
205
|
rubyforge_project:
|
|
205
|
-
rubygems_version: 2.
|
|
206
|
+
rubygems_version: 2.4.8
|
|
206
207
|
signing_key:
|
|
207
208
|
specification_version: 4
|
|
208
209
|
summary: A Ruby library that provides an interface to the LCE web services.
|