larikov-onerby_generators 0.0.0 → 1.0.2

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/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.2
@@ -0,0 +1,22 @@
1
+ class RestControllerGenerator < Rails::Generator::NamedBase
2
+ attr_reader :controller_file_path, :controller_class_name
3
+
4
+ def initialize(runtime_args, runtime_options = {})
5
+ super
6
+ @controller_file_path = file_path
7
+ @controller_class_name = class_name
8
+ end
9
+
10
+ def manifest
11
+ record do |m|
12
+ m.template('controller.rb', "app/controllers/#{@controller_file_path}.rb")
13
+ m.template('helper.rb', "app/helpers/#{@controller_file_path}_helper.rb")
14
+
15
+ m.directory("app/views/#{@controller_file_path}")
16
+
17
+ %w(index show new create update edit destroy).each do |action|
18
+ m.template('view.rb', "app/views/#{@controller_file_path}/#{action}.html.haml", :assigns => { :action => action })
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,30 @@
1
+ class <%= controller_class_name %>Controller < ApplicationController
2
+
3
+ def index
4
+
5
+ end
6
+
7
+ def show
8
+
9
+ end
10
+
11
+ def new
12
+
13
+ end
14
+
15
+ def create
16
+
17
+ end
18
+
19
+ def update
20
+
21
+ end
22
+
23
+ def edit
24
+
25
+ end
26
+
27
+ def destroy
28
+
29
+ end
30
+ end
@@ -0,0 +1,2 @@
1
+ module <%= controller_class_name %>Helper
2
+ end
@@ -0,0 +1,4 @@
1
+ %h1
2
+ <%= controller_class_name %>#<%= action %>
3
+ %p
4
+ Find me in app/views/<%= controller_file_path %>/<%= action %>.html.haml
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ # Include hook code here
data/install.rb ADDED
@@ -0,0 +1 @@
1
+ # Install hook code here
@@ -0,0 +1 @@
1
+ # OnerbyGenerator
@@ -0,0 +1,62 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{onerby_generators}
8
+ s.version = "1.0.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["\320\220\320\273\320\265\320\272\321\201\320\260\320\275\320\264\321\200"]
12
+ s.date = %q{2009-09-01}
13
+ s.description = %q{TODO: longer description of your gem}
14
+ s.email = %q{i@larikov.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "generators/rest_controller/rest_controller_generator.rb",
27
+ "generators/rest_controller/templates/controller.rb",
28
+ "generators/rest_controller/templates/helper.rb",
29
+ "generators/rest_controller/templates/view.rb",
30
+ "init.rb",
31
+ "install.rb",
32
+ "lib/onerby_generator.rb",
33
+ "onerby_generators.gemspec",
34
+ "tasks/onerby_generator_tasks.rake",
35
+ "test/onerby_generator_test.rb",
36
+ "test/test_helper.rb",
37
+ "uninstall.rb"
38
+ ]
39
+ s.has_rdoc = true
40
+ s.homepage = %q{http://github.com/larikov/onerby_generators}
41
+ s.rdoc_options = ["--charset=UTF-8"]
42
+ s.require_paths = ["lib"]
43
+ s.rubygems_version = %q{1.3.1}
44
+ s.summary = %q{TODO: one-line summary of your gem}
45
+ s.test_files = [
46
+ "test/onerby_generator_test.rb",
47
+ "test/test_helper.rb"
48
+ ]
49
+
50
+ if s.respond_to? :specification_version then
51
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
52
+ s.specification_version = 2
53
+
54
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
55
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
56
+ else
57
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
58
+ end
59
+ else
60
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
61
+ end
62
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :onerby_generator do
3
+ # # Task goes here
4
+ # end
data/uninstall.rb ADDED
@@ -0,0 +1 @@
1
+ # Uninstall hook code here
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: larikov-onerby_generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - !binary |
@@ -39,7 +39,19 @@ files:
39
39
  - LICENSE
40
40
  - README.rdoc
41
41
  - Rakefile
42
+ - VERSION
43
+ - generators/rest_controller/rest_controller_generator.rb
44
+ - generators/rest_controller/templates/controller.rb
45
+ - generators/rest_controller/templates/helper.rb
46
+ - generators/rest_controller/templates/view.rb
47
+ - init.rb
48
+ - install.rb
49
+ - lib/onerby_generator.rb
50
+ - onerby_generators.gemspec
51
+ - tasks/onerby_generator_tasks.rake
52
+ - test/onerby_generator_test.rb
42
53
  - test/test_helper.rb
54
+ - uninstall.rb
43
55
  has_rdoc: true
44
56
  homepage: http://github.com/larikov/onerby_generators
45
57
  post_install_message: