maglove 1.0.7 → 1.0.8

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: b081cf7ee1ddef23b4df6d82955438f54e626e87
4
- data.tar.gz: 1be99808e2b23f445cd0155cf4e9f0410df67a59
3
+ metadata.gz: 28aa277ef1e3d61e0a73ca340fce4063ee3e9187
4
+ data.tar.gz: b6ee63e3775ee7d9c5a0ea00e04b48e9df687159
5
5
  SHA512:
6
- metadata.gz: 456c2e5b1d097dfe6f06e7751630792971c25b3c63c6a19a56e4a5a484eedf0fe52e0ed081cf067a296399e75b417d19ae93a7a31aa5455fb2734fbc6078ffae
7
- data.tar.gz: 9481b2f9acb212c5cd39496f61c3a1dac2f8ff0985e6279dd169e2b458d4e075e01dce48e1baf632a503d34099043e4c4b8278372b585ab01ad0b536274beafc
6
+ metadata.gz: 9224bf9bc2ac596d1b92f3436568ba28d7d1f021408d219854078727d535c71212eb03e67b92173c25131fc0878d73bc99c6bd118bb3ff9c6587bdeaa8ab64f8
7
+ data.tar.gz: 0a6cf9be836d074519da9519500ef74c4bb74518619a02a7e8c5bfcf960690b40f232492820a4c4b39410ee9693f448df4f7cebdc4b805d10e1ab3ec8f8a8b76
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- maglove (1.0.7)
4
+ maglove (1.0.8)
5
5
  actionpack (>= 4.0)
6
6
  activesupport (>= 4.0)
7
7
  bundler (~> 1.10)
@@ -20,6 +20,7 @@ PATH
20
20
  puma (~> 3.6)
21
21
  rubyzip (~> 1.1)
22
22
  sass (~> 3.4)
23
+ sass-css-importer (>= 1.0.0.beta.0)
23
24
  therubyracer (~> 0.12)
24
25
  thor (~> 0.19)
25
26
  tilt (~> 1.4)
@@ -46,7 +47,8 @@ GEM
46
47
  i18n (~> 0.7)
47
48
  minitest (~> 5.1)
48
49
  tzinfo (~> 1.1)
49
- addressable (2.4.0)
50
+ addressable (2.5.0)
51
+ public_suffix (~> 2.0, >= 2.0.2)
50
52
  ast (2.3.0)
51
53
  builder (3.2.2)
52
54
  coffee-script (2.4.1)
@@ -137,6 +139,7 @@ GEM
137
139
  ast (~> 2.2)
138
140
  powerpack (0.1.1)
139
141
  progress (3.2.2)
142
+ public_suffix (2.0.3)
140
143
  puma (3.6.0)
141
144
  rack (2.0.1)
142
145
  rack-test (0.6.3)
@@ -157,6 +160,8 @@ GEM
157
160
  ruby-progressbar (1.8.1)
158
161
  rubyzip (1.2.0)
159
162
  sass (3.4.22)
163
+ sass-css-importer (1.0.0.beta.0)
164
+ sass (>= 3.1)
160
165
  therubyracer (0.12.2)
161
166
  libv8 (~> 3.16.14.0)
162
167
  ref
@@ -181,4 +186,4 @@ DEPENDENCIES
181
186
  rubocop (~> 0.32)
182
187
 
183
188
  BUNDLED WITH
184
- 1.12.4
189
+ 1.13.6
@@ -11,7 +11,7 @@
11
11
  #templates-container
12
12
  - templates.each do |template|
13
13
  %div.template-item
14
- %a.template{href: "/#{template}", style: "background-image: url(#{MagLoft::ApiCaller::MAGLOFT_CDN_URL}/themes/#{theme}/thumbnails/#{template}.png);"}
14
+ %a.template{href: "/#{template}", style: "background-image: url(#{MagLoft::ApiCaller.cdn_url}/themes/#{theme}/thumbnails/#{template}.png);"}
15
15
  %div.template-label
16
16
  %span
17
17
  #{template}
@@ -14,10 +14,10 @@ module MagLoft
14
14
  response = conn.put(nil, File.read(file_path))
15
15
  return (response.status == 200)
16
16
  end
17
-
17
+
18
18
  def queue_upload_thumbnail(file_path, &block)
19
19
  return false if thumbnail_policy.nil?
20
- request = Typhoeus::Request.new(thumbnail_policy["url"], method: :put, headers: thumbnail_policy["headers"], body: File.read(file_path), timeout: 200000)
20
+ request = Typhoeus::Request.new(thumbnail_policy["url"], method: :put, headers: thumbnail_policy["headers"], body: File.read(file_path), timeout: 200_000)
21
21
  request.on_complete(&block) if block
22
22
  request
23
23
  end
@@ -14,10 +14,10 @@ module MagLoft
14
14
  response = conn.put(nil, File.read(file_path))
15
15
  return (response.status == 200)
16
16
  end
17
-
17
+
18
18
  def queue_upload(file_path, &block)
19
19
  return false if policy.nil?
20
- request = Typhoeus::Request.new(policy["url"], method: :put, headers: policy["headers"], body: File.read(file_path), timeout: 200000)
20
+ request = Typhoeus::Request.new(policy["url"], method: :put, headers: policy["headers"], body: File.read(file_path), timeout: 200_000)
21
21
  request.on_complete(&block) if block
22
22
  request
23
23
  end
@@ -14,10 +14,10 @@ module MagLoft
14
14
  response = conn.put(nil, File.read(file_path))
15
15
  return (response.status == 200)
16
16
  end
17
-
17
+
18
18
  def queue_upload_thumbnail(file_path, &block)
19
19
  return false if thumbnail_policy.nil?
20
- request = Typhoeus::Request.new(thumbnail_policy["url"], method: :put, headers: thumbnail_policy["headers"], body: File.read(file_path), timeout: 200000)
20
+ request = Typhoeus::Request.new(thumbnail_policy["url"], method: :put, headers: thumbnail_policy["headers"], body: File.read(file_path), timeout: 200_000)
21
21
  request.on_complete(&block) if block
22
22
  request
23
23
  end
@@ -42,7 +42,7 @@ module MagLove
42
42
  desc "stylesheet", "Compile Stylesheet"
43
43
  def stylesheet
44
44
  info("▸ Compiling Stylesheet")
45
- theme_dir.files("theme.{scss,less}").first.asset.write!
45
+ theme_dir.files("theme.{scss,less}").first.asset(asset_uri: ".").write!
46
46
  end
47
47
 
48
48
  desc "yaml", "Compile YAML Manifest"
@@ -97,13 +97,13 @@ module MagLove
97
97
  if image_file.md5 != existing_image.md5
98
98
  info("▸ Updating Image '#{remote_file}'")
99
99
  existing_image.md5 = image_file.md5
100
- hydra.queue(existing_image.queue_upload(image_file.to_s) {debug("▸ Finished updating Image '#{remote_file}'")})
100
+ hydra.queue(existing_image.queue_upload(image_file.to_s) { debug("▸ Finished updating Image '#{remote_file}'") })
101
101
  existing_image.save
102
102
  end
103
103
  else
104
104
  info("▸ Creating Image '#{remote_file}'")
105
105
  new_image = theme.typeloft_images.create(remote_file: remote_file, title: image_file.basename.titlecase, md5: image_file.md5)
106
- hydra.queue(new_image.queue_upload(image_file.to_s) {info("▸ Finished creating Image '#{remote_file}'")})
106
+ hydra.queue(new_image.queue_upload(image_file.to_s) { info("▸ Finished creating Image '#{remote_file}'") })
107
107
  end
108
108
  end
109
109
  hydra.run
@@ -139,13 +139,13 @@ module MagLove
139
139
  if options.thumbnails
140
140
  invoke(:thumbnails, [], { theme: options.theme })
141
141
  hydra = Typhoeus::Hydra.new
142
-
142
+
143
143
  info("▸ Synchronizing Template Thumbnails")
144
144
  theme.typeloft_templates.all.each do |template|
145
145
  thumbnail_file = theme_dir(root: "dist").dir("templates").file("#{template.identifier}.png")
146
146
  if thumbnail_file.exists?
147
147
  info("~> Uploading Thumbnail for '#{template.identifier}'")
148
- hydra.queue(template.queue_upload_thumbnail(thumbnail_file.to_s) {info("▸ Finished uploading Thumbnail for '#{template.identifier}'")})
148
+ hydra.queue(template.queue_upload_thumbnail(thumbnail_file.to_s) { info("▸ Finished uploading Thumbnail for '#{template.identifier}'") })
149
149
  end
150
150
  end
151
151
 
@@ -154,7 +154,7 @@ module MagLove
154
154
  thumbnail_file = theme_dir(root: "dist").dir("blocks").file("#{block.identifier}.png")
155
155
  if thumbnail_file.exists?
156
156
  info("~> Uploading Thumbnail for '#{block.identifier}'")
157
- hydra.queue(block.queue_upload_thumbnail(thumbnail_file.to_s) {info("▸ Finished uploading Thumbnail for '#{block.identifier}'")})
157
+ hydra.queue(block.queue_upload_thumbnail(thumbnail_file.to_s) { info("▸ Finished uploading Thumbnail for '#{block.identifier}'") })
158
158
  end
159
159
  end
160
160
  hydra.run
@@ -10,6 +10,7 @@ module MagLove
10
10
  app = Rack::Builder.new do
11
11
  use MagLove::Middleware::LiveReload, mount: "/maglove", theme: theme, templates: templates
12
12
  use Rack::Static, urls: ["/fonts", "/themes"], root: "dist"
13
+ use Rack::Static, urls: ["/images"], root: "dist/themes/#{theme}"
13
14
  run MagLove::Server.new(theme: theme, templates: templates, port: port)
14
15
  end
15
16
  Rack::Server.start(app: app, Port: port, server: :puma)
@@ -1,3 +1,4 @@
1
+ require 'sass-css-importer'
1
2
  module Sass::Script::Functions
2
3
  def asset(url)
3
4
  assert_type url, :String
@@ -1,3 +1,3 @@
1
1
  module MagLove
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
data/lib/powersnap.rb CHANGED
@@ -5,7 +5,7 @@ class Powersnap
5
5
  def powersnap_config
6
6
  @system_prefix ||= (File.exist?("powersnap.yml") ? YAML.load_file("powersnap.yml") : default_powersnap_config)
7
7
  end
8
-
8
+
9
9
  def default_powersnap_config
10
10
  { "prefix" => nil }
11
11
  end
data/maglove.gemspec CHANGED
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
27
27
  s.add_runtime_dependency "less", "~> 2.6"
28
28
  s.add_runtime_dependency "therubyracer", "~> 0.12"
29
29
  s.add_runtime_dependency "sass", "~> 3.4"
30
+ s.add_runtime_dependency "sass-css-importer", ">= 1.0.0.beta.0"
30
31
  s.add_runtime_dependency "dialers", "~> 0.2"
31
32
  s.add_runtime_dependency "rubyzip", "~> 1.1"
32
33
  s.add_runtime_dependency "image_optim", "~> 0.21"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maglove
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Strebitzer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-27 00:00:00.000000000 Z
11
+ date: 2016-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -206,6 +206,20 @@ dependencies:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
208
  version: '3.4'
209
+ - !ruby/object:Gem::Dependency
210
+ name: sass-css-importer
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: 1.0.0.beta.0
216
+ type: :runtime
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: 1.0.0.beta.0
209
223
  - !ruby/object:Gem::Dependency
210
224
  name: dialers
211
225
  requirement: !ruby/object:Gem::Requirement
@@ -478,7 +492,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
478
492
  version: 2.4.7
479
493
  requirements: []
480
494
  rubyforge_project:
481
- rubygems_version: 2.6.6
495
+ rubygems_version: 2.5.1
482
496
  signing_key:
483
497
  specification_version: 4
484
498
  summary: MagLove - MagLoft Theme Toolkit.