bently 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/README.md +7 -4
  2. data/lib/bently/core_ext/method.rb +95 -0
  3. data/lib/bently/recipe/action-mailer.rb +4 -42
  4. data/lib/bently/recipe/active_admin.rb +15 -0
  5. data/lib/bently/recipe/acts-as-taggable-on.rb +18 -0
  6. data/lib/bently/recipe/better-errors.rb +16 -0
  7. data/lib/bently/recipe/cancan.rb +21 -0
  8. data/lib/bently/recipe/carrierwave.rb +34 -0
  9. data/lib/bently/recipe/cucumber-rails.rb +1 -1
  10. data/lib/bently/recipe/delayed-job-active-record.rb +18 -0
  11. data/lib/bently/recipe/delayed-job-mongoid.rb +16 -0
  12. data/lib/bently/recipe/devise.rb +1 -1
  13. data/lib/bently/recipe/factory-girl-rails.rb +2 -22
  14. data/lib/bently/recipe/foreman-thin.rb +1 -1
  15. data/lib/bently/recipe/foreman.rb +1 -1
  16. data/lib/bently/recipe/formtastic.rb +16 -0
  17. data/lib/bently/recipe/gitignore-emacs.rb +1 -18
  18. data/lib/bently/recipe/gitignore-linux.rb +1 -9
  19. data/lib/bently/recipe/gitignore-osx.rb +1 -18
  20. data/lib/bently/recipe/gitignore-rails.rb +1 -24
  21. data/lib/bently/recipe/gitignore-ruby.rb +1 -24
  22. data/lib/bently/recipe/gitignore-rubymine.rb +1 -7
  23. data/lib/bently/recipe/gitignore-sass.rb +1 -9
  24. data/lib/bently/recipe/gitignore-sublime-text.rb +1 -8
  25. data/lib/bently/recipe/gitignore-textmate.rb +1 -9
  26. data/lib/bently/recipe/gitignore-vim.rb +1 -11
  27. data/lib/bently/recipe/gitignore-windows.rb +1 -15
  28. data/lib/bently/recipe/guard-coffeescript.rb +18 -0
  29. data/lib/bently/recipe/guard-cucumber.rb +18 -0
  30. data/lib/bently/recipe/guard-minitest.rb +18 -0
  31. data/lib/bently/recipe/guard-rails.rb +18 -0
  32. data/lib/bently/recipe/guard-rspec.rb +18 -0
  33. data/lib/bently/recipe/guard-spork.rb +18 -0
  34. data/lib/bently/recipe/haml-rails.rb +1 -1
  35. data/lib/bently/recipe/heroku-sendgrid.rb +1 -17
  36. data/lib/bently/recipe/jasmine-rails.rb +20 -0
  37. data/lib/bently/recipe/kaminari.rb +21 -0
  38. data/lib/bently/recipe/minitest-rails.rb +16 -0
  39. data/lib/bently/recipe/omniauth-facebook.rb +1 -2
  40. data/lib/bently/recipe/omniauth.rb +2 -28
  41. data/lib/bently/recipe/paperclip.rb +39 -0
  42. data/lib/bently/recipe/rspec-rails.rb +1 -1
  43. data/lib/bently/recipe/simple_form.rb +21 -0
  44. data/lib/bently/recipe/twitter-bootstrap-rails.rb +1 -1
  45. data/lib/bently/recipe/twitter.rb +21 -0
  46. data/lib/bently/recipe.rb +15 -1
  47. data/lib/bently/recipe_class/rails.rb +5 -1
  48. data/lib/bently/template/action-mailer/welcome_email.html.erb +18 -0
  49. data/lib/bently/template/action-mailer/welcome_email.text.erb +10 -0
  50. data/lib/bently/template/acts-as-taggable-on/usage.rb +18 -0
  51. data/lib/bently/template/factory-girl-rails/factories.rb +15 -0
  52. data/lib/bently/template/gitignore-emacs/.gitignore +12 -0
  53. data/lib/bently/template/gitignore-linux/.gitignore +3 -0
  54. data/lib/bently/template/gitignore-osx/.gitignore +12 -0
  55. data/lib/bently/template/gitignore-rails/.gitignore +18 -0
  56. data/lib/bently/template/gitignore-ruby/.gitignore +18 -0
  57. data/lib/bently/template/gitignore-rubymine/.gitignore +1 -0
  58. data/lib/bently/template/gitignore-sass/.gitignore +2 -0
  59. data/lib/bently/template/gitignore-sublime-text/.gitignore +2 -0
  60. data/lib/bently/template/gitignore-textmate/.gitignore +3 -0
  61. data/lib/bently/template/gitignore-vim/.gitignore +5 -0
  62. data/lib/bently/template/gitignore-windows/.gitignore +9 -0
  63. data/lib/bently/template/heroku-sendgrid/mail.rb +9 -0
  64. data/lib/bently/template/jasmine-rails/jasmine.yml +17 -0
  65. data/lib/bently/template/omniauth/omniauth.rb +5 -0
  66. data/lib/bently/template/omniauth/sessions_controller.rb +13 -0
  67. data/lib/bently/version.rb +1 -1
  68. data/lib/bently.rb +1 -0
  69. data/spec/bently/base_spec.rb +55 -0
  70. metadata +42 -3
  71. data/Gemfile.lock +0 -28
data/README.md CHANGED
@@ -4,9 +4,9 @@ Bently is a community maintained library of executable recipes for rapid applica
4
4
 
5
5
  The goal of Bently is to reduce duplication in the development process across projects, with rapid prototyping in mind.
6
6
 
7
- Bently is Homebrew meets Rails generators.
7
+ Bently is [Homebrew](https://github.com/mxcl/homebrew) meets Rails generators.
8
8
 
9
- Bently is built on top of Thor.
9
+ Bently is built on top of [Thor](https://github.com/wycats/thor).
10
10
 
11
11
 
12
12
  Installation
@@ -19,7 +19,7 @@ Usage
19
19
  =====
20
20
 
21
21
  bently list # list all recipes
22
- bently list [STRING] # search recipes matching a string
22
+ bently list [STRING] # find recipes matching a string
23
23
  bently read [RECIPE] # display a recipe without executing it
24
24
  bently bake [RECIPE] # execute all steps in recipe
25
25
  bently bake [RECIPE] --step # execute a recipe step by step, prompting before each step
@@ -29,9 +29,12 @@ Usage
29
29
  Example
30
30
  =======
31
31
 
32
- Installing and configuring devise in a Rails application.
32
+ Installing and configuring devise in a Rails application
33
33
 
34
34
  $ bently bake devise
35
+
36
+ which executes and outputs
37
+
35
38
  gemfile devise
36
39
  1
37
40
  2 gem "devise"
@@ -0,0 +1,95 @@
1
+ # (The MIT License)
2
+ #
3
+ # Copyright (c) 2011 John Mair (banisterfiend)
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the
7
+ # 'Software'), to deal in the Software without restriction, including
8
+ # without limitation the rights to use, copy, modify, merge, publish,
9
+ # distribute, sublicense, and/or sell copies of the Software, and to
10
+ # permit persons to whom the Software is furnished to do so, subject to
11
+ # the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be
14
+ # included in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+
25
+ if RUBY_VERSION == '1.8.7'
26
+ class Method
27
+ def trace_func(event, file, line, id, binding, classname)
28
+ return unless event == 'call'
29
+ set_trace_func nil
30
+
31
+ @file, @line = file, line
32
+ raise :found
33
+ end
34
+
35
+ private :trace_func
36
+
37
+ # Return the source location of a method for Ruby 1.8.
38
+ # @return [Array] A two element array. First element is the
39
+ # file, second element is the line in the file where the
40
+ # method definition is found.
41
+ def source_location
42
+ if @file.nil?
43
+ args =[*(1..(arity<-1 ? -arity-1 : arity ))]
44
+
45
+ set_trace_func method(:trace_func).to_proc
46
+ call(*args) rescue nil
47
+ set_trace_func nil
48
+ @file = File.expand_path(@file) if @file && File.exist?(File.expand_path(@file))
49
+ end
50
+ [@file, @line] if @file
51
+ end
52
+ end
53
+
54
+
55
+ class UnboundMethod
56
+ # Return the source location of an instance method for Ruby 1.8.
57
+ # @return [Array] A two element array. First element is the
58
+ # file, second element is the line in the file where the
59
+ # method definition is found.
60
+ def source_location
61
+ klass = case owner
62
+ when Class
63
+ owner
64
+ when Module
65
+ method_owner = owner
66
+ Class.new { include(method_owner) }
67
+ end
68
+
69
+ # deal with immediate values
70
+ case
71
+ when klass == Symbol
72
+ return :a.method(name).source_location
73
+ when klass == Fixnum
74
+ return 0.method(name).source_location
75
+ when klass == TrueClass
76
+ return true.method(name).source_location
77
+ when klass == FalseClass
78
+ return false.method(name).source_location
79
+ when klass == NilClass
80
+ return nil.method(name).source_location
81
+ end
82
+
83
+ begin
84
+ Object.instance_method(:method).bind(klass.allocate).call(name).source_location
85
+ rescue TypeError
86
+
87
+ # Assume we are dealing with a Singleton Class:
88
+ # 1. Get the instance object
89
+ # 2. Forward the source_location lookup to the instance
90
+ instance ||= ObjectSpace.each_object(owner).first
91
+ Object.instance_method(:method).bind(instance).call(name).source_location
92
+ end
93
+ end
94
+ end
95
+ end
@@ -7,56 +7,18 @@ module Bently
7
7
  def initialize
8
8
  generate 'mailer UserMailer'
9
9
  insert 'app/mailers/user_mailer.rb', welcome_email_method, :after => /^.*default.*$/
10
- create './app/views/user_mailer/welcome_email.html.erb', welcome_email_html
11
- create './app/views/user_mailer/welcome_email.text.erb', welcome_email_text
10
+ create './app/views/user_mailer/welcome_email.html.erb', template('welcome_email.html.erb')
11
+ create './app/views/user_mailer/welcome_email.text.erb', template('welcome_email.text.erb')
12
12
  end
13
13
 
14
14
  protected
15
15
 
16
16
  def welcome_email_method
17
- %{
18
- # def welcome_email(user)
17
+ %{# def welcome_email(user)
19
18
  # @user = user
20
19
  # @url = "http://example.com/login"
21
20
  # mail(:to => user.email, :subject => "Welcome to My Awesome Site")
22
- # end
23
- }
24
- end
25
-
26
- def welcome_email_html
27
- %{
28
- <!DOCTYPE html>
29
- <html>
30
- <head>
31
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
32
- </head>
33
- <body>
34
- <h1>Welcome to example.com, <%= @user.name %></h1>
35
- <p>
36
- You have successfully signed up to example.com,
37
- your username is: <%= @user.login %>.<br/>
38
- </p>
39
- <p>
40
- To login to the site, just follow this link: <%= @url %>.
41
- </p>
42
- <p>Thanks for joining and have a great day!</p>
43
- </body>
44
- </html>
45
- }
46
- end
47
-
48
- def welcome_email_text
49
- %{
50
- Welcome to example.com, <%= @user.name %>
51
- ===============================================
52
-
53
- You have successfully signed up to example.com,
54
- your username is: <%= @user.login %>.
55
-
56
- To login to the site, just follow this link: <%= @url %>.
57
-
58
- Thanks for joining and have a great day!
59
- }
21
+ # end}
60
22
  end
61
23
 
62
24
  end
@@ -0,0 +1,15 @@
1
+ module Bently
2
+ class ActiveAdmin < RailsRecipe
3
+
4
+ title 'active_admin'
5
+ homepage 'https://github.com/gregbell/active_admin/blob/master/README.rdoc'
6
+
7
+ def initialize
8
+ gem 'activeadmin'
9
+ bundle
10
+ generate 'active_admin:install'
11
+ migrate
12
+ end
13
+
14
+ end
15
+ end
@@ -0,0 +1,18 @@
1
+ module Bently
2
+ class ActsAsTaggableOn < RailsRecipe
3
+
4
+ title 'acts-as-taggable-on'
5
+ homepage 'https://github.com/mbleigh/acts-as-taggable-on/blob/master/README.md'
6
+
7
+ def initialize
8
+ gem 'acts-as-taggable-on', '~> 2.3.1'
9
+ bundle
10
+ generate 'acts_as_taggable_on:migration'
11
+ migrate
12
+ usage ''
13
+ code template('usage.rb')
14
+ usage 'See https://github.com/mbleigh/acts-as-taggable-on/blob/master/README.md#usage'
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ module Bently
2
+ class BetterErrors < RailsRecipe
3
+
4
+ title 'better_errors'
5
+ homepage 'https://github.com/charliesome/better_errors/blob/master/README.md'
6
+
7
+ def initialize
8
+ gem_group :development do
9
+ gem 'better_errors'
10
+ gem 'binding_of_caller'
11
+ end
12
+ bundle
13
+ end
14
+
15
+ end
16
+ end
@@ -0,0 +1,21 @@
1
+ module Bently
2
+ class Cancan < RailsRecipe
3
+
4
+ title 'cancan'
5
+ category 'gem'
6
+ description 'downloads and installs cancan gem'
7
+ homepage 'https://github.com/ryanb/cancan/blob/master/README.rdoc'
8
+
9
+ def initialize
10
+ gem 'cancan'
11
+ bundle
12
+ generate 'cancan:ability'
13
+ todo 'See Defining Abilities: https://github.com/ryanb/cancan/wiki/defining-abilities'
14
+ todo 'See Checking Abilities: https://github.com/ryanb/cancan/wiki/checking-abilities'
15
+ todo 'See Authorizing Controller Actions: https://github.com/ryanb/cancan/wiki/authorizing-controller-actions'
16
+ todo 'See Exception Handling: https://github.com/ryanb/cancan/wiki/exception-handling'
17
+ todo 'See Ensure Authorization: https://github.com/ryanb/cancan/wiki/Ensure-Authorization'
18
+ end
19
+
20
+ end
21
+ end
@@ -0,0 +1,34 @@
1
+ module Bently
2
+ class Carrierwave < RailsRecipe
3
+
4
+ title 'carrierwave'
5
+ category 'gem'
6
+ description 'downloads and installs carrierwave gem'
7
+ homepage 'https://github.com/jnicklas/carrierwave/blob/master/README.md'
8
+
9
+ def initialize
10
+ gem 'carrierwave'
11
+ bundle
12
+ todo 'Start off by generating an uploader:'
13
+ say ' rails generate uploader Avatar', ''
14
+ todo 'For use with ActiveRecord:'
15
+ say 'Make sure you are loading CarrierWave after loading your ORM, otherwise you\'ll need to require the relevant extension manually, e.g.:', '-'
16
+ say ' require \'carrierwave/orm/activerecord\'','1', :magenta
17
+ say 'Add a string column to the model you want to mount the uploader on:','-'
18
+ say ' add_column :users, :avatar, :string','1', :magenta
19
+ say 'Open your model file and mount the uploader:','-'
20
+ say ' class User < ActiveRecord::Base','1', :magenta
21
+ say ' mount_uploader :avatar, AvatarUploader','2', :magenta
22
+ say ' end','3', :magenta
23
+ say 'Now you can cache files by assigning them to the attribute, they will automatically be stored when the record is saved.','-'
24
+ say ' u = User.new', '1', :magenta
25
+ say ' u.avatar = params[:file]', '2', :magenta
26
+ say ' u.avatar = File.open(\'somewhere\')', '3', :magenta
27
+ say ' u.save!', '4', :magenta
28
+ say ' u.avatar.url # => \'/url/to/file.png\'', '5', :magenta
29
+ say ' u.avatar.current_path # => \'path/to/file.png\'', '6', :magenta
30
+ say ' u.avatar.identifier # => \'file.png\'', '7', :magenta
31
+ end
32
+
33
+ end
34
+ end
@@ -1,7 +1,7 @@
1
1
  module Bently
2
2
  class CucumberRails < RailsRecipe
3
3
 
4
- name 'cucumber-rails'
4
+ title 'cucumber-rails'
5
5
  category 'gem'
6
6
  description 'downloads and installs cucumber-rails gem'
7
7
  homepage 'https://github.com/cucumber/cucumber-rails'
@@ -0,0 +1,18 @@
1
+ module Bently
2
+ class DelayedJobActiveRecord < RailsRecipe
3
+
4
+ title 'delayed_job Active Record'
5
+ category 'gem'
6
+ description 'downloads and installs delayed_job_active_record gem'
7
+ homepage 'https://github.com/collectiveidea/delayed_job/blob/master/README.md'
8
+ version '3.0'
9
+
10
+ def initialize
11
+ gem 'delayed_job_active_record'
12
+ bundle
13
+ generate 'delayed_job:active_record'
14
+ migrate
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ module Bently
2
+ class DelayedJobMongoid < RailsRecipe
3
+
4
+ title 'delayed_job Mongoid'
5
+ category 'gem'
6
+ description 'downloads and installs delayed_job_mongoid gem'
7
+ homepage 'https://github.com/collectiveidea/delayed_job/blob/master/README.md'
8
+ version '3.0'
9
+
10
+ def initialize
11
+ gem 'delayed_job_mongoid'
12
+ bundle
13
+ end
14
+
15
+ end
16
+ end
@@ -1,7 +1,7 @@
1
1
  module Bently
2
2
  class Devise < RailsRecipe
3
3
 
4
- name 'devise'
4
+ title 'devise'
5
5
  category 'gem'
6
6
  description 'downloads and installs devise gem'
7
7
  homepage 'https://github.com/plataformatec/devise/blob/master/README.md'
@@ -1,7 +1,7 @@
1
1
  module Bently
2
2
  class FactoryGirlRails < RailsRecipe
3
3
 
4
- name 'factory_girl_rails'
4
+ title 'factory_girl_rails'
5
5
  category 'gem'
6
6
  description 'downloads and installs factory_girl_rails gem'
7
7
  homepage 'https://github.com/thoughtbot/factory_girl_rails/blob/master/README.md'
@@ -11,27 +11,7 @@ module Bently
11
11
  gem "factory_girl_rails", "~> 4.0"
12
12
  end
13
13
  bundle
14
- create './spec/factories.rb', factory_file
15
- end
16
-
17
- protected
18
-
19
- def factory_file
20
- %{# # This will guess the User class
21
- # FactoryGirl.define do
22
- # factory :user do
23
- # first_name "John"
24
- # last_name "Doe"
25
- # admin false
26
- # end
27
- #
28
- # # This will use the User class (Admin would have been guessed)
29
- # factory :admin, class: User do
30
- # first_name "Admin"
31
- # last_name "User"
32
- # admin true
33
- # end
34
- # end}
14
+ create './spec/factories.rb', template('factories.rb')
35
15
  end
36
16
 
37
17
  end
@@ -1,7 +1,7 @@
1
1
  module Bently
2
2
  class ForemanThin < RailsRecipe
3
3
 
4
- name 'foreman-thin'
4
+ title 'foreman-thin'
5
5
  category 'gem'
6
6
  description 'downloads and installs foreman and thin Ruby gems'
7
7
  homepage 'https://devcenter.heroku.com/articles/rails3#webserver'
@@ -1,7 +1,7 @@
1
1
  module Bently
2
2
  class Foreman < RubyRecipe
3
3
 
4
- name 'foreman'
4
+ title 'foreman'
5
5
  category 'gem'
6
6
  description 'downloads and installs foreman gem'
7
7
  homepage 'https://github.com/ddollar/foreman/blob/master/README.md'
@@ -0,0 +1,16 @@
1
+ module Bently
2
+ class Formtastic < RailsRecipe
3
+
4
+ title 'formtastic'
5
+ category 'gem'
6
+ description 'downloads and installs formtastic gem'
7
+ homepage 'https://github.com/justinfrench/formtastic/blob/master/README.textile'
8
+
9
+ def initialize
10
+ gem 'formtastic'
11
+ bundle
12
+ generate 'formtastic:install'
13
+ end
14
+
15
+ end
16
+ end
@@ -5,24 +5,7 @@ module Bently
5
5
  homepage 'https://github.com/github/gitignore/blob/master/Global/Emacs.gitignore'
6
6
 
7
7
  def initialize
8
- append '.gitignore', gitignore
9
- end
10
-
11
- protected
12
-
13
- def gitignore
14
- %{*~
15
- \#*\#
16
- /.emacs.desktop
17
- /.emacs.desktop.lock
18
- .elc
19
- auto-save-list
20
- tramp
21
- .\#*
22
-
23
- # Org-mode
24
- .org-id-locations
25
- *_archive}
8
+ append '.gitignore', template('.gitignore')
26
9
  end
27
10
 
28
11
  end
@@ -5,15 +5,7 @@ module Bently
5
5
  homepage 'https://github.com/github/gitignore/blob/master/Global/Linux.gitignore'
6
6
 
7
7
  def initialize
8
- append '.gitignore', gitignore
9
- end
10
-
11
- protected
12
-
13
- def gitignore
14
- %{.*
15
- !.gitignore
16
- *~}
8
+ append '.gitignore', template('.gitignore')
17
9
  end
18
10
 
19
11
  end
@@ -5,24 +5,7 @@ module Bently
5
5
  homepage 'https://github.com/github/gitignore/blob/master/Global/OSX.gitignore'
6
6
 
7
7
  def initialize
8
- append '.gitignore', gitignore
9
- end
10
-
11
- protected
12
-
13
- def gitignore
14
- %{.DS_Store
15
- .AppleDouble
16
- .LSOverride
17
- Icon
18
-
19
-
20
- # Thumbnails
21
- ._*
22
-
23
- # Files that might appear on external disk
24
- .Spotlight-V100
25
- .Trashes}
8
+ append '.gitignore', template('.gitignore')
26
9
  end
27
10
 
28
11
  end
@@ -5,30 +5,7 @@ module Bently
5
5
  homepage 'https://github.com/github/gitignore/blob/master/Rails.gitignore'
6
6
 
7
7
  def initialize
8
- append '.gitignore', gitignore
9
- end
10
-
11
- protected
12
-
13
- def gitignore
14
- %{*.rbc
15
- *.sassc
16
- .sass-cache
17
- capybara-*.html
18
- .rspec
19
- .rvmrc
20
- /.bundle
21
- /vendor/bundle
22
- /log/*
23
- /tmp/*
24
- /db/*.sqlite3
25
- /public/system/*
26
- /coverage/
27
- /spec/tmp/*
28
- **.orig
29
- rerun.txt
30
- pickle-email-*.html
31
- .project}
8
+ append '.gitignore', template('.gitignore')
32
9
  end
33
10
 
34
11
  end
@@ -5,30 +5,7 @@ module Bently
5
5
  homepage 'https://github.com/github/gitignore/blob/master/Ruby.gitignore'
6
6
 
7
7
  def initialize
8
- append '.gitignore', gitignore
9
- end
10
-
11
- protected
12
-
13
- def gitignore
14
- %{*.gem
15
- *.rbc
16
- .bundle
17
- .config
18
- coverage
19
- InstalledFiles
20
- lib/bundler/man
21
- pkg
22
- rdoc
23
- spec/reports
24
- test/tmp
25
- test/version_tmp
26
- tmp
27
-
28
- # YARD artifacts
29
- # .yardoc
30
- # _yardoc
31
- # doc/}
8
+ append '.gitignore', template('.gitignore')
32
9
  end
33
10
 
34
11
  end
@@ -5,13 +5,7 @@ module Bently
5
5
  homepage 'https://github.com/github/gitignore/blob/master/Global/RubyMine.gitignore'
6
6
 
7
7
  def initialize
8
- append '.gitignore', gitignore
9
- end
10
-
11
- protected
12
-
13
- def gitignore
14
- %{.idea/workspace.xml}
8
+ append '.gitignore', template('.gitignore')
15
9
  end
16
10
 
17
11
  end
@@ -5,15 +5,7 @@ module Bently
5
5
  homepage 'https://github.com/github/gitignore/blob/master/Global/SASS.gitignore'
6
6
 
7
7
  def initialize
8
- append '.gitignore', gitignore
9
- end
10
-
11
- protected
12
-
13
- def gitignore
14
- %{### SASS Ignores - "Sassy CSS" http://sass-lang.com/
15
- *.sass-cache
16
- }
8
+ append '.gitignore', template('.gitignore')
17
9
  end
18
10
 
19
11
  end
@@ -5,14 +5,7 @@ module Bently
5
5
  homepage 'https://github.com/github/gitignore/blob/master/Global/SublimeText.gitignore'
6
6
 
7
7
  def initialize
8
- append '.gitignore', gitignore
9
- end
10
-
11
- protected
12
-
13
- def gitignore
14
- %{# SublimeText project files
15
- *.sublime-workspace}
8
+ append '.gitignore', template('.gitignore')
16
9
  end
17
10
 
18
11
  end
@@ -5,15 +5,7 @@ module Bently
5
5
  homepage 'https://github.com/github/gitignore/blob/master/Global/TextMate.gitignore'
6
6
 
7
7
  def initialize
8
- append '.gitignore', gitignore
9
- end
10
-
11
- protected
12
-
13
- def gitignore
14
- %{*.tmproj
15
- *.tmproject
16
- tmtags}
8
+ append '.gitignore', template('.gitignore')
17
9
  end
18
10
 
19
11
  end
@@ -5,17 +5,7 @@ module Bently
5
5
  homepage 'https://github.com/github/gitignore/blob/master/Global/vim.gitignore'
6
6
 
7
7
  def initialize
8
- append '.gitignore', gitignore
9
- end
10
-
11
- protected
12
-
13
- def gitignore
14
- %{.*.s[a-w][a-z]
15
- *.un~
16
- Session.vim
17
- .netrwhist
18
- *~}
8
+ append '.gitignore', template('.gitignore')
19
9
  end
20
10
 
21
11
  end