midas-g_flot 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,4 +1,8 @@
1
- == 0.0.1 2009-04-03
1
+ == 1.0.1 2009-04-03
2
2
 
3
- * 1 major enhancement:
4
- * Initial release
3
+ * Fixed bug with view_helpers.rb file not making it into manifest and gem build
4
+
5
+
6
+ == 1.0.0 2009-04-03
7
+
8
+ * Initial release
data/g_flot.gemspec ADDED
@@ -0,0 +1,44 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{g_flot}
5
+ s.version = "1.0.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["C. Jason Harrelson (midas)"]
9
+ s.date = %q{2009-04-03}
10
+ s.description = %q{A Guilded (http://github.com/midas/guilded/tree/master) Rails component that facilitates creating jQuery Flot graphs.}
11
+ s.email = ["jason@lookforwardenterprises.com"]
12
+ s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc"]
13
+ s.files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "g_flot.gemspec", "lib/g_flot.rb", "lib/g_flot/view_helpers.rb", "rails_generators/flot_assets/flot_assets_generator.rb", "rails_generators/flot_assets/template/guilded.flot_graph.js", "rails_generators/flot_assets/template/guilded.flot_graph.min.js", "rails_generators/flot_assets/template/jquery-flot-0.5.js", "rails_generators/flot_assets/template/jquery-flot-0.5.min.js", "script/console", "script/destroy", "script/generate", "spec/g_flot_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/rspec.rake"]
14
+ s.has_rdoc = true
15
+ s.homepage = %q{http://github.com/midas/g_flot/tree/master}
16
+ s.post_install_message = %q{PostInstall.txt}
17
+ s.rdoc_options = ["--main", "README.rdoc"]
18
+ s.require_paths = ["lib"]
19
+ s.rubyforge_project = %q{g_flot}
20
+ s.rubygems_version = %q{1.3.1}
21
+ s.summary = %q{A Guilded (http://github.com/midas/guilded/tree/master) Rails component that facilitates creating jQuery Flot graphs.}
22
+
23
+ if s.respond_to? :specification_version then
24
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
25
+ s.specification_version = 2
26
+
27
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
+ s.add_development_dependency(%q<newgem>, [">= 1.2.3"])
29
+ s.add_development_dependency(%q<rails>, [">= 2.2.0"])
30
+ s.add_development_dependency(%q<midas-guilded>, [">= 0.2.1"])
31
+ s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
32
+ else
33
+ s.add_dependency(%q<newgem>, [">= 1.2.3"])
34
+ s.add_dependency(%q<rails>, [">= 2.2.0"])
35
+ s.add_dependency(%q<midas-guilded>, [">= 0.2.1"])
36
+ s.add_dependency(%q<hoe>, [">= 1.8.0"])
37
+ end
38
+ else
39
+ s.add_dependency(%q<newgem>, [">= 1.2.3"])
40
+ s.add_dependency(%q<rails>, [">= 2.2.0"])
41
+ s.add_dependency(%q<midas-guilded>, [">= 0.2.1"])
42
+ s.add_dependency(%q<hoe>, [">= 1.8.0"])
43
+ end
44
+ end
@@ -0,0 +1,14 @@
1
+ module GFlot
2
+ module ViewHelpers
3
+
4
+ def g_flot_graph( *args )
5
+ options = args.extract_options!
6
+ options[:class] ||= 'flot-graph'
7
+ options[:width] ||= 600
8
+ options[:height] ||= 300
9
+ Guilded::Guilder.instance.add( :flot_graph, options, ['jquery/jquery-flot-0.5.min.js'] )
10
+ "<div id=\"#{options[:id]}\" class=\"#{options[:class]}\" style=\"width:#{options[:width].to_s}px;height:#{options[:height].to_s}px\"></div>"
11
+ end
12
+
13
+ end
14
+ end
data/lib/g_flot.rb CHANGED
@@ -4,7 +4,7 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require 'g_flot/view_helpers'
5
5
 
6
6
  module GFlot
7
- VERSION = '1.0.0'
7
+ VERSION = '1.0.1'
8
8
  end
9
9
 
10
10
  if defined?( ActionView::Base )
@@ -0,0 +1,15 @@
1
+ class AlreadyGridAssetsGenerator < Rails::Generator::Base
2
+ def initialize(runtime_args, runtime_options = {})
3
+ super
4
+ end
5
+
6
+ def manifest
7
+ record do |m|
8
+ m.file "guilded.flot_graph.js", "public/javascripts/guilded.flot_graph.js"
9
+ m.file "guilded.flot_graph.min.js", "public/javascripts/guilded.flot_graph.min.js"
10
+ m.directory "public/javascripts/jquery"
11
+ m.file "jquery-flot-0.5.js", "public/javascripts/jquery/jquery-flot-0.5.js"
12
+ m.file "jquery-flot-0.5.min.js", "public/javascripts/jquery/jquery-flot-0.5.min.js"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,23 @@
1
+ /* Guilded Flot Graph 1.0.0
2
+ * Copyright (c) 2009 C. Jason Harrelson (midas)
3
+ * Guilded Flot Graph is licensed under the terms of the MIT License */
4
+
5
+ g.flotGraphInit = function( options )
6
+ {
7
+ if( g.beforeFlotGraphInit )
8
+ g.beforeFlotGraphInit( options );
9
+
10
+ // Translate the legend container's id to a jQuery element
11
+ if( options.legend )
12
+ {
13
+ if( options.legend.container )
14
+ {
15
+ options.legend.container = $jid( options.legend.container );
16
+ }
17
+ }
18
+
19
+ $j.plot( $j( '#' + options.id ), options.data, options );
20
+
21
+ if( g.afterFlotGraphInit )
22
+ g.afterFlotGraphInit( options );
23
+ };
@@ -0,0 +1,4 @@
1
+ /* Guilded Flot Graph 1.0.0
2
+ * Copyright (c) 2009 C. Jason Harrelson (midas)
3
+ * Guilded Flot Graph is licensed under the terms of the MIT License */
4
+ g.flotGraphInit=function(options){if(g.beforeFlotGraphInit)g.beforeFlotGraphInit(options);if(options.legend){if(options.legend.container){options.legend.container=$jid(options.legend.container)}}$j.plot($j('#'+options.id),options.data,options);if(g.afterFlotGraphInit)g.afterFlotGraphInit(options)};