dasht 0.1.5 → 0.1.6

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: 37c767031e79d357e0909e79cdbe2714db028ab9
4
- data.tar.gz: c322dfac345b8066a4fee29b114140926207e78d
3
+ metadata.gz: 08d9bf8c84f034a3072b5b6db5ce99a6439f094d
4
+ data.tar.gz: 8acfeb28d77f3efb79e7264a2cb9d4e91b0a26a7
5
5
  SHA512:
6
- metadata.gz: 51d399f550759ec9ebd9eda1fcd37f7fa86f152ca3faf10afb374c1c7347aeb5e8dbec5869755f681ac739799fa2fc7ee0942222d48b28ebf01a10aabf742c67
7
- data.tar.gz: 8f12acbe41abda275b99bbbf5d628a12e0d96aaecaab7982f03d9b11a26cbd0a998c4253f0b5ac7e4454e1dd81e947f2f877274bfacba0f2955cb4e8c3c73fe9
6
+ metadata.gz: 6d0ba09d2fd41618fe3f81e5df35bd2560ccff5f74496a8c76a3cf3747d2ccf83391b1ab8f10b5aac64396ccb34bed22c2a7383f35d14bd37773103819297c53
7
+ data.tar.gz: 4e4a49b636fa79ffd46652acf0d97f058c627551474b2412786a0041784769cd445ee4e3d53ee20b7690b8b7aa4aab29f078af3eb9a1222147acacb2c24d55a5
data/README.md CHANGED
@@ -12,11 +12,14 @@ Dasht is a Ruby / Rack application by [Rusty Klophaus](http://rusty.io), open-so
12
12
 
13
13
  [![Gem Version](https://badge.fury.io/rb/dasht.svg)](http://badge.fury.io/rb/dasht)
14
14
 
15
+ ![Dasht At FiveStreet](fivestreet_example.jpg)
16
+ *Two Dasht-powered dashboards at FiveStreet HQ*
17
+
15
18
  # Getting Started
16
19
 
17
20
  Let's make the following dashboard for your Heroku app.
18
21
 
19
- ![Dasht Screen Shot](screenshot_1.png)
22
+ ![Dasht Screen Shot](screenshot.png)
20
23
 
21
24
  First, copy the Ruby code below to a file called `my_dashboard.rb`.
22
25
 
@@ -281,7 +284,7 @@ b.value :my_metric, :title => "My Title"
281
284
 
282
285
  ### Map Tile
283
286
 
284
- Drop pins on a map corresponding to either a physical addresses ("123 Main Street...") or an IP address ("216.58.217.142"). The metric attached to the map should use the `append` metric type, and the block should return the address string. See `examples/simple_heroku_dashboard.rb` for an example.
287
+ Drop pins on a map corresponding to either a physical addresses ("123 Main Street..."), an IP address ("216.58.217.142"), or coordinates ("[-97.7559964, 30.3071816]", longitude then latitude) . The metric attached to the map should use the `append` metric type, and the block should return the address string. See `examples/simple_heroku_dashboard.rb` for an example.
285
288
 
286
289
  ```ruby
287
290
  b.map :visitors, :title => "Visitors"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
@@ -93,6 +93,7 @@ Dasht.map_init = function(el, options) {
93
93
  var markers = {};
94
94
  var geocoder = new google.maps.Geocoder();
95
95
  var ip_regex = /\d+\.\d+\.\d+\.\d+/;
96
+ var coordinate_regex = /\[(-?\d+\.\d+),(-?\d+\.\d+\)]/;
96
97
 
97
98
  Dasht.fill_tile($(el).find(".map"));
98
99
 
@@ -113,6 +114,12 @@ Dasht.map_init = function(el, options) {
113
114
  _.each(new_data, function(item, index) {
114
115
  if (item.search(ip_regex) >= 0) {
115
116
  Dasht.map_plot_ip(map, markers, item);
117
+ } else if (item.search(coordinate_regex) >= 0) {
118
+ var matches = item.match(coordinate_regex);
119
+ var lng = parseFloat(matches[1]);
120
+ var lat = parseFloat(matches[2]);
121
+ var location = new google.maps.LatLng(lat, lng);
122
+ Dasht.map_plot_location(map, markers, item, location);
116
123
  } else {
117
124
  Dasht.map_plot_address(map, markers, geocoder, item);
118
125
  }
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: dasht 0.1.5 ruby lib
5
+ # stub: dasht 0.1.6 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "dasht"
9
- s.version = "0.1.5"
9
+ s.version = "0.1.6"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Rusty Klophaus"]
14
- s.date = "2015-09-23"
14
+ s.date = "2015-10-15"
15
15
  s.description = "Dasht is a framework for building beautiful, developer-focused application dashboards. Dasht is especially good at displaying high-level application stats in real-time on a wall-mounted monitor."
16
16
  s.email = "rklophaus@gmail.com"
17
17
  s.extra_rdoc_files = [
@@ -45,6 +45,7 @@ Gem::Specification.new do |s|
45
45
  "dasht.gemspec",
46
46
  "examples/simple_heroku_dashboard.rb",
47
47
  "examples/simple_heroku_dashboard_2.rb",
48
+ "fivestreet_example.jpg",
48
49
  "lib/dasht.rb",
49
50
  "lib/dasht/array_monkeypatching.rb",
50
51
  "lib/dasht/base.rb",
@@ -55,7 +56,7 @@ Gem::Specification.new do |s|
55
56
  "lib/dasht/metrics.rb",
56
57
  "lib/dasht/rack_app.rb",
57
58
  "lib/dasht/reloader.rb",
58
- "screenshot_1.png",
59
+ "screenshot.png",
59
60
  "test/helper.rb",
60
61
  "test/test_list.rb",
61
62
  "test/test_metric.rb",
Binary file
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dasht
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rusty Klophaus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-23 00:00:00.000000000 Z
11
+ date: 2015-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -144,6 +144,7 @@ files:
144
144
  - dasht.gemspec
145
145
  - examples/simple_heroku_dashboard.rb
146
146
  - examples/simple_heroku_dashboard_2.rb
147
+ - fivestreet_example.jpg
147
148
  - lib/dasht.rb
148
149
  - lib/dasht/array_monkeypatching.rb
149
150
  - lib/dasht/base.rb
@@ -154,7 +155,7 @@ files:
154
155
  - lib/dasht/metrics.rb
155
156
  - lib/dasht/rack_app.rb
156
157
  - lib/dasht/reloader.rb
157
- - screenshot_1.png
158
+ - screenshot.png
158
159
  - test/helper.rb
159
160
  - test/test_list.rb
160
161
  - test/test_metric.rb