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 CHANGED
@@ -48,6 +48,7 @@ Is attempt to automate many tasks and practices in building RIA using Dojo and R
48
48
  == CHANGE LOG:
49
49
 
50
50
  * 0.0.5 remove dependency from dojo_src, to extenrnalize control over it
51
+ * 0.0.7 add app_package customization (default left 'app')
51
52
 
52
53
  == LICENSE:
53
54
 
data/lib/depo/config.rb CHANGED
@@ -9,6 +9,7 @@ module Depo
9
9
  define_prop :profile_path,'tmp/dojo_build_profile.js'
10
10
  define_prop :default_page_lib,'app.pages'
11
11
  define_prop :enable_dojofy, true
12
+ define_prop :app_package, 'app'
12
13
 
13
14
  def dojo_version(*args)
14
15
  raise "dojo_version depricated."
@@ -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}/app/themes/#{theme}/#{add_ext(@opts[:app],'css')}]
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}/app/pages/#{@opts[:app]}.js]
40
+ %Q[#{webroot}/#{app_package}/pages/#{@opts[:app]}.js]
37
41
  end
38
42
 
39
43
  end
data/lib/depo.rb CHANGED
@@ -4,7 +4,7 @@ require 'kung_figure'
4
4
  require 'active_support'
5
5
 
6
6
  module Depo
7
- VERSION = '0.0.6'
7
+ VERSION = '0.0.7'
8
8
  autoload :Config, 'depo/config'
9
9
  autoload :Build, 'depo/build'
10
10
  autoload :DijitConventions, 'depo/dijit_conventions'
@@ -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/app/pages/app.js",
33
+ :app_js => "/ria/src/medhub/pages/app.js",
33
34
  :djConfig => "parseOnLoad:true,isDebug:true",
34
- :css => "/ria/src/app/themes/tundra/app.css"
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,4 @@
1
+ <div class="${baseClass}">
2
+ <div class="${baseClass}Container" dojoAttachPoint='containerNode'>
3
+ </div>
4
+ </div>
@@ -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
+
@@ -0,0 +1,11 @@
1
+ dojo.require("doh.runner");
2
+ //dojo.require("dojo.robot");
3
+ dojo.require("app.my.Dijit");
4
+
5
+ dojo.addOnLoad(function () {
6
+ doh.register("app.my.Dijit", [
7
+ function test(t) {
8
+ t.t(false,"not implemented");
9
+ }]);
10
+ doh.run();
11
+ });
@@ -0,0 +1,4 @@
1
+ .AppMyDijit {
2
+ }
3
+ .AppMyDijitContainer {
4
+ }
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: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
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-05-27 00:00:00 +04:00
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
- - uninstall.rb
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/dpage.js
90
- - generators/dpage/templates/app/models.js
91
- - generators/dpage/templates/app/views.js
92
- - generators/dpage/templates/app/controllers.js
93
- - lib/depo/dijit_conventions.rb
94
- - lib/depo/build.rb
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: []