maglove 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -1
- data/lib/magloft/api_caller.rb +20 -3
- data/lib/maglove/version.rb +1 -1
- data/maglove.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba272d7f5bbb561afb0f11895cb453e5b4d57d59
|
4
|
+
data.tar.gz: 05a7b2259684673d40c685a4b6658a14f2626940
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a73eac01829081e36ae03bde5f01c932a804446b9a3b9c3951842d15d131345e544f6a06ad72f07400cbf99f737fc7782586890eb3c6e11646661691d49433e8
|
7
|
+
data.tar.gz: 1dd43fa97def50820dbed7745d7aaffecd107bf3bcd46f4b461a1f136bfc2a1b9aa4c92f5be4f89a1c0c23d1495ea10895118d3bf340a71c7acead15995646d3
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
maglove (1.0.
|
4
|
+
maglove (1.0.3)
|
5
5
|
actionpack (>= 4.0)
|
6
6
|
activesupport (>= 4.0)
|
7
7
|
bundler (~> 1.10)
|
@@ -21,6 +21,7 @@ PATH
|
|
21
21
|
puma (~> 3.6)
|
22
22
|
rubyzip (~> 1.1)
|
23
23
|
sass (~> 3.4)
|
24
|
+
therubyracer (~> 0.12)
|
24
25
|
thor (~> 0.19)
|
25
26
|
tilt (~> 1.4)
|
26
27
|
|
@@ -111,6 +112,7 @@ GEM
|
|
111
112
|
in_threads (1.3.1)
|
112
113
|
less (2.6.0)
|
113
114
|
commonjs (~> 0.2.7)
|
115
|
+
libv8 (3.16.14.15)
|
114
116
|
little-plugger (1.1.4)
|
115
117
|
logging (2.1.0)
|
116
118
|
little-plugger (~> 1.1)
|
@@ -142,6 +144,7 @@ GEM
|
|
142
144
|
rails-html-sanitizer (1.0.3)
|
143
145
|
loofah (~> 2.0)
|
144
146
|
rainbow (2.1.0)
|
147
|
+
ref (2.0.0)
|
145
148
|
rubocop (0.42.0)
|
146
149
|
parser (>= 2.3.1.1, < 3.0)
|
147
150
|
powerpack (~> 0.1)
|
@@ -151,6 +154,9 @@ GEM
|
|
151
154
|
ruby-progressbar (1.8.1)
|
152
155
|
rubyzip (1.2.0)
|
153
156
|
sass (3.4.22)
|
157
|
+
therubyracer (0.12.2)
|
158
|
+
libv8 (~> 3.16.14.0)
|
159
|
+
ref
|
154
160
|
thor (0.19.1)
|
155
161
|
thread_safe (0.3.5)
|
156
162
|
tilt (1.4.1)
|
data/lib/magloft/api_caller.rb
CHANGED
@@ -1,11 +1,28 @@
|
|
1
|
+
require "yaml"
|
1
2
|
module MagLoft
|
2
3
|
class ApiCaller < Dialers::Caller
|
3
4
|
MAX_RETRIES = 0
|
4
5
|
TIMEOUT_IN_SECONDS = 600
|
5
|
-
MAGLOFT_API_URL = "https://www.magloft.dev"
|
6
|
-
MAGLOFT_CDN_URL = "https://cdn.magloft.dev/"
|
7
6
|
|
8
|
-
|
7
|
+
class << self
|
8
|
+
def default_api_config
|
9
|
+
{ "api_url" => "https://www.magloft.com", "cdn_url" => "https://storage.googleapis.com/cdn.magloft.com" }
|
10
|
+
end
|
11
|
+
|
12
|
+
def api_config
|
13
|
+
@api_config ||= File.exist?("magloft-api.yml") ? YAML.load_file("magloft-api.yml") : default_api_config
|
14
|
+
end
|
15
|
+
|
16
|
+
def api_url
|
17
|
+
api_config["api_url"]
|
18
|
+
end
|
19
|
+
|
20
|
+
def cdn_url
|
21
|
+
api_config["cdn_url"]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
setup_api(url: api_url) do |faraday|
|
9
26
|
faraday.request :json
|
10
27
|
faraday.request :request_headers, accept: "application/json"
|
11
28
|
faraday.response :json
|
data/lib/maglove/version.rb
CHANGED
data/maglove.gemspec
CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_runtime_dependency "tilt", "~> 1.4"
|
26
26
|
s.add_runtime_dependency "coffee-script", "~> 2.4"
|
27
27
|
s.add_runtime_dependency "less", "~> 2.6"
|
28
|
+
s.add_runtime_dependency "therubyracer", "~> 0.12"
|
28
29
|
s.add_runtime_dependency "sass", "~> 3.4"
|
29
30
|
s.add_runtime_dependency "dialers", "~> 0.2"
|
30
31
|
s.add_runtime_dependency "rubyzip", "~> 1.1"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maglove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Strebitzer
|
@@ -178,6 +178,20 @@ dependencies:
|
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '2.6'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: therubyracer
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0.12'
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0.12'
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: sass
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|