impressionist 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. data/.gitignore +11 -0
  2. data/.rspec +1 -0
  3. data/.travis.yml +11 -0
  4. data/CHANGELOG.rdoc +1 -1
  5. data/Gemfile +8 -19
  6. data/README.md +65 -34
  7. data/Rakefile +10 -82
  8. data/app/controllers/impressionist_controller.rb +11 -11
  9. data/app/models/impression.rb +2 -15
  10. data/app/models/impressionist/bots.rb +3 -3
  11. data/app/models/impressionist/impressionable.rb +29 -41
  12. data/impressionist.gemspec +22 -65
  13. data/lib/generators/active_record/impressionist_generator.rb +21 -0
  14. data/lib/generators/{impressionist → active_record}/templates/create_impressions_table.rb +1 -9
  15. data/lib/generators/impressionist_generator.rb +12 -0
  16. data/lib/generators/mongo_mapper/impressionist_generator.rb +8 -0
  17. data/lib/generators/templates/impression.rb +5 -0
  18. data/lib/impressionist.rb +10 -3
  19. data/lib/impressionist/bots.rb +1 -1
  20. data/lib/impressionist/engine.rb +11 -3
  21. data/lib/impressionist/models/active_record/impression.rb +18 -0
  22. data/lib/impressionist/models/active_record/impressionist/impressionable.rb +12 -0
  23. data/lib/impressionist/models/mongo_mapper/impression.rb +17 -0
  24. data/lib/impressionist/models/mongo_mapper/impressionist/impressionable.rb +12 -0
  25. data/lib/impressionist/version.rb +3 -0
  26. data/test_app/.gitignore +17 -0
  27. data/test_app/.rspec +1 -0
  28. data/test_app/Gemfile +58 -0
  29. data/test_app/README +256 -0
  30. data/test_app/README.rdoc +261 -0
  31. data/test_app/Rakefile +7 -0
  32. data/test_app/app/assets/images/rails.png +0 -0
  33. data/test_app/app/assets/javascripts/application.js +15 -0
  34. data/test_app/app/assets/stylesheets/application.css +13 -0
  35. data/test_app/app/controllers/application_controller.rb +8 -0
  36. data/test_app/app/controllers/articles_controller.rb +18 -0
  37. data/test_app/app/controllers/dummy_controller.rb +6 -0
  38. data/test_app/app/controllers/posts_controller.rb +23 -0
  39. data/test_app/app/controllers/widgets_controller.rb +13 -0
  40. data/test_app/app/helpers/application_helper.rb +2 -0
  41. data/{lib/impressionist/railties/tasks.rake → test_app/app/mailers/.gitkeep} +0 -0
  42. data/test_app/app/models/.gitkeep +0 -0
  43. data/test_app/app/models/article.rb +3 -0
  44. data/test_app/app/models/dummy.rb +7 -0
  45. data/test_app/app/models/post.rb +3 -0
  46. data/test_app/app/models/user.rb +3 -0
  47. data/test_app/app/models/widget.rb +3 -0
  48. data/test_app/app/views/articles/index.html.erb +1 -0
  49. data/test_app/app/views/articles/show.html.erb +1 -0
  50. data/test_app/app/views/layouts/application.html.erb +14 -0
  51. data/test_app/app/views/posts/edit.html.erb +0 -0
  52. data/test_app/app/views/posts/index.html.erb +0 -0
  53. data/test_app/app/views/posts/show.html.erb +0 -0
  54. data/test_app/app/views/widgets/index.html.erb +0 -0
  55. data/test_app/app/views/widgets/new.html.erb +0 -0
  56. data/test_app/app/views/widgets/show.html.erb +0 -0
  57. data/test_app/config.ru +4 -0
  58. data/test_app/config/application.rb +59 -0
  59. data/test_app/config/boot.rb +6 -0
  60. data/test_app/config/cucumber.yml +8 -0
  61. data/test_app/config/database.yml +30 -0
  62. data/test_app/config/environment.rb +5 -0
  63. data/test_app/config/environments/development.rb +37 -0
  64. data/test_app/config/environments/pg_test.rb +35 -0
  65. data/test_app/config/environments/production.rb +67 -0
  66. data/test_app/config/environments/test.rb +37 -0
  67. data/test_app/config/initializers/backtrace_silencers.rb +7 -0
  68. data/test_app/config/initializers/impression.rb +5 -0
  69. data/test_app/config/initializers/inflections.rb +15 -0
  70. data/test_app/config/initializers/mime_types.rb +5 -0
  71. data/test_app/config/initializers/secret_token.rb +7 -0
  72. data/test_app/config/initializers/session_store.rb +8 -0
  73. data/test_app/config/initializers/wrap_parameters.rb +14 -0
  74. data/test_app/config/locales/en.yml +5 -0
  75. data/test_app/config/routes.rb +3 -0
  76. data/test_app/db/migrate/20110201153144_create_articles.rb +13 -0
  77. data/test_app/db/migrate/20110210205028_create_posts.rb +13 -0
  78. data/test_app/db/migrate/20111127184039_create_widgets.rb +15 -0
  79. data/test_app/db/seeds.rb +7 -0
  80. data/test_app/lib/assets/.gitkeep +0 -0
  81. data/test_app/lib/tasks/.gitkeep +0 -0
  82. data/test_app/lib/tasks/cucumber.rake +53 -0
  83. data/test_app/log/.gitkeep +0 -0
  84. data/test_app/public/404.html +26 -0
  85. data/test_app/public/422.html +26 -0
  86. data/test_app/public/500.html +25 -0
  87. data/test_app/public/favicon.ico +0 -0
  88. data/test_app/public/images/rails.png +0 -0
  89. data/test_app/public/index.html +241 -0
  90. data/test_app/public/javascripts/application.js +2 -0
  91. data/test_app/public/javascripts/controls.js +965 -0
  92. data/test_app/public/javascripts/dragdrop.js +974 -0
  93. data/test_app/public/javascripts/effects.js +1123 -0
  94. data/test_app/public/javascripts/prototype.js +6001 -0
  95. data/test_app/public/javascripts/rails.js +175 -0
  96. data/test_app/public/robots.txt +5 -0
  97. data/test_app/public/stylesheets/.gitkeep +0 -0
  98. data/test_app/script/cucumber +10 -0
  99. data/test_app/script/rails +6 -0
  100. data/test_app/spec/controllers/controller_spec.rb +125 -0
  101. data/test_app/spec/controllers/impressionist_uniqueness_spec.rb +310 -0
  102. data/test_app/spec/fixtures/articles.yml +3 -0
  103. data/test_app/spec/fixtures/impressions.yml +43 -0
  104. data/test_app/spec/fixtures/posts.yml +3 -0
  105. data/test_app/spec/fixtures/widgets.yml +4 -0
  106. data/test_app/spec/intializers/initializers_spec.rb +18 -0
  107. data/test_app/spec/models/counter_caching_spec.rb +30 -0
  108. data/test_app/spec/models/model_spec.rb +94 -0
  109. data/test_app/spec/rails_generators/rails_generators_spec.rb +23 -0
  110. data/test_app/spec/spec_helper.rb +36 -0
  111. data/upgrade_migrations/version_0_3_0.rb +7 -7
  112. data/upgrade_migrations/version_0_4_0.rb +2 -2
  113. metadata +356 -99
  114. data/VERSION +0 -1
  115. data/config/routes.rb +0 -2
  116. data/lib/generators/impressionist/impressionist_generator.rb +0 -20
@@ -1,20 +1,11 @@
1
1
  module Impressionist
2
2
  module Impressionable
3
-
4
- def self.included(base)
5
- base.extend ClassMethods
6
- base.send(:include, InstanceMethods)
7
- end
3
+ extend ActiveSupport::Concern
8
4
 
9
5
  module ClassMethods
10
6
  attr_accessor :cache_options
11
7
  @cache_options = nil
12
8
 
13
- def is_impressionable(options={})
14
- has_many :impressions, :as=>:impressionable
15
- @cache_options = options[:counter_cache]
16
- end
17
-
18
9
  def counter_cache_options
19
10
  if @cache_options
20
11
  options = { :column_name => :impressions_count, :unique => false }
@@ -28,44 +19,41 @@ module Impressionist
28
19
  end
29
20
  end
30
21
 
31
- module InstanceMethods
32
- def impressionable?
33
- true
34
- end
35
-
36
- def impressionist_count(options={})
37
- options.reverse_merge!(:filter=>:request_hash, :start_date=>nil, :end_date=>Time.now)
38
- imps = options[:start_date].blank? ? impressions : impressions.where("created_at>=? and created_at<=?",options[:start_date],options[:end_date])
39
- if options[:filter]!=:all
40
- imps = imps.select(options[:filter]).group(options[:filter])
41
- end
42
- imps.all.size
43
- end
22
+ def impressionable?
23
+ true
24
+ end
44
25
 
45
- def update_counter_cache
46
- cache_options = self.class.counter_cache_options
47
- column_name = cache_options[:column_name].to_sym
48
- count = cache_options[:unique] ? impressionist_count(:filter => :ip_address) : impressionist_count
49
- update_attribute(column_name, count)
26
+ def impressionist_count(options={})
27
+ options.reverse_merge!(:filter=>:request_hash, :start_date=>nil, :end_date=>Time.now)
28
+ imps = options[:start_date].blank? ? impressions : impressions.where("created_at>=? and created_at<=?",options[:start_date],options[:end_date])
29
+ if options[:filter]!=:all
30
+ imps = imps.select(options[:filter]).group(options[:filter])
50
31
  end
32
+ imps.all.size
33
+ end
51
34
 
52
- # OLD METHODS - DEPRECATE IN V0.5
53
- def impression_count(start_date=nil,end_date=Time.now)
54
- impressionist_count({:start_date=>start_date, :end_date=>end_date, :filter=>:all})
55
- end
35
+ def update_counter_cache
36
+ cache_options = self.class.counter_cache_options
37
+ column_name = cache_options[:column_name].to_sym
38
+ count = cache_options[:unique] ? impressionist_count(:filter => :ip_address) : impressionist_count
39
+ update_attribute(column_name, count)
40
+ end
56
41
 
57
- def unique_impression_count(start_date=nil,end_date=Time.now)
58
- impressionist_count({:start_date=>start_date, :end_date=>end_date, :filter=> :request_hash})
59
- end
42
+ # OLD METHODS - DEPRECATE IN V0.5
43
+ def impression_count(start_date=nil,end_date=Time.now)
44
+ impressionist_count({:start_date=>start_date, :end_date=>end_date, :filter=>:all})
45
+ end
60
46
 
61
- def unique_impression_count_ip(start_date=nil,end_date=Time.now)
62
- impressionist_count({:start_date=>start_date, :end_date=>end_date, :filter=> :ip_address})
63
- end
47
+ def unique_impression_count(start_date=nil,end_date=Time.now)
48
+ impressionist_count({:start_date=>start_date, :end_date=>end_date, :filter=> :request_hash})
49
+ end
64
50
 
65
- def unique_impression_count_session(start_date=nil,end_date=Time.now)
66
- impressionist_count({:start_date=>start_date, :end_date=>end_date, :filter=> :session_hash})
67
- end
51
+ def unique_impression_count_ip(start_date=nil,end_date=Time.now)
52
+ impressionist_count({:start_date=>start_date, :end_date=>end_date, :filter=> :ip_address})
68
53
  end
69
54
 
55
+ def unique_impression_count_session(start_date=nil,end_date=Time.now)
56
+ impressionist_count({:start_date=>start_date, :end_date=>end_date, :filter=> :session_hash})
57
+ end
70
58
  end
71
59
  end
@@ -1,70 +1,27 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ # encoding: utf-8
2
+ require File.expand_path('../lib/impressionist/version', __FILE__)
5
3
 
6
4
  Gem::Specification.new do |s|
7
- s.name = %q{impressionist}
8
- s.version = "1.0.1"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["cowboycoded"]
12
- s.date = %q{2011-11-30}
13
- s.description = %q{Log impressions from controller actions or from a model}
14
- s.email = %q{john.mcaliley@gmail.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.md"
18
- ]
19
- s.files = [
20
- "CHANGELOG.rdoc",
21
- "Gemfile",
22
- "LICENSE.txt",
23
- "README.md",
24
- "Rakefile",
25
- "VERSION",
26
- "app/controllers/impressionist_controller.rb",
27
- "app/models/impression.rb",
28
- "app/models/impressionist/bots.rb",
29
- "app/models/impressionist/impressionable.rb",
30
- "config/routes.rb",
31
- "impressionist.gemspec",
32
- "lib/generators/impressionist/impressionist_generator.rb",
33
- "lib/generators/impressionist/templates/create_impressions_table.rb",
34
- "lib/impressionist.rb",
35
- "lib/impressionist/bots.rb",
36
- "lib/impressionist/engine.rb",
37
- "lib/impressionist/railties/tasks.rake",
38
- "logo.png",
39
- "upgrade_migrations/version_0_3_0.rb",
40
- "upgrade_migrations/version_0_4_0.rb"
41
- ]
42
- s.homepage = %q{http://github.com/cowboycoded/impressionist}
5
+ s.add_dependency 'httpclient', '~> 2.2'
6
+ s.add_dependency 'nokogiri', '~> 1.5'
7
+ s.add_development_dependency 'capybara'
8
+ s.add_development_dependency 'rake', '>= 0.9'
9
+ s.add_development_dependency 'rails', '~>3.1'
10
+ s.add_development_dependency 'rdoc', '>= 2.4.2'
11
+ s.add_development_dependency 'rspec-rails'
12
+ s.add_development_dependency 'simplecov'
13
+ s.add_development_dependency 'sqlite3'
14
+ s.add_development_dependency 'systemu'
15
+ s.authors = ["johnmcaliley"]
16
+ s.description = "Log impressions from controller actions or from a model"
17
+ s.email = "john.mcaliley@gmail.com"
18
+ s.files = `git ls-files`.split("\n")
19
+ s.homepage = "https://github.com/charlotte-ruby/impressionist"
43
20
  s.licenses = ["MIT"]
21
+ s.name = "impressionist"
44
22
  s.require_paths = ["lib"]
45
- s.rubygems_version = %q{1.3.7}
46
- s.summary = %q{Easy way to log impressions}
47
-
48
- if s.respond_to? :specification_version then
49
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
50
- s.specification_version = 3
51
-
52
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
53
- s.add_development_dependency(%q<shoulda>, [">= 0"])
54
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
55
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
56
- s.add_development_dependency(%q<rcov>, [">= 0"])
57
- else
58
- s.add_dependency(%q<shoulda>, [">= 0"])
59
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
60
- s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
61
- s.add_dependency(%q<rcov>, [">= 0"])
62
- end
63
- else
64
- s.add_dependency(%q<shoulda>, [">= 0"])
65
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
66
- s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
67
- s.add_dependency(%q<rcov>, [">= 0"])
68
- end
23
+ s.required_rubygems_version = Gem::Requirement.new('>= 1.3.6') if s.respond_to? :required_rubygems_version=
24
+ s.summary = "Easy way to log impressions"
25
+ s.test_files = `git ls-files -- test_app/*`.split("\n")
26
+ s.version = Impressionist::VERSION
69
27
  end
70
-
@@ -0,0 +1,21 @@
1
+ module ActiveRecord
2
+ module Generators
3
+ class ImpressionistGenerator < Rails::Generators::Base
4
+ include Rails::Generators::Migration
5
+ source_root File.join(File.dirname(__FILE__), 'templates')
6
+
7
+ def self.next_migration_number(dirname)
8
+ sleep 1
9
+ if ActiveRecord::Base.timestamped_migrations
10
+ Time.now.utc.strftime("%Y%m%d%H%M%S")
11
+ else
12
+ "%.3d" % (current_migration_number(dirname) + 1)
13
+ end
14
+ end
15
+
16
+ def create_migration_file
17
+ migration_template 'create_impressions_table.rb', 'db/migrate/create_impressions_table.rb'
18
+ end
19
+ end
20
+ end
21
+ end
@@ -24,14 +24,6 @@ class CreateImpressionsTable < ActiveRecord::Migration
24
24
  end
25
25
 
26
26
  def self.down
27
- remove_index :impressions, :name => :poly_request_index
28
- remove_index :impressions, :name => :poly_ip_index
29
- remove_index :impressions, :name => :poly_session_index
30
- remove_index :impressions, :name => :controlleraction_request_index
31
- remove_index :impressions, :name => :controlleraction_ip_index
32
- remove_index :impressions, :name => :controlleraction_session_index
33
- remove_index :impressions, :user_id
34
-
35
27
  drop_table :impressions
36
28
  end
37
- end
29
+ end
@@ -0,0 +1,12 @@
1
+ module Impressionist
2
+ module Generators
3
+ class ImpressionistGenerator < Rails::Generators::Base
4
+ hook_for :orm
5
+ source_root File.expand_path('../templates', __FILE__)
6
+
7
+ def copy_config_file
8
+ template 'impression.rb', 'config/initializers/impression.rb'
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,8 @@
1
+ module MongoMapper
2
+ module Generators
3
+ class ImpressionistGenerator < Rails::Generators::Base
4
+ # Empty for now, need it for generating the config file without
5
+ # triggering other ORM's generators.
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ # Use this hook to configure impressionist parameters
2
+ Impressionist.setup do |config|
3
+ # Define ORM. Could be :active_record (default) and :mongo_mapper
4
+ # config.orm = :active_record
5
+ end
data/lib/impressionist.rb CHANGED
@@ -1,5 +1,12 @@
1
- IMPRESSIONIST_PATH = File.dirname(__FILE__) + "/impressionist"
2
- require "#{IMPRESSIONIST_PATH}/engine.rb"
1
+ require "impressionist/engine.rb"
3
2
 
4
3
  module Impressionist
5
- end
4
+ # Define ORM
5
+ mattr_accessor :orm
6
+ @@orm = :active_record
7
+
8
+ # Load configuration from initializer
9
+ def self.setup
10
+ yield self
11
+ end
12
+ end
@@ -15,4 +15,4 @@ module Impressionist
15
15
  list
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -3,8 +3,16 @@ require "rails"
3
3
 
4
4
  module Impressionist
5
5
  class Engine < Rails::Engine
6
- initializer 'impressionist.extend_ar' do |app|
7
- ActiveRecord::Base.send(:include, Impressionist::Impressionable)
6
+ initializer 'impressionist.model' do |app|
7
+ if Impressionist.orm == :active_record
8
+ require "impressionist/models/active_record/impression.rb"
9
+ require "impressionist/models/active_record/impressionist/impressionable.rb"
10
+ ActiveRecord::Base.send(:include, Impressionist::Impressionable)
11
+ elsif Impressionist.orm == :mongo_mapper
12
+ require "impressionist/models/mongo_mapper/impression.rb"
13
+ require "impressionist/models/mongo_mapper/impressionist/impressionable.rb"
14
+ MongoMapper::Document.plugin Impressionist::Impressionable
15
+ end
8
16
  end
9
17
 
10
18
  initializer 'impressionist.controller' do
@@ -14,4 +22,4 @@ module Impressionist
14
22
  end
15
23
  end
16
24
  end
17
- end
25
+ end
@@ -0,0 +1,18 @@
1
+ class Impression < ActiveRecord::Base
2
+ attr_accessible :impressionable_type, :impressionable_id, :user_id,
3
+ :controller_name, :action_name, :view_name, :request_hash, :ip_address,
4
+ :session_hash, :message, :referrer
5
+
6
+ after_save :update_impressions_counter_cache
7
+
8
+ private
9
+
10
+ def update_impressions_counter_cache
11
+ impressionable_class = self.impressionable_type.constantize
12
+
13
+ if impressionable_class.counter_cache_options
14
+ resouce = impressionable_class.find(self.impressionable_id)
15
+ resouce.try(:update_counter_cache)
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,12 @@
1
+ module Impressionist
2
+ module Impressionable
3
+ extend ActiveSupport::Concern
4
+
5
+ module ClassMethods
6
+ def is_impressionable(options={})
7
+ has_many :impressions, :as => :impressionable, :dependent => :destroy
8
+ @cache_options = options[:counter_cache]
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,17 @@
1
+ class Impression
2
+ include MongoMapper::Document
3
+
4
+ key :impressionable_type, String
5
+ key :impressionable_id, String
6
+ key :user_id, String
7
+ key :controller_name, String
8
+ key :action_name, String
9
+ key :view_name, String
10
+ key :request_hash, String
11
+ key :ip_address, String
12
+ key :session_hash, String
13
+ key :message, String
14
+ key :referrer, String
15
+
16
+ timestamps!
17
+ end
@@ -0,0 +1,12 @@
1
+ module Impressionist
2
+ module Impressionable
3
+ extend ActiveSupport::Concern
4
+
5
+ module ClassMethods
6
+ def is_impressionable(options={})
7
+ many :impressions, :as => :impressionable, :dependent => :destroy
8
+ @cache_options = options[:counter_cache]
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module Impressionist
2
+ VERSION = "1.1.0"
3
+ end
@@ -0,0 +1,17 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile ~/.gitignore_global
6
+
7
+ # Ignore bundler config
8
+ /.bundle
9
+ /Gemfile.lock
10
+
11
+ # Ignore the default SQLite database.
12
+ /db/*.sqlite3
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /coverage
16
+ /log/*.log
17
+ /tmp
data/test_app/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/test_app/Gemfile ADDED
@@ -0,0 +1,58 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rails', '3.2.2'
4
+
5
+ gem 'impressionist', :path => '../'
6
+
7
+ platforms :jruby do
8
+ gem 'activerecord-jdbcsqlite3-adapter'
9
+ gem 'jdbc-sqlite3'
10
+ gem 'jruby-openssl'
11
+ end
12
+
13
+ platforms :ruby, :mswin, :mingw do
14
+ gem 'sqlite3'
15
+ end
16
+
17
+ gem 'json'
18
+
19
+ # Gems used only for assets and not required
20
+ # in production environments by default.
21
+ group :assets do
22
+ gem 'sass-rails', '~> 3.2.3'
23
+ gem 'coffee-rails', '~> 3.2.1'
24
+
25
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
26
+ # gem 'therubyracer'
27
+
28
+ gem 'uglifier', '>= 1.0.3'
29
+ end
30
+
31
+ group :development, :test do
32
+ gem 'autotest-notification'
33
+ gem 'rspec-rails'
34
+ gem 'spork'
35
+ end
36
+
37
+ group :test do
38
+ gem 'capybara'
39
+ gem 'simplecov'
40
+ gem 'systemu'
41
+ end
42
+
43
+ gem 'jquery-rails'
44
+
45
+ # To use ActiveModel has_secure_password
46
+ # gem 'bcrypt-ruby', '~> 3.0.0'
47
+
48
+ # To use Jbuilder templates for JSON
49
+ # gem 'jbuilder'
50
+
51
+ # Use unicorn as the app server
52
+ # gem 'unicorn'
53
+
54
+ # Deploy with Capistrano
55
+ # gem 'capistrano'
56
+
57
+ # To use debugger
58
+ # gem 'ruby-debug'