useful_functionality 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +22 -0
- data/README +15 -0
- data/Rakefile +22 -0
- data/init.rb +1 -0
- data/lib/extensions/generator_base.rb +11 -0
- data/lib/generators_helpers/insert_commands.rb +109 -0
- data/lib/useful_functionality.rb +10 -0
- data/rails_generators/article_like/article_like_generator.rb +72 -0
- data/rails_generators/article_like/templates/article.rb +2 -0
- data/rails_generators/article_like/templates/article_methods.rb +10 -0
- data/rails_generators/article_like/templates/articles_controller.rb +4 -0
- data/rails_generators/article_like/templates/migration.rb +14 -0
- data/rails_generators/article_like/templates/show.html.erb +9 -0
- data/rails_generators/news_like/news_like_generator.rb +60 -0
- data/rails_generators/news_like/templates/migration.rb +14 -0
- data/rails_generators/news_like/templates/news_post.rb +2 -0
- data/rails_generators/news_like/templates/news_posts_controller.rb +13 -0
- data/rails_generators/news_like/templates/news_posts_helper.rb +3 -0
- data/rails_generators/news_like/templates/views/index.html.erb +21 -0
- data/rails_generators/news_like/templates/views/new.html.erb +37 -0
- data/rails_generators/news_like/templates/views/show.html.erb +24 -0
- data/useful_functionality.gemspec +36 -0
- metadata +104 -0
data/Manifest
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
init.rb
|
2
|
+
lib/extensions/generator_base.rb
|
3
|
+
lib/generators_helpers/insert_commands.rb
|
4
|
+
lib/useful_functionality.rb
|
5
|
+
Manifest
|
6
|
+
rails_generators/article_like/article_like_generator.rb
|
7
|
+
rails_generators/article_like/templates/article.rb
|
8
|
+
rails_generators/article_like/templates/articles_controller.rb
|
9
|
+
rails_generators/article_like/templates/article_methods.rb
|
10
|
+
rails_generators/article_like/templates/migration.rb
|
11
|
+
rails_generators/article_like/templates/show.html.erb
|
12
|
+
rails_generators/news_like/news_like_generator.rb
|
13
|
+
rails_generators/news_like/templates/migration.rb
|
14
|
+
rails_generators/news_like/templates/news_post.rb
|
15
|
+
rails_generators/news_like/templates/news_posts_controller.rb
|
16
|
+
rails_generators/news_like/templates/news_posts_helper.rb
|
17
|
+
rails_generators/news_like/templates/views/index.html.erb
|
18
|
+
rails_generators/news_like/templates/views/new.html.erb
|
19
|
+
rails_generators/news_like/templates/views/show.html.erb
|
20
|
+
Rakefile
|
21
|
+
README
|
22
|
+
useful_functionality.gemspec
|
data/README
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
1)News like functionality generation.Example:
|
2
|
+
|
3
|
+
ruby script/generate news_like post
|
4
|
+
|
5
|
+
Generates 3 views,controller,helper,model,migration and add nessesary resource routes
|
6
|
+
|
7
|
+
2) Inplace Articles like fuctionality generation.
|
8
|
+
|
9
|
+
Example: ruby script/generate article_like clients
|
10
|
+
|
11
|
+
3) useful_generators depends on ryanb's nifty_generators gem. so you've got it's fuctions too.
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Rakefile
|
2
|
+
require 'rubygems'
|
3
|
+
require 'rake'
|
4
|
+
require 'echoe'
|
5
|
+
|
6
|
+
Echoe.new('useful_functionality', '0.1.0') do |p|
|
7
|
+
p.description = "useful_functionality "
|
8
|
+
p.url = "http://7studio.ru"
|
9
|
+
p.author = "Vesov Ilya"
|
10
|
+
p.email = "strikeroff@gmail.com"
|
11
|
+
p.ignore_pattern = ["tmp/*", "script/*",".svn",".git"]
|
12
|
+
p.runtime_dependencies = ['nifty-generators']
|
13
|
+
p.need_tar_gz = false
|
14
|
+
p.retain_gemspec = true
|
15
|
+
p.gemspec_name = 'useful_functionality.gemspec'
|
16
|
+
p.test_pattern = ["test/**/*_test.rb"]
|
17
|
+
p.rdoc_pattern = ["README", "CHANGELOG", "lib/**/*.rb"]
|
18
|
+
p.rdoc_options << "-c utf-8"
|
19
|
+
p.ignore_pattern = [".gitignore", "doc", ".idea", "*.bat","*.sh"]
|
20
|
+
end
|
21
|
+
|
22
|
+
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
|
data/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'lib/inplace.rb'
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Rails::Generator::Base.class_eval do
|
2
|
+
# Return true if file exists
|
3
|
+
def file_exist?(relative_destination)
|
4
|
+
File.exist?(destination_path(relative_destination))
|
5
|
+
end
|
6
|
+
|
7
|
+
# Return true if directory exists and exists relative_destination is a directory
|
8
|
+
def directory_exists?(relative_destination)
|
9
|
+
File.exist?(destination_path(relative_destination))&& File.directory?(destination_path(relative_destination))
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
Rails::Generator::Commands::Create.class_eval do
|
2
|
+
def route_resource(*resources)
|
3
|
+
resource_list = resources.map { |r| r.to_sym.inspect }.join(', ')
|
4
|
+
sentinel = 'ActionController::Routing::Routes.draw do |map|'
|
5
|
+
logger.route "map.resource #{resource_list}"
|
6
|
+
unless options[:pretend]
|
7
|
+
gsub_file 'config/routes.rb', /(#{Regexp.escape(sentinel)})/mi do |match|
|
8
|
+
"#{match}\n map.resource #{resource_list}\n"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def route_resource_with_options(name, options={})
|
14
|
+
sentinel = 'ActionController::Routing::Routes.draw do |map|'
|
15
|
+
|
16
|
+
logger.route "map.resource #{name}#{", "<<options.inspect unless options.blank?}"
|
17
|
+
unless options[:pretend]
|
18
|
+
gsub_file 'config/routes.rb', /(#{Regexp.escape(sentinel)})/mi do |match|
|
19
|
+
"#{match}\n map.resource #{","<<options.inspect unless options.blank?}\n"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def route_name(name, path, route_options = {})
|
25
|
+
sentinel = 'ActionController::Routing::Routes.draw do |map|'
|
26
|
+
|
27
|
+
variable = "map.#{name} '#{path}', :controller => '#{route_options[:controller]}', :action => '#{route_options[:action]}'"
|
28
|
+
|
29
|
+
variable << ", :requirements => #{route_options[:requirements].inspect}" unless route_options[:requirements].blank?
|
30
|
+
|
31
|
+
logger.route variable
|
32
|
+
unless options[:pretend]
|
33
|
+
gsub_file 'config/routes.rb', /(#{Regexp.escape(sentinel)})/mi do |match|
|
34
|
+
"#{match}\n #{variable}"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def insert_into(file, line)
|
40
|
+
logger.insert "#{line} into #{file}"
|
41
|
+
unless options[:pretend]
|
42
|
+
gsub_file file, /^(class|module) .+$/ do |match|
|
43
|
+
"#{match}\n #{line}"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
Rails::Generator::Commands::Destroy.class_eval do
|
50
|
+
def route_resource(*resources)
|
51
|
+
resource_list = resources.map { |r| r.to_sym.inspect }.join(', ')
|
52
|
+
look_for = "\n map.resource #{resource_list}\n"
|
53
|
+
logger.route "map.resource #{resource_list}"
|
54
|
+
unless options[:pretend]
|
55
|
+
gsub_file 'config/routes.rb', /(#{look_for})/mi, ''
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
def route_resource_with_options(name, options={})
|
61
|
+
sentinel = 'ActionController::Routing::Routes.draw do |map|'
|
62
|
+
look_for = "\n map.resource #{name}#{", "<<options.inspect unless options.blank?}\n"
|
63
|
+
logger.route look_for
|
64
|
+
unless options[:pretend]
|
65
|
+
gsub_file 'config/routes.rb', /(#{look_for})/mi, ''
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def route_name(name, path, route_options = {})
|
70
|
+
variable = "map.#{name} '#{path}', :controller => '#{route_options[:controller]}', :action => '#{route_options[:action]}'"
|
71
|
+
variable << ", :requirements => #{route_options[:requirements].inspect}" unless route_options[:requirements].blank?
|
72
|
+
|
73
|
+
look_for = "\n #{variable}"
|
74
|
+
logger.route variable
|
75
|
+
unless options[:pretend]
|
76
|
+
gsub_file 'config/routes.rb', /(#{look_for})/mi, ''
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def insert_into(file, line)
|
81
|
+
logger.remove "#{line} from #{file}"
|
82
|
+
unless options[:pretend]
|
83
|
+
gsub_file file, "\n #{line}", ''
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
Rails::Generator::Commands::List.class_eval do
|
89
|
+
def route_resource(*resources)
|
90
|
+
resource_list = resources.map { |r| r.to_sym.inspect }.join(', ')
|
91
|
+
logger.route "map.resource #{resource_list}"
|
92
|
+
end
|
93
|
+
|
94
|
+
def route_resource_with_options(name, options={})
|
95
|
+
sentinel = 'ActionController::Routing::Routes.draw do |map|'
|
96
|
+
look_for = "\n map.resource #{name}#{", "<<options.inspect unless options.blank?}\n"
|
97
|
+
logger.route look_for
|
98
|
+
end
|
99
|
+
|
100
|
+
def route_name(name, path, options = {})
|
101
|
+
variable = "map.#{name} '#{path}', :controller => '#{route_options[:controller]}', :action => '#{route_options[:action]}'"
|
102
|
+
variable << ", :requirements => #{route_options[:requirements].inspect}" unless route_options[:requirements].blank?
|
103
|
+
variable
|
104
|
+
end
|
105
|
+
|
106
|
+
def insert_into(file, line)
|
107
|
+
logger.insert "#{line} into #{file}"
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
require "generators_helpers/insert_commands.rb"
|
2
|
+
require "extensions/generator_base.rb"
|
3
|
+
|
4
|
+
class ArticleLikeGenerator < Rails::Generator::Base
|
5
|
+
|
6
|
+
attr_accessor :article_like
|
7
|
+
|
8
|
+
def initialize(runtime_args, runtime_options = {})
|
9
|
+
super
|
10
|
+
#usage if @args.empty?
|
11
|
+
@article_like = @args.first || "article"
|
12
|
+
end
|
13
|
+
|
14
|
+
def manifest
|
15
|
+
record do |m|
|
16
|
+
m.directory "app/models"
|
17
|
+
m.directory "app/controllers"
|
18
|
+
m.directory "app/views"
|
19
|
+
m.directory "lib"
|
20
|
+
|
21
|
+
|
22
|
+
unless file_exist?("lib/article_methods.rb")
|
23
|
+
m.template "article_methods.rb", "lib/article_methods.rb"
|
24
|
+
end
|
25
|
+
|
26
|
+
unless file_exist?("app/controllers/articles_controller.rb")
|
27
|
+
m.template "articles_controller.rb", "app/controllers/articles_controller.rb"
|
28
|
+
m.route_resources :articles
|
29
|
+
end
|
30
|
+
|
31
|
+
unless directory_exists?("app/views/articles")
|
32
|
+
m.directory "app/views/articles"
|
33
|
+
end
|
34
|
+
|
35
|
+
unless file_exist?("app/views/articles/show.html.erb")
|
36
|
+
m.template "show.html.erb", "app/views/articles/show.html.erb"
|
37
|
+
end
|
38
|
+
|
39
|
+
unless file_exist?("app/models/article.rb")
|
40
|
+
m.template "article.rb", "app/models/article.rb"
|
41
|
+
m.migration_template "migration.rb", "db/migrate", :migration_file_name => "create_articles"
|
42
|
+
end
|
43
|
+
|
44
|
+
unless article_like.blank?
|
45
|
+
|
46
|
+
m.template "show.html.erb", "app/views/articles/#{article_like}.html.erb"
|
47
|
+
|
48
|
+
m.route_name article_like, article_like, :controller => 'articles', :action => 'article_show',
|
49
|
+
:requirements=>{
|
50
|
+
:alias=>"#{article_like}"
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def singular_name
|
58
|
+
article_like.underscore.singularize
|
59
|
+
end
|
60
|
+
|
61
|
+
def plural_name
|
62
|
+
article_like.underscore.pluralize
|
63
|
+
end
|
64
|
+
|
65
|
+
def singular_class_name
|
66
|
+
singular_name.camelize
|
67
|
+
end
|
68
|
+
|
69
|
+
def plural_class_name
|
70
|
+
plural_name.camelize
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module ArticleMethods
|
2
|
+
def article_show
|
3
|
+
@article = Article.find_or_create_by_alias_and_locale params[:alias], I18n.locale.to_s
|
4
|
+
#@article ||= Article.create(:alias => params[:alias],
|
5
|
+
# :title=> I18n.t(params[:alias]),
|
6
|
+
# :locale => I18n.locale.to_s )
|
7
|
+
view = params[:default_view]? "show" : params[:alias]
|
8
|
+
render :template => "articles/#{view}"
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%%= inplace_textareafield("description", show_unblanked(@article.description, "Введите текст"),
|
2
|
+
attribute_article_url(:id=>@article.id,:attribute=>"description"),
|
3
|
+
:width => "700px",
|
4
|
+
:height => "450px",
|
5
|
+
:identifier => "description",
|
6
|
+
:value => @article.description,
|
7
|
+
:default_value => 'Добавить текст статьи',
|
8
|
+
:enable => admin?)
|
9
|
+
%>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require "generators_helpers/insert_commands.rb"
|
2
|
+
class NewsLikeGenerator < Rails::Generator::Base
|
3
|
+
|
4
|
+
attr_accessor :news_like,:generator_options
|
5
|
+
|
6
|
+
def initialize(runtime_args, runtime_options = {})
|
7
|
+
super
|
8
|
+
usage if @args.empty?
|
9
|
+
@news_like = @args.first
|
10
|
+
@generator_options = @args.second || {}
|
11
|
+
end
|
12
|
+
|
13
|
+
def manifest
|
14
|
+
record do |m|
|
15
|
+
m.directory "app/models"
|
16
|
+
m.directory "app/controllers"
|
17
|
+
m.directory "app/helpers"
|
18
|
+
m.directory "app/views"
|
19
|
+
m.directory "lib"
|
20
|
+
|
21
|
+
m.directory "app/views/#{plural_name}"
|
22
|
+
|
23
|
+
m.template "views/index.html.erb", "app/views/#{plural_name}/index.html.erb"
|
24
|
+
m.template "views/show.html.erb", "app/views/#{plural_name}/show.html.erb"
|
25
|
+
m.template "views/new.html.erb", "app/views/#{plural_name}/new.html.erb"
|
26
|
+
|
27
|
+
|
28
|
+
m.template "news_post.rb", "app/models/#{singular_name}.rb"
|
29
|
+
m.template "news_posts_controller.rb", "app/controllers/#{plural_name}_controller.rb"
|
30
|
+
m.template "news_posts_helper.rb", "app/helpers/#{plural_name}_helper.rb"
|
31
|
+
m.migration_template "migration.rb", "db/migrate", :migration_file_name => "create_#{plural_name}"
|
32
|
+
|
33
|
+
m.route_resources plural_name
|
34
|
+
|
35
|
+
#m.route_name article_like, article_like, :controller => 'articles', :action => 'articles_show',
|
36
|
+
# :requirements=>{
|
37
|
+
# :alias=>"#{article_like}"
|
38
|
+
# }
|
39
|
+
#
|
40
|
+
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def singular_name
|
46
|
+
news_like.underscore.singularize
|
47
|
+
end
|
48
|
+
|
49
|
+
def plural_name
|
50
|
+
news_like.underscore.pluralize
|
51
|
+
end
|
52
|
+
|
53
|
+
def singular_class_name
|
54
|
+
singular_name.camelize
|
55
|
+
end
|
56
|
+
|
57
|
+
def plural_class_name
|
58
|
+
plural_name.camelize
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class Create<%= plural_class_name %> < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :<%= plural_name %> do |t|
|
4
|
+
t.string :title
|
5
|
+
t.text :body
|
6
|
+
t.boolean :delta, :default => true, :null => false
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.down
|
12
|
+
drop_table :<%= plural_name %>
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class <%= plural_class_name %>Controller < ResourceController::Base
|
2
|
+
|
3
|
+
protect_from_forgery :except=>[:update_attributes]
|
4
|
+
|
5
|
+
create.wants.html do
|
6
|
+
redirect_to :action=>"show"
|
7
|
+
end
|
8
|
+
|
9
|
+
destroy.wants.html do
|
10
|
+
redirect_to :action => "index"
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<%% unless @<%= plural_name%>.blank? %>
|
2
|
+
<div class="news-post">
|
3
|
+
<%% @<%= plural_name%>.each do |post| %>
|
4
|
+
<div class="post-item">
|
5
|
+
<div class="news-date">
|
6
|
+
<%%= post.created_at.strftime("%d.%m.%Y") %>
|
7
|
+
</div>
|
8
|
+
<div class="list-posts">
|
9
|
+
|
10
|
+
<%%= title(post.title, :link => <%= singular_name%>_url(:id => post.id))%>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<%% end %>
|
15
|
+
</div>
|
16
|
+
<%% end %>
|
17
|
+
<%% if admin? %>
|
18
|
+
<div class="post-operations">
|
19
|
+
<%%= link_to I18n.t('<%= plural_name%>.add_post'), new_<%= singular_name%>_url %>
|
20
|
+
</div>
|
21
|
+
<%% end %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<%% form_id = "new_<%= singular_name%>_form" %>
|
2
|
+
<%% form_for :<%= singular_name%>, @object, :url =>{:action => "create"}, :html => { :id => form_id} do |form| %>
|
3
|
+
|
4
|
+
<%%= form.error_messages %>
|
5
|
+
|
6
|
+
<%%= inplace_textfield("title",
|
7
|
+
show_unblanked(@object.title, "Введите текст заголовка"),
|
8
|
+
"",
|
9
|
+
:width => "440px",
|
10
|
+
:height => "20px",
|
11
|
+
:identifier => "title",
|
12
|
+
:value => @object.title,
|
13
|
+
:default_value => 'Введите текст заголовка',
|
14
|
+
:adapter => true,
|
15
|
+
:form_id => form_id,
|
16
|
+
:form_name => "title",
|
17
|
+
:wrapperPattern => "<%= singular_name%>[*]",
|
18
|
+
:enable => admin?) %>
|
19
|
+
|
20
|
+
<%%= inplace_textareafield("body", show_unblanked(@object.body, "Добавить текст статьи"), "",
|
21
|
+
:width => "527px",
|
22
|
+
:height => "450px",
|
23
|
+
:identifier => "body",
|
24
|
+
:value => @object.body,
|
25
|
+
:default_value => 'Добавить текст статьи',
|
26
|
+
:adapter => true,
|
27
|
+
:form_id => form_id,
|
28
|
+
:form_name => "body",
|
29
|
+
:wrapperPattern => "<%= singular_name%>[*]",
|
30
|
+
:enable => admin?)
|
31
|
+
%>
|
32
|
+
|
33
|
+
|
34
|
+
<%%= submit_tag "Публикация", :class=>"publ" %>
|
35
|
+
|
36
|
+
|
37
|
+
<%% end %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<div class="post">
|
2
|
+
<div class="post-attribute post-title">
|
3
|
+
<%%= title @object.title,
|
4
|
+
:update_to => attribute_<%=singular_name%>_url(:id=>@object.id,:attribute=>"title"),
|
5
|
+
:enable => admin?, :mode=>:edit %>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
|
9
|
+
<div class="post-attribute">
|
10
|
+
|
11
|
+
<%%= textarea @object.body, :update_to => attribute_<%=singular_name%>_url(:id=>@object.id,:attribute=>"body"),
|
12
|
+
:width => "627px",
|
13
|
+
:height => "450px",
|
14
|
+
:editable => admin?%>
|
15
|
+
|
16
|
+
</div>
|
17
|
+
<div class="post-operations">
|
18
|
+
<%%= show_link_to_if I18n.t("<%=plural_name%>.delete_post"), <%=singular_name%>_url(@object), admin?,
|
19
|
+
:method=>:delete,
|
20
|
+
:confirm=>I18n.t("<%=plural_name%>.confirm_delete_post") %>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{useful_functionality}
|
5
|
+
s.version = "0.1.0"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Vesov Ilya"]
|
9
|
+
s.date = %q{2009-10-19}
|
10
|
+
s.description = %q{useful_functionality }
|
11
|
+
s.email = %q{strikeroff@gmail.com}
|
12
|
+
s.extra_rdoc_files = ["lib/extensions/generator_base.rb", "lib/generators_helpers/insert_commands.rb", "lib/useful_functionality.rb", "README"]
|
13
|
+
s.files = ["init.rb", "lib/extensions/generator_base.rb", "lib/generators_helpers/insert_commands.rb", "lib/useful_functionality.rb", "Manifest", "rails_generators/article_like/article_like_generator.rb", "rails_generators/article_like/templates/article.rb", "rails_generators/article_like/templates/articles_controller.rb", "rails_generators/article_like/templates/article_methods.rb", "rails_generators/article_like/templates/migration.rb", "rails_generators/article_like/templates/show.html.erb", "rails_generators/news_like/news_like_generator.rb", "rails_generators/news_like/templates/migration.rb", "rails_generators/news_like/templates/news_post.rb", "rails_generators/news_like/templates/news_posts_controller.rb", "rails_generators/news_like/templates/news_posts_helper.rb", "rails_generators/news_like/templates/views/index.html.erb", "rails_generators/news_like/templates/views/new.html.erb", "rails_generators/news_like/templates/views/show.html.erb", "Rakefile", "README", "useful_functionality.gemspec"]
|
14
|
+
s.homepage = %q{http://7studio.ru}
|
15
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Useful_functionality", "--main", "README", "-c utf-8"]
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
s.rubyforge_project = %q{useful_functionality}
|
18
|
+
s.rubygems_version = %q{1.3.5}
|
19
|
+
s.summary = %q{useful_functionality}
|
20
|
+
|
21
|
+
if s.respond_to? :specification_version then
|
22
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
23
|
+
s.specification_version = 3
|
24
|
+
|
25
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
26
|
+
s.add_runtime_dependency(%q<nifty-generators>, [">= 0"])
|
27
|
+
s.add_development_dependency(%q<echoe>, [">= 0"])
|
28
|
+
else
|
29
|
+
s.add_dependency(%q<nifty-generators>, [">= 0"])
|
30
|
+
s.add_dependency(%q<echoe>, [">= 0"])
|
31
|
+
end
|
32
|
+
else
|
33
|
+
s.add_dependency(%q<nifty-generators>, [">= 0"])
|
34
|
+
s.add_dependency(%q<echoe>, [">= 0"])
|
35
|
+
end
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: useful_functionality
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vesov Ilya
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-10-19 00:00:00 +05:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: nifty-generators
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: echoe
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0"
|
34
|
+
version:
|
35
|
+
description: "useful_functionality "
|
36
|
+
email: strikeroff@gmail.com
|
37
|
+
executables: []
|
38
|
+
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files:
|
42
|
+
- lib/extensions/generator_base.rb
|
43
|
+
- lib/generators_helpers/insert_commands.rb
|
44
|
+
- lib/useful_functionality.rb
|
45
|
+
- README
|
46
|
+
files:
|
47
|
+
- init.rb
|
48
|
+
- lib/extensions/generator_base.rb
|
49
|
+
- lib/generators_helpers/insert_commands.rb
|
50
|
+
- lib/useful_functionality.rb
|
51
|
+
- Manifest
|
52
|
+
- rails_generators/article_like/article_like_generator.rb
|
53
|
+
- rails_generators/article_like/templates/article.rb
|
54
|
+
- rails_generators/article_like/templates/articles_controller.rb
|
55
|
+
- rails_generators/article_like/templates/article_methods.rb
|
56
|
+
- rails_generators/article_like/templates/migration.rb
|
57
|
+
- rails_generators/article_like/templates/show.html.erb
|
58
|
+
- rails_generators/news_like/news_like_generator.rb
|
59
|
+
- rails_generators/news_like/templates/migration.rb
|
60
|
+
- rails_generators/news_like/templates/news_post.rb
|
61
|
+
- rails_generators/news_like/templates/news_posts_controller.rb
|
62
|
+
- rails_generators/news_like/templates/news_posts_helper.rb
|
63
|
+
- rails_generators/news_like/templates/views/index.html.erb
|
64
|
+
- rails_generators/news_like/templates/views/new.html.erb
|
65
|
+
- rails_generators/news_like/templates/views/show.html.erb
|
66
|
+
- Rakefile
|
67
|
+
- README
|
68
|
+
- useful_functionality.gemspec
|
69
|
+
has_rdoc: true
|
70
|
+
homepage: http://7studio.ru
|
71
|
+
licenses: []
|
72
|
+
|
73
|
+
post_install_message:
|
74
|
+
rdoc_options:
|
75
|
+
- --line-numbers
|
76
|
+
- --inline-source
|
77
|
+
- --title
|
78
|
+
- Useful_functionality
|
79
|
+
- --main
|
80
|
+
- README
|
81
|
+
- -c utf-8
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: "0"
|
89
|
+
version:
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: "1.2"
|
95
|
+
version:
|
96
|
+
requirements: []
|
97
|
+
|
98
|
+
rubyforge_project: useful_functionality
|
99
|
+
rubygems_version: 1.3.5
|
100
|
+
signing_key:
|
101
|
+
specification_version: 3
|
102
|
+
summary: useful_functionality
|
103
|
+
test_files: []
|
104
|
+
|