grimen-dry_scaffold 0.2.2 → 0.2.3

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/CHANGELOG.textile ADDED
@@ -0,0 +1,20 @@
1
+ h1. 0.2.2 (2009-05-06)
2
+
3
+ * Feature: Specifying actions new+ instead of new, then actions new/create. Same applies to edit+, i.e. edit/update.
4
+ * Feature: For respond_to-formats ATOM/RSS; builders will be generated unless --skip-builders flag is specified
5
+ * Feature: If route is already declared in 'config/routes.rb', then don't generate the route again.
6
+ * Refactor: New template directory structure and naming conventions - more generic. Preparing for optional test frameworks.
7
+ * Refactor: Cleaned up views with generator helpers.
8
+ * Fixed bug: Options for factory_girl vs. machinist got in-versed, i.e. typo.
9
+ * Fixed bug: Options got ignored because of a typo. Grrr....
10
+
11
+ h1. 0.2.1 (2009-05-03)
12
+
13
+ * New feature: Possible to set generator default args in a config file (config/scaffold.yml), or rely on defaults.
14
+ * Fixed issue: Rails default_options don't seem to work at all; replacing it with own solution.
15
+ * Fixed bug: Typo in formats arg parser.
16
+ * Refactor: Gem requires less hardcoded.
17
+
18
+ h1. 0.2.0 (2009-05-01)
19
+
20
+ * New dry model generator: Extends Rails default model generator with features such as generation of factory_girl/machinis/object_daddy-factories if available and requested (or fixtures), and specifying database column indexes upon generation in a very convenient way.
data/README.textile CHANGED
@@ -4,7 +4,7 @@ A Rails scaffold generator that generates DRYer, cleaner, and more useful code.
4
4
 
5
5
  h2. Description
6
6
 
7
- DryScaffold is a replacement for the Rails scaffold generator that generates code that most people end up deleting or rewriting anyway because of the unusable code. The scaffold concept is powerful, but it has more potential than generating messy and almost useless code. The goal with DryScaffold is to generate DRY, beautiful, and standards compliant code based on common patterns without adding a lot of magic.
7
+ DryScaffold is a replacement for the Rails scaffold generator that generates code that most people end up deleting or rewriting anyway because of the unusable code. The scaffold concept is powerful, but it has more potential than generating messy and almost useless code - something that might change with Rails 3 though. The goal with DryScaffold is to generate DRY, beautiful, and standards compliant code based on common patterns without adding a lot of assumptions.
8
8
 
9
9
  h3. Key Concepts:
10
10
 
@@ -159,9 +159,8 @@ h3. More To Come... (TODO)
159
159
 
160
160
  These are things I have in mind:
161
161
 
162
- * Generation of Rails builder stubs automatically for formats atom/rss.
163
- * Make routing smarter; if route is already declared in _config/routes.rb_, then don't generate it (no duplication).
164
- * Break up into multiple generators as dependencies (like Rails generators): dry_controller, dry_views, dry_scaffold, ...
162
+ * Handle belongs_to, i.e. specify MODEL --belongs-to PARENT_MODEL, which generates proper routes, proper before-filters if inherited_resources-controller, adding belongs_to-association in model, and correct form_for arguments.
163
+ * Choose test suits: testunit/shoulda/rspec
165
164
 
166
165
  h2. Setup
167
166
 
@@ -252,8 +251,6 @@ Example:
252
251
 
253
252
  You can override what actions that should be generated directly - including custom actions.
254
253
 
255
- NOTE: Sorry for the a bit ugly prefix (_), but I had to trick the Rails generator a bit to get this working for now. This is definitely something I want to fix sooner or later, but I skipped that for now with this small hack.
256
-
257
254
  h4. Default Actions (REST)
258
255
 
259
256
  If no actions are specified, the following REST-actions will be generated by default:
@@ -287,8 +284,6 @@ Example:
287
284
 
288
285
  You can override what respond_to-formats that should be generated directly - only for REST-actions right now because I tried to avoid bad assumptions.
289
286
 
290
- NOTE: Sorry for the a bit ugly prefix (_), but I had to trick the Rails generator a bit to get this working for now. This is definitely something I want to fix sooner or later, but I skipped that for now with this small hack.
291
-
292
287
  h4. Default Formats
293
288
 
294
289
  If no formats are specified, the following formats will be generated by default:
@@ -418,4 +413,4 @@ If you experience any issues/bugs or have feature requests, just file a GitHub-i
418
413
  If you think parts of my implementation could be implemented nicer somehow, please let me know...or just fork it and fix it yourself! =)
419
414
  At last, positive feedback is always appreciated!
420
415
 
421
- Copyright (c) 2009 Jonas Grimfelt
416
+ Copyright (c) 2009 Jonas Grimfelt, released under MIT-license
data/Rakefile CHANGED
@@ -7,6 +7,7 @@ SUMMARY = %Q{A DRYer scaffold generator for Rails. Generates dry semantic and st
7
7
  HOMEPAGE = "http://github.com/grimen/#{NAME}/tree/master"
8
8
  AUTHOR = "Jonas Grimfelt"
9
9
  EMAIL = "grimen@gmail.com"
10
+ SUPPORT_FILES = %w(README.textile TODO.textile CHANGELOG.textile)
10
11
 
11
12
  begin
12
13
  require 'jeweler'
@@ -19,9 +20,9 @@ begin
19
20
  gem.email = EMAIL
20
21
 
21
22
  gem.require_paths = %w{lib}
22
- gem.files = %w(MIT-LICENSE README.textile TODO.textile Rakefile) + Dir.glob(File.join('{generators,rails,tasks}', '**', '*'))
23
- gem.executables = %w()
24
- gem.extra_rdoc_files = %w{README.textile}
23
+ gem.files = %w(MIT-LICENSE Rakefile) + SUPPORT_FILES + Dir.glob(File.join('{bin,generators,rails,tasks}', '**', '*'))
24
+ gem.executables = %w(dscaffold dry_scaffold dmodel dry_model)
25
+ gem.extra_rdoc_files = SUPPORT_FILES
25
26
  end
26
27
  rescue LoadError
27
28
  puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
@@ -42,6 +43,6 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
42
43
  rdoc.rdoc_dir = 'rdoc'
43
44
  rdoc.title = NAME
44
45
  rdoc.options << '--line-numbers' << '--inline-source' << '--charset=UTF-8'
45
- rdoc.rdoc_files.include('README.textile')
46
+ rdoc.rdoc_files.include(SUPPORT_FILES)
46
47
  rdoc.rdoc_files.include(File.join('lib', '**', '*.rb'))
47
48
  end
data/bin/dmodel ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ `ruby script/generate dmodel #{ARGV.join(' ')}`
data/bin/dry_model ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ `ruby script/generate dry_model #{ARGV.join(' ')}`
data/bin/dry_scaffold ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ `ruby script/generate dry_scaffold #{ARGV.join(' ')}`
data/bin/dscaffold ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ `ruby script/generate dscaffold #{ARGV.join(' ')}`
@@ -1,8 +1,12 @@
1
1
  NAME
2
- dry_model a.k.a. dmodel - A Rails scaffold generator that generates DRYer, cleaner, and more useful code - for models.
2
+ dry_model/dmodel - A Rails scaffold generator that generates DRYer, cleaner, and more useful code - for models.
3
3
 
4
4
  DESCRIPTION
5
5
  A replacement for the Rails model generator - a part of the dry_generator toolset.
6
6
 
7
7
  EXAMPLE
8
- ./script/generate dry_model ModelName [attribute:type attribute:type] [_index:name,owner_id+owner_type,active,...] [--fixtures] [--fgirl] [--machinist] [--odaddy] [--skip-timestamps] [--skip-migration] [--skip-tests]
8
+ ./script/generate dry_model ModelName [attribute:type attribute:type] [_index:name,owner_id+owner_type,active,...] [--fixtures] [--fgirl] [--machinist] [--odaddy] [--skip-timestamps] [--skip-migration] [--skip-tests]
9
+
10
+ ...or the shortcut version:
11
+
12
+ ./script/generate dmodel ...
@@ -1,12 +1,12 @@
1
1
  NAME
2
- dry_scaffold a.k.a. dscaffold - A Rails scaffold generator that generates DRYer, cleaner, and more useful code.
2
+ dry_scaffold/dscaffold - A Rails scaffold generator that generates DRYer, cleaner, and more useful code.
3
3
 
4
4
  DESCRIPTION
5
5
  A replacement for the Rails scaffold generator that generates code that most people end up deleting or rewriting anyway because of the unusable code. The scaffold concept is powerful, but it has more potential than generating messy and almost useless code. The goal with dry_scaffold is to generate DRY, beautiful, and standards compliant code based on common patterns without adding a lot of magic.
6
6
 
7
7
  EXAMPLE
8
- ./script/generate dry_scaffold ModelName [attribute:type attribute:type] [_actions:new,create,...] [_formats:html,json,...] [--skip-pagination] [--skip-resourceful] [--skip-formtastic] [--skip-views] [--skip-helpers] [--skip-tests] [--include-layout]
8
+ ./script/generate dry_scaffold ModelName [attribute:type attribute:type] [_actions:new,create,...] [_formats:html,json,...] [--skip-pagination] [--skip-resourceful] [--skip-formtastic] [--skip-views] [--skip-helpers] [--skip-tests] [--skip-builders] [--layout]
9
9
 
10
10
  ...or the shortcut version:
11
11
 
12
- ./script/generate dscaffold ModelName [attribute:type attribute:type] [_actions:new,create,...] [_formats:html,json,...] [--skip-pagination] [--skip-resourceful] [--skip-formtastic] [--skip-views] [--skip-helpers] [--skip-tests] [--layout]
12
+ ./script/generate dscaffold ...
@@ -170,7 +170,7 @@ class DryScaffoldGenerator < Rails::Generator::NamedBase
170
170
 
171
171
  # Controller Tests.
172
172
  unless options[:skip_tests]
173
- m.template File.join('controllers', 'tests',"#{test_framework}", 'functional_test.rb'),
173
+ m.template File.join('controllers', 'tests', "#{test_framework}", 'functional_test.rb'),
174
174
  File.join(FUNCTIONAL_TESTS_PATH, controller_class_path, "#{controller_file_name}_controller_test.rb")
175
175
  end
176
176
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grimen-dry_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Grimfelt
@@ -9,23 +9,33 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-07 00:00:00 -07:00
12
+ date: 2009-05-13 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
16
  description: A DRYer scaffold generator for Rails. Generates dry semantic and standards compliant views, and dry RESTful controllers.
17
17
  email: grimen@gmail.com
18
- executables: []
19
-
18
+ executables:
19
+ - dscaffold
20
+ - dry_scaffold
21
+ - dmodel
22
+ - dry_model
20
23
  extensions: []
21
24
 
22
25
  extra_rdoc_files:
26
+ - CHANGELOG.textile
23
27
  - README.textile
28
+ - TODO.textile
24
29
  files:
30
+ - CHANGELOG.textile
25
31
  - MIT-LICENSE
26
32
  - README.textile
27
33
  - Rakefile
28
34
  - TODO.textile
35
+ - bin/dmodel
36
+ - bin/dry_model
37
+ - bin/dry_scaffold
38
+ - bin/dscaffold
29
39
  - generators/dmodel/dmodel_generator.rb
30
40
  - generators/dry_model/USAGE
31
41
  - generators/dry_model/dry_model_generator.rb
@@ -74,7 +84,7 @@ files:
74
84
  - generators/dscaffold/dscaffold_generator.rb
75
85
  - rails/init.rb
76
86
  - tasks/dry_scaffold.rake
77
- has_rdoc: true
87
+ has_rdoc: false
78
88
  homepage: http://github.com/grimen/dry_scaffold/tree/master
79
89
  post_install_message:
80
90
  rdoc_options: