acts_as_dashboard 0.1.0 → 0.3.0

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.
Files changed (30) hide show
  1. data/.gitignore +1 -0
  2. data/README.rdoc +3 -3
  3. data/Rakefile +1 -1
  4. data/VERSION +1 -1
  5. data/acts_as_dashboard.gemspec +21 -4
  6. data/generators/dashboard/dashboard_generator.rb +15 -8
  7. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-anim_basic_16x16.gif +0 -0
  8. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png +0 -0
  9. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
  10. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png +0 -0
  11. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png +0 -0
  12. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png +0 -0
  13. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png +0 -0
  14. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png +0 -0
  15. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png +0 -0
  16. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png +0 -0
  17. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_222222_256x240.png +0 -0
  18. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png +0 -0
  19. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_a83300_256x240.png +0 -0
  20. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_cccccc_256x240.png +0 -0
  21. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_ffffff_256x240.png +0 -0
  22. data/generators/dashboard/templates/jquery-ui/css/ui-darkness/jquery-ui-1.8.2.custom.css +489 -0
  23. data/generators/dashboard/templates/jquery-ui/js/jquery-1.4.2.min.js +154 -0
  24. data/generators/dashboard/templates/jquery-ui/js/jquery-ui-1.8.2.custom.min.js +1012 -0
  25. data/lib/acts_as_dashboard/app/views/dashboards/show.html.erb +11 -8
  26. data/lib/acts_as_dashboard/class_methods.rb +23 -17
  27. data/lib/acts_as_dashboard/public/javascripts/dashboard.js +0 -1
  28. data/lib/acts_as_dashboard/public/stylesheets/dashboard.css +27 -7
  29. metadata +21 -4
  30. data/.document +0 -5
data/.gitignore CHANGED
@@ -17,5 +17,6 @@ tmtags
17
17
  coverage
18
18
  rdoc
19
19
  pkg
20
+ .document
20
21
 
21
22
  ## PROJECT::SPECIFIC
data/README.rdoc CHANGED
@@ -1,8 +1,8 @@
1
- = ActsAsDashboard
1
+ = acts_as_dashboard
2
2
 
3
3
  == Description
4
4
 
5
- ActsAsDashboard makes it easy to create dashboards in Rails apps.
5
+ acts_as_dashboard makes it easy to create dashboards in Rails apps.
6
6
 
7
7
 
8
8
  == Usage
@@ -25,7 +25,7 @@ ActsAsDashboard makes it easy to create dashboards in Rails apps.
25
25
  == To Do
26
26
 
27
27
  * Make LineGraphWidget#line_colours accept a string or array.
28
- * Decide if routes should added to config/routes.rb , or loaded by ActsAsDashboard using ActionController::Routing::RouteSet#add_route .
28
+ * Decide if routes should added to config/routes.rb , or loaded by acts_as_dashboard using ActionController::Routing::Routes#add_route . If the latter figure out how to make it work.
29
29
  * Make the "show" view template sexy.
30
30
  * Add more widget types.
31
31
  * If getting a new value for a widget fails, keep the last value, and mark the widget as failing.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  Jeweler::Tasks.new do |gemspec|
7
7
  gemspec.name = "acts_as_dashboard"
8
8
  gemspec.summary = %Q{Create dashboards in Rails apps easily.}
9
- gemspec.description = %Q{ActsAsDashboard makes it easy to create dashboards in Rails apps. Very little configuration is required. Read the docs to get started.}
9
+ gemspec.description = %Q{acts_as_dashboard makes it easy to create dashboards in Rails apps. Very little configuration is required. Read the docs to get started.}
10
10
  gemspec.email = "nick@deadorange.com"
11
11
  gemspec.homepage = "http://github.com/nickhoffman/acts_as_dashboard"
12
12
  gemspec.authors = ["Nick Hoffman"]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.3.0
@@ -5,20 +5,19 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{acts_as_dashboard}
8
- s.version = "0.1.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nick Hoffman"]
12
12
  s.date = %q{2010-08-01}
13
- s.description = %q{ActsAsDashboard makes it easy to create dashboards in Rails apps. Very little configuration is required. Read the docs to get started.}
13
+ s.description = %q{acts_as_dashboard makes it easy to create dashboards in Rails apps. Very little configuration is required. Read the docs to get started.}
14
14
  s.email = %q{nick@deadorange.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
- ".document",
21
- ".gitignore",
20
+ ".gitignore",
22
21
  "LICENSE",
23
22
  "README.rdoc",
24
23
  "Rakefile",
@@ -63,6 +62,24 @@ Gem::Specification.new do |s|
63
62
  "generators/dashboard/templates/jqplot-0.9.7/plugins/jqplot.pointLabels.min.js",
64
63
  "generators/dashboard/templates/jqplot-0.9.7/plugins/jqplot.trendline.js",
65
64
  "generators/dashboard/templates/jqplot-0.9.7/plugins/jqplot.trendline.min.js",
65
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-anim_basic_16x16.gif",
66
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png",
67
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png",
68
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png",
69
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png",
70
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png",
71
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png",
72
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png",
73
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png",
74
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png",
75
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_222222_256x240.png",
76
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png",
77
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_a83300_256x240.png",
78
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_cccccc_256x240.png",
79
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/images/ui-icons_ffffff_256x240.png",
80
+ "generators/dashboard/templates/jquery-ui/css/ui-darkness/jquery-ui-1.8.2.custom.css",
81
+ "generators/dashboard/templates/jquery-ui/js/jquery-1.4.2.min.js",
82
+ "generators/dashboard/templates/jquery-ui/js/jquery-ui-1.8.2.custom.min.js",
66
83
  "generators/dashboard/templates/jquery.jqplot.min.css",
67
84
  "generators/dashboard/templates/js.class-2.1.4/CHANGELOG",
68
85
  "generators/dashboard/templates/js.class-2.1.4/MIT-LICENSE",
@@ -8,7 +8,10 @@ class DashboardGenerator < Rails::Generator::Base
8
8
  @@jqplot_css_file = 'jquery.jqplot.min.css'
9
9
  @@jqplot_js_dir = 'jqplot-0.9.7'
10
10
  @@jsclass_js_dir = 'js.class-2.1.4'
11
+ @@jquery_ui_js_dir = 'jquery-ui/js'
12
+ @@jquery_ui_css_dir = 'jquery-ui/css'
11
13
  @@public_js_dir = File.join Rails.public_path, 'javascripts/'
14
+ @@public_css_dir = File.join Rails.public_path, 'stylesheets/'
12
15
 
13
16
  def manifest
14
17
  build_names args[0]
@@ -28,14 +31,20 @@ class DashboardGenerator < Rails::Generator::Base
28
31
 
29
32
  if options[:command] == :create
30
33
  logger.directory File.join('public', 'javascripts', @@jqplot_js_dir , '/')
31
- FileUtils.cp_r source_path(@@jqplot_js_dir ), @@public_js_dir unless options[:pretend]
34
+ FileUtils.cp_r source_path(@@jqplot_js_dir), @@public_js_dir unless options[:pretend]
32
35
 
33
36
  logger.directory File.join('public', 'javascripts', @@jsclass_js_dir , '/')
34
- FileUtils.cp_r source_path(@@jsclass_js_dir ), @@public_js_dir unless options[:pretend]
37
+ FileUtils.cp_r source_path(@@jsclass_js_dir), @@public_js_dir unless options[:pretend]
35
38
 
36
- # This is commented out because ActsAsDashboard::ClassMethods#acts_as_dashboard creates
37
- # routes at run-time.
38
- # add_dashboard_routes controller_name
39
+ logger.directory File.join('public', 'javascripts', @@jquery_ui_js_dir, '/')
40
+ m.directory File.join('public', 'javascripts', 'jquery-ui')
41
+ FileUtils.cp_r source_path(@@jquery_ui_js_dir), File.join(@@public_js_dir, 'jquery-ui/') unless options[:pretend]
42
+
43
+ logger.directory File.join('public', 'stylesheets', @@jquery_ui_css_dir, '/')
44
+ m.directory File.join('public', 'stylesheets', 'jquery-ui')
45
+ FileUtils.cp_r source_path(@@jquery_ui_css_dir), File.join(@@public_css_dir, 'jquery-ui/') unless options[:pretend]
46
+
47
+ add_dashboard_routes controller_name
39
48
  elsif options[:command] == :destroy
40
49
  app_jqplot_js_dir = File.join(@@public_js_dir, @@jqplot_js_dir)
41
50
  app_jsclass_js_dir = File.join(@@public_js_dir, @@jsclass_js_dir)
@@ -50,9 +59,7 @@ class DashboardGenerator < Rails::Generator::Base
50
59
  FileUtils.rm_r app_jsclass_js_dir
51
60
  end
52
61
 
53
- # This is commented out because ActsAsDashboard::ClassMethods#acts_as_dashboard creates
54
- # routes at run-time.
55
- # remove_dashboard_routes controller_name
62
+ remove_dashboard_routes controller_name
56
63
  end
57
64
  end
58
65
  end