munin_passenger 1.0.0

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.
Files changed (107) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +16 -0
  5. data/Gemfile +3 -0
  6. data/LICENSE.txt +20 -0
  7. data/README.md +69 -0
  8. data/Rakefile +19 -0
  9. data/Vagrantfile +172 -0
  10. data/bin/munin_passenger-install +10 -0
  11. data/bin/munin_passenger-install.sh +13 -0
  12. data/bin/passenger_cpu +9 -0
  13. data/bin/passenger_last_used +9 -0
  14. data/bin/passenger_munin-install.sh +13 -0
  15. data/bin/passenger_processed +9 -0
  16. data/bin/passenger_queue +9 -0
  17. data/bin/passenger_ram +9 -0
  18. data/bin/passenger_uptime +9 -0
  19. data/example/.gitignore +23 -0
  20. data/example/Gemfile +45 -0
  21. data/example/Gemfile.lock +194 -0
  22. data/example/README.md +24 -0
  23. data/example/Rakefile +6 -0
  24. data/example/app/assets/config/manifest.js +3 -0
  25. data/example/app/assets/images/.keep +0 -0
  26. data/example/app/assets/javascripts/application.js +15 -0
  27. data/example/app/assets/javascripts/cable.js +13 -0
  28. data/example/app/assets/javascripts/channels/.keep +0 -0
  29. data/example/app/assets/stylesheets/application.css +15 -0
  30. data/example/app/channels/application_cable/channel.rb +4 -0
  31. data/example/app/channels/application_cable/connection.rb +4 -0
  32. data/example/app/controllers/application_controller.rb +8 -0
  33. data/example/app/controllers/concerns/.keep +0 -0
  34. data/example/app/helpers/application_helper.rb +2 -0
  35. data/example/app/jobs/application_job.rb +2 -0
  36. data/example/app/mailers/application_mailer.rb +4 -0
  37. data/example/app/models/application_record.rb +3 -0
  38. data/example/app/models/concerns/.keep +0 -0
  39. data/example/app/views/layouts/application.html.erb +14 -0
  40. data/example/app/views/layouts/mailer.html.erb +13 -0
  41. data/example/app/views/layouts/mailer.text.erb +1 -0
  42. data/example/bin/bundle +3 -0
  43. data/example/bin/rails +9 -0
  44. data/example/bin/rake +9 -0
  45. data/example/bin/setup +38 -0
  46. data/example/bin/spring +17 -0
  47. data/example/bin/update +29 -0
  48. data/example/bin/yarn +11 -0
  49. data/example/config/application.rb +18 -0
  50. data/example/config/boot.rb +3 -0
  51. data/example/config/cable.yml +10 -0
  52. data/example/config/database.yml +7 -0
  53. data/example/config/environment.rb +5 -0
  54. data/example/config/environments/development.rb +54 -0
  55. data/example/config/environments/production.rb +91 -0
  56. data/example/config/environments/test.rb +42 -0
  57. data/example/config/initializers/application_controller_renderer.rb +8 -0
  58. data/example/config/initializers/assets.rb +14 -0
  59. data/example/config/initializers/backtrace_silencers.rb +7 -0
  60. data/example/config/initializers/cookies_serializer.rb +5 -0
  61. data/example/config/initializers/filter_parameter_logging.rb +4 -0
  62. data/example/config/initializers/inflections.rb +16 -0
  63. data/example/config/initializers/mime_types.rb +4 -0
  64. data/example/config/initializers/wrap_parameters.rb +14 -0
  65. data/example/config/locales/en.yml +33 -0
  66. data/example/config/puma.rb +56 -0
  67. data/example/config/routes.rb +4 -0
  68. data/example/config/secrets.yml +33 -0
  69. data/example/config/spring.rb +6 -0
  70. data/example/config.ru +5 -0
  71. data/example/db/seeds.rb +7 -0
  72. data/example/lib/assets/.keep +0 -0
  73. data/example/lib/tasks/.keep +0 -0
  74. data/example/log/.keep +0 -0
  75. data/example/package.json +5 -0
  76. data/example/public/404.html +67 -0
  77. data/example/public/422.html +67 -0
  78. data/example/public/500.html +66 -0
  79. data/example/public/apple-touch-icon-precomposed.png +0 -0
  80. data/example/public/apple-touch-icon.png +0 -0
  81. data/example/public/favicon.ico +0 -0
  82. data/example/public/robots.txt +1 -0
  83. data/example/test/application_system_test_case.rb +5 -0
  84. data/example/test/controllers/.keep +0 -0
  85. data/example/test/fixtures/.keep +0 -0
  86. data/example/test/fixtures/files/.keep +0 -0
  87. data/example/test/helpers/.keep +0 -0
  88. data/example/test/integration/.keep +0 -0
  89. data/example/test/mailers/.keep +0 -0
  90. data/example/test/models/.keep +0 -0
  91. data/example/test/system/.keep +0 -0
  92. data/example/test/test_helper.rb +10 -0
  93. data/example/tmp/.keep +0 -0
  94. data/example/vendor/.keep +0 -0
  95. data/lib/munin_passenger/collect.rb +71 -0
  96. data/lib/munin_passenger/graphs.rb +213 -0
  97. data/lib/munin_passenger/version.rb +3 -0
  98. data/lib/munin_passenger.rb +2 -0
  99. data/munin_passenger.gemspec +34 -0
  100. data/scripts/capture-passenger-status.sh +3 -0
  101. data/scripts/load-test.sh +3 -0
  102. data/scripts/make-bins.rb +38 -0
  103. data/spec/mock/passenger-status +3 -0
  104. data/spec/mock/passenger-status.xml +2 -0
  105. data/spec/munin_passenger_spec.rb +139 -0
  106. data/spec/spec_helper.rb +15 -0
  107. metadata +255 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: cd4851916ebee9fa861409169457d111a73ffd2ba8601f94baac9656be2df3d5
4
+ data.tar.gz: 5d65009a959ae947020602d57a84d97e7464f604cc0be371285a99177f357dd1
5
+ SHA512:
6
+ metadata.gz: 699faab7cf106fbd9243e0ab513ba43a7f78479f3dfcdedefab1f88364aa863eb360eaeb2d0dbc6f12d5521178a4463b6113c61642919e6af2941146cc7334fb
7
+ data.tar.gz: 6467c039f53a061b6d4324c2b79b09eac0a32c8678f0933d31a05c130690bb9ede1852d90b3011a8f28e2c7e2b3ab1d62df4ef778041c07044b983a6e165704c
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.vagrant
2
+ *.log
3
+ /coverage
4
+ /rdoc
5
+ /doc
6
+ /pkg
7
+ /tmp
8
+ /README.html
9
+ /.ruby-version
10
+ /.ruby-gemset
11
+ /Gemfile.lock
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,16 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9
4
+ - 2.0
5
+ - 2.1
6
+ - 2.2
7
+ - 2.3
8
+ - 2.4
9
+ - 2.5
10
+ - jruby
11
+
12
+ matrix:
13
+ include:
14
+ # Only run rubocop on the latest Ruby:
15
+ - rvm: 2.5
16
+ env: SUITE="rubocop"
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2018 Paul A. Jungwirth
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,69 @@
1
+ This is a collection of [munin](http://munin-monitoring.org/) plugins for [Phusion Passenger](https://www.phusionpassenger.com/).
2
+
3
+ They give you graphs for things like:
4
+
5
+ - How many requests are waiting in the queue for a worker.
6
+ - How many requests each worker is currently handling.
7
+ - How much RAM each Passenger worker is using.
8
+ - How much CPU each Passenger worker is using.
9
+ - How many cumulative requests have been processed by each worker.
10
+ - How long each worker has been alive.
11
+ - How long each worker has been idle.
12
+
13
+ The plugins are written in Ruby and packaged as a gem,
14
+ because if you're running Passenger, presumably you are comfortable with Ruby and its ecosystem.
15
+ To install them, first install the gem, then add symlinks to your munin `plugins` directory as desired.
16
+ You can run this to symlink all the plugins automatically:
17
+
18
+ ```
19
+ munin_passenger-install /etc/munin/plugins
20
+ ```
21
+
22
+ (Actually `/etc/munin/plugins` if the default, so you can leave it off if you like.)
23
+
24
+ You should also configure the plugins by adding a file at `/etc/munin/plugin-conf.d/passenger` with these contents:
25
+
26
+ ```
27
+ [passenger_*]
28
+ user root
29
+ env.PASSENGER_ROOT /usr/sbin
30
+ ```
31
+
32
+ The `user root` line is necessary because otherwise `passenger-status` will refuse to run.
33
+ The second line should be whatever directory contains `passenger-status`.
34
+
35
+ Once installed, you will get graphs for most of the things `passenger-status` can tell you.
36
+
37
+ # TODO
38
+
39
+ - Distinguish between different groups/supergroups, perhaps by having plugins like `passenger_ram_` etc.
40
+ so you can get them in separate graphs.
41
+
42
+ - Suppress the "helpful" `passenger-status` message about `xmllint` so it doesn't clutter the munin log,
43
+ without suppressing all the rest of stderr.
44
+
45
+ # Development
46
+
47
+ You can run tests by saying `rspec spec`.
48
+
49
+ You can build a local copy of the gem by saying `rake build`, and install it with `rake install`.
50
+
51
+ After running `rake build`
52
+ you can run `vagrant up` to build a machine running Passenger against a dummy Rails app,
53
+ with this munin plugin included.
54
+ It will install the most recent `*.gem` file in `pkg`.
55
+ Then you can do to http://192.168.60.10:7778/ to see the graphs.
56
+
57
+ You can run `scripts/make-bins.rb` to regenerate the files in `bin`.
58
+
59
+ You can run `scripts/load-test.sh` to simulate load on the app.
60
+ While that is running, do `scripts/capture-passenger-status.sh` to get some realish XML you can use as a test fixture or example.
61
+
62
+ If you have it installed, you can use `xmllint --format -` and `xmllint --noblanks -` to make Passenger's XML readable vs compact.
63
+
64
+ You can release a new version of the gem with `rake release`.
65
+
66
+ # Copyright
67
+
68
+ Copyright (c) 2018 by Paul A. Jungwirth.
69
+ See LICENSE.txt for further details.
data/Rakefile ADDED
@@ -0,0 +1,19 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+ require 'rubocop/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+ RuboCop::RakeTask.new
7
+
8
+ task readme: [] do
9
+ `markdown README.md >README.html`
10
+ end
11
+
12
+ if ENV['CI'].nil?
13
+ task default: %w[spec rubocop]
14
+ else
15
+ case ENV['SUITE']
16
+ when 'rubocop' then task default: :rubocop
17
+ else task default: :spec
18
+ end
19
+ end
data/Vagrantfile ADDED
@@ -0,0 +1,172 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant.configure("2") do |config|
5
+ # All Vagrant configuration is done here. The most common configuration
6
+ # options are documented and commented below. For a complete reference,
7
+ # please see the online documentation at vagrantup.com.
8
+
9
+ # Every Vagrant virtual environment requires a box to build off of.
10
+ config.vm.box = "ubuntu/xenial64"
11
+ # config.vm.box_version = '0.1.0'
12
+
13
+ config.ssh.forward_agent = true
14
+ config.omnibus.chef_version = '12.18.31'
15
+
16
+ config.vm.define "app" do |host|
17
+ host.vm.network :private_network, ip: "192.168.60.10"
18
+ host.vm.provider :virtualbox do |vb|
19
+ vb.name = "munin_with_passenger"
20
+ vb.customize ["modifyvm", :id, "--memory", "1024"]
21
+ end
22
+ end
23
+
24
+ config.vm.provision :shell, inline: <<-EOS
25
+ set -eu
26
+
27
+ sudo apt-get update
28
+
29
+ # nginx
30
+ sudo apt-get install -y nginx
31
+
32
+ # passenger
33
+ sudo apt-get install -y dirmngr gnupg
34
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
35
+ sudo apt-get install -y apt-transport-https ca-certificates
36
+ sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger xenial main > /etc/apt/sources.list.d/passenger.list'
37
+ sudo apt-get update
38
+ sudo apt-get install -y nginx-extras passenger
39
+ sudo tee /etc/nginx/nginx.conf <<EOF
40
+ user www-data;
41
+ worker_processes 2;
42
+ pid /run/nginx.pid;
43
+
44
+ events {
45
+ worker_connections 768;
46
+ }
47
+
48
+ http {
49
+ sendfile on;
50
+ tcp_nopush on;
51
+ tcp_nodelay on;
52
+ keepalive_timeout 65;
53
+ types_hash_max_size 2048;
54
+ # server_tokens off;
55
+
56
+ # server_names_hash_bucket_size 64;
57
+ # server_name_in_redirect off;
58
+
59
+ include /etc/nginx/mime.types;
60
+ default_type application/octet-stream;
61
+
62
+ ##
63
+ # SSL Settings
64
+ ##
65
+
66
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
67
+ ssl_prefer_server_ciphers on;
68
+
69
+ ##
70
+ # Logging Settings
71
+ ##
72
+
73
+ access_log /var/log/nginx/access.log;
74
+ error_log /var/log/nginx/error.log;
75
+
76
+ ##
77
+ # Gzip Settings
78
+ ##
79
+
80
+ gzip on;
81
+ gzip_disable "msie6";
82
+
83
+ # gzip_vary on;
84
+ # gzip_proxied any;
85
+ # gzip_comp_level 6;
86
+ # gzip_buffers 16 8k;
87
+ # gzip_http_version 1.1;
88
+ # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
89
+
90
+ ##
91
+ # Phusion Passenger config
92
+ ##
93
+ # Uncomment it if you installed passenger or passenger-enterprise
94
+ ##
95
+
96
+ include /etc/nginx/passenger.conf;
97
+ passenger_max_pool_size 4;
98
+ passenger_pool_idle_time 300;
99
+ passenger_pre_start http://127.0.0.1/;
100
+ passenger_user_switching off;
101
+ passenger_default_user www-data;
102
+ passenger_default_group www-data;
103
+
104
+ limit_req_zone \\$binary_remote_addr zone=one:10m rate=20r/s;
105
+
106
+ ##
107
+ # Virtual Host Configs
108
+ ##
109
+
110
+ include /etc/nginx/conf.d/*.conf;
111
+ include /etc/nginx/sites-enabled/*;
112
+ }
113
+ EOF
114
+
115
+ sudo tee /etc/nginx/sites-available/rails <<EOF
116
+ server {
117
+ listen 80 default_server;
118
+ server_name _;
119
+
120
+ root /vagrant/example/public;
121
+ try_files \\$uri @passenger;
122
+
123
+ location @passenger {
124
+ rails_env production;
125
+ passenger_enabled on;
126
+ passenger_min_instances 4;
127
+ limit_req zone=one burst=5;
128
+ }
129
+ }
130
+ EOF
131
+ sudo rm -f /etc/nginx/sites-enabled/default
132
+ sudo ln -s /etc/nginx/sites-available/rails /etc/nginx/sites-enabled/
133
+
134
+ # munin
135
+ sudo add-apt-repository -y ppa:hawq/munin
136
+ sudo apt-get update
137
+ sudo apt-get install -y munin munin-node
138
+ sudo tee /etc/nginx/sites-available/munin <<EOF
139
+ server {
140
+ listen 7778;
141
+ root /var/cache/munin/www;
142
+ }
143
+ EOF
144
+ sudo ln -s /etc/nginx/sites-available/munin /etc/nginx/sites-enabled/
145
+
146
+ # postgres
147
+ sudo apt-get install -y postgresql postgresql-contrib
148
+ sudo su - postgres -c "psql -c \\"CREATE USER rails WITH PASSWORD 'rails';\\""
149
+ sudo su - postgres -c "psql -c \\"CREATE DATABASE rails WITH OWNER rails;\\""
150
+
151
+ # rails
152
+ cd /vagrant/example
153
+ sudo gem install bundler
154
+ sudo apt-get install -y build-essential patch ruby-dev zlib1g-dev liblzma-dev libpq-dev nodejs
155
+ sudo bundle install --system
156
+ RAILS_ENV=production bundle exec rake db:migrate
157
+
158
+ # my plugin
159
+ the_gem=`ls -t /vagrant/pkg/*.gem | head -1`
160
+ if [ ! -z "$the_gem" ]; then
161
+ sudo gem install /vagrant/pkg/`ls /vagrant/pkg/ | head -1`
162
+ fi
163
+ sudo munin_passenger-install
164
+ sudo tee /etc/munin/plugin-conf.d/passenger <<EOF
165
+ [passenger_*]
166
+ user root
167
+ env.PASSENGER_ROOT /usr/sbin
168
+ EOF
169
+ sudo service munin-node restart
170
+ sudo service nginx restart
171
+ EOS
172
+ end
@@ -0,0 +1,10 @@
1
+ #/usr/bin/env ruby
2
+
3
+ # This has to be a Ruby script, not a shell script!
4
+ # See https://stackoverflow.com/questions/23701726/deploy-a-shell-script-with-ruby-gem-and-install-in-bin-directory
5
+
6
+ bin_dir = File.expand_path(File.dirname(__FILE__))
7
+ shell_script_path = File.join(bin_dir, 'munin_passenger-install.sh')
8
+
9
+ # Have to make sure it runs bash, not dash or sh:
10
+ system("bash", shell_script_path, *ARGV)
@@ -0,0 +1,13 @@
1
+ #/bin/bash
2
+
3
+ set -eu
4
+
5
+ dest="${1:-/etc/munin/plugins/}"
6
+ mydir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
7
+
8
+ ln -fs "${mydir}/passenger_queue" "$dest"
9
+ ln -fs "${mydir}/passenger_ram" "$dest"
10
+ ln -fs "${mydir}/passenger_cpu" "$dest"
11
+ ln -fs "${mydir}/passenger_processed" "$dest"
12
+ ln -fs "${mydir}/passenger_uptime" "$dest"
13
+ ln -fs "${mydir}/passenger_last_used" "$dest"
data/bin/passenger_cpu ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'munin_passenger'
4
+
5
+ if ARGV[0] == 'config'
6
+ puts MuninPassenger::Graphs.cpu_config
7
+ else
8
+ puts MuninPassenger::Graphs.cpu_values
9
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'munin_passenger'
4
+
5
+ if ARGV[0] == 'config'
6
+ puts MuninPassenger::Graphs.last_used_config
7
+ else
8
+ puts MuninPassenger::Graphs.last_used_values
9
+ end
@@ -0,0 +1,13 @@
1
+ #/bin/bash
2
+
3
+ set -eu
4
+
5
+ dest="${1:-/etc/munin/plugins/}"
6
+ mydir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
7
+
8
+ ln -s "${mydir}/passenger_queue" "$dest"
9
+ ln -s "${mydir}/passenger_ram" "$dest"
10
+ ln -s "${mydir}/passenger_cpu" "$dest"
11
+ ln -s "${mydir}/passenger_processed" "$dest"
12
+ ln -s "${mydir}/passenger_uptime" "$dest"
13
+ ln -s "${mydir}/passenger_last_used" "$dest"
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'munin_passenger'
4
+
5
+ if ARGV[0] == 'config'
6
+ puts MuninPassenger::Graphs.processed_config
7
+ else
8
+ puts MuninPassenger::Graphs.processed_values
9
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'munin_passenger'
4
+
5
+ if ARGV[0] == 'config'
6
+ puts MuninPassenger::Graphs.queue_config
7
+ else
8
+ puts MuninPassenger::Graphs.queue_values
9
+ end
data/bin/passenger_ram ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'munin_passenger'
4
+
5
+ if ARGV[0] == 'config'
6
+ puts MuninPassenger::Graphs.ram_config
7
+ else
8
+ puts MuninPassenger::Graphs.ram_values
9
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'munin_passenger'
4
+
5
+ if ARGV[0] == 'config'
6
+ puts MuninPassenger::Graphs.uptime_config
7
+ else
8
+ puts MuninPassenger::Graphs.uptime_values
9
+ end
@@ -0,0 +1,23 @@
1
+ # See https://help.github.com/articles/ignoring-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
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*
16
+ /tmp/*
17
+ !/log/.keep
18
+ !/tmp/.keep
19
+
20
+ /node_modules
21
+ /yarn-error.log
22
+
23
+ .byebug_history
data/example/Gemfile ADDED
@@ -0,0 +1,45 @@
1
+ source 'https://rubygems.org'
2
+
3
+ git_source(:github) do |repo_name|
4
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5
+ "https://github.com/#{repo_name}.git"
6
+ end
7
+
8
+
9
+ gem 'rails', '~> 5.1.6'
10
+ gem 'pg'
11
+ gem 'puma', '~> 3.7'
12
+ gem 'sass-rails', '~> 5.0'
13
+ gem 'uglifier', '>= 1.3.0'
14
+ # See https://github.com/rails/execjs#readme for more supported runtimes
15
+ gem 'therubyracer', platforms: :ruby
16
+
17
+ gem 'turbolinks', '~> 5'
18
+ gem 'jbuilder', '~> 2.5'
19
+ # Use Redis adapter to run Action Cable in production
20
+ # gem 'redis', '~> 4.0'
21
+ # Use ActiveModel has_secure_password
22
+ # gem 'bcrypt', '~> 3.1.7'
23
+
24
+ # Use Capistrano for deployment
25
+ # gem 'capistrano-rails', group: :development
26
+
27
+ group :development, :test do
28
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
29
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
30
+ # Adds support for Capybara system testing and selenium driver
31
+ gem 'capybara', '~> 2.13'
32
+ gem 'selenium-webdriver'
33
+ end
34
+
35
+ group :development do
36
+ # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
37
+ gem 'web-console', '>= 3.3.0'
38
+ gem 'listen', '>= 3.0.5', '< 3.2'
39
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
40
+ gem 'spring'
41
+ gem 'spring-watcher-listen', '~> 2.0.0'
42
+ end
43
+
44
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
45
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]