depo 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -0
- data/lib/depo/config.rb +1 -0
- data/lib/depo/view_helpers.rb +6 -2
- data/lib/depo.rb +1 -1
- data/test/action_pack_test.rb +3 -2
- data/test/config_test.rb +3 -0
- data/test/rails_root/public/ria/src/DOJO_VERSION +1 -0
- data/test/rails_root/public/ria/src/app/my/Dijit.js +28 -0
- data/test/rails_root/public/ria/src/app/my/templates/Dijit.html +4 -0
- data/test/rails_root/public/ria/src/app/tests/my/Dijit.html +18 -0
- data/test/rails_root/public/ria/src/app/tests/my/Dijit.js +11 -0
- data/test/rails_root/public/ria/src/app/themes/tundra/my/Dijit.css +4 -0
- metadata +37 -31
data/README.rdoc
CHANGED
data/lib/depo/config.rb
CHANGED
data/lib/depo/view_helpers.rb
CHANGED
@@ -10,13 +10,17 @@ module Depo
|
|
10
10
|
Depo.config.env_dj_config(@opts[:env])
|
11
11
|
end
|
12
12
|
|
13
|
+
def app_package
|
14
|
+
@app_package||=Depo.config.app_package
|
15
|
+
end
|
16
|
+
|
13
17
|
#check if ext presented and add if not
|
14
18
|
def add_ext(str,ext)
|
15
19
|
( str.strip=~/\.#{ext}$/ ) ? str.strip : "#{str.strip}.#{ext}"
|
16
20
|
end
|
17
21
|
|
18
22
|
def css
|
19
|
-
%Q[#{webroot}/
|
23
|
+
%Q[#{webroot}/#{app_package}/themes/#{theme}/#{add_ext(@opts[:app],'css')}]
|
20
24
|
end
|
21
25
|
|
22
26
|
def dojo(opts)
|
@@ -33,7 +37,7 @@ module Depo
|
|
33
37
|
end
|
34
38
|
|
35
39
|
def app_js
|
36
|
-
%Q[#{webroot}/
|
40
|
+
%Q[#{webroot}/#{app_package}/pages/#{@opts[:app]}.js]
|
37
41
|
end
|
38
42
|
|
39
43
|
end
|
data/lib/depo.rb
CHANGED
data/test/action_pack_test.rb
CHANGED
@@ -27,11 +27,12 @@ end
|
|
27
27
|
|
28
28
|
class ActionPackTest < GeneratorTest
|
29
29
|
def test_dojo_helper_development
|
30
|
+
Depo.config.app_package 'medhub'
|
30
31
|
assert_equal ActionView.new.dojo(:app => 'app', :env => 'development'), ActionViewEnv.new.get_template({
|
31
32
|
:webroot => "/ria/src",
|
32
|
-
:app_js => "/ria/src/
|
33
|
+
:app_js => "/ria/src/medhub/pages/app.js",
|
33
34
|
:djConfig => "parseOnLoad:true,isDebug:true",
|
34
|
-
:css => "/ria/src/
|
35
|
+
:css => "/ria/src/medhub/themes/tundra/app.css"
|
35
36
|
})
|
36
37
|
Depo.clear_config!
|
37
38
|
end
|
data/test/config_test.rb
CHANGED
@@ -7,6 +7,8 @@ class DepoConfigureTest < GeneratorTest
|
|
7
7
|
author 'niquola@gmail.com'
|
8
8
|
themes ['tundra','verdugo']
|
9
9
|
|
10
|
+
app_package 'medhub'
|
11
|
+
|
10
12
|
environments {
|
11
13
|
developmentDjConfig 'parseOnLoad:true;isDebug:true;'
|
12
14
|
productionDjConfig 'parseOnLoad:true;isDebug:false;'
|
@@ -41,6 +43,7 @@ class DepoConfigureTest < GeneratorTest
|
|
41
43
|
assert_equal('public/ria/src', config.src_path)
|
42
44
|
assert_equal('public/ria/builds', config.builds_path)
|
43
45
|
assert_equal('niquola@gmail.com', config.author)
|
46
|
+
assert_equal('medhub', config.app_package)
|
44
47
|
|
45
48
|
assert_equal(['tundra','verdugo'],config.themes)
|
46
49
|
assert_equal('parseOnLoad:true;isDebug:true;',config.environments.developmentDjConfig)
|
@@ -0,0 +1 @@
|
|
1
|
+
1.4.3
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/**
|
2
|
+
* app.my.Dijit
|
3
|
+
* Created by niquola@gmail.com
|
4
|
+
**/
|
5
|
+
dojo.provide("app.my.Dijit");
|
6
|
+
|
7
|
+
(function () {
|
8
|
+
//here go private vars and functions
|
9
|
+
dojo.declare("app.my.Dijit",null, {
|
10
|
+
// summary:
|
11
|
+
// HERE WIDGET SUMMARY
|
12
|
+
|
13
|
+
// baseClass: [protected] String
|
14
|
+
baseClass: "AppMyDijit"
|
15
|
+
//templateString: dojo.cache("app.my", "templates/Dijit.html"),
|
16
|
+
widgetsInTemplate: true,
|
17
|
+
//buildRendering: function () {
|
18
|
+
//this.inherited(arguments);
|
19
|
+
//},
|
20
|
+
//layout: function () {
|
21
|
+
//var cb = this._contentBox;
|
22
|
+
//dojo.marginBox(this.containerNode, cb);
|
23
|
+
//},
|
24
|
+
//postCreate: function () {
|
25
|
+
//this.inherited(arguments);
|
26
|
+
//}
|
27
|
+
});
|
28
|
+
})();
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version='1.0' encoding='utf-8' ?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<title>app.my.Dijit</title>
|
6
|
+
|
7
|
+
<script type="text/javascript" src="/ria/src/dojo/dojo.js" djConfig="isDebug:false,parseOnLoad:true"> </script>
|
8
|
+
<script src="Dijit.js"></script>
|
9
|
+
<link rel="stylesheet" href="public/ria/src/common.css" type="text/css" />
|
10
|
+
|
11
|
+
<link rel="stylesheet" href="/public/ria/src/app/themes/tundra/my/Dijit.css" type="text/css" />
|
12
|
+
</head>
|
13
|
+
<body class="app">
|
14
|
+
<div dojoType="app.my.Dijit" jsId="dijit">
|
15
|
+
</div>
|
16
|
+
</body>
|
17
|
+
</html>
|
18
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: depo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- niquola, smecsia
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-06-17 00:00:00 +04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -59,53 +59,59 @@ extensions: []
|
|
59
59
|
extra_rdoc_files:
|
60
60
|
- README.rdoc
|
61
61
|
files:
|
62
|
-
- MIT-LICENSE
|
63
|
-
- Rakefile
|
64
62
|
- init.rb
|
63
|
+
- Rakefile
|
64
|
+
- uninstall.rb
|
65
65
|
- README.rdoc
|
66
66
|
- install.rb
|
67
|
-
-
|
68
|
-
- generators/depo_config/depo_config_generator.rb
|
69
|
-
- generators/depo_config/USAGE
|
70
|
-
- generators/depo_config/templates/depo.rb
|
71
|
-
- generators/dijit/USAGE
|
72
|
-
- generators/dijit/templates/test.html
|
73
|
-
- generators/dijit/templates/test.js
|
74
|
-
- generators/dijit/templates/template.html
|
75
|
-
- generators/dijit/templates/style.css
|
76
|
-
- generators/dijit/templates/class.js
|
77
|
-
- generators/dijit/dijit_generator.rb
|
78
|
-
- generators/dpage/dpage_generator.rb
|
79
|
-
- generators/dpage/USAGE
|
67
|
+
- MIT-LICENSE
|
80
68
|
- generators/dpage/templates/dpage.css
|
69
|
+
- generators/dpage/templates/app/views.js
|
70
|
+
- generators/dpage/templates/app/controllers.js
|
71
|
+
- generators/dpage/templates/app/models.js
|
72
|
+
- generators/dpage/templates/dpage.js
|
81
73
|
- generators/dpage/templates/controller.rb
|
82
|
-
- generators/dpage/templates/helper.rb
|
83
74
|
- generators/dpage/templates/helper_test.rb
|
84
75
|
- generators/dpage/templates/view.haml
|
76
|
+
- generators/dpage/templates/helper.rb
|
85
77
|
- generators/dpage/templates/default_stylesheets/reset.css
|
86
|
-
- generators/dpage/templates/default_stylesheets/all.css
|
87
78
|
- generators/dpage/templates/default_stylesheets/theme_override.css
|
88
79
|
- generators/dpage/templates/default_stylesheets/common.css
|
89
|
-
- generators/dpage/templates/
|
90
|
-
- generators/dpage/
|
91
|
-
- generators/dpage/
|
92
|
-
- generators/
|
93
|
-
-
|
94
|
-
-
|
80
|
+
- generators/dpage/templates/default_stylesheets/all.css
|
81
|
+
- generators/dpage/USAGE
|
82
|
+
- generators/dpage/dpage_generator.rb
|
83
|
+
- generators/depo_config/templates/depo.rb
|
84
|
+
- generators/depo_config/USAGE
|
85
|
+
- generators/depo_config/depo_config_generator.rb
|
86
|
+
- generators/dijit/dijit_generator.rb
|
87
|
+
- generators/dijit/templates/style.css
|
88
|
+
- generators/dijit/templates/template.html
|
89
|
+
- generators/dijit/templates/test.html
|
90
|
+
- generators/dijit/templates/class.js
|
91
|
+
- generators/dijit/templates/test.js
|
92
|
+
- generators/dijit/USAGE
|
95
93
|
- lib/depo/config.rb
|
94
|
+
- lib/depo/build.rb
|
95
|
+
- lib/depo/dijit_conventions.rb
|
96
96
|
- lib/depo/tasks.rb
|
97
|
-
- lib/depo/templates/profile.js
|
98
97
|
- lib/depo/templates/dojo_src.tpl
|
98
|
+
- lib/depo/templates/profile.js
|
99
99
|
- lib/depo/view_helpers.rb
|
100
100
|
- lib/depo.rb
|
101
101
|
- tasks/depo.rake
|
102
|
-
- test/database.yml
|
103
|
-
- test/path_utils_test.rb
|
104
102
|
- test/build_profile_test.rb
|
105
|
-
- test/test_helper.rb
|
106
103
|
- test/action_pack_test.rb
|
104
|
+
- test/path_utils_test.rb
|
107
105
|
- test/generators_test.rb
|
106
|
+
- test/database.yml
|
107
|
+
- test/rails_root/public/ria/src/app/my/templates/Dijit.html
|
108
|
+
- test/rails_root/public/ria/src/app/my/Dijit.js
|
109
|
+
- test/rails_root/public/ria/src/app/themes/tundra/my/Dijit.css
|
110
|
+
- test/rails_root/public/ria/src/app/tests/my/Dijit.html
|
111
|
+
- test/rails_root/public/ria/src/app/tests/my/Dijit.js
|
112
|
+
- test/rails_root/public/ria/src/DOJO_VERSION
|
108
113
|
- test/config_test.rb
|
114
|
+
- test/test_helper.rb
|
109
115
|
has_rdoc: true
|
110
116
|
homepage:
|
111
117
|
licenses: []
|