chameleon 0.2.0 → 0.2.1
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.
data/README.rdoc
CHANGED
@@ -12,7 +12,7 @@ This only works for Rails 3 apps.
|
|
12
12
|
|
13
13
|
This provides a generator to build widgets using a basic DSL syntax to describe the data to be exposed, and the settings for it to be exposed under, and also includes the controller/routing necessary to provide an endpoint for Geckoboard to retrieve the data to display on your dashboard.
|
14
14
|
|
15
|
-
Currently it supports the "number and optional secondary stat", "line" and "
|
15
|
+
Currently it supports the "number and optional secondary stat" (with optional display text), "line", "pie", "geckometer", "rag" and "text" widget types.
|
16
16
|
|
17
17
|
== SYNOPSIS:
|
18
18
|
|
@@ -64,9 +64,14 @@ It's best to add it to the Gemfile for your Rails 3 app, but if needed you can i
|
|
64
64
|
|
65
65
|
gem install chameleon
|
66
66
|
|
67
|
+
== CONTRIBUTORS:
|
68
|
+
|
69
|
+
Elliott Draper
|
70
|
+
Tim Blair
|
71
|
+
|
67
72
|
== LICENSE:
|
68
73
|
|
69
|
-
Copyright
|
74
|
+
Copyright 2011 Elliott Draper <el@ejdraper.com>
|
70
75
|
|
71
76
|
Permission is hereby granted, free of charge, to any person obtaining
|
72
77
|
a copy of this software and associated documentation files (the
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<root>
|
3
|
+
<item><%= @data[:value] %></item>
|
4
|
+
<min>
|
5
|
+
<value><%= @data[:min][:value] rescue "" %></value>
|
6
|
+
<text><%= @data[:min][:label] rescue "" %></text>
|
7
|
+
</min>
|
8
|
+
<max>
|
9
|
+
<value><%= @data[:max][:value] rescue "" %></value>
|
10
|
+
<text><%= @data[:max][:label] rescue "" %></text>
|
11
|
+
</max>
|
12
|
+
</root>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<root>
|
3
|
+
<item>
|
4
|
+
<value><%= @data[:red][:value] rescue "" %></value>
|
5
|
+
<text><%= @data[:red][:label] rescue "" %></text>
|
6
|
+
</item>
|
7
|
+
<item>
|
8
|
+
<value><%= @data[:amber][:value] rescue "" %></value>
|
9
|
+
<text><%= @data[:amber][:label] rescue "" %></text>
|
10
|
+
</item>
|
11
|
+
<item>
|
12
|
+
<value><%= @data[:green][:value] rescue "" %></value>
|
13
|
+
<text><%= @data[:green][:label] rescue "" %></text>
|
14
|
+
</item>
|
15
|
+
</root>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<root>
|
3
|
+
<% @data.each do |panel| %>
|
4
|
+
<item>
|
5
|
+
<text><![CDATA[<%= panel[:text] %>]]></text>
|
6
|
+
<type><%=
|
7
|
+
case panel[:type]
|
8
|
+
when :alert then 1
|
9
|
+
when :info then 2
|
10
|
+
else 0
|
11
|
+
end
|
12
|
+
%></type>
|
13
|
+
</item>
|
14
|
+
<% end %>
|
15
|
+
</root>
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chameleon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 2
|
8
|
-
- 0
|
9
|
-
version: 0.2.0
|
4
|
+
prerelease:
|
5
|
+
version: 0.2.1
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Elliott Draper
|
@@ -14,7 +10,7 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date: 2011-
|
13
|
+
date: 2011-03-24 00:00:00 +00:00
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
@@ -24,10 +20,6 @@ dependencies:
|
|
24
20
|
requirements:
|
25
21
|
- - "="
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 3
|
29
|
-
- 0
|
30
|
-
- 3
|
31
23
|
version: 3.0.3
|
32
24
|
type: :development
|
33
25
|
prerelease: false
|
@@ -45,9 +37,12 @@ files:
|
|
45
37
|
- README.rdoc
|
46
38
|
- app/controllers/widgets_controller.rb
|
47
39
|
- app/models/widget.rb
|
40
|
+
- app/views/widgets/geckometer.xml.erb
|
48
41
|
- app/views/widgets/line.xml.erb
|
49
42
|
- app/views/widgets/number_and_secondary.xml.erb
|
50
43
|
- app/views/widgets/pie.xml.erb
|
44
|
+
- app/views/widgets/rag.xml.erb
|
45
|
+
- app/views/widgets/text.xml.erb
|
51
46
|
- config/routes.rb
|
52
47
|
- lib/chameleon.rb
|
53
48
|
- lib/generators/chameleon/widget_generator.rb
|
@@ -66,7 +61,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
61
|
requirements:
|
67
62
|
- - ">="
|
68
63
|
- !ruby/object:Gem::Version
|
69
|
-
hash:
|
64
|
+
hash: -4130507598224075309
|
70
65
|
segments:
|
71
66
|
- 0
|
72
67
|
version: "0"
|
@@ -75,14 +70,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
70
|
requirements:
|
76
71
|
- - ">="
|
77
72
|
- !ruby/object:Gem::Version
|
78
|
-
hash: 2842150292622897971
|
79
|
-
segments:
|
80
|
-
- 0
|
81
73
|
version: "0"
|
82
74
|
requirements: []
|
83
75
|
|
84
76
|
rubyforge_project:
|
85
|
-
rubygems_version: 1.3
|
77
|
+
rubygems_version: 1.5.3
|
86
78
|
signing_key:
|
87
79
|
specification_version: 3
|
88
80
|
summary: Rails engine to let you easily build Geckoboard widgets
|