xmvc 0.1.4 → 0.1.5

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/Rakefile CHANGED
@@ -12,13 +12,14 @@ begin
12
12
  gem.authors = ["Ed Spencer and Chris Scott"]
13
13
 
14
14
  gem.add_dependency "extlib", ">=0.9.14"
15
- gem.add_dependency "thor", ">=0.13.0"
15
+ gem.add_dependency "thor", ">=0.13.4"
16
16
  gem.add_dependency "jammit-core", ">=0.1.0"
17
17
  gem.add_dependency "whorm", ">=0.1.0"
18
18
  gem.add_dependency "hpricot", ">=0.8.2"
19
+ gem.add_dependency "sprockets"
19
20
 
20
21
  gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
21
- # gem.files = FileList["[A-Z]*", "{bin,generators,lib,test}/**/*", 'lib/jeweler/templates/.gitignore']
22
+ gem.files = FileList["[A-Z]*", "{bin,generators,lib,test}/**/*"]
22
23
 
23
24
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
24
25
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
data/lib/xmvc.rb CHANGED
@@ -1,10 +1,11 @@
1
+ #$LOAD_PATH.unshift(File.dirname(__FILE__))
2
+
1
3
  require 'fileutils'
2
4
  require 'pathname'
3
5
  require 'yaml'
4
6
  require 'json'
5
7
  require 'extlib'
6
8
  require 'whorm'
7
- #require 'thor-cheese/ui'
8
9
 
9
10
  require 'jammit-core'
10
11
  require 'jammit-core/cli'
@@ -27,7 +28,10 @@ module Xmvc
27
28
  # Do autoloads here
28
29
  #
29
30
  require 'xmvc/builder'
31
+ require 'xmvc/config'
32
+ #require 'xmvc/api' # <-- autoloadable ?? check with Sinatra handlers "sprockets"
30
33
 
34
+ autoload :API, 'xmvc/api'
31
35
  autoload :UI, 'xmvc/ui'
32
36
  autoload :Generator, 'xmvc/generator'
33
37
  autoload :Environment, 'xmvc/environment'
@@ -53,7 +57,8 @@ module Xmvc
53
57
  class BuilderError < Error; status_code(5) ; end
54
58
  class NoFramework < Error; status_code(6) ; end
55
59
  class HostError < Error; status_code(10) ; end
56
-
60
+ class VendorFileNotFound < Error; status_code(11) ; end
61
+
57
62
  ##
58
63
  # Add more error classes here
59
64
  #
@@ -68,6 +73,8 @@ module Xmvc
68
73
  # The Xmvc::Environemnt instance
69
74
  #
70
75
  attr_accessor :environment
76
+ alias :env :environment
77
+
71
78
  ##
72
79
  # An instance of supplied framework plugin, eg ExtJS::MVC::CLI
73
80
  #
@@ -79,16 +86,8 @@ module Xmvc
79
86
 
80
87
  attr_accessor :public_path
81
88
 
82
- def configure
83
- @configured ||= begin
84
- ##
85
- # perform some config here?
86
- #
87
- #configure_gem_home_and_path
88
- true
89
- end
90
- end
91
-
89
+ attr_writer :config
90
+
92
91
  ##
93
92
  # @param {Symbol} type :js, :css, :image
94
93
  # @param {String} name
data/lib/xmvc/api.rb ADDED
@@ -0,0 +1,56 @@
1
+ require 'thor'
2
+ require 'thor/group'
3
+
4
+ module Xmvc
5
+ class API < Thor
6
+ ARGV = ::ARGV.dup
7
+
8
+ class_option :environment, :default => :development
9
+
10
+ desc "build", "Build stuff"
11
+
12
+ desc "stats", "View code statistics"
13
+ def stats
14
+ Xmvc.ensure_in_app
15
+ Xmvc::Stats.dispatch
16
+ end
17
+
18
+ desc "config", "Return configuration"
19
+ def config
20
+ Xmvc::Config
21
+ end
22
+
23
+ desc "secretary", "Return Sprockets::Secretary for app javascripts"
24
+ def secretary
25
+ say_status "Xmvc::API", "secretary #{config[:root]}, #{FileUtils.pwd}"
26
+ Sprockets::Secretary.new({
27
+ :source_files => Xmvc::Config["javascripts"]
28
+ })
29
+ end
30
+
31
+ def initialize(args=ARGV, options={}, config={})
32
+
33
+ unless File.expand_path("../#{options[:root]}") == FileUtils.pwd
34
+ FileUtils.chdir(options[:root])
35
+ end
36
+
37
+ Xmvc::Config.setup(options)
38
+
39
+ #host = options.delete(:host)
40
+ #unless host
41
+ # raise Xmvc::NoFramework.new("Xmvc is meant to be supplied with a framework extension, eg extjs-mvc, via Xmvc::CLI.start(ARGV, {:framework => Your::Framework})")
42
+ #end
43
+
44
+ # Set the framework.
45
+ #Xmvc.host = host
46
+ #options.delete(:shell)
47
+
48
+ #Xmvc::Config.setup(options)
49
+
50
+ #Xmvc.environment = Xmvc::Config[:environment]
51
+
52
+ super
53
+ end
54
+
55
+ end
56
+ end
data/lib/xmvc/builder.rb CHANGED
@@ -10,9 +10,9 @@ module Xmvc
10
10
  def all(*params)
11
11
  Xmvc.ui.warn('build all assets with sprcokets')
12
12
  sec = Sprockets::Secretary.new({
13
- :source_files => Xmvc.environment.get("javascripts")
13
+ :source_files => Xmvc::Config["javascripts"]
14
14
  })
15
- create_file("public/javascripts/app/app-all-debug.js", sec.concatenation)
15
+ #create_file("public/javascripts/app/app-all-debug.js", sec.concatenation)
16
16
  end
17
17
 
18
18
  desc "setup", "Initialize config file"
@@ -21,9 +21,7 @@ module Xmvc
21
21
 
22
22
  Xmvc.secretary = Sprockets::Secretary.new({})
23
23
  Xmvc.public_path = File.expand_path("public")
24
- host = Vendor.new([], {
25
- :debug => true
26
- })
24
+ host = Vendor.new([], {})
27
25
  host.invoke("app", [Xmvc.environment])
28
26
  end
29
27
 
@@ -16,7 +16,7 @@ module Xmvc
16
16
  end
17
17
 
18
18
  Xmvc.secretary.reset!({
19
- :source_files => environment.get("javascripts")
19
+ :source_files => Xmvc::Config[:javascripts]
20
20
  })
21
21
 
22
22
  filename = Xmvc.public_build_path(:js, "app", nil, "debug")
data/lib/xmvc/cli.rb CHANGED
@@ -3,7 +3,6 @@ require 'thor/group'
3
3
 
4
4
  require 'jammit-core'
5
5
  require 'jammit-core/cli'
6
-
7
6
 
8
7
  module Xmvc
9
8
  class CLI < Thor
@@ -11,21 +10,12 @@ module Xmvc
11
10
 
12
11
  class_option :environment, :default => :development
13
12
 
14
- desc "install", "Install a framework"
15
- def install(path)
16
- Xmvc.ui.confirm('Xmvc install')
17
- end
18
-
19
13
  desc "generate", "Generate model, controller, view or app"
20
14
  def generate(*params)
21
-
22
15
  which = params.shift
23
16
  Xmvc.ensure_in_app unless which == 'app'
24
17
  Xmvc::Generator.dispatch(which, options, *params)
25
-
26
- puts "generate: #{options.to_yaml}"
27
- Xmvc.environment.render
28
-
18
+ Xmvc::Config.render
29
19
  end
30
20
 
31
21
  desc "build", "Build stuff"
@@ -59,15 +49,20 @@ module Xmvc
59
49
  # Boot UI
60
50
  Xmvc.ui = UI::Shell.new(shell)
61
51
 
62
- unless options[:host]
52
+ host = config.delete(:host) || options.delete(:host)
53
+ unless host
63
54
  raise Xmvc::NoFramework.new("Xmvc is meant to be supplied with a framework extension, eg extjs-mvc, via Xmvc::CLI.start(ARGV, {:framework => Your::Framework})")
64
55
  end
65
56
 
66
- # Boot environment
67
- Xmvc.environment = Xmvc::Environment.load(options[:environment])
68
-
69
57
  # Set the framework.
70
- Xmvc.host = options[:host]
58
+ Xmvc.host = host
59
+ options.delete(:shell)
60
+
61
+ Xmvc::Config.setup(options)
62
+
63
+ Xmvc.config = Xmvc::Config
64
+
65
+ Xmvc.environment = Xmvc::Config[:environment]
71
66
 
72
67
  super
73
68
  end
@@ -0,0 +1,192 @@
1
+ module Xmvc
2
+ class Config
3
+ class << self
4
+ def defaults
5
+ @defaults ||= {
6
+ "environment" => "development",
7
+ "javascript_loader" => true,
8
+ "name" => "xmvc",
9
+ "javascripts" => [],
10
+ "stylesheets" => []
11
+ }
12
+ end
13
+
14
+ def use
15
+ @configuration ||= {}
16
+ yield @configuration
17
+ nil
18
+ end
19
+
20
+ # Retrieve the value of a config entry.
21
+ #
22
+ # ==== Parameters
23
+ # key<Object>:: The key to retrieve the parameter for.
24
+ #
25
+ # ==== Returns
26
+ # Object:: The value of the configuration parameter.
27
+ #
28
+ # :api: public
29
+ def [](key)
30
+ (@configuration ||= setup)[key]
31
+ end
32
+
33
+ # Set the value of a config entry.
34
+ #
35
+ # ==== Parameters
36
+ # key<Object>:: The key to set the parameter for.
37
+ # val<Object>:: The value of the parameter.
38
+ #
39
+ # :api: public
40
+ def []=(key, val)
41
+ (@configuration ||= setup)[key] = val
42
+ end
43
+
44
+ # Sets up the configuration by storing the given settings.
45
+ #
46
+ # ==== Parameters
47
+ # settings<Hash>::
48
+ # Configuration settings to use. These are merged with the defaults.
49
+ #
50
+ # ==== Returns
51
+ # The configuration as a hash.
52
+ #
53
+ # :api: private
54
+ def setup(settings = {})
55
+
56
+ # Merge new settings with any existing configuration settings
57
+ settings = @configuration.merge(settings) unless @configuration.nil?
58
+
59
+ # Merge new settings with default settings
60
+ config = defaults.merge(settings)
61
+ config = config.merge(load(config[:environment]))
62
+
63
+ dev_mode = config[:environment] == "development"
64
+ @configuration = config.to_mash
65
+ end
66
+
67
+ def render
68
+ File.open("config/environment.json", "w") {|file|
69
+ file << @configuration.to_json
70
+ }
71
+ #File.open("#{@configuration[:environment]}.json", "w") {|file|
72
+ # file << @configuration.to_json
73
+ #}
74
+ end
75
+
76
+ ##
77
+ # write a newly generated controller, model or view to environment.json
78
+ # Unfortunately, we cannot JSON.parse the entire config/environment.json, since it contains comments
79
+ # and such. Have to RegExp, pick-out the requested key, and JSON.parse the returned chunk.
80
+ # Is this Regexp satisfactory?? Could probably be made better.
81
+ #
82
+ def add (key, item)
83
+ key = key.to_s
84
+ @configuration[key] = [] unless @configuration[key] && configuration[key].kind_of?(Array)
85
+
86
+ unless key == "views"
87
+ @configuration[key] << item
88
+ else
89
+ if controller = @configuration[key].find {|i| i[item[:package]]}
90
+ controller[item[:package]] << item[:filename]
91
+ else
92
+ @configuration[key] << {
93
+ item[:package] => [
94
+ item[:filename]
95
+ ]
96
+ }.to_hash
97
+ end
98
+ end
99
+ save
100
+ end
101
+
102
+ # :api: private
103
+ attr_accessor :configuration
104
+
105
+ # Set configuration parameters from a code block, where each method
106
+ # evaluates to a config parameter.
107
+ #
108
+ # ==== Parameters
109
+ # &block:: Configuration parameter block.
110
+ #
111
+ # ==== Examples
112
+ # # Set environment and log level.
113
+ # Xmvc::Config.configure do
114
+ # environment "development"
115
+ # end
116
+ #
117
+ # ==== Returns
118
+ # nil
119
+ #
120
+ # :api: public
121
+ def configure(&block)
122
+ ConfigBlock.new(self, &block) if block_given?
123
+ nil
124
+ end
125
+
126
+ def to_yaml
127
+ @configuration.to_yaml
128
+ end
129
+
130
+ private
131
+
132
+ ##
133
+ # TODO: load and merge! specific environemnt.
134
+ #
135
+ def load(environment)
136
+ # When generating a new app, there is no environment yet
137
+ #
138
+ #unless File.exists?("#{DEFAULT_ENVIRONMENT}.yml")
139
+ # raise FileNotFound.new("Failed to load environment #{DEFAULT_ENVIRONMENT}.yml")
140
+ #end
141
+ config = {}
142
+ if File.exists? "config/environment.yml"
143
+ config = YAML.load_file("config/environment.yml")
144
+ end
145
+ if File.exists? "config/environments/#{environment}.yml"
146
+ config.merge!(YAML.load_file("config/environments/#{environment}.yml"))
147
+ end
148
+ config
149
+
150
+ end
151
+
152
+ def save
153
+ File.open("config/environment.yml", "w") {|file|
154
+ file << @configuration.to_hash.to_yaml
155
+ }
156
+ render
157
+ #File.open("#{@configuration[:environment]}.json", "w") {|file|
158
+ # file << @configuration.to_json
159
+ #}
160
+ end
161
+
162
+
163
+ class ConfigBlock
164
+
165
+ # Evaluates the provided block, where any call to a method causes
166
+ # #[]= to be called on klass with the method name as the key and the arguments
167
+ # as the value.
168
+ #
169
+ # ==== Parameters
170
+ # klass<Object~[]=>:: The object on which to assign values.
171
+ # &block:: The block which specifies the config values to set.
172
+ #
173
+ # ==== Returns
174
+ # nil
175
+ #
176
+ # :api: private
177
+ def initialize(klass, &block)
178
+ @klass = klass
179
+ instance_eval(&block)
180
+ end
181
+
182
+ # Assign args as the value of the entry keyed by method.
183
+ #
184
+ # :api: private
185
+ def method_missing(method, *args)
186
+ @klass[method] = *args
187
+ end
188
+
189
+ end # class Configurator
190
+ end
191
+ end
192
+ end
@@ -24,8 +24,8 @@ module Xmvc
24
24
  options = options.dup
25
25
 
26
26
  App.start(params, options)
27
-
28
- Xmvc.public_path = File.expand_path("./public")
27
+ Xmvc::Config.setup
28
+ #FXmvc.public_path = File.expand_path("./public")
29
29
 
30
30
  builder = Xmvc::Builder.new([], {})
31
31
  packages = builder.invoke(:setup, [])
@@ -20,7 +20,7 @@ module Xmvc
20
20
  def create_app
21
21
  empty_directory("app")
22
22
  inside("app", {}) do
23
- copy_file("App.js", "#{destination_root}/App.js")
23
+ #copy_file("App.js", "#{destination_root}/App.js")
24
24
  directory("models", "models")
25
25
  directory("views", "views")
26
26
  directory("controllers", "controllers")
@@ -62,8 +62,10 @@ module Xmvc
62
62
  end
63
63
 
64
64
  def install_host
65
- inside("vendor", {}) do
66
- directory(Xmvc.host::VENDOR_PATH, Xmvc.host.config["name"])
65
+ inside("vendor", {}) do |dir|
66
+ host = Xmvc.host.new([], {})
67
+ host.invoke(:install, [dir])
68
+ #Xmvc.host.install(dir)
67
69
  end
68
70
  end
69
71
 
@@ -16,7 +16,7 @@ module Xmvc
16
16
  @filename = "app/controllers/#{@controller_name}_controller.js"
17
17
 
18
18
  unless File.exists? @filename
19
- Xmvc.environment.add(:controllers, @controller_name)
19
+ Xmvc::Config.add(:controllers, @controller_name)
20
20
  end
21
21
 
22
22
  template "Controller.js", @filename
@@ -22,11 +22,12 @@ module Xmvc
22
22
  spec_filename = "spec/models/#{filename}.spec.js"
23
23
 
24
24
  unless File.exists?(model_filename)
25
- Xmvc.environment.add(:models, filename)
25
+ Xmvc::Config.add(:models, filename)
26
26
  end
27
27
 
28
28
  template("Model.js", model_filename)
29
29
  template("ModelSpec.js", spec_filename)
30
+
30
31
  end
31
32
  end
32
33
  end
@@ -1 +1,66 @@
1
- ExtMVC.model.modelNamespace = MyApp.models;
1
+ ExtMVC.model.modelNamespace = MyApp.models;
2
+
3
+ /**
4
+ * @class MyApp.App
5
+ * @extends ExtMVC.App
6
+ * The MyApp application.
7
+ */
8
+
9
+ ExtMVC.App.define({
10
+ name : "MyApp",
11
+
12
+ /**
13
+ * Sets up the application's Viewport
14
+ */
15
+ launch: function() {
16
+
17
+ Ext.QuickTips.init();
18
+
19
+ this.menu = ExtMVC.buildView('layout', 'menu', {
20
+ region : 'west',
21
+ split: true,
22
+ width : 240,
23
+ listeners: {
24
+ scope: this,
25
+ click: function(node) {
26
+ var attrs = node.attributes;
27
+
28
+ if (attrs.controller != undefined) {
29
+ ExtMVC.dispatch({controller: attrs.controller, action: attrs.action});
30
+ }
31
+ }
32
+ }
33
+ });
34
+
35
+ /**
36
+ * @property main
37
+ * @type Ext.Panel
38
+ * A container into which views are rendered
39
+ */
40
+ this.main = new Ext.TabPanel({
41
+ region: 'center',
42
+ border: false,
43
+ cls : 'mainPanel',
44
+ activeTab: 0
45
+ });
46
+
47
+ this.viewport = new Ext.Viewport({
48
+ layout: 'border',
49
+ items: [{
50
+ xtype: 'box',
51
+ region: 'north',
52
+ height: 30
53
+ },this.menu, this.main
54
+ ]
55
+ });
56
+
57
+ this.fireEvent('launched');
58
+
59
+ ExtMVC.dispatch('home', 'index');
60
+
61
+ Ext.get('loading').remove();
62
+ Ext.get('loading-mask').fadeOut({remove:true});
63
+ }
64
+ });
65
+
66
+
@@ -4,11 +4,11 @@ namespace: MyApp
4
4
 
5
5
  ##
6
6
  # Directory paths
7
- pluginsDIr: ../vendor/plugins
8
- libsDir: ../lib
9
- configDir: ../config
10
- overridesDir: ../config/overrides
11
- appDir: ../app
7
+ pluginsDIr: /vendor/plugins
8
+ libsDir: /lib
9
+ configDir: /config
10
+ overridesDir: /config/overrides
11
+ appDir: /app
12
12
  vendor:
13
13
  - extjs-mvc
14
14
  mvcFilename: extjs-mvc-all-min
@@ -16,7 +16,6 @@ mvcFilename: extjs-mvc-all-min
16
16
  name: app
17
17
 
18
18
  javascripts:
19
- - app/App.js
20
19
  - config/application.js
21
20
  - config/routes.js
22
21
  - vendor/plugins/*/**.js
@@ -27,9 +26,8 @@ javascripts:
27
26
 
28
27
  # Use config/application for general framework configuration
29
28
  config:
30
- - app/App
31
- - config/application
32
- - config/routes
29
+ - application
30
+ - routes
33
31
 
34
32
  ##
35
33
  # All stylesheets to be loaded. These are all taken to be relative to the public/stylesheets directory,
@@ -14,7 +14,7 @@ module Xmvc
14
14
  @filename = "app/views/#{@namespace}/#{@name}.js"
15
15
 
16
16
  unless File.exists? @filename
17
- Xmvc.environment.add(:views, {
17
+ Xmvc::Config.add(:views, {
18
18
  :package => @package,
19
19
  :filename => @name
20
20
  })
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 4
9
- version: 0.1.4
8
+ - 5
9
+ version: 0.1.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ed Spencer and Chris Scott
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-13 00:00:00 -05:00
17
+ date: 2010-03-15 00:00:00 -04:00
18
18
  default_executable: xmvc
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -41,8 +41,8 @@ dependencies:
41
41
  segments:
42
42
  - 0
43
43
  - 13
44
- - 0
45
- version: 0.13.0
44
+ - 4
45
+ version: 0.13.4
46
46
  type: :runtime
47
47
  version_requirements: *id002
48
48
  - !ruby/object:Gem::Dependency
@@ -88,7 +88,7 @@ dependencies:
88
88
  type: :runtime
89
89
  version_requirements: *id005
90
90
  - !ruby/object:Gem::Dependency
91
- name: thoughtbot-shoulda
91
+ name: sprockets
92
92
  prerelease: false
93
93
  requirement: &id006 !ruby/object:Gem::Requirement
94
94
  requirements:
@@ -97,8 +97,20 @@ dependencies:
97
97
  segments:
98
98
  - 0
99
99
  version: "0"
100
- type: :development
100
+ type: :runtime
101
101
  version_requirements: *id006
102
+ - !ruby/object:Gem::Dependency
103
+ name: thoughtbot-shoulda
104
+ prerelease: false
105
+ requirement: &id007 !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ segments:
110
+ - 0
111
+ version: "0"
112
+ type: :development
113
+ version_requirements: *id007
102
114
  description: A full-stack, full-stack MVC framework generator geared towards generating towards the Ext JS framework. The actual javascript framework implementation is provided by the Gem extjs-mvc. This gem contains a series of builders and erb-templates for auto-generating javascript model, view and controller class-files.
103
115
  email: christocracy@gmail.com
104
116
  executables:
@@ -109,8 +121,6 @@ extra_rdoc_files:
109
121
  - LICENSE
110
122
  - README.rdoc
111
123
  files:
112
- - .document
113
- - .gitignore
114
124
  - LICENSE
115
125
  - README.rdoc
116
126
  - Rakefile
@@ -118,6 +128,7 @@ files:
118
128
  - bin/xmvc
119
129
  - lib/xmvc.rb
120
130
  - lib/xmvc/README
131
+ - lib/xmvc/api.rb
121
132
  - lib/xmvc/builder.rb
122
133
  - lib/xmvc/builders/all_builder.rb
123
134
  - lib/xmvc/builders/app_builder.rb
@@ -128,6 +139,7 @@ files:
128
139
  - lib/xmvc/builders/plugin_builder.rb
129
140
  - lib/xmvc/builders/vendor.rb
130
141
  - lib/xmvc/cli.rb
142
+ - lib/xmvc/config.rb
131
143
  - lib/xmvc/environment.rb
132
144
  - lib/xmvc/generator.rb
133
145
  - lib/xmvc/generators/app.rb
@@ -141,7 +153,6 @@ files:
141
153
  - lib/xmvc/generators/templates/ModelSpec.js
142
154
  - lib/xmvc/generators/templates/View.js
143
155
  - lib/xmvc/generators/templates/_Action.js
144
- - lib/xmvc/generators/templates/app/public/app/App.js
145
156
  - lib/xmvc/generators/templates/app/public/app/controllers/application_controller.js
146
157
  - lib/xmvc/generators/templates/app/public/app/controllers/home_controller.js
147
158
  - lib/xmvc/generators/templates/app/public/app/views/home/index.js
@@ -188,7 +199,6 @@ files:
188
199
  - lib/xmvc/update.rb
189
200
  - test/helper.rb
190
201
  - test/test_extjs-core.rb
191
- - xmvc.gemspec
192
202
  has_rdoc: true
193
203
  homepage: http://github.com/christocracy/extjs-core
194
204
  licenses: []
data/.document DELETED
@@ -1,5 +0,0 @@
1
- README.rdoc
2
- #lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC
@@ -1,64 +0,0 @@
1
- /**
2
- * @class MyApp.App
3
- * @extends ExtMVC.App
4
- * The MyApp application.
5
- */
6
-
7
- ExtMVC.App.define({
8
- name : "MyApp",
9
-
10
- /**
11
- * Sets up the application's Viewport
12
- */
13
- launch: function() {
14
-
15
- Ext.QuickTips.init();
16
-
17
- this.menu = ExtMVC.buildView('layout', 'menu', {
18
- region : 'west',
19
- split: true,
20
- width : 240,
21
- listeners: {
22
- scope: this,
23
- click: function(node) {
24
- var attrs = node.attributes;
25
-
26
- if (attrs.controller != undefined) {
27
- ExtMVC.dispatch({controller: attrs.controller, action: attrs.action});
28
- }
29
- }
30
- }
31
- });
32
-
33
- /**
34
- * @property main
35
- * @type Ext.Panel
36
- * A container into which views are rendered
37
- */
38
- this.main = new Ext.TabPanel({
39
- region: 'center',
40
- border: false,
41
- cls : 'mainPanel',
42
- activeTab: 0
43
- });
44
-
45
- this.viewport = new Ext.Viewport({
46
- layout: 'border',
47
- items: [{
48
- xtype: 'box',
49
- region: 'north',
50
- height: 30
51
- },this.menu, this.main
52
- ]
53
- });
54
-
55
- this.fireEvent('launched');
56
-
57
- ExtMVC.dispatch('home', 'index');
58
-
59
- Ext.get('loading').remove();
60
- Ext.get('loading-mask').fadeOut({remove:true});
61
- }
62
- });
63
-
64
-
data/xmvc.gemspec DELETED
@@ -1,141 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{xmvc}
8
- s.version = "0.1.4"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Ed Spencer and Chris Scott"]
12
- s.date = %q{2010-03-13}
13
- s.default_executable = %q{xmvc}
14
- s.description = %q{A full-stack, full-stack MVC framework generator geared towards generating towards the Ext JS framework. The actual javascript framework implementation is provided by the Gem extjs-mvc. This gem contains a series of builders and erb-templates for auto-generating javascript model, view and controller class-files.}
15
- s.email = %q{christocracy@gmail.com}
16
- s.executables = ["xmvc"]
17
- s.extra_rdoc_files = [
18
- "LICENSE",
19
- "README.rdoc"
20
- ]
21
- s.files = [
22
- ".document",
23
- ".gitignore",
24
- "LICENSE",
25
- "README.rdoc",
26
- "Rakefile",
27
- "VERSION",
28
- "bin/xmvc",
29
- "lib/xmvc.rb",
30
- "lib/xmvc/README",
31
- "lib/xmvc/builder.rb",
32
- "lib/xmvc/builders/all_builder.rb",
33
- "lib/xmvc/builders/app_builder.rb",
34
- "lib/xmvc/builders/base.rb",
35
- "lib/xmvc/builders/css_builder.rb",
36
- "lib/xmvc/builders/docs_builder.rb",
37
- "lib/xmvc/builders/mvc_builder.rb",
38
- "lib/xmvc/builders/plugin_builder.rb",
39
- "lib/xmvc/builders/vendor.rb",
40
- "lib/xmvc/cli.rb",
41
- "lib/xmvc/environment.rb",
42
- "lib/xmvc/generator.rb",
43
- "lib/xmvc/generators/app.rb",
44
- "lib/xmvc/generators/boot.rb",
45
- "lib/xmvc/generators/controller.rb",
46
- "lib/xmvc/generators/layout.rb",
47
- "lib/xmvc/generators/model.rb",
48
- "lib/xmvc/generators/scaffold.rb",
49
- "lib/xmvc/generators/templates/Controller.js",
50
- "lib/xmvc/generators/templates/Model.js",
51
- "lib/xmvc/generators/templates/ModelSpec.js",
52
- "lib/xmvc/generators/templates/View.js",
53
- "lib/xmvc/generators/templates/_Action.js",
54
- "lib/xmvc/generators/templates/app/public/app/App.js",
55
- "lib/xmvc/generators/templates/app/public/app/controllers/application_controller.js",
56
- "lib/xmvc/generators/templates/app/public/app/controllers/home_controller.js",
57
- "lib/xmvc/generators/templates/app/public/app/views/home/index.js",
58
- "lib/xmvc/generators/templates/app/public/app/views/layout/menu.js",
59
- "lib/xmvc/generators/templates/app/public/config/application.js",
60
- "lib/xmvc/generators/templates/app/public/config/database.js",
61
- "lib/xmvc/generators/templates/app/public/config/environment.json",
62
- "lib/xmvc/generators/templates/app/public/config/environment.yml",
63
- "lib/xmvc/generators/templates/app/public/config/environments/development.json",
64
- "lib/xmvc/generators/templates/app/public/config/environments/production.json",
65
- "lib/xmvc/generators/templates/app/public/config/routes.js",
66
- "lib/xmvc/generators/templates/app/public/public/index.html",
67
- "lib/xmvc/generators/templates/app/public/public/stylesheets/extjs-mvc-all.css",
68
- "lib/xmvc/generators/templates/app/public/spec/SpecHelper.js",
69
- "lib/xmvc/generators/templates/app/public/spec/index.html",
70
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/EXAMPLE.html",
71
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/LICENSE",
72
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/README.markdown",
73
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/lib/jquery-1.2.3.js",
74
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/lib/jquery.fn.js",
75
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/lib/jquery.print.js",
76
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/lib/screw.assets.js",
77
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/lib/screw.behaviors.js",
78
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/lib/screw.builder.js",
79
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/lib/screw.css",
80
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/lib/screw.events.js",
81
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/lib/screw.matchers.js",
82
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/lib/screw.server.js",
83
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/spec/behaviors_spec.js",
84
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/spec/matchers_spec.js",
85
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/spec/print_spec.js",
86
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/spec/spec_helper.js",
87
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/spec/suite.html",
88
- "lib/xmvc/generators/templates/app/public/vendor/screw-unit/vendor.yml",
89
- "lib/xmvc/generators/templates/boot.js",
90
- "lib/xmvc/generators/templates/layout.html.erb",
91
- "lib/xmvc/generators/templates/scaffold/ScaffoldController.js",
92
- "lib/xmvc/generators/view.rb",
93
- "lib/xmvc/plugin.rb",
94
- "lib/xmvc/stats.rb",
95
- "lib/xmvc/test.rb",
96
- "lib/xmvc/testserver.ru",
97
- "lib/xmvc/ui.rb",
98
- "lib/xmvc/update.rb",
99
- "test/helper.rb",
100
- "test/test_extjs-core.rb",
101
- "xmvc.gemspec"
102
- ]
103
- s.homepage = %q{http://github.com/christocracy/extjs-core}
104
- s.rdoc_options = ["--charset=UTF-8"]
105
- s.require_paths = ["lib"]
106
- s.rubygems_version = %q{1.3.6}
107
- s.summary = %q{A Rails-like, full-stack MVC framework generator geared towards generating towards the Ext JS framework.}
108
- s.test_files = [
109
- "test/helper.rb",
110
- "test/test_extjs-core.rb"
111
- ]
112
-
113
- if s.respond_to? :specification_version then
114
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
115
- s.specification_version = 3
116
-
117
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
118
- s.add_runtime_dependency(%q<extlib>, [">= 0.9.14"])
119
- s.add_runtime_dependency(%q<thor>, [">= 0.13.0"])
120
- s.add_runtime_dependency(%q<jammit-core>, [">= 0.1.0"])
121
- s.add_runtime_dependency(%q<whorm>, [">= 0.1.0"])
122
- s.add_runtime_dependency(%q<hpricot>, [">= 0.8.2"])
123
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
124
- else
125
- s.add_dependency(%q<extlib>, [">= 0.9.14"])
126
- s.add_dependency(%q<thor>, [">= 0.13.0"])
127
- s.add_dependency(%q<jammit-core>, [">= 0.1.0"])
128
- s.add_dependency(%q<whorm>, [">= 0.1.0"])
129
- s.add_dependency(%q<hpricot>, [">= 0.8.2"])
130
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
131
- end
132
- else
133
- s.add_dependency(%q<extlib>, [">= 0.9.14"])
134
- s.add_dependency(%q<thor>, [">= 0.13.0"])
135
- s.add_dependency(%q<jammit-core>, [">= 0.1.0"])
136
- s.add_dependency(%q<whorm>, [">= 0.1.0"])
137
- s.add_dependency(%q<hpricot>, [">= 0.8.2"])
138
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
139
- end
140
- end
141
-