smashing 1.3.4 → 1.3.6

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
  SHA256:
3
- metadata.gz: 721d40877762d848822b6bc0de8dfa8597074035af92afc3bea7d4aca9fc4bdc
4
- data.tar.gz: 579de5e911ffeb05986481ed0e41b676856b43fa78e639e1d2b661082c983c9f
3
+ metadata.gz: 57a57e38f3b67a015c7fe0288b6e8055492c9d46f97d2382b0cadc49409068cd
4
+ data.tar.gz: ce1038ee92edbd5e06cb17d6f68681dff0c04a941355e940f480d3dbf4f9e914
5
5
  SHA512:
6
- metadata.gz: a338ddf3e7e4fc0c6b630d9e1b710cbfdac91deb711a8a738e5bda229e79310669a035407f0fb5ebe5395e7ee2eec7de9b1dbb41a7204bd91d321644ac1dd3ea
7
- data.tar.gz: f08c1b7bdd36c315e88acee22512c5c2066ed2c55a375726631f7053e35f7ab416b2723691a1e043afcc4a55f32d00684b46730f48814637cf0bbd553c1450a9
6
+ metadata.gz: e71a0b12d6925d6c9bfcd935bc1c88c43a9b7613e8f22655dc4a79fcf98415eea376de771e369d0427041347d8920ec425407e53d94797c3bf4b9d07d266ad49
7
+ data.tar.gz: bc674183631dcd49fc25d0f82220de08ee08d2109f77ad17aafd2d45804f1e64c62b594c34d801836da36580aae3dc5e8783640d28067c70bdf5563788efdfed
data/README.md CHANGED
@@ -5,6 +5,8 @@
5
5
 
6
6
  Smashing, the spiritual successor to [Dashing](https://github.com/Shopify/dashing), is a Sinatra based framework that lets you build excellent dashboards. It looks especially great on TVs.
7
7
 
8
+ ![Smashing logo](./.github/docs/assets/screenshot.png)
9
+
8
10
  ## Community
9
11
 
10
12
  Feel free to submit issues for bugs, new features, and enhancements in [GitHub](https://github.com/Smashing/smashing/issues). For more general questions, or help with widgets, please use the [gitter chatroom](https://gitter.im/Smashing).
data/lib/dashing/app.rb CHANGED
@@ -25,6 +25,10 @@ helpers do
25
25
  # override with auth logic
26
26
  end
27
27
 
28
+ def h(text)
29
+ Rack::Utils.escape_html(text)
30
+ end
31
+
28
32
  def authenticated?(token)
29
33
  return true unless settings.auth_token
30
34
  token && Rack::Utils.secure_compare(settings.auth_token, token)
@@ -129,7 +133,7 @@ get '/views/:widget?.html' do
129
133
  return Tilt[language].new(file).render if File.exist?(file)
130
134
  end
131
135
 
132
- "Drats! Unable to find a widget file named: #{params[:widget]} to render."
136
+ "Drats! Unable to find a widget file named: #{h(params[:widget])} to render."
133
137
  end
134
138
 
135
139
  Thin::Server.class_eval do
@@ -11,7 +11,7 @@ module Dashing
11
11
  end
12
12
 
13
13
  def get_json(url)
14
- response = open(url).read
14
+ response = URI.open(url).read
15
15
  JSON.parse(response)
16
16
  end
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module Dashing
2
- VERSION = "1.3.4".freeze
2
+ VERSION = "1.3.6".freeze
3
3
  end
@@ -0,0 +1,33 @@
1
+ # First need to import Dashing with the Smashing Sinatra App
2
+ require 'dashing'
3
+ # Then import Sinatra, which will prepare sprockets settings
4
+ require 'sinatra'
5
+ # Now match the imports from Smashing's app.rb so that the resources are pre-processed
6
+ require 'coffee-script'
7
+ require 'sass' if RUBY_VERSION < "2.5.0"
8
+ require 'sassc' if RUBY_VERSION >= "2.5.0"
9
+ # Logger and misc
10
+ require 'pathname'
11
+ require 'logger'
12
+
13
+ # From: https://simonecarletti.com/blog/2011/09/using-sprockets-without-a-railsrack-project/
14
+ ROOT = Pathname(File.dirname(__FILE__))
15
+ LOGGER = Logger.new(STDOUT)
16
+ BUNDLES = %w( application.js )
17
+ BUILD_DIR = ROOT.join("assets/javascripts/")
18
+
19
+ # This contains the settings from the Smashign Sinatra App (see app.rb)
20
+ # so no need to append_path, etc.
21
+ sprockets = Sinatra::Application.settings.sprockets
22
+ sprockets.logger = LOGGER
23
+
24
+ # Task: precompile-assets
25
+ # Pre-compiles sprockets application.js so users don't need to wait for Sinatra/Sprockets
26
+ # to generate it on the fly.
27
+ # see: https://github.com/Smashing/smashing/issues/189
28
+ task :'precompile-assets' do
29
+ BUNDLES.each do |bundle|
30
+ asset = sprockets.find_asset(bundle)
31
+ asset.write_to(BUILD_DIR.join(asset.logical_path))
32
+ end
33
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smashing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Beauchamp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-06 00:00:00.000000000 Z
11
+ date: 2022-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coffee-script
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.0'
47
+ version: '2.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.0'
54
+ version: '2.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sinatra-contrib
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -140,16 +140,22 @@ dependencies:
140
140
  name: rack
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '2.2'
146
+ - - "<"
147
+ - !ruby/object:Gem::Version
148
+ version: '4.0'
146
149
  type: :runtime
147
150
  prerelease: false
148
151
  version_requirements: !ruby/object:Gem::Requirement
149
152
  requirements:
150
- - - "~>"
153
+ - - ">="
151
154
  - !ruby/object:Gem::Version
152
155
  version: '2.2'
156
+ - - "<"
157
+ - !ruby/object:Gem::Version
158
+ version: '4.0'
153
159
  - !ruby/object:Gem::Dependency
154
160
  name: rake
155
161
  requirement: !ruby/object:Gem::Requirement
@@ -277,6 +283,7 @@ files:
277
283
  - templates/project/.gitignore
278
284
  - templates/project/Gemfile
279
285
  - templates/project/README.md
286
+ - templates/project/Rakefile
280
287
  - templates/project/assets/fonts/fa-brands-400.eot
281
288
  - templates/project/assets/fonts/fa-brands-400.svg
282
289
  - templates/project/assets/fonts/fa-brands-400.ttf
@@ -371,7 +378,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
371
378
  - !ruby/object:Gem::Version
372
379
  version: '0'
373
380
  requirements: []
374
- rubygems_version: 3.1.4
381
+ rubygems_version: 3.3.5
375
382
  signing_key:
376
383
  specification_version: 4
377
384
  summary: The wonderfully excellent dashboard framework.