depo 0.0.2 → 0.0.3
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 +4 -0
- data/Rakefile +1 -1
- data/generators/dijit/templates/class.js +2 -2
- data/generators/dijit/templates/test.html +12 -1
- data/lib/depo/dijit_conventions.rb +12 -0
- data/lib/depo.rb +1 -1
- data/test/path_utils_test.rb +2 -0
- data/test/rails_root/public/ria/src/app/my/Dijit.js +2 -2
- data/test/rails_root/public/ria/src/app/tests/my/Dijit.html +12 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -21,6 +21,10 @@ Is attempt to automate many tasks and practices in building RIA using Dojo and R
|
|
21
21
|
* Generators for custom widgets (DijitGenerator) and one page applications
|
22
22
|
* ActionView Helper
|
23
23
|
|
24
|
+
== CHANGELOG:
|
25
|
+
- 0.0.3 - Various template fixes.
|
26
|
+
|
27
|
+
|
24
28
|
== SAMPLE CONFIGURATION:
|
25
29
|
Depo.configure {
|
26
30
|
author 'niquola'
|
data/Rakefile
CHANGED
@@ -29,7 +29,7 @@ PKG_FILES = FileList[ '[a-zA-Z]*', 'generators/**/*', 'lib/**/*', 'rails/**/*',
|
|
29
29
|
|
30
30
|
spec = Gem::Specification.new do |s|
|
31
31
|
s.name = "depo"
|
32
|
-
s.version = "0.0.
|
32
|
+
s.version = "0.0.3"
|
33
33
|
s.author = "niquola, smecsia"
|
34
34
|
s.email = "niquola@gmail.com"
|
35
35
|
#s.homepage = ""
|
@@ -13,7 +13,7 @@ dojo.require("<%= dijit_base_class %>");
|
|
13
13
|
// HERE WIDGET SUMMARY
|
14
14
|
|
15
15
|
// baseClass: [protected] String
|
16
|
-
baseClass: "<%= dijit_style_class_name %>"
|
16
|
+
baseClass: "<%= dijit_style_class_name %>"
|
17
17
|
//templateString: dojo.cache("<%= dijit_package_name %>", "templates/<%= dijit_class_name %>.html"),
|
18
18
|
//widgetsInTemplate: true,
|
19
19
|
//buildRendering: function () {
|
@@ -27,4 +27,4 @@ dojo.require("<%= dijit_base_class %>");
|
|
27
27
|
//this.inherited(arguments);
|
28
28
|
//}
|
29
29
|
});
|
30
|
-
});
|
30
|
+
})();
|
@@ -7,9 +7,20 @@
|
|
7
7
|
<script type="text/javascript" src="/ria/src/dojo/dojo.js" djConfig="isDebug:false,parseOnLoad:true"> </script>
|
8
8
|
<script src="<%= dijit_class_name %>.js"></script>
|
9
9
|
<%= config.generators.head_of_test_page %>
|
10
|
-
<link rel="stylesheet" href="
|
10
|
+
<link rel="stylesheet" href="<%= style_webpath %>" type="text/css" />
|
11
11
|
</head>
|
12
|
+
<style>
|
13
|
+
#id<%= dijit_class_name %>{
|
14
|
+
position:absolute;
|
15
|
+
top:1em;
|
16
|
+
left:1em;
|
17
|
+
bottom:1em;
|
18
|
+
right:1em;
|
19
|
+
border:1px solid #aaa;
|
20
|
+
}
|
21
|
+
</style>
|
12
22
|
<body class="app">
|
23
|
+
<div id="id<%= dijit_class_name %>" dojoType="<%= dijit_full_name %>" jsId="dijit<%= dijit_class_name %>"></div>
|
13
24
|
</body>
|
14
25
|
</html>
|
15
26
|
|
@@ -55,6 +55,10 @@ module Depo
|
|
55
55
|
File.join(*args.flatten.unshift(Depo.config.src_path))
|
56
56
|
end
|
57
57
|
|
58
|
+
def from_websrc(*args)
|
59
|
+
File.join(*args.flatten.unshift(Depo.config.src_webpath))
|
60
|
+
end
|
61
|
+
|
58
62
|
def j(*args)
|
59
63
|
File.join(*args)
|
60
64
|
end
|
@@ -67,6 +71,10 @@ module Depo
|
|
67
71
|
from_src cmp.base_module,'themes', Depo.config.default_theme, cmp.modules
|
68
72
|
end
|
69
73
|
|
74
|
+
prop :style_dir_webpath do
|
75
|
+
from_websrc cmp.base_module,'themes', Depo.config.default_theme, cmp.modules
|
76
|
+
end
|
77
|
+
|
70
78
|
prop :test_dir_path do
|
71
79
|
from_src cmp.base_module,'tests', cmp.modules
|
72
80
|
end
|
@@ -75,6 +83,10 @@ module Depo
|
|
75
83
|
j(package_path,"#{cmp.class_name}.js")
|
76
84
|
end
|
77
85
|
|
86
|
+
prop :style_webpath do
|
87
|
+
j(style_dir_webpath, "#{cmp.class_name}.css")
|
88
|
+
end
|
89
|
+
|
78
90
|
prop :style_path do
|
79
91
|
j(style_dir_path,"#{cmp.class_name}.css")
|
80
92
|
end
|
data/lib/depo.rb
CHANGED
data/test/path_utils_test.rb
CHANGED
@@ -13,6 +13,8 @@ class DijitConventionsTest < GeneratorTest
|
|
13
13
|
assert_equal('public/ria/src/app/tests/my/Dijit.js', dijit.test_code_path)
|
14
14
|
assert_equal('public/ria/src/app/tests/my/Dijit.html', dijit.test_page_path)
|
15
15
|
|
16
|
+
assert_equal('/ria/src/app/themes/tundra/my/Dijit.css', dijit.style_webpath)
|
17
|
+
|
16
18
|
assert_not_nil(dijit.to_hash)
|
17
19
|
end
|
18
20
|
end
|
@@ -11,7 +11,7 @@ dojo.provide("app.my.Dijit");
|
|
11
11
|
// HERE WIDGET SUMMARY
|
12
12
|
|
13
13
|
// baseClass: [protected] String
|
14
|
-
baseClass: "AppMyDijit"
|
14
|
+
baseClass: "AppMyDijit"
|
15
15
|
//templateString: dojo.cache("app.my", "templates/Dijit.html"),
|
16
16
|
//widgetsInTemplate: true,
|
17
17
|
//buildRendering: function () {
|
@@ -25,4 +25,4 @@ dojo.provide("app.my.Dijit");
|
|
25
25
|
//this.inherited(arguments);
|
26
26
|
//}
|
27
27
|
});
|
28
|
-
});
|
28
|
+
})();
|
@@ -8,9 +8,20 @@
|
|
8
8
|
<script src="Dijit.js"></script>
|
9
9
|
<link rel="stylesheet" href="public/ria/src/common.css" type="text/css" />
|
10
10
|
|
11
|
-
<link rel="stylesheet" href="/
|
11
|
+
<link rel="stylesheet" href="/ria/src/app/themes/tundra/my/Dijit.css" type="text/css" />
|
12
12
|
</head>
|
13
|
+
<style>
|
14
|
+
#idDijit{
|
15
|
+
position:absolute;
|
16
|
+
top:1em;
|
17
|
+
left:1em;
|
18
|
+
bottom:1em;
|
19
|
+
right:1em;
|
20
|
+
border:1px solid #aaa;
|
21
|
+
}
|
22
|
+
</style>
|
13
23
|
<body class="app">
|
24
|
+
<div id="idDijit" dojoType="app.my.Dijit" jsId="dijitDijit"></div>
|
14
25
|
</body>
|
15
26
|
</html>
|
16
27
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: depo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- niquola, smecsia
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-04-
|
12
|
+
date: 2010-04-21 00:00:00 +04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|