bruce-bumpspark 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +27 -2
- data/TODO.markdown +14 -0
- data/VERSION +1 -1
- data/bumpspark.gemspec +70 -0
- metadata +3 -1
data/README.markdown
CHANGED
@@ -7,11 +7,36 @@ inclusion in Rails projects (and standalone Ruby code).
|
|
7
7
|
This version of the library generates a transparent PNG.
|
8
8
|
|
9
9
|
Many thanks to the various collaborators:
|
10
|
+
|
10
11
|
* _why (concept, BMP implementation)
|
11
12
|
* jzp (png)
|
12
13
|
* MenTaLguY (transparency)
|
13
14
|
|
14
|
-
|
15
|
+
## Usage
|
16
|
+
|
17
|
+
### From Rails
|
18
|
+
|
19
|
+
1. Include the gem as a dependency.
|
20
|
+
2. Use `bumpspark_tag` from your views or helpers, passing it the data points
|
21
|
+
you'd like graphed.
|
22
|
+
|
23
|
+
<%= bumpspark_tag [12, 34, 12, 42, 12, 23] >
|
24
|
+
|
25
|
+
## From Ruby
|
26
|
+
|
27
|
+
Simply create a `Bumpspark::Graph` instance and call `to_png` on it.
|
28
|
+
|
29
|
+
require 'bumpspark'
|
30
|
+
|
31
|
+
graph = Bumpspark::Graph.new [12, 34, 12, 42, 12, 23]
|
32
|
+
|
33
|
+
File.open('bumpspark.png', 'wb') do |file|
|
34
|
+
file.write graph.to_png
|
35
|
+
end
|
36
|
+
|
37
|
+
## Note on Patches/Pull Requests
|
38
|
+
|
39
|
+
Please check the TODO file for information on things that need doing.
|
15
40
|
|
16
41
|
* Fork the project.
|
17
42
|
* Make your feature addition or bug fix.
|
@@ -22,7 +47,7 @@ Many thanks to the various collaborators:
|
|
22
47
|
bump version in a commit by itself I can ignore when I pull)
|
23
48
|
* Send me a pull request. Bonus points for topic branches.
|
24
49
|
|
25
|
-
|
50
|
+
## Copyright
|
26
51
|
|
27
52
|
Copyright (c) 2009 Bruce Williams, et al. See LICENSE for details.
|
28
53
|
|
data/TODO.markdown
ADDED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/bumpspark.gemspec
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{bumpspark}
|
8
|
+
s.version = "1.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Bruce Williams"]
|
12
|
+
s.date = %q{2009-08-30}
|
13
|
+
s.description = %q{Generates transparent PNG "bumpspark"-style sparklines. Use from Ruby directly or as a Rails helper generating an image tag w/ built-in data, as conceived by whytheluckystiff.}
|
14
|
+
s.email = %q{bruce@codefluency.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.markdown"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.markdown",
|
24
|
+
"Rakefile",
|
25
|
+
"TODO.markdown",
|
26
|
+
"VERSION",
|
27
|
+
"bumpspark.gemspec",
|
28
|
+
"lib/bumpspark.rb",
|
29
|
+
"lib/bumpspark/formats/png.rb",
|
30
|
+
"lib/bumpspark/graph.rb",
|
31
|
+
"lib/bumpspark_helper.rb",
|
32
|
+
"lib/rails/init.rb",
|
33
|
+
"test/bumpspark_helper_test.rb",
|
34
|
+
"test/bumpspark_test.rb",
|
35
|
+
"test/test_helper.rb"
|
36
|
+
]
|
37
|
+
s.has_rdoc = true
|
38
|
+
s.homepage = %q{http://github.com/bruce/bumpspark}
|
39
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
40
|
+
s.require_paths = ["lib"]
|
41
|
+
s.rubygems_version = %q{1.3.2}
|
42
|
+
s.summary = %q{Generates "bumpspark"-style sparklines for Ruby & Rails}
|
43
|
+
s.test_files = [
|
44
|
+
"test/bumpspark_helper_test.rb",
|
45
|
+
"test/bumpspark_test.rb",
|
46
|
+
"test/test_helper.rb"
|
47
|
+
]
|
48
|
+
|
49
|
+
if s.respond_to? :specification_version then
|
50
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
51
|
+
s.specification_version = 3
|
52
|
+
|
53
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
54
|
+
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
55
|
+
s.add_development_dependency(%q<activesupport>, [">= 0"])
|
56
|
+
s.add_development_dependency(%q<actionpack>, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<rmagick>, [">= 0"])
|
58
|
+
else
|
59
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
60
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
61
|
+
s.add_dependency(%q<actionpack>, [">= 0"])
|
62
|
+
s.add_dependency(%q<rmagick>, [">= 0"])
|
63
|
+
end
|
64
|
+
else
|
65
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
66
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
67
|
+
s.add_dependency(%q<actionpack>, [">= 0"])
|
68
|
+
s.add_dependency(%q<rmagick>, [">= 0"])
|
69
|
+
end
|
70
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bruce-bumpspark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruce Williams
|
@@ -67,7 +67,9 @@ files:
|
|
67
67
|
- LICENSE
|
68
68
|
- README.markdown
|
69
69
|
- Rakefile
|
70
|
+
- TODO.markdown
|
70
71
|
- VERSION
|
72
|
+
- bumpspark.gemspec
|
71
73
|
- lib/bumpspark.rb
|
72
74
|
- lib/bumpspark/formats/png.rb
|
73
75
|
- lib/bumpspark/graph.rb
|