panic_board_data 1.0.1 → 1.0.2

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: a96cc0a4c0c9defb433c8e52cd435b416725cf75
4
- data.tar.gz: 3892a19e078f15052b1a4ef43e5637912704d46c
3
+ metadata.gz: 187785c2fdbc4bce731a3d75e50e507419e21860
4
+ data.tar.gz: 22ad3a8fad2d2b45aec4849f22dae2397590ccca
5
5
  SHA512:
6
- metadata.gz: 960baaac1f93813e6aa934d1d37d608b2ef9da670f8e5912436eaa8d3758dd40fd0a2f748f67a3fbcd8da5cf94184ec04c937ab4dff822cd479e6381825af386
7
- data.tar.gz: 4c1024b24e53409d1aafdb8972a5515e2ecda9837bcb8f3bc14e07085b1fb884811a309810404e2c436c5ca58bd18bb23c8c291aa3d36afea08ef12f74238de3
6
+ metadata.gz: 3d41bc571afe5ca3f7e90c3a0890afda31ead122a7459662039c1455614b56151ee81d8fd5359882c8179b07f209ce0e29c4db13c90435d8f421f5633eed3858
7
+ data.tar.gz: 88617ad930d4fd4e38e4ca6a8f7d19cba21cbe220eb8d56d871dab13ffbdcaa0430709cc1d70664d9a1f84e0ba4dd139a03c9158fd8272d48b75217f97d5a159
Binary file
data/README.md CHANGED
@@ -1,29 +1,115 @@
1
1
  # PanicBoardData
2
2
 
3
- TODO: Write a gem description
3
+ This gem exists to make it eaiser to display data on your Panic Status Board.
4
4
 
5
- ## Installation
5
+ ## Usage
6
6
 
7
- Add this line to your application's Gemfile:
7
+ The Panic Status Board loads itself with data it pulls from the internet.
8
8
 
9
- gem 'panic_board_data'
9
+ Therefore, if you want to show very custom data in your Status Board, you'll want to create a website that serves that custom data.
10
10
 
11
- And then execute:
11
+ With this gem, the easiest way to do this is to create a simple Sinatra application. Create a simple site that returns the output from this gem, and your custom Status Board will be good-to-go.
12
12
 
13
- $ bundle
13
+ #### Tables
14
14
 
15
- Or install it yourself as:
15
+ ![Table](https://raw.github.com/darrencauthon/panic_board_data/master/samples/tables.jpg "Table")
16
16
 
17
- $ gem install panic_board_data
17
+ ````ruby
18
+ # Sinatra example
19
+ get '/my_table' do
18
20
 
19
- ## Usage
21
+ # sample images for our board
22
+ images = [build_image('http://tinyurl.com/mnvjm96'),
23
+ build_image('http://tinyurl.com/kt3hp7v')]
24
+
25
+ # special note: An array of values (like "images") will
26
+ # be flattened into a single value in the cell...
27
+ # so no need to concatenate things like rows of images.
28
+ data = [['Project A', "5 days", images, progress_bar_to(3)],
29
+ ['Project B', "2 days", images[0], progress_bar_to(7)],
30
+ ['Project C', "9 days", images[1], progress_bar_to(1)],
31
+ ['Project D', "1 day", nil, progress_bar_to(8)]]
32
+
33
+ table = PanicBoardData::Table.new data
34
+
35
+ # optionally set the column widths
36
+ table.widths = [nil, 125, 100]
37
+
38
+ # return HTML necessary for import into Status Board
39
+ table.to_html
40
+
41
+ end
42
+ ````
43
+
44
+ #### Graphs
45
+
46
+ ![Graph](https://raw.github.com/darrencauthon/panic_board_data/master/samples/graphs.jpg "Graph")
47
+
48
+ ````ruby
49
+ #another Sinatra example
50
+ get '/graph_example' do
51
+
52
+ # one set of data
53
+ hotdogs = PanicBoardData::DataSequence.new('Hotdogs')
54
+ hotdogs.data['Sunday'] = 4
55
+ hotdogs.data['Monday'] = 3
56
+ hotdogs.data['Tuesday'] = 4
57
+ hotdogs.data['Wednesday'] = 8
58
+ hotdogs.data['Thursday'] = 10
59
+ hotdogs.data['Friday'] = 11
60
+ hotdogs.data['Saturday'] = 2
61
+
62
+ # another set of data
63
+ burgers = PanicBoardData::DataSequence.new('Burgers')
64
+ burgers.data['Sunday'] = 1
65
+ burgers.data['Monday'] = 7
66
+ burgers.data['Tuesday'] = 5
67
+ burgers.data['Wednesday'] = 6
68
+ burgers.data['Thursday'] = 10
69
+ burgers.data['Friday'] = 15
70
+ burgers.data['Saturday'] = 5
71
+
72
+ # build the graph
73
+ graph = PanicBoardData::Graph.new
74
+ graph.title = "Purchases"
75
+
76
+ # this can be :bar or :line
77
+ graph.type = :bar
78
+
79
+ # add the sets of data you want to display in the graph
80
+ graph.data_sequences << hotdogs
81
+ graph.data_sequences << burgers
82
+
83
+ # return JSON necessary for import into Status Board
84
+ graph.to_json
85
+
86
+ end
87
+ ````
88
+
89
+ #### Single Values
90
+
91
+ These can be really big...
92
+
93
+ ![SingleValue](https://raw.github.com/darrencauthon/panic_board_data/master/samples/single_value_1.jpg "Single Value")
94
+
95
+ ````ruby
96
+ # yet another Sinatra example
97
+ get '/single_value' do
98
+ heading = 'How many people live in the United States?'
99
+ value = PanicBoardData::SingleValue.new heading, '317,044,240'
100
+
101
+ # return HTML necessary for import into Status Board
102
+ value.to_html
103
+ end
104
+ ````
20
105
 
21
- TODO: Write usage instructions here
106
+ ... or very small.
22
107
 
23
- ## Contributing
108
+ ![SingleValue](https://raw.github.com/darrencauthon/panic_board_data/master/samples/single_value_2.jpg "Single Value")
24
109
 
25
- 1. Fork it
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
110
+ ````ruby
111
+ # yet another Sinatra example
112
+ get '/single_value' do
113
+ PanicBoardData::SingleValue.new('Logins Today', 1).to_html
114
+ end
115
+ ````
@@ -1,3 +1,3 @@
1
1
  module PanicBoardData
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
8
8
  spec.version = PanicBoardData::VERSION
9
9
  spec.authors = ["Darren Cauthon"]
10
10
  spec.email = ["darren@cauthon.com"]
11
- spec.description = %q{Export data for Panic Board}
12
- spec.summary = %q{Export data for Panic Board}
13
- spec.homepage = ""
11
+ spec.description = %q{Export data for Panic Status Board}
12
+ spec.summary = %q{Export data for Panic Status Board}
13
+ spec.homepage = "http://www.github.com/darrencauthon/panic_board_data"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panic_board_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Cauthon
@@ -94,13 +94,14 @@ dependencies:
94
94
  - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- description: Export data for Panic Board
97
+ description: Export data for Panic Status Board
98
98
  email:
99
99
  - darren@cauthon.com
100
100
  executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
+ - .DS_Store
104
105
  - .gitignore
105
106
  - Gemfile
106
107
  - LICENSE.txt
@@ -115,12 +116,16 @@ files:
115
116
  - lib/panic_board_data/table.rb
116
117
  - lib/panic_board_data/version.rb
117
118
  - panic_board_data.gemspec
119
+ - samples/graphs.jpg
120
+ - samples/single_value_1.jpg
121
+ - samples/single_value_2.jpg
122
+ - samples/tables.jpg
118
123
  - spec/panic_board_data/graph_spec.rb
119
124
  - spec/panic_board_data/kernel_spec.rb
120
125
  - spec/panic_board_data/single_value_spec.rb
121
126
  - spec/panic_board_data/table_spec.rb
122
127
  - spec/spec_helper.rb
123
- homepage: ''
128
+ homepage: http://www.github.com/darrencauthon/panic_board_data
124
129
  licenses:
125
130
  - MIT
126
131
  metadata: {}
@@ -143,7 +148,7 @@ rubyforge_project:
143
148
  rubygems_version: 2.0.2
144
149
  signing_key:
145
150
  specification_version: 4
146
- summary: Export data for Panic Board
151
+ summary: Export data for Panic Status Board
147
152
  test_files:
148
153
  - spec/panic_board_data/graph_spec.rb
149
154
  - spec/panic_board_data/kernel_spec.rb