Commit e993fbb43cb4b7b79eb7311d63c82c17854656d9
1 parent
15e1ea84
Exists in
colab
and in
4 other branches
Rails 4.1.0
Showing
25 changed files
with
202 additions
and
111 deletions
Show diff stats
Gemfile
1 | source 'https://rubygems.org' | 1 | source 'https://rubygems.org' |
2 | 2 | ||
3 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | 3 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' |
4 | -gem 'rails', '4.0.4' | 4 | +gem 'rails', '4.1.0' |
5 | 5 | ||
6 | # Use sqlite3 as the database for Active Record | 6 | # Use sqlite3 as the database for Active Record |
7 | gem 'sqlite3' | 7 | gem 'sqlite3' |
@@ -54,20 +54,21 @@ gem 'colorpicker', '~> 0.0.5' | @@ -54,20 +54,21 @@ gem 'colorpicker', '~> 0.0.5' | ||
54 | # Memcached | 54 | # Memcached |
55 | gem "dalli", "~> 2.7.0" | 55 | gem "dalli", "~> 2.7.0" |
56 | 56 | ||
57 | -group :doc do | ||
58 | - # bundle exec rake doc:rails generates the API under doc/api. | ||
59 | - gem 'sdoc', require: false | ||
60 | -end | 57 | +# bundle exec rake doc:rails generates the API under doc/api. |
58 | +gem 'sdoc', require: false | ||
59 | + | ||
60 | +# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring | ||
61 | +gem 'spring', group: :development | ||
61 | 62 | ||
62 | group :test do | 63 | group :test do |
63 | # Easier test writing | 64 | # Easier test writing |
64 | - gem "shoulda-matchers" | 65 | + gem "shoulda-matchers", require: false # not requiring is necessary to avoid warnings from minitest 5, with version 2.6 this might get fixed |
65 | 66 | ||
66 | # Test coverage | 67 | # Test coverage |
67 | - gem 'simplecov', :require => false | 68 | + gem 'simplecov', require: false |
68 | 69 | ||
69 | # Simple Mocks | 70 | # Simple Mocks |
70 | - gem 'mocha', :require => 'mocha/api' | 71 | + gem 'mocha', require: 'mocha/api' |
71 | end | 72 | end |
72 | 73 | ||
73 | group :development, :test do | 74 | group :development, :test do |
@@ -107,8 +108,5 @@ end | @@ -107,8 +108,5 @@ end | ||
107 | # Use unicorn as the app server | 108 | # Use unicorn as the app server |
108 | # gem 'unicorn' | 109 | # gem 'unicorn' |
109 | 110 | ||
110 | -# Use Capistrano for deployment | ||
111 | -# gem 'capistrano', group: :development | ||
112 | - | ||
113 | # Use debugger | 111 | # Use debugger |
114 | # gem 'debugger', group: [:development, :test] | 112 | # gem 'debugger', group: [:development, :test] |
Gemfile.lock
1 | GEM | 1 | GEM |
2 | remote: https://rubygems.org/ | 2 | remote: https://rubygems.org/ |
3 | specs: | 3 | specs: |
4 | - actionmailer (4.0.4) | ||
5 | - actionpack (= 4.0.4) | 4 | + actionmailer (4.1.0) |
5 | + actionpack (= 4.1.0) | ||
6 | + actionview (= 4.1.0) | ||
6 | mail (~> 2.5.4) | 7 | mail (~> 2.5.4) |
7 | - actionpack (4.0.4) | ||
8 | - activesupport (= 4.0.4) | ||
9 | - builder (~> 3.1.0) | ||
10 | - erubis (~> 2.7.0) | 8 | + actionpack (4.1.0) |
9 | + actionview (= 4.1.0) | ||
10 | + activesupport (= 4.1.0) | ||
11 | rack (~> 1.5.2) | 11 | rack (~> 1.5.2) |
12 | rack-test (~> 0.6.2) | 12 | rack-test (~> 0.6.2) |
13 | - activemodel (4.0.4) | ||
14 | - activesupport (= 4.0.4) | ||
15 | - builder (~> 3.1.0) | ||
16 | - activerecord (4.0.4) | ||
17 | - activemodel (= 4.0.4) | ||
18 | - activerecord-deprecated_finders (~> 1.0.2) | ||
19 | - activesupport (= 4.0.4) | ||
20 | - arel (~> 4.0.0) | ||
21 | - activerecord-deprecated_finders (1.0.3) | ||
22 | - activesupport (4.0.4) | 13 | + actionview (4.1.0) |
14 | + activesupport (= 4.1.0) | ||
15 | + builder (~> 3.1) | ||
16 | + erubis (~> 2.7.0) | ||
17 | + activemodel (4.1.0) | ||
18 | + activesupport (= 4.1.0) | ||
19 | + builder (~> 3.1) | ||
20 | + activerecord (4.1.0) | ||
21 | + activemodel (= 4.1.0) | ||
22 | + activesupport (= 4.1.0) | ||
23 | + arel (~> 5.0.0) | ||
24 | + activesupport (4.1.0) | ||
23 | i18n (~> 0.6, >= 0.6.9) | 25 | i18n (~> 0.6, >= 0.6.9) |
24 | - minitest (~> 4.2) | ||
25 | - multi_json (~> 1.3) | 26 | + json (~> 1.7, >= 1.7.7) |
27 | + minitest (~> 5.1) | ||
26 | thread_safe (~> 0.1) | 28 | thread_safe (~> 0.1) |
27 | - tzinfo (~> 0.3.37) | ||
28 | - arel (4.0.2) | 29 | + tzinfo (~> 1.1) |
30 | + arel (5.0.0) | ||
29 | bcrypt (3.1.7) | 31 | bcrypt (3.1.7) |
30 | better_errors (1.1.0) | 32 | better_errors (1.1.0) |
31 | coderay (>= 1.0.0) | 33 | coderay (>= 1.0.0) |
32 | erubis (>= 2.6.6) | 34 | erubis (>= 2.6.6) |
33 | binding_of_caller (0.7.2) | 35 | binding_of_caller (0.7.2) |
34 | debug_inspector (>= 0.0.1) | 36 | debug_inspector (>= 0.0.1) |
35 | - builder (3.1.4) | 37 | + builder (3.2.2) |
36 | capistrano (3.1.0) | 38 | capistrano (3.1.0) |
37 | i18n | 39 | i18n |
38 | rake (>= 10.0.0) | 40 | rake (>= 10.0.0) |
@@ -133,7 +135,7 @@ GEM | @@ -133,7 +135,7 @@ GEM | ||
133 | metaclass (0.0.4) | 135 | metaclass (0.0.4) |
134 | mime-types (1.25.1) | 136 | mime-types (1.25.1) |
135 | mini_portile (0.5.3) | 137 | mini_portile (0.5.3) |
136 | - minitest (4.7.5) | 138 | + minitest (5.3.2) |
137 | mocha (1.0.0) | 139 | mocha (1.0.0) |
138 | metaclass (~> 0.0.1) | 140 | metaclass (~> 0.0.1) |
139 | modernizr-rails (2.7.1) | 141 | modernizr-rails (2.7.1) |
@@ -156,17 +158,19 @@ GEM | @@ -156,17 +158,19 @@ GEM | ||
156 | rack (1.5.2) | 158 | rack (1.5.2) |
157 | rack-test (0.6.2) | 159 | rack-test (0.6.2) |
158 | rack (>= 1.0) | 160 | rack (>= 1.0) |
159 | - rails (4.0.4) | ||
160 | - actionmailer (= 4.0.4) | ||
161 | - actionpack (= 4.0.4) | ||
162 | - activerecord (= 4.0.4) | ||
163 | - activesupport (= 4.0.4) | 161 | + rails (4.1.0) |
162 | + actionmailer (= 4.1.0) | ||
163 | + actionpack (= 4.1.0) | ||
164 | + actionview (= 4.1.0) | ||
165 | + activemodel (= 4.1.0) | ||
166 | + activerecord (= 4.1.0) | ||
167 | + activesupport (= 4.1.0) | ||
164 | bundler (>= 1.3.0, < 2.0) | 168 | bundler (>= 1.3.0, < 2.0) |
165 | - railties (= 4.0.4) | ||
166 | - sprockets-rails (~> 2.0.0) | ||
167 | - railties (4.0.4) | ||
168 | - actionpack (= 4.0.4) | ||
169 | - activesupport (= 4.0.4) | 169 | + railties (= 4.1.0) |
170 | + sprockets-rails (~> 2.0) | ||
171 | + railties (4.1.0) | ||
172 | + actionpack (= 4.1.0) | ||
173 | + activesupport (= 4.1.0) | ||
170 | rake (>= 0.8.7) | 174 | rake (>= 0.8.7) |
171 | thor (>= 0.18.1, < 2.0) | 175 | thor (>= 0.18.1, < 2.0) |
172 | rake (10.3.1) | 176 | rake (10.3.1) |
@@ -203,12 +207,13 @@ GEM | @@ -203,12 +207,13 @@ GEM | ||
203 | multi_json | 207 | multi_json |
204 | simplecov-html (~> 0.8.0) | 208 | simplecov-html (~> 0.8.0) |
205 | simplecov-html (0.8.0) | 209 | simplecov-html (0.8.0) |
210 | + spring (1.1.2) | ||
206 | sprockets (2.11.0) | 211 | sprockets (2.11.0) |
207 | hike (~> 1.2) | 212 | hike (~> 1.2) |
208 | multi_json (~> 1.0) | 213 | multi_json (~> 1.0) |
209 | rack (~> 1.0) | 214 | rack (~> 1.0) |
210 | tilt (~> 1.1, != 1.3.0) | 215 | tilt (~> 1.1, != 1.3.0) |
211 | - sprockets-rails (2.0.1) | 216 | + sprockets-rails (2.1.1) |
212 | actionpack (>= 3.0) | 217 | actionpack (>= 3.0) |
213 | activesupport (>= 3.0) | 218 | activesupport (>= 3.0) |
214 | sprockets (~> 2.8) | 219 | sprockets (~> 2.8) |
@@ -236,8 +241,8 @@ GEM | @@ -236,8 +241,8 @@ GEM | ||
236 | execjs | 241 | execjs |
237 | rails (>= 3.1) | 242 | rails (>= 3.1) |
238 | railties (>= 3.1) | 243 | railties (>= 3.1) |
239 | - tzinfo (0.3.39) | ||
240 | - uglifier (2.5.0) | 244 | + tzinfo (1.1.0) |
245 | + thread_safe (~> 0.1) | ||
241 | execjs (>= 0.3.0) | 246 | execjs (>= 0.3.0) |
242 | json (>= 1.8.0) | 247 | json (>= 1.8.0) |
243 | warden (1.2.3) | 248 | warden (1.2.3) |
@@ -274,12 +279,13 @@ DEPENDENCIES | @@ -274,12 +279,13 @@ DEPENDENCIES | ||
274 | modernizr-rails | 279 | modernizr-rails |
275 | pg (~> 0.17.0) | 280 | pg (~> 0.17.0) |
276 | poltergeist (~> 1.5.0) | 281 | poltergeist (~> 1.5.0) |
277 | - rails (= 4.0.4) | 282 | + rails (= 4.1.0) |
278 | rspec-rails | 283 | rspec-rails |
279 | sass-rails (~> 4.0.1) | 284 | sass-rails (~> 4.0.1) |
280 | sdoc | 285 | sdoc |
281 | shoulda-matchers | 286 | shoulda-matchers |
282 | simplecov | 287 | simplecov |
288 | + spring | ||
283 | sqlite3 | 289 | sqlite3 |
284 | therubyracer | 290 | therubyracer |
285 | turbolinks | 291 | turbolinks |
Rakefile
app/assets/stylesheets/application.css
@@ -5,13 +5,15 @@ | @@ -5,13 +5,15 @@ | ||
5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, | 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, |
6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. | 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. |
7 | * | 7 | * |
8 | - * You're free to add application-wide styles to this file and they'll appear at the top of the | ||
9 | - * compiled file, but it's generally better to create a new file per style scope. | 8 | + * You're free to add application-wide styles to this file and they'll appear at the bottom of the |
9 | + * compiled file so the styles you add here take precedence over styles defined in any styles | ||
10 | + * defined in the other CSS/SCSS files in this directory. It is generally better to create a new | ||
11 | + * file per style scope. | ||
10 | * | 12 | * |
11 | *= boilerplate/main.css | 13 | *= boilerplate/main.css |
12 | *= boilerplate/normalize.css | 14 | *= boilerplate/normalize.css |
13 | *= require jquery.ui.all | 15 | *= require jquery.ui.all |
14 | - *= require_self | ||
15 | - *= require_tree . | ||
16 | *= require colorpicker | 16 | *= require colorpicker |
17 | + *= require_tree . | ||
18 | + *= require_self | ||
17 | */ | 19 | */ |
app/views/layouts/application.html.erb
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script> | 16 | <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script> |
17 | <![endif]--> | 17 | <![endif]--> |
18 | 18 | ||
19 | - <%= stylesheet_link_tag "application", :media => "all" %> | 19 | + <%= stylesheet_link_tag 'application', :media => 'all' %> |
20 | 20 | ||
21 | <!-- For third-generation iPad with high-resolution Retina display: --> | 21 | <!-- For third-generation iPad with high-resolution Retina display: --> |
22 | <!-- Size should be 144 x 144 pixels --> | 22 | <!-- Size should be 144 x 144 pixels --> |
@@ -101,8 +101,8 @@ | @@ -101,8 +101,8 @@ | ||
101 | </div><!--/row--> | 101 | </div><!--/row--> |
102 | 102 | ||
103 | <footer> | 103 | <footer> |
104 | - <div class="footer-left">© <%= link_to "The Mezuro Team", "/humans.txt" %> 2013-2014</div> | ||
105 | - <div class="footer-right"><%= link_to(image_tag('agplv3-88x31.png'), 'http://www.gnu.org/licenses/agpl-3.0-standalone.html') %> <%= link_to image_tag('fork-me.png'), "https://github.com/mezuro/mezuro" %> <%= image_tag 'usp-cloud-nuvem-logo.png' %></div> | 104 | + <div class="footer-left">© <%= link_to 'The Mezuro Team', '/humans.txt' %> 2013-2014</div> |
105 | + <div class="footer-right"><%= link_to(image_tag('agplv3-88x31.png'), 'http://www.gnu.org/licenses/agpl-3.0-standalone.html') %> <%= link_to image_tag('fork-me.png'), 'https://github.com/mezuro/mezuro' %> <%= image_tag 'usp-cloud-nuvem-logo.png' %></div> | ||
106 | </footer> | 106 | </footer> |
107 | 107 | ||
108 | </div> <!-- /container --> | 108 | </div> <!-- /container --> |
bin/rails
1 | #!/usr/bin/env ruby | 1 | #!/usr/bin/env ruby |
2 | +begin | ||
3 | + load File.expand_path("../spring", __FILE__) | ||
4 | +rescue LoadError | ||
5 | +end | ||
2 | APP_PATH = File.expand_path('../../config/application', __FILE__) | 6 | APP_PATH = File.expand_path('../../config/application', __FILE__) |
3 | require_relative '../config/boot' | 7 | require_relative '../config/boot' |
4 | require 'rails/commands' | 8 | require 'rails/commands' |
bin/rake
@@ -0,0 +1,18 @@ | @@ -0,0 +1,18 @@ | ||
1 | +#!/usr/bin/env ruby | ||
2 | + | ||
3 | +# This file loads spring without using Bundler, in order to be fast | ||
4 | +# It gets overwritten when you run the `spring binstub` command | ||
5 | + | ||
6 | +unless defined?(Spring) | ||
7 | + require "rubygems" | ||
8 | + require "bundler" | ||
9 | + | ||
10 | + if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m) | ||
11 | + ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) | ||
12 | + ENV["GEM_HOME"] = "" | ||
13 | + Gem.paths = ENV | ||
14 | + | ||
15 | + gem "spring", match[1] | ||
16 | + require "spring/binstub" | ||
17 | + end | ||
18 | +end |
config/application.rb
@@ -4,7 +4,7 @@ require 'rails/all' | @@ -4,7 +4,7 @@ require 'rails/all' | ||
4 | 4 | ||
5 | # Require the gems listed in Gemfile, including any gems | 5 | # Require the gems listed in Gemfile, including any gems |
6 | # you've limited to :test, :development, or :production. | 6 | # you've limited to :test, :development, or :production. |
7 | -Bundler.require(:default, Rails.env) | 7 | +Bundler.require(*Rails.groups) |
8 | 8 | ||
9 | module Mezuro | 9 | module Mezuro |
10 | class Application < Rails::Application | 10 | class Application < Rails::Application |
config/boot.rb
1 | # Set up gems listed in the Gemfile. | 1 | # Set up gems listed in the Gemfile. |
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) | 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) |
3 | 3 | ||
4 | -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) | 4 | +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) |
config/environment.rb
config/environments/development.rb
1 | -Mezuro::Application.configure do | 1 | +Rails.application.configure do |
2 | # Settings specified here will take precedence over those in config/application.rb | 2 | # Settings specified here will take precedence over those in config/application.rb |
3 | 3 | ||
4 | # In the development environment your application's code is reloaded on | 4 | # In the development environment your application's code is reloaded on |
@@ -19,7 +19,7 @@ Mezuro::Application.configure do | @@ -19,7 +19,7 @@ Mezuro::Application.configure do | ||
19 | # Print deprecation notices to the Rails logger | 19 | # Print deprecation notices to the Rails logger |
20 | config.active_support.deprecation = :log | 20 | config.active_support.deprecation = :log |
21 | 21 | ||
22 | - # Raise an error on page load if there are pending migrations | 22 | + # Raise an error on page load if there are pending migrations |
23 | config.active_record.migration_error = :page_load | 23 | config.active_record.migration_error = :page_load |
24 | 24 | ||
25 | # Debug mode disables concatenation and preprocessing of assets. | 25 | # Debug mode disables concatenation and preprocessing of assets. |
@@ -32,4 +32,12 @@ Mezuro::Application.configure do | @@ -32,4 +32,12 @@ Mezuro::Application.configure do | ||
32 | 32 | ||
33 | # Enables page caching | 33 | # Enables page caching |
34 | config.action_controller.perform_caching = true | 34 | config.action_controller.perform_caching = true |
35 | + | ||
36 | + # Adds additional error checking when serving assets at runtime. | ||
37 | + # Checks for improperly declared sprockets dependencies. | ||
38 | + # Raises helpful error messages. | ||
39 | + config.assets.raise_runtime_errors = true | ||
40 | + | ||
41 | + # Raises error for missing translations | ||
42 | + # config.action_view.raise_on_missing_translations = true | ||
35 | end | 43 | end |
config/environments/production.rb
1 | -Mezuro::Application.configure do | 1 | +Rails.application.configure do |
2 | # Settings specified here will take precedence over those in config/application.rb. | 2 | # Settings specified here will take precedence over those in config/application.rb. |
3 | 3 | ||
4 | # Code is not reloaded between requests. | 4 | # Code is not reloaded between requests. |
@@ -66,7 +66,7 @@ Mezuro::Application.configure do | @@ -66,7 +66,7 @@ Mezuro::Application.configure do | ||
66 | # config.action_mailer.raise_delivery_errors = false | 66 | # config.action_mailer.raise_delivery_errors = false |
67 | 67 | ||
68 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to | 68 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to |
69 | - # the I18n.default_locale when a translation can not be found). | 69 | + # the I18n.default_locale when a translation cannot be found). |
70 | config.i18n.fallbacks = true | 70 | config.i18n.fallbacks = true |
71 | 71 | ||
72 | # Send deprecation notices to registered listeners. | 72 | # Send deprecation notices to registered listeners. |
@@ -81,6 +81,9 @@ Mezuro::Application.configure do | @@ -81,6 +81,9 @@ Mezuro::Application.configure do | ||
81 | # Root URL for ActionMailer | 81 | # Root URL for ActionMailer |
82 | config.action_mailer.default_url_options = { :host => 'mezuro.org' } | 82 | config.action_mailer.default_url_options = { :host => 'mezuro.org' } |
83 | 83 | ||
84 | + # Do not dump schema after migrations. | ||
85 | + config.active_record.dump_schema_after_migration = false | ||
86 | + | ||
84 | # Kalibro URL | 87 | # Kalibro URL |
85 | KalibroGatekeeperClient.configure_with(Rails.root.join('config', 'kalibro_gatekeeper.yml')) | 88 | KalibroGatekeeperClient.configure_with(Rails.root.join('config', 'kalibro_gatekeeper.yml')) |
86 | end | 89 | end |
config/environments/test.rb
1 | -Mezuro::Application.configure do | 1 | +Rails.application.configure do |
2 | # Settings specified here will take precedence over those in config/application.rb | 2 | # Settings specified here will take precedence over those in config/application.rb |
3 | 3 | ||
4 | # The test environment is used exclusively to run your application's | 4 | # The test environment is used exclusively to run your application's |
@@ -39,4 +39,7 @@ Mezuro::Application.configure do | @@ -39,4 +39,7 @@ Mezuro::Application.configure do | ||
39 | 39 | ||
40 | # Enables page caching | 40 | # Enables page caching |
41 | config.action_controller.perform_caching = true | 41 | config.action_controller.perform_caching = true |
42 | + | ||
43 | + # Raises error for missing translations | ||
44 | + # config.action_view.raise_on_missing_translations = true | ||
42 | end | 45 | end |
config/initializers/secret_token.rb
@@ -1,12 +0,0 @@ | @@ -1,12 +0,0 @@ | ||
1 | -# Be sure to restart your server when you modify this file. | ||
2 | - | ||
3 | -# Your secret key is used for verifying the integrity of signed cookies. | ||
4 | -# If you change this key, all old signed cookies will become invalid! | ||
5 | - | ||
6 | -# Make sure the secret is at least 30 characters and all random, | ||
7 | -# no regular words or you'll be exposed to dictionary attacks. | ||
8 | -# You can use `rake secret` to generate a secure secret key. | ||
9 | - | ||
10 | -# Make sure your secret_key_base is kept private | ||
11 | -# if you're sharing your code publicly. | ||
12 | -Mezuro::Application.config.secret_key_base = '911af0f72528665828e90df909cbb42098b26a622cdc41456f89020a89c861b8f7b8c4c94924e2c791e5be6c8996453fd8ea99ab5b6c054a292b735518ef9e17' |
config/initializers/session_store.rb
config/routes.rb
@@ -0,0 +1,22 @@ | @@ -0,0 +1,22 @@ | ||
1 | +# Be sure to restart your server when you modify this file. | ||
2 | + | ||
3 | +# Your secret key is used for verifying the integrity of signed cookies. | ||
4 | +# If you change this key, all old signed cookies will become invalid! | ||
5 | + | ||
6 | +# Make sure the secret is at least 30 characters and all random, | ||
7 | +# no regular words or you'll be exposed to dictionary attacks. | ||
8 | +# You can use `rake secret` to generate a secure secret key. | ||
9 | + | ||
10 | +# Make sure the secrets in this file are kept private | ||
11 | +# if you're sharing your code publicly. | ||
12 | + | ||
13 | +development: | ||
14 | + secret_key_base: de0ecd5dc49c9135f04c7c98998af35119cbb014d420046505a344c2dc479a5ff2b28d4037c776dd0cb3c3ba512243e71c20fb1f094796ddc5fa92641e103c58 | ||
15 | + | ||
16 | +test: | ||
17 | + secret_key_base: 3dca9eabe30fd729be04dbd035fca4774072d0cf9307d1dd93630e6dc27d72edde2ff4b9b027199b446ce9978b4f14acd6b6ee112ac05bf187bb2058ec31dc12 | ||
18 | + | ||
19 | +# Do not keep production secrets in the repository, | ||
20 | +# instead read values from the environment. | ||
21 | +production: | ||
22 | + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> |
public/404.html
@@ -2,17 +2,23 @@ | @@ -2,17 +2,23 @@ | ||
2 | <html> | 2 | <html> |
3 | <head> | 3 | <head> |
4 | <title>The page you were looking for doesn't exist (404)</title> | 4 | <title>The page you were looking for doesn't exist (404)</title> |
5 | + <meta name="viewport" content="width=device-width,initial-scale=1"> | ||
5 | <style> | 6 | <style> |
6 | body { | 7 | body { |
7 | background-color: #EFEFEF; | 8 | background-color: #EFEFEF; |
8 | color: #2E2F30; | 9 | color: #2E2F30; |
9 | text-align: center; | 10 | text-align: center; |
10 | font-family: arial, sans-serif; | 11 | font-family: arial, sans-serif; |
12 | + margin: 0; | ||
11 | } | 13 | } |
12 | 14 | ||
13 | div.dialog { | 15 | div.dialog { |
14 | - width: 25em; | ||
15 | - margin: 4em auto 0 auto; | 16 | + width: 95%; |
17 | + max-width: 33em; | ||
18 | + margin: 4em auto 0; | ||
19 | + } | ||
20 | + | ||
21 | + div.dialog > div { | ||
16 | border: 1px solid #CCC; | 22 | border: 1px solid #CCC; |
17 | border-right-color: #999; | 23 | border-right-color: #999; |
18 | border-left-color: #999; | 24 | border-left-color: #999; |
@@ -21,7 +27,8 @@ | @@ -21,7 +27,8 @@ | ||
21 | border-top-left-radius: 9px; | 27 | border-top-left-radius: 9px; |
22 | border-top-right-radius: 9px; | 28 | border-top-right-radius: 9px; |
23 | background-color: white; | 29 | background-color: white; |
24 | - padding: 7px 4em 0 4em; | 30 | + padding: 7px 12% 0; |
31 | + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); | ||
25 | } | 32 | } |
26 | 33 | ||
27 | h1 { | 34 | h1 { |
@@ -30,19 +37,19 @@ | @@ -30,19 +37,19 @@ | ||
30 | line-height: 1.5em; | 37 | line-height: 1.5em; |
31 | } | 38 | } |
32 | 39 | ||
33 | - body > p { | ||
34 | - width: 33em; | ||
35 | - margin: 0 auto 1em; | ||
36 | - padding: 1em 0; | 40 | + div.dialog > p { |
41 | + margin: 0 0 1em; | ||
42 | + padding: 1em; | ||
37 | background-color: #F7F7F7; | 43 | background-color: #F7F7F7; |
38 | border: 1px solid #CCC; | 44 | border: 1px solid #CCC; |
39 | border-right-color: #999; | 45 | border-right-color: #999; |
46 | + border-left-color: #999; | ||
40 | border-bottom-color: #999; | 47 | border-bottom-color: #999; |
41 | border-bottom-left-radius: 4px; | 48 | border-bottom-left-radius: 4px; |
42 | border-bottom-right-radius: 4px; | 49 | border-bottom-right-radius: 4px; |
43 | border-top-color: #DADADA; | 50 | border-top-color: #DADADA; |
44 | color: #666; | 51 | color: #666; |
45 | - box-shadow:0 3px 8px rgba(50, 50, 50, 0.17); | 52 | + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); |
46 | } | 53 | } |
47 | </style> | 54 | </style> |
48 | </head> | 55 | </head> |
@@ -50,9 +57,11 @@ | @@ -50,9 +57,11 @@ | ||
50 | <body> | 57 | <body> |
51 | <!-- This file lives in public/404.html --> | 58 | <!-- This file lives in public/404.html --> |
52 | <div class="dialog"> | 59 | <div class="dialog"> |
53 | - <h1>The page you were looking for doesn't exist.</h1> | ||
54 | - <p>You may have mistyped the address or the page may have moved.</p> | 60 | + <div> |
61 | + <h1>The page you were looking for doesn't exist.</h1> | ||
62 | + <p>You may have mistyped the address or the page may have moved.</p> | ||
63 | + </div> | ||
64 | + <p>If you are the application owner check the logs for more information.</p> | ||
55 | </div> | 65 | </div> |
56 | - <p>If you are the application owner check the logs for more information.</p> | ||
57 | </body> | 66 | </body> |
58 | </html> | 67 | </html> |
public/422.html
@@ -2,17 +2,23 @@ | @@ -2,17 +2,23 @@ | ||
2 | <html> | 2 | <html> |
3 | <head> | 3 | <head> |
4 | <title>The change you wanted was rejected (422)</title> | 4 | <title>The change you wanted was rejected (422)</title> |
5 | + <meta name="viewport" content="width=device-width,initial-scale=1"> | ||
5 | <style> | 6 | <style> |
6 | body { | 7 | body { |
7 | background-color: #EFEFEF; | 8 | background-color: #EFEFEF; |
8 | color: #2E2F30; | 9 | color: #2E2F30; |
9 | text-align: center; | 10 | text-align: center; |
10 | font-family: arial, sans-serif; | 11 | font-family: arial, sans-serif; |
12 | + margin: 0; | ||
11 | } | 13 | } |
12 | 14 | ||
13 | div.dialog { | 15 | div.dialog { |
14 | - width: 25em; | ||
15 | - margin: 4em auto 0 auto; | 16 | + width: 95%; |
17 | + max-width: 33em; | ||
18 | + margin: 4em auto 0; | ||
19 | + } | ||
20 | + | ||
21 | + div.dialog > div { | ||
16 | border: 1px solid #CCC; | 22 | border: 1px solid #CCC; |
17 | border-right-color: #999; | 23 | border-right-color: #999; |
18 | border-left-color: #999; | 24 | border-left-color: #999; |
@@ -21,7 +27,8 @@ | @@ -21,7 +27,8 @@ | ||
21 | border-top-left-radius: 9px; | 27 | border-top-left-radius: 9px; |
22 | border-top-right-radius: 9px; | 28 | border-top-right-radius: 9px; |
23 | background-color: white; | 29 | background-color: white; |
24 | - padding: 7px 4em 0 4em; | 30 | + padding: 7px 12% 0; |
31 | + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); | ||
25 | } | 32 | } |
26 | 33 | ||
27 | h1 { | 34 | h1 { |
@@ -30,19 +37,19 @@ | @@ -30,19 +37,19 @@ | ||
30 | line-height: 1.5em; | 37 | line-height: 1.5em; |
31 | } | 38 | } |
32 | 39 | ||
33 | - body > p { | ||
34 | - width: 33em; | ||
35 | - margin: 0 auto 1em; | ||
36 | - padding: 1em 0; | 40 | + div.dialog > p { |
41 | + margin: 0 0 1em; | ||
42 | + padding: 1em; | ||
37 | background-color: #F7F7F7; | 43 | background-color: #F7F7F7; |
38 | border: 1px solid #CCC; | 44 | border: 1px solid #CCC; |
39 | border-right-color: #999; | 45 | border-right-color: #999; |
46 | + border-left-color: #999; | ||
40 | border-bottom-color: #999; | 47 | border-bottom-color: #999; |
41 | border-bottom-left-radius: 4px; | 48 | border-bottom-left-radius: 4px; |
42 | border-bottom-right-radius: 4px; | 49 | border-bottom-right-radius: 4px; |
43 | border-top-color: #DADADA; | 50 | border-top-color: #DADADA; |
44 | color: #666; | 51 | color: #666; |
45 | - box-shadow:0 3px 8px rgba(50, 50, 50, 0.17); | 52 | + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); |
46 | } | 53 | } |
47 | </style> | 54 | </style> |
48 | </head> | 55 | </head> |
@@ -50,9 +57,11 @@ | @@ -50,9 +57,11 @@ | ||
50 | <body> | 57 | <body> |
51 | <!-- This file lives in public/422.html --> | 58 | <!-- This file lives in public/422.html --> |
52 | <div class="dialog"> | 59 | <div class="dialog"> |
53 | - <h1>The change you wanted was rejected.</h1> | ||
54 | - <p>Maybe you tried to change something you didn't have access to.</p> | 60 | + <div> |
61 | + <h1>The change you wanted was rejected.</h1> | ||
62 | + <p>Maybe you tried to change something you didn't have access to.</p> | ||
63 | + </div> | ||
64 | + <p>If you are the application owner check the logs for more information.</p> | ||
55 | </div> | 65 | </div> |
56 | - <p>If you are the application owner check the logs for more information.</p> | ||
57 | </body> | 66 | </body> |
58 | </html> | 67 | </html> |
public/500.html
@@ -2,17 +2,23 @@ | @@ -2,17 +2,23 @@ | ||
2 | <html> | 2 | <html> |
3 | <head> | 3 | <head> |
4 | <title>We're sorry, but something went wrong (500)</title> | 4 | <title>We're sorry, but something went wrong (500)</title> |
5 | + <meta name="viewport" content="width=device-width,initial-scale=1"> | ||
5 | <style> | 6 | <style> |
6 | body { | 7 | body { |
7 | background-color: #EFEFEF; | 8 | background-color: #EFEFEF; |
8 | color: #2E2F30; | 9 | color: #2E2F30; |
9 | text-align: center; | 10 | text-align: center; |
10 | font-family: arial, sans-serif; | 11 | font-family: arial, sans-serif; |
12 | + margin: 0; | ||
11 | } | 13 | } |
12 | 14 | ||
13 | div.dialog { | 15 | div.dialog { |
14 | - width: 25em; | ||
15 | - margin: 4em auto 0 auto; | 16 | + width: 95%; |
17 | + max-width: 33em; | ||
18 | + margin: 4em auto 0; | ||
19 | + } | ||
20 | + | ||
21 | + div.dialog > div { | ||
16 | border: 1px solid #CCC; | 22 | border: 1px solid #CCC; |
17 | border-right-color: #999; | 23 | border-right-color: #999; |
18 | border-left-color: #999; | 24 | border-left-color: #999; |
@@ -21,7 +27,8 @@ | @@ -21,7 +27,8 @@ | ||
21 | border-top-left-radius: 9px; | 27 | border-top-left-radius: 9px; |
22 | border-top-right-radius: 9px; | 28 | border-top-right-radius: 9px; |
23 | background-color: white; | 29 | background-color: white; |
24 | - padding: 7px 4em 0 4em; | 30 | + padding: 7px 12% 0; |
31 | + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); | ||
25 | } | 32 | } |
26 | 33 | ||
27 | h1 { | 34 | h1 { |
@@ -30,19 +37,19 @@ | @@ -30,19 +37,19 @@ | ||
30 | line-height: 1.5em; | 37 | line-height: 1.5em; |
31 | } | 38 | } |
32 | 39 | ||
33 | - body > p { | ||
34 | - width: 33em; | ||
35 | - margin: 0 auto 1em; | ||
36 | - padding: 1em 0; | 40 | + div.dialog > p { |
41 | + margin: 0 0 1em; | ||
42 | + padding: 1em; | ||
37 | background-color: #F7F7F7; | 43 | background-color: #F7F7F7; |
38 | border: 1px solid #CCC; | 44 | border: 1px solid #CCC; |
39 | border-right-color: #999; | 45 | border-right-color: #999; |
46 | + border-left-color: #999; | ||
40 | border-bottom-color: #999; | 47 | border-bottom-color: #999; |
41 | border-bottom-left-radius: 4px; | 48 | border-bottom-left-radius: 4px; |
42 | border-bottom-right-radius: 4px; | 49 | border-bottom-right-radius: 4px; |
43 | border-top-color: #DADADA; | 50 | border-top-color: #DADADA; |
44 | color: #666; | 51 | color: #666; |
45 | - box-shadow:0 3px 8px rgba(50, 50, 50, 0.17); | 52 | + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); |
46 | } | 53 | } |
47 | </style> | 54 | </style> |
48 | </head> | 55 | </head> |
@@ -50,8 +57,10 @@ | @@ -50,8 +57,10 @@ | ||
50 | <body> | 57 | <body> |
51 | <!-- This file lives in public/500.html --> | 58 | <!-- This file lives in public/500.html --> |
52 | <div class="dialog"> | 59 | <div class="dialog"> |
53 | - <h1>We're sorry, but something went wrong.</h1> | 60 | + <div> |
61 | + <h1>We're sorry, but something went wrong.</h1> | ||
62 | + </div> | ||
63 | + <p>If you are the application owner check the logs for more information.</p> | ||
54 | </div> | 64 | </div> |
55 | - <p>If you are the application owner check the logs for more information.</p> | ||
56 | </body> | 65 | </body> |
57 | </html> | 66 | </html> |
public/robots.txt
1 | -# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file | 1 | +# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file |
2 | # | 2 | # |
3 | # To ban all spiders from the entire site uncomment the next two lines: | 3 | # To ban all spiders from the entire site uncomment the next two lines: |
4 | # User-agent: * | 4 | # User-agent: * |
spec/controllers/repositories_controller_spec.rb
@@ -173,7 +173,11 @@ describe RepositoriesController do | @@ -173,7 +173,11 @@ describe RepositoriesController do | ||
173 | 173 | ||
174 | it { should redirect_to(projects_url) } | 174 | it { should redirect_to(projects_url) } |
175 | it { should respond_with(:redirect) } | 175 | it { should respond_with(:redirect) } |
176 | - it { should set_the_flash[:notice].to("You're not allowed to do this operation") } | 176 | + it 'should set the flash' do |
177 | + pending 'incompability between shoulda-matchers and Rails 4.1.0.rc1' do | ||
178 | + should set_the_flash[:notice].to("You're not allowed to do this operation") | ||
179 | + end | ||
180 | + end | ||
177 | end | 181 | end |
178 | end | 182 | end |
179 | 183 |
spec/spec_helper.rb
@@ -24,6 +24,7 @@ ENV["RAILS_ENV"] ||= 'test' | @@ -24,6 +24,7 @@ ENV["RAILS_ENV"] ||= 'test' | ||
24 | require File.expand_path("../../config/environment", __FILE__) | 24 | require File.expand_path("../../config/environment", __FILE__) |
25 | require 'rspec/rails' | 25 | require 'rspec/rails' |
26 | require 'rspec/autorun' | 26 | require 'rspec/autorun' |
27 | +require 'shoulda-matchers' # requiring here is necessary to avoid warnings from minitest 5, with version 2.6 this might get fixed | ||
27 | 28 | ||
28 | # Requires supporting ruby files with custom matchers and macros, etc, | 29 | # Requires supporting ruby files with custom matchers and macros, etc, |
29 | # in spec/support/ and its subdirectories. | 30 | # in spec/support/ and its subdirectories. |