vesper 0.9.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/bin/vesper CHANGED
@@ -8,18 +8,18 @@ def show_options
8
8
  puts 'Commands:'
9
9
  puts ''
10
10
  puts ' vesper create app'
11
- puts ' Summary: Create a new Vesper web app.'
11
+ puts ' Summary: Creates a new Vesper web app.'
12
12
  puts ' Alias for vesper create application.'
13
- puts ' Example: vesper create app MyApp'
13
+ puts ' Example: vesper create app HelloWorld'
14
14
  puts ''
15
15
  puts ' vesper install plugin'
16
- puts ' Summary: Install a plugin from a git repo.'
16
+ puts ' Summary: Installs a plugin from a git repo.'
17
17
  puts ' Should be run from inside an existing Vesper app.'
18
- puts ' Example: vesper install plugin git@github.com:vesper/mobile-request-router.git'
18
+ puts ' Example: vesper install plugin git@github.com:vesper/logger.git'
19
19
  puts ''
20
20
  puts ' vesper remove plugin'
21
21
  puts ' Summary: Removes an existing plugin from a Vesper app.'
22
- puts ' Example: vesper remove plugin mobile-request-router'
22
+ puts ' Example: vesper remove plugin logger'
23
23
  puts ''
24
24
  puts ' vesper create plugin'
25
25
  puts ' Summary: Creates an empty plugin for development.'
@@ -42,19 +42,24 @@ end
42
42
 
43
43
 
44
44
  def create_app app_name
45
- puts "Creating #{app_name}..."
46
- FileUtils.cp_r File.dirname(__FILE__) + '/../lib/vesper/framework', app_name unless Dir.exists? app_name
47
- puts 'Installing default plugins...'
48
- Dir["#{app_name}/tmp/plugins/**"].each {|plugin| FileUtils.cp_r plugin, "#{app_name}/plugins"}
49
- Dir["#{app_name}/plugins/**"].each {|plugin| Dir["#{plugin}/assets/**"].each {|asset| FileUtils.cp_r asset, "#{app_name}/"}}
50
- FileUtils.rm_rf "#{app_name}/tmp/plugins"
51
- puts "Bundling gems..."
52
- system "cd #{app_name} && bundle > /dev/null"
53
- puts ''
54
- puts "#{app_name} is ready. Next steps:"
55
- puts " cd #{app_name}"
56
- puts " rackup"
57
- puts ''
45
+ if Dir.exists? app_name
46
+ puts 'That name is already taken.'
47
+ else
48
+ puts "Creating #{app_name}..."
49
+ FileUtils.cp_r File.dirname(__FILE__) + '/../lib/vesper/framework', app_name
50
+ FileUtils.chmod_R 0777, app_name
51
+ puts 'Installing default plugins...'
52
+ Dir["#{app_name}/tmp/plugins/**"].each {|plugin| FileUtils.cp_r plugin, "#{app_name}/plugins"}
53
+ Dir["#{app_name}/plugins/**"].each {|plugin| Dir["#{plugin}/assets/**"].each {|asset| FileUtils.cp_r asset, "#{app_name}/"}}
54
+ FileUtils.rm_rf "#{app_name}/tmp/plugins"
55
+ puts "Bundling gems..."
56
+ system "cd #{app_name} && bundle > /dev/null"
57
+ puts ''
58
+ puts "#{app_name} is ready. Next steps:"
59
+ puts " cd #{app_name}"
60
+ puts " rackup"
61
+ puts ''
62
+ end
58
63
  end
59
64
 
60
65
 
@@ -2,7 +2,7 @@ source 'http://rubygems.org'
2
2
 
3
3
 
4
4
  gem 'sinatra', '~> 1.3.1'
5
- gem 'vesper', '~> 0.9', :require => false
5
+ gem 'vesper', '~> 1.0.0', :require => false
6
6
 
7
7
 
8
8
  Dir["./plugins/**/Gemfile"].each {|gemfile| self.send(:eval, File.open(gemfile, 'r').read)}
@@ -3,48 +3,142 @@
3
3
 
4
4
  <style type="text/css" media="screen">
5
5
  /* Import fonts from Google */
6
- @import url(http://fonts.googleapis.com/css?family=Vollkorn:700italic,400italic,400,700);
7
- @import url(http://fonts.googleapis.com/css?family=Cabin+Condensed:400,700);
6
+ @import url(http://fonts.googleapis.com/css?family=Cabin+Condensed:400);
7
+ @import url(http://fonts.googleapis.com/css?family=Lato:300,700);
8
8
  body {
9
- color: #333;
10
- font-family: 'Vollkorn', serif;
9
+ background-color: #ededed;
10
+ color: #121212;
11
+ font-family: "Lato", sans-serif;
11
12
  font-size: 16px;
12
13
  line-height: 1.5em;
13
- text-align: center;
14
14
  padding-bottom: 33px;
15
+ text-align: center;
16
+ }
17
+ a, a:visited {
18
+ color: rgb(39, 177, 245);
19
+ text-decoration: none;
20
+ }
21
+ a:hover {
22
+ text-decoration: underline;
23
+ text-shadow: 0 0 3px rgb(39, 177, 245);
15
24
  }
16
- fieldset {
25
+ div {
26
+ background-color: white;
17
27
  border: 1px solid silver;
18
28
  display: inline-block;
19
29
  margin: auto;
30
+ padding: 11px 33px 22px 33px;
31
+ text-align: left;
32
+ width: 550px;
20
33
  -webkit-border-radius: 7px;
34
+ -moz-border-radius: 7px;
35
+ border-radius: 7px;
21
36
  }
22
- legend { font-family: 'Cabin Condensed', sans-serif; }
23
- fieldset p {
24
- margin: 11px;
37
+ blockquote {
38
+ border-left: 3px solid #ededed;
39
+ color: #777;
40
+ font-size: 90%;
41
+ margin-left: 11px;
42
+ padding-left: 11px;
25
43
  }
26
- code {
27
- padding: 0 11px;
44
+ blockquote.output {
45
+ font-family: monospace;
28
46
  font-size: 11px;
29
- display: block;
30
- background-color: black;
47
+ }
48
+ code {
49
+ background-color: #121212;
31
50
  color: white;
32
- -webkit-border-radius: 2px;
51
+ display: block;
52
+ font-size: 11px;
53
+ line-height: 1.5em;
54
+ margin: 1em 0;
55
+ padding: 7px 11px;
56
+ -webkit-border-radius: 3px;
57
+ -moz-border-radius: 3px;
58
+ border-radius: 3px;
59
+ }
60
+ code span { color: #777; }
61
+ dl dt { font-weight: bold; }
62
+ dl dd {
63
+ color: #777;
64
+ font-size: 90%;
65
+ line-height: 1.3em;
66
+ margin: 3px 11px 11px 11px;
67
+ }
68
+ hr {
69
+ border: none;
70
+ border-top: 1px solid #ededed;
71
+ margin: 30px 0;
33
72
  }
34
73
  </style>
35
74
 
36
75
 
37
76
  <p><img src="/img/vesper.png" /></p>
38
77
 
39
- <fieldset>
40
- <legend>Getting Started</legend>
41
-
42
- <p>Install a plugin from a git repo:<code>vesper install plugin git@github.com:vesper/mobile-request-router.git</code></p>
43
- <p>Remove a plugin:<code>vesper remove plugin mobile-request-router</code></p>
44
- <p>Run your tests:<code>vesper run tests</code></p>
45
- <p>More commands:<code>vesper options</code></p>
46
-
47
- </fieldset>
78
+ <div>
79
+ <p>Vesper handles tieing all this together for you, but it's still important to know where everything is and what it does. Take a look at what's included in a new application.</p>
80
+
81
+ <dl>
82
+ <dt>.gitignore</dt>
83
+ <dd>Tell git which files to ignore. Learn more from <a href="http://book.git-scm.com/4_ignoring_files.html">The Git Community Book</a>.</dd>
84
+
85
+ <dt>application/</dt>
86
+ <dd>Here's where you'll write the Ruby code for your app, including classes, routes and helpers. You can structure it as MVC, a collection of libraries, a single file, or any other way you see fit. Support for subdirectories is included.</dd>
87
+
88
+ <dt>config/</dt>
89
+ <dd>Add any sitewide and/or environment settings here. Separate from plugins, which have their own configuration. Again, support for subdirectories is included.</dd>
90
+
91
+ <dt>config.ru</dt>
92
+ <dd>Required by Rack servers to get things started.</dd>
93
+
94
+ <dt>data/</dt>
95
+ <dd>Created by the DataMapper plugin, this is where your SQLite databases will be created, along with scripts for seeding and transmogrifying data.</dd>
96
+
97
+ <dt>Gemfile</dt>
98
+ <dd>Used by Bundler, here's where you can specify which gems your app should use. It also handles loading gems required by plugins.</dd>
99
+
100
+ <dt>Gemfile.lock</dt>
101
+ <dd>Created by Bundler from your Gemfile, this ensures exact versioning of the required gems. Be sure to check this into version control.</dd>
102
+
103
+ <dt>plugins/</dt>
104
+ <dd>Plugins are shared, reusable, configurable mini apps that can be installed and modified to help with the legwork in creating your app. They can include their own application code, configuration, assets, tasks, hooks, and gems.</dd>
105
+
106
+ <dt>public/</dt>
107
+ <dd>Stylesheets, images, JavaScripts, and error pages. This is the only directory accessible from a browser.</dd>
108
+
109
+ <dt>Rakefile</dt>
110
+ <dd>Loads your app and your rake tasks from tasks/ into the command line.</dd>
111
+
112
+ <dt>Readme.md</dt>
113
+ <dd>Use this to give other people instructions on how to run, modify or just read your code. It uses Markdown formatting by default to make sure it renders well on GitHub.</dd>
114
+
115
+ <dt>tasks/</dt>
116
+ <dd>
117
+ Drop your own Rake tasks in here and they'll be loaded, along with your app, from the command line.
118
+ <blockquote><strong>Example:</strong> Loads the HelloWorld app into an IRB session.</blockquote>
119
+ <code><span>~/HelloWorld:</span> rake irb</code>
120
+ </dd>
121
+
122
+ <dt>tests/</dt>
123
+ <dd>
124
+ Write your tests here and they'll be automatically loaded, along with your app, when you run Vesper's test commands. Set up by default to use MiniTest.
125
+ <code><span>~/HelloWorld:</span> vesper run tests</code>
126
+ </dd>
127
+
128
+ <dt>tmp/</dt>
129
+ <dd>
130
+ Temporary holding for uploaded files and downloaded plugins. Also includes restart.txt, which Rack can use to restart your app.
131
+ <code><span>~/HelloWorld:</span> touch tmp/restart.txt</code>
132
+ </dd>
133
+
134
+ <dt>views/</dt>
135
+ <dd>
136
+ All your views should be created here. Ruby is embedded into .html and .erb files, layout.html is the default template, and subdirectories are supported.
137
+ <blockquote><strong>Pro Tip:</strong> Check out the Mobile Request Router plugin for easy mobile designs.</blockquote>
138
+ </dd>
139
+ </dl>
140
+
141
+ </div>
48
142
 
49
143
  <p>Documentation can be found online at: <a href="http://vesperapps.com">http://vesperapps.com</a></p>
50
- <p>Questions, comments and bugs should be send to: <a href="mailto:jarrod@vesperapps.com">jarrod@vesperapps.com</a></p>
144
+ <p>Questions, comments and bugs should be send to: <a href="mailto:jarrod@vesperapps.com">jarrod@vesperapps.com</a></p>
@@ -1,3 +1,3 @@
1
1
  module Vesper
2
- VERSION = "0.9.1"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vesper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-01-04 00:00:00.000000000 Z
13
+ date: 2012-01-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: grit
17
- requirement: &70352596300800 !ruby/object:Gem::Requirement
17
+ requirement: &70204747674340 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 2.4.1
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70352596300800
25
+ version_requirements: *70204747674340
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: sinatra
28
- requirement: &70352596300120 !ruby/object:Gem::Requirement
28
+ requirement: &70204747673060 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: 1.3.1
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70352596300120
36
+ version_requirements: *70204747673060
37
37
  description:
38
38
  email: jarrod@vesperapps.com
39
39
  executables: