acts_as_multipart_form 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,6 +1,12 @@
1
+ == 0.0.4
2
+
3
+ * Added controller and views generators
4
+
1
5
  == 0.0.3
2
6
 
3
7
  * Moved capybara and sqlite to development gems
8
+ * Added an all_errors partial
9
+ * Updated the commenting
4
10
 
5
11
  == 0.0.2
6
12
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{acts_as_multipart_form}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Jeremiah Hemphill}, %q{Ethan Pemble}]
12
- s.date = %q{2011-08-01}
12
+ s.date = %q{2012-01-19}
13
13
  s.description = %q{Multipart forms using custom routes}
14
14
  s.email = %q{jeremiah@cloudspace.com}
15
15
  s.extra_rdoc_files = [
@@ -39,9 +39,11 @@ Gem::Specification.new do |s|
39
39
  "lib/acts_as_multipart_form/multipart_form_in_controller.rb",
40
40
  "lib/acts_as_multipart_form/multipart_form_in_model.rb",
41
41
  "lib/acts_as_multipart_form/railtie.rb",
42
+ "lib/generators/acts_as_multipart_form/controllers_generator.rb",
42
43
  "lib/generators/acts_as_multipart_form/install_generator.rb",
43
44
  "lib/generators/acts_as_multipart_form/templates/config.rb",
44
45
  "lib/generators/acts_as_multipart_form/templates/migrations/install_migration.rb.erb",
46
+ "lib/generators/acts_as_multipart_form/views_generator.rb",
45
47
  "spec/acts_as_multipart_form_spec.rb",
46
48
  "spec/dummy/Rakefile",
47
49
  "spec/dummy/app/controllers/application_controller.rb",
@@ -0,0 +1,29 @@
1
+ require 'rails/generators'
2
+
3
+ module ActsAsMultipartForm
4
+ module Generators
5
+ # Generator for copying the views into the project
6
+ #
7
+ # @author Jeremiah Hemphill
8
+ class ControllersGenerator < Rails::Generators::Base
9
+
10
+ source_root File.expand_path('../../../../app/controllers/multipart_form/', __FILE__)
11
+
12
+ desc <<DESC
13
+ Description:
14
+ Copies over controller and views for the multipart form system.
15
+ DESC
16
+
17
+ desc''
18
+ def copy_or_fetch#:nodoc:
19
+ filename_pattern = File.join self.class.source_root, "*.rb"
20
+ Dir.glob(filename_pattern).map { |f| File.basename f}.each do |f|
21
+ copy_file f, "app/controllers/multipart_form/#{f}"
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+
28
+
29
+
@@ -0,0 +1,44 @@
1
+ require 'rails/generators'
2
+
3
+ module ActsAsMultipartForm
4
+ module Generators
5
+ # Generator for copying the views into the project
6
+ #
7
+ # @author Jeremiah Hemphill
8
+ class ViewsGenerator < Rails::Generators::Base
9
+
10
+ source_root File.expand_path('../../../../app/views/multipart_form/', __FILE__)
11
+
12
+ desc <<DESC
13
+ Description:
14
+ Copies over controller and views for the multipart form system.
15
+ DESC
16
+
17
+ desc''
18
+ def copy_or_fetch#:nodoc:
19
+ view_directory :in_progress_form
20
+
21
+ filename_pattern = File.join self.class.source_root, "*.erb"
22
+ Dir.glob(filename_pattern).map { |f| File.basename f}.each do |f|
23
+ copy_file f, "app/views/multipart_form/#{f}"
24
+ end
25
+ end
26
+
27
+ private
28
+
29
+ # copy an indivindual directory to the target project
30
+ # @param [Symbol] name Name of the directory
31
+ # @param [String] _target_path Location of the directory
32
+ def view_directory(name, _target_path = nil)
33
+ directory name.to_s, _target_path || "#{target_path}/#{name}"
34
+ end
35
+
36
+ # base path to put the copied views into
37
+ def target_path
38
+ "app/views/multipart_form"
39
+ end
40
+ end
41
+ end
42
+ end
43
+
44
+
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: acts_as_multipart_form
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jeremiah Hemphill
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-08-01 00:00:00 Z
14
+ date: 2012-01-19 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -199,9 +199,11 @@ files:
199
199
  - lib/acts_as_multipart_form/multipart_form_in_controller.rb
200
200
  - lib/acts_as_multipart_form/multipart_form_in_model.rb
201
201
  - lib/acts_as_multipart_form/railtie.rb
202
+ - lib/generators/acts_as_multipart_form/controllers_generator.rb
202
203
  - lib/generators/acts_as_multipart_form/install_generator.rb
203
204
  - lib/generators/acts_as_multipart_form/templates/config.rb
204
205
  - lib/generators/acts_as_multipart_form/templates/migrations/install_migration.rb.erb
206
+ - lib/generators/acts_as_multipart_form/views_generator.rb
205
207
  - spec/acts_as_multipart_form_spec.rb
206
208
  - spec/dummy/Rakefile
207
209
  - spec/dummy/app/controllers/application_controller.rb
@@ -277,7 +279,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
277
279
  requirements:
278
280
  - - ">="
279
281
  - !ruby/object:Gem::Version
280
- hash: -3656101662010391779
282
+ hash: -1732177548644926524
281
283
  segments:
282
284
  - 0
283
285
  version: "0"