jumpstart 0.5.4 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,27 @@
1
1
  =JumpStart
2
2
 
3
- JumpStart is a gem for quickly creating projects.
4
- It does this by running options from a YAML file that you can create, or you can let the gem do it for you.
5
- It's dead easy to do.
3
+ ==Quick! No time! Dinner burning! Tell me everything in three sentences!
4
+ * JumpStart is a gem for quickly creating projects just the way you want them.
5
+ * It uses YAML and your custom template files to automate all of that new project creation and configuration hoo-ha.
6
+ * It's dead easy to do.
7
+
8
+ ==Spiel
9
+ Are you:
10
+ * Tired of customising newly created framework projects to get them just the way you want them?
11
+ * On a holy quest for the almighty power to create any kind of project with a single command?
12
+ * Dancing like MC Hammer in anticipation of a solution to starting framework-less projects with ease?
13
+ * Offering to sell your granny for the opportunity to store all of your project templates in one handy git-able directory structure?
14
+ * Frothing at the mouth for an easy command line way to create, copy, move or duplicate these templates?
15
+ * If so you are in luck my friend. Have some Jumpstart!
16
+
17
+ ==Why?
18
+ Despite the many cool generators for a typical framework based project, there are always things that I want to set up differently. I figure that generated code will constantly change. With that in mind, the best way to control the creation of genuinely unique project configurations is to manipulate the files that the generators create. This is what JumpStart does, as well as some other cool stuff to avoid doing the same tedious setup dance over and over again.
19
+ I also wanted one place to keep my setup templates for all kinds of different projects. I might want to create a Ruby Gem in a certain way, or a Sinatra app. I also like the idea of all of my templates residing in one source controlled space.
6
20
 
7
21
  ==Use Case
8
- Despite the many cool generators etc for a typical framework based project, there are always things that I wanted set up differently when starting a new Rails/Sinatra/(other cool framework) project. I figured that the way that these tools create code, and what that code is, will constantly change. With that in mind, the only way to be able to control the creation of genuinely unique project configurations would be to manipulate the files that these processes create. This is what JumpStart does. As well as some other cool stuff to avoid doing the same tedious setup dance over and over again.
22
+ My main use case is Rails. Application templates weren't adjustable or broad enough in scope for me. I wanted a way of automatically configuring my local Nginx setup to include the new project, make a collection of changes to the files generated by Rails (for example changing the path of the Production MySQL database) as well as running a bunch of other stuff that needs to happen at a projects inception (Like running Capistrano and creating a custom deploy.rb file or checking the project in to source control.)
9
23
 
10
- My main use case is Rails. Application templates weren't adjustable or broad enough in scope for me, and I wanted a way of automatically configuring my local Nginx setup to include the new project, make a collection of changes to the files generated by Rails (for example changing the path of the Production MySQL database) as well as running a bunch of other stuff that needs to happen at a projects inception (Like running Capistrano and creating a custom deploy.rb file or checking the project in to source control. Git in my case.) I also wanted one place to keep my setup templates for all kinds of different projects. I might want to create a Ruby Gem in a certain way, or a Sinatra app. So that's why I wrote this gem. That, and it being fun :-) Give it a try, I think you'll like it.
11
-
12
- Finally, if you think that anything isn't clear in this README or you have other ideas about improving JumpStart, give me a shout!
24
+ Ideas on improving JumpStart are welcome, give me a shout!
13
25
 
14
26
  ==Features
15
27
  With jumpstart you can:
@@ -43,7 +55,7 @@ You'll need the win32console gem to use JumpStart
43
55
  gem install win32console
44
56
  I can't figure a good way to get this dependancy to install automatically for Windows users without disturbing their Unix bashing friends. If anyone knows how I might achieve this (with Bundler or otherwise) just let me know and I'll implement it.
45
57
 
46
- ====NOTE! If you install jumpstart using sudo then you will probably need to run jumpstart with it as well to grant writes to the YAML files in the gem.
58
+ ====NOTE! If you install jumpstart using sudo then you will probably need to run jumpstart with sudo as well to grant writes to the YAML files in the gem.
47
59
 
48
60
  == Getting Started
49
61
  There are a few ways to use jumpstart.
@@ -63,7 +75,7 @@ JumpStart has a handy menu interface which will start up if you don't pass the j
63
75
  From the menu you can:
64
76
  * Create a new project from a list of existing templates
65
77
  * Create a new template from scratch (the config file and directory structure will be created for you.)
66
- * Create a new template by duplicating an existing one. (Everything the except the name.)
78
+ * Create a new template by duplicating an existing one. (Everything the same except the name.)
67
79
  * Set the default template. (The template that will be used if you invoke the jumpstart command with only a project name)
68
80
  * Set the directory that JumpStart looks in for templates. This means you can have your own folder anywhere on your dev machine for templates. By default templates get created inside the JumpStart gems directory structure.
69
81
  * Easily reset the default template directory back to the original default (All of the templates in your current default templates directory will be copied back inside the gem.)
@@ -139,7 +151,7 @@ Can be omitted or left blank.
139
151
  List files that you would like to perform string substitution on. This can be useful for populating files such as a capistrano deploy.rb file.
140
152
  Paths use the newly created project folder as root.
141
153
  Any key:value pair can be used for substitution, simply add the key name in CAPS to the template file then specify the symbol key and value as in the example.
142
- As of version 0.5 it is now possible to append _CLASS to the capitalized key name in your templates. This will capitalise the replacement value, which is very handy for files where you need a lowercase and capitalized version of the same string, like class or module definitions.
154
+ As of version 0.5 it is now possible to append _CLASS to the capitalised key name in your templates. This will capitalise the replacement value, which is very handy for files where you need a lowercase and capitalised version of the same string, like class or module definitions.
143
155
  Note! The value of :project_name is hard coded to be the same as the projects name, no matter the value entered in this config file. This helps with capistrano.
144
156
  e.g.
145
157
  :replace_strings:
@@ -208,8 +220,4 @@ Example 1: Sets up a new Rails project, creating MySQL Dbs and other options. Cr
208
220
  future version unintentionally.
209
221
  * Commit, do not mess with rakefile, version, or history.
210
222
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
211
- * Send me a pull request. Bonus points for topic branches.
212
-
213
- Copyright
214
-
215
- Copyright (c) 2010 i0n. See LICENSE for details.
223
+ * Send me a pull request. Bonus points for topic branches.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :jumpstart_version_major: 0
3
- :jumpstart_version_minor: 5
4
- :jumpstart_version_patch: 4
3
+ :jumpstart_version_minor: 6
4
+ :jumpstart_version_patch: 0
@@ -63,6 +63,13 @@
63
63
  - :target_path:
64
64
  :symbols:
65
65
 
66
+ ## Can be omitted or left blank.
67
+ # Add extra commands that you want to run after templates have been parsed for string replacement.
68
+ # e.g.
69
+ # :run_after_string_replace:
70
+ # - rake db:create
71
+ :run_after_string_replace:
72
+
66
73
  ## Can be omitted or left blank.
67
74
  # If you would like jumpstart to configure your local nginx setup specify a path. Handy for rails.
68
75
  # e.g.
@@ -73,6 +73,7 @@ module JumpStart
73
73
  remove_unwanted_files
74
74
  run_scripts_from_yaml(:run_after_jumpstart)
75
75
  check_for_strings_to_replace
76
+ run_scripts_from_yaml(:run_after_string_replace)
76
77
  check_local_nginx_configuration
77
78
  exit_with_success
78
79
  end
@@ -560,7 +561,7 @@ module JumpStart
560
561
  end
561
562
  end
562
563
 
563
- # Runs additional scripts specified in YAML. Runs one set after the install command has executed, and another after the templates have been generated.
564
+ # Runs additional scripts specified in YAML. Runs one set after the install command has executed, another after the templates have been generated, and a final time after string replacement
564
565
  def run_scripts_from_yaml(script_name)
565
566
  unless @config_file[script_name].nil? || @config_file[script_name].empty?
566
567
  begin
@@ -197,6 +197,7 @@ class TestJumpstartBase < Test::Unit::TestCase
197
197
  @test_project.expects(:remove_unwanted_files).once
198
198
  @test_project.expects(:run_scripts_from_yaml).with(:run_after_jumpstart).once
199
199
  @test_project.expects(:check_for_strings_to_replace).once
200
+ @test_project.expects(:run_scripts_from_yaml).with(:run_after_string_replace).once
200
201
  @test_project.expects(:check_local_nginx_configuration).once
201
202
  @test_project.expects(:exit_with_success).once
202
203
  @test_project.start
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 5
8
- - 4
9
- version: 0.5.4
7
+ - 6
8
+ - 0
9
+ version: 0.6.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ian Alexander Wood (i0n)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-08 00:00:00 +01:00
17
+ date: 2010-08-13 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency