diff options
-rw-r--r-- | CONTRIBUTING.md | 12 | ||||
-rw-r--r-- | README.md | 14 | ||||
-rw-r--r-- | lib/dashing/app.rb | 13 | ||||
-rw-r--r-- | smashing.gemspec | 4 | ||||
-rw-r--r-- | templates/project/README.md | 2 | ||||
-rw-r--r-- | templates/project/assets/stylesheets/application.scss | 12 | ||||
-rw-r--r-- | templates/project/dashboards/layout.erb | 4 | ||||
-rw-r--r-- | test/app_test.rb | 8 |
8 files changed, 49 insertions, 20 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b7e4dfe..051a840 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,15 @@ # Welcome! + Thank you for your interest in Smashing! This project is a fork of Dashing, the exceptionally handsome dashboard framework. We're still in the process of transitioning, so please excuse the mess. +For general questions on new features, widgets, or ideas, please consider using the +[Gitter Chat Room](https://gitter.im/Smashing/Lobby). This way +developers can maintain code-related issues in GitHub, and help users with users with simple +usage or widgets questions in a more appropriate channel. + <a name="issues"></a> ## Have an Issue + If you run into problems with Smashing (or Dashing), please take these steps before submitting an issue: @@ -12,6 +19,7 @@ submitting an issue: <a name="features"></a> ## Feature Requests + Feature requests are welcome, but take a moment to consider whether your idea fits with the scope and aim of the project. A good rule of thumb is to apply the 80/20 rule: every feature should be useful to at least 80% of users. Adding @@ -24,6 +32,9 @@ external Gem which supercharges a project. An excellent example of this is [dashing-contrib](https://github.com/QubitProducts/dashing-contrib). If you do create a third-party extension for Smashing, please add it [here](https://github.com/Dashing-io/dashing/wiki/Additional-Widgets#other-third-party-tools). +For general questions on new features, widgets, or ideas, please use the +[project mailing list](https://groups.google.com/forum/#!forum/smashing-dashboard). + <a name="pull-requests"></a> ## Pull Requests @@ -44,6 +55,7 @@ GitHub has [excellent documentation on how to use Pull Requests.](https://help.g <a name="commit-msgs"></a> ## Git Commit Message Suggestions + * Consider starting the commit message with an applicable emoji: * :art: `:art:` when improving the format/structure of the code * :moyai: `:moyai:` when adding a new feature @@ -1,8 +1,14 @@ -# [Smashing](https://github.com/dashing-io/smashing/wiki) +[![Gitter chat](https://badges.gitter.im/smashing.png)](https://gitter.im/Smashing) + +# [Smashing](https://github.com/Smashing/smashing/wiki) 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. -**Installation**: +## Community + +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). + +## Installation ```bash # Install bundler @@ -19,9 +25,9 @@ $ bundle $ smashing start ``` -[Check out our wiki](https://github.com/dashing-io/smashing/wiki). +[Check out our wiki](https://github.com/Smashing/smashing/wiki). Note: This is a fork of the Dashing project, which is no longer being maintained. Read about that [here](https://github.com/Shopify/dashing/issues/711). -# License +## License Distributed under the [MIT license](MIT-LICENSE). diff --git a/lib/dashing/app.rb b/lib/dashing/app.rb index b11352d..5ee085f 100644 --- a/lib/dashing/app.rb +++ b/lib/dashing/app.rb @@ -34,16 +34,18 @@ set :root, Dir.pwd set :sprockets, Sprockets::Environment.new(settings.root) set :assets_prefix, '/assets' set :digest_assets, false -set server: 'thin', connections: [], history_file: 'history.yml' +set :server, 'thin' +set :connections, [] +set :history_file, 'history.yml' set :public_folder, File.join(settings.root, 'public') set :views, File.join(settings.root, 'dashboards') set :default_dashboard, nil set :auth_token, nil if File.exists?(settings.history_file) - set history: YAML.load_file(settings.history_file) + set :history, YAML.load_file(settings.history_file) else - set history: {} + set :history, {} end %w(javascripts stylesheets fonts images).each do |path| @@ -55,7 +57,7 @@ end end not_found do - send_file File.join(settings.public_folder, '404.html'), status: 404 + send_file File.join(settings.public_folder, '404.html'), :status => 404 end at_exit do @@ -70,7 +72,7 @@ get '/' do redirect "/" + dashboard end -get '/events', provides: 'text/event-stream' do +get '/events', :provides => 'text/event-stream' do protected! response.headers['X-Accel-Buffering'] = 'no' # Disable buffering for nginx stream :keep_open do |out| @@ -121,6 +123,7 @@ get '/views/:widget?.html' do file = File.join(settings.root, "widgets", params[:widget], "#{params[:widget]}.#{suffix}") return engines.first.new(file).render if File.exist? file end + "Drats! Unable to find a widget file named: #{params[:widget]} to render." end Thin::Server.class_eval do diff --git a/smashing.gemspec b/smashing.gemspec index 8be031c..4f1fbd6 100644 --- a/smashing.gemspec +++ b/smashing.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |s| s.summary = "The wonderfully excellent dashboard framework." s.description = "A framework for pulling together an overview of data that is important to your team and displaying it easily on TVs around the office. You write a bit of ruby code to gather data from some services and let Smashing handle the rest - displaying that data in a wonderfully simple layout. Built for developers and hackers, Smashing is highly customizable while maintaining humble roots that make it approachable to beginners." s.author = "Daniel Beauchamp" - s.homepage = 'http://smashing.github.io' + s.homepage = 'http://smashing.github.io/smashing' s.license = "MIT" s.files = Dir['README.md', 'javascripts/**/*', 'templates/**/*','templates/**/.[a-z]*', 'lib/**/*'] @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.add_dependency('sinatra', '~> 1.4.4') s.add_dependency('sinatra-contrib', '~> 1.4.2') s.add_dependency('thin', '~> 1.6.1') - s.add_dependency('rufus-scheduler', '~> 2.0.24') + s.add_dependency('rufus-scheduler', '~> 3.2.0') s.add_dependency('thor', '~> 0.19') s.add_dependency('sprockets', '~> 2.10.1') s.add_dependency('rack', '~> 1.5.4') diff --git a/templates/project/README.md b/templates/project/README.md index d041f84..7bd2471 100644 --- a/templates/project/README.md +++ b/templates/project/README.md @@ -1 +1 @@ -Check out http://smashing.github.io/ for more information.
\ No newline at end of file +Check out http://smashing.github.io/smashing for more information. diff --git a/templates/project/assets/stylesheets/application.scss b/templates/project/assets/stylesheets/application.scss index 451f03e..ef2af59 100644 --- a/templates/project/assets/stylesheets/application.scss +++ b/templates/project/assets/stylesheets/application.scss @@ -8,14 +8,14 @@ $background-color: #222; $text-color: #fff; -$background-warning-color-1: #e82711; -$background-warning-color-2: #9b2d23; -$text-warning-color: #fff; - -$background-danger-color-1: #eeae32; -$background-danger-color-2: #ff9618; +$background-danger-color-1: #e82711; +$background-danger-color-2: #9b2d23; $text-danger-color: #fff; +$background-warning-color-1: #eeae32; +$background-warning-color-2: #ff9618; +$text-warning-color: #fff; + @-webkit-keyframes status-warning-background { 0% { background-color: $background-warning-color-1; } 50% { background-color: $background-warning-color-2; } diff --git a/templates/project/dashboards/layout.erb b/templates/project/dashboards/layout.erb index eae9785..a578f0c 100644 --- a/templates/project/dashboards/layout.erb +++ b/templates/project/dashboards/layout.erb @@ -13,7 +13,7 @@ <link rel="stylesheet" href="/assets/application.css"> <link href='//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700' rel='stylesheet' type='text/css'> - <link rel="icon" href="/assets/favicon.ico"> + <link rel="icon" href="/public/favicon.ico"> </head> <body> @@ -29,4 +29,4 @@ <a href="#saving-instructions" id="save-gridster">Save this layout</a> <% end %> </body> -</html>
\ No newline at end of file +</html> diff --git a/test/app_test.rb b/test/app_test.rb index 36cd310..0eb6f3a 100644 --- a/test/app_test.rb +++ b/test/app_test.rb @@ -137,6 +137,14 @@ class AppTest < Dashing::Test end end + def test_get_nonexistent_widget + with_generated_project do + get '/views/nowidget.html' + assert_equal 200, last_response.status + assert_equal last_response.body, 'Drats! Unable to find a widget file named: nowidget to render.' + end + end + def with_generated_project source_path = File.expand_path('../../templates', __FILE__) |