dummier 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,23 +1,27 @@
1
- Redistribution and use in source and binary forms, with or without modification,
1
+ Copyright (c) 2011 Spencer Steffen and Citrus Media Group.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
2
5
  are permitted provided that the following conditions are met:
3
6
 
4
- * Redistributions of source code must retain the above copyright notice,
7
+ * Redistributions of source code must retain the above copyright notice,
5
8
  this list of conditions and the following disclaimer.
6
- * Redistributions in binary form must reproduce the above copyright notice,
7
- this list of conditions and the following disclaimer in the documentation
9
+
10
+ * Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
8
12
  and/or other materials provided with the distribution.
9
- * Neither the name of the Rails Dog LLC nor the names of its
10
- contributors may be used to endorse or promote products derived from this
13
+
14
+ * Neither the name of Citrus Media Group nor the names of its
15
+ contributors may be used to endorse or promote products derived from this
11
16
  software without specific prior written permission.
12
17
 
13
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md CHANGED
@@ -9,7 +9,7 @@ The idea behind Dummier is that we don't check `test/dummy` into git, but rather
9
9
 
10
10
  Dummier is simple; just run the binary from your gem's root directory and it will generate a stripped-down & gem-dev-ready rails app in `test/dummy`. While it's doing it's thing, Dummer triggers a few hooks along the way for easy customization.
11
11
 
12
- To catch the hooks, just create appropriatly named files in `lib/dummy_hooks` inside your gem. See **Hooks** below for more info.
12
+ To catch the hooks, just create appropriatly named files in `test/dummy_hooks` inside your gem. See **Hooks** below for more info.
13
13
 
14
14
 
15
15
  Installation
@@ -52,7 +52,7 @@ Dummier calls the following hooks along the way:
52
52
  after_migrate
53
53
 
54
54
 
55
- Place appropriatly named files in `lib/dummy_hooks` and dummier will find and execute them automatically!
55
+ Place appropriatly named files in `test/dummy_hooks` and dummier will find and execute them automatically!
56
56
 
57
57
  You can use [Rails::Generators::Actions](http://api.rubyonrails.org/classes/Rails/Generators/Actions.html) as well as [Thor::Actions](http://textmate.rubyforge.org/thor/Thor/Actions.html) in your hooks. Also, since hooks are just `eval`'d into the [Dummer::AppGenerator](http://rubydoc.info/gems/dummier/0.1.0/Dummier/AppGenerator), you have access to all of [those methods](http://rubydoc.info/gems/dummier/0.1.0/Dummier/AppGenerator) as well.
58
58
 
@@ -61,7 +61,7 @@ You can use [Rails::Generators::Actions](http://api.rubyonrails.org/classes/Rail
61
61
 
62
62
  Here's a `before_migrate.rb` hook that will install [Spree Commerce](https://github.com/spree/spree) by running some rake commands before migrating the `test/dummy` database.
63
63
 
64
- # lib/dummy_hooks/before_migrate.rb
64
+ # test/dummy_hooks/before_migrate.rb
65
65
  say_status "installing", "spree_core, spree_auth and spree_sample"
66
66
  rake "spree_core:install spree_auth:install spree_sample:install"
67
67
 
@@ -70,7 +70,7 @@ Here's a `before_migrate.rb` hook that will install [Spree Commerce](https://git
70
70
 
71
71
  Here's an example taken from [has_magick_title](https://github.com/citrus/has_magick_title):
72
72
 
73
- # lib/dummy_hooks/after_app_generator.rb
73
+ # test/dummy_hooks/after_app_generator.rb
74
74
  run "rails g scaffold post title:string"
75
75
 
76
76
  gsub_file "app/models/post.rb", "end", %(
@@ -103,19 +103,28 @@ Enjoy!
103
103
  Change Log
104
104
  ----------
105
105
 
106
+
107
+ **0.2.0 - 2011/6/18**
108
+
109
+ * moved the dummy_hooks to your test folder rather than in lib. makes more sense that way.
110
+
111
+
106
112
  **0.1.1 - 2011/6/1**
107
113
 
108
- * added your gem's `lib/dummy_hooks/templates` folder into the generator's `source_paths`
114
+ * added your gem's `test/dummy_hooks/templates` folder into the generator's `source_paths`
115
+
109
116
 
110
117
  **0.1.0 - 2011/5/20**
111
118
 
112
119
  * removed spork and wrote a basic hook test
113
120
  * improved documentation
114
121
 
122
+
115
123
  **0.1.0.rc1 - 2011/5/11**
116
124
 
117
125
  * added spork and some tests
118
126
 
127
+
119
128
  **2011/5/10**
120
129
 
121
130
  * it exists!
@@ -20,7 +20,7 @@ module Dummier
20
20
  @root_path = File.expand_path(root)
21
21
  @destination_stack = []
22
22
  @options = defaults.merge(options)
23
- self.source_paths << File.join(root_path, "lib", "dummy_hooks", "templates")
23
+ self.source_paths << File.join(root_path, "test", "dummy_hooks", "templates")
24
24
  self.destination_root = File.join(test_path, name)
25
25
  raise "Invalid directory!" unless Dir.exists?(@root_path)
26
26
  end
@@ -74,7 +74,7 @@ module Dummier
74
74
  # store hooks in your_extension/lib/dummy_hooks
75
75
  def fire_hook(hook_name)
76
76
  begin
77
- file = File.join(root_path, "lib/dummy_hooks/#{hook_name}.rb")
77
+ file = File.join(root_path, "test/dummy_hooks/#{hook_name}.rb")
78
78
  say_status "hook", hook_name, File.exists?(file) ? :cyan : :red
79
79
  if File.exists?(file)
80
80
  rb = File.read(file)
@@ -1,3 +1,3 @@
1
1
  module Dummier
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -40,7 +40,7 @@ class DummierTest < Test::Unit::TestCase
40
40
  @generator = Dummier::AppGenerator.new(@root)
41
41
 
42
42
  # make sure our gem's dummy_hooks/templates folder is accessible
43
- assert @generator.source_paths.include?(File.join(@root, "lib/dummy_hooks/templates"))
43
+ assert @generator.source_paths.include?(File.join(@root, "test/dummy_hooks/templates"))
44
44
 
45
45
  # run the generator
46
46
  @generator.run!
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dummier
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Spencer Steffen
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-01 00:00:00 -07:00
13
+ date: 2011-06-18 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -71,11 +71,11 @@ files:
71
71
  - test/dummy_gem/Gemfile
72
72
  - test/dummy_gem/dummy_gem.gemspec
73
73
  - test/dummy_gem/lib/dummy_gem.rb
74
- - test/dummy_gem/lib/dummy_hooks/after_app_generator.rb
75
- - test/dummy_gem/lib/dummy_hooks/after_migrate.rb
76
- - test/dummy_gem/lib/dummy_hooks/before_app_generator.rb
77
- - test/dummy_gem/lib/dummy_hooks/before_delete.rb
78
- - test/dummy_gem/lib/dummy_hooks/before_migrate.rb
74
+ - test/dummy_gem/test/dummy_hooks/after_app_generator.rb
75
+ - test/dummy_gem/test/dummy_hooks/after_migrate.rb
76
+ - test/dummy_gem/test/dummy_hooks/before_app_generator.rb
77
+ - test/dummy_gem/test/dummy_hooks/before_delete.rb
78
+ - test/dummy_gem/test/dummy_hooks/before_migrate.rb
79
79
  - test/test_helper.rb
80
80
  - test/unit/dummier_test.rb
81
81
  has_rdoc: true
@@ -110,10 +110,10 @@ test_files:
110
110
  - test/dummy_gem/Gemfile
111
111
  - test/dummy_gem/dummy_gem.gemspec
112
112
  - test/dummy_gem/lib/dummy_gem.rb
113
- - test/dummy_gem/lib/dummy_hooks/after_app_generator.rb
114
- - test/dummy_gem/lib/dummy_hooks/after_migrate.rb
115
- - test/dummy_gem/lib/dummy_hooks/before_app_generator.rb
116
- - test/dummy_gem/lib/dummy_hooks/before_delete.rb
117
- - test/dummy_gem/lib/dummy_hooks/before_migrate.rb
113
+ - test/dummy_gem/test/dummy_hooks/after_app_generator.rb
114
+ - test/dummy_gem/test/dummy_hooks/after_migrate.rb
115
+ - test/dummy_gem/test/dummy_hooks/before_app_generator.rb
116
+ - test/dummy_gem/test/dummy_hooks/before_delete.rb
117
+ - test/dummy_gem/test/dummy_hooks/before_migrate.rb
118
118
  - test/test_helper.rb
119
119
  - test/unit/dummier_test.rb