dojo_mobile_proto 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +23 -0
- data/Rakefile +1 -0
- data/bin/dojo_prototype +7 -0
- data/dojo_mobile_proto.gemspec +21 -0
- data/lib/dojo_mobile_proto.rb +36 -0
- data/lib/dojo_mobile_proto/version.rb +3 -0
- data/lib/templates/gemfile.tt +5 -0
- data/lib/templates/proto.tt +6 -0
- data/lib/templates/view.tt +39 -0
- metadata +75 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Allan Davis
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# DojoMobileProto
|
2
|
+
|
3
|
+
Project generator to kickstart a mobile prototype application with dojo
|
4
|
+
See: http://www.dojotoolkit.org for more information about dojo.
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Or install it yourself as:
|
8
|
+
|
9
|
+
$ gem install dojo_mobile_proto
|
10
|
+
|
11
|
+
## Usage
|
12
|
+
|
13
|
+
$ dojo_prototype NAME
|
14
|
+
|
15
|
+
Name should be the name of the prototype application you wish to create.
|
16
|
+
|
17
|
+
## Contributing
|
18
|
+
|
19
|
+
1. Fork it
|
20
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
21
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
22
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
23
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/dojo_prototype
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'dojo_mobile_proto/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "dojo_mobile_proto"
|
8
|
+
gem.version = DojoMobileProto::VERSION
|
9
|
+
gem.authors = ["Allan Davis"]
|
10
|
+
gem.email = ["cajun.code@gmail.com"]
|
11
|
+
gem.description = %q{Project generator to kickstart a mobile prototype application with dojo}
|
12
|
+
gem.summary = %q{Project generator to kickstart a mobile dojo prototype application. See: http://www.dojotoolkit.org for more information about dojo}
|
13
|
+
gem.homepage = "https://github.com/cajun-code/dojo_mobile_prototype"
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
19
|
+
gem.add_dependency "thor"
|
20
|
+
#gem.add_dependency 'sinatra'
|
21
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require "dojo_mobile_proto/version"
|
2
|
+
require "thor"
|
3
|
+
require "thor/group"
|
4
|
+
require "fileutils"
|
5
|
+
|
6
|
+
module DojoMobileProto
|
7
|
+
class Prototype < Thor::Group
|
8
|
+
include Thor::Actions
|
9
|
+
def self.source_root
|
10
|
+
File.dirname(__FILE__)
|
11
|
+
end
|
12
|
+
desc "Create Sinatra app for hosting dojo mobile prototype"
|
13
|
+
argument :name
|
14
|
+
|
15
|
+
def create_gemfile
|
16
|
+
template('templates/gemfile.tt', "#{name}/Gemfile")
|
17
|
+
end
|
18
|
+
|
19
|
+
def create_proto_ruby
|
20
|
+
template('templates/proto.tt', "#{name}/#{name}.rb")
|
21
|
+
FileUtils.chmod("+x","#{name}/#{name}.rb" )
|
22
|
+
end
|
23
|
+
|
24
|
+
def create_basic_view
|
25
|
+
template('templates/view.tt', "#{name}/views/index.erb")
|
26
|
+
end
|
27
|
+
|
28
|
+
def message
|
29
|
+
say "You are now ready to run the prototype."
|
30
|
+
say "\tChange into the directory 'cd #{name}'"
|
31
|
+
say "\tRun 'bundle install'"
|
32
|
+
say "\tRun '#{name}.rb'"
|
33
|
+
say "Now go and build you prototype in views/index.erb"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta name="viewport"
|
5
|
+
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
|
6
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
7
|
+
<title><%= name %></title>
|
8
|
+
|
9
|
+
<!-- stylesheet will go here -->
|
10
|
+
|
11
|
+
<!-- dojo/javascript will go here -->
|
12
|
+
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.0/dojo/dojo.js"
|
13
|
+
data-dojo-config="async:true"></script>
|
14
|
+
<script >
|
15
|
+
// Load the widget parser and mobile base
|
16
|
+
require(["dojox/mobile/parser",
|
17
|
+
"dojox/mobile/deviceTheme",
|
18
|
+
"dojox/mobile/compat",
|
19
|
+
"dojox/mobile/Button",
|
20
|
+
"dojox/mobile/TextBox",
|
21
|
+
"dojox/mobile"],
|
22
|
+
function(parser, deviceTheme) {
|
23
|
+
|
24
|
+
// Parse the page for widgets!
|
25
|
+
parser.parse();
|
26
|
+
|
27
|
+
}
|
28
|
+
);
|
29
|
+
</script>
|
30
|
+
</head>
|
31
|
+
<body>
|
32
|
+
|
33
|
+
<!-- application will go here -->
|
34
|
+
<!-- the view or "page"; select it as the "home" screen -->
|
35
|
+
<div id="home" data-dojo-type="dojox.mobile.View" data-dojo-props="selected: true">
|
36
|
+
|
37
|
+
<!-- a sample heading -->
|
38
|
+
<h1 data-dojo-type="dojox.mobile.Heading"><%= name %></h1>
|
39
|
+
</div>
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dojo_mobile_proto
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Allan Davis
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-10-30 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: thor
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: Project generator to kickstart a mobile prototype application with dojo
|
31
|
+
email:
|
32
|
+
- cajun.code@gmail.com
|
33
|
+
executables:
|
34
|
+
- dojo_prototype
|
35
|
+
extensions: []
|
36
|
+
extra_rdoc_files: []
|
37
|
+
files:
|
38
|
+
- .gitignore
|
39
|
+
- Gemfile
|
40
|
+
- LICENSE.txt
|
41
|
+
- README.md
|
42
|
+
- Rakefile
|
43
|
+
- bin/dojo_prototype
|
44
|
+
- dojo_mobile_proto.gemspec
|
45
|
+
- lib/dojo_mobile_proto.rb
|
46
|
+
- lib/dojo_mobile_proto/version.rb
|
47
|
+
- lib/templates/gemfile.tt
|
48
|
+
- lib/templates/proto.tt
|
49
|
+
- lib/templates/view.tt
|
50
|
+
homepage: https://github.com/cajun-code/dojo_mobile_prototype
|
51
|
+
licenses: []
|
52
|
+
post_install_message:
|
53
|
+
rdoc_options: []
|
54
|
+
require_paths:
|
55
|
+
- lib
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
requirements: []
|
69
|
+
rubyforge_project:
|
70
|
+
rubygems_version: 1.8.24
|
71
|
+
signing_key:
|
72
|
+
specification_version: 3
|
73
|
+
summary: ! 'Project generator to kickstart a mobile dojo prototype application. See:
|
74
|
+
http://www.dojotoolkit.org for more information about dojo'
|
75
|
+
test_files: []
|