mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
Compare commits
5 Commits
df8620625f
...
50f1fc25aa
| Author | SHA1 | Date | |
|---|---|---|---|
| 50f1fc25aa | |||
| 955cc7f603 | |||
| 85346fe763 | |||
| ad13971872 | |||
| c4ca82d16d |
13
.rubocop.yml
13
.rubocop.yml
@ -1,13 +0,0 @@
|
|||||||
Documentation:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
AllCops:
|
|
||||||
Include:
|
|
||||||
- '**/Rakefile'
|
|
||||||
- '**/config.ru'
|
|
||||||
Exclude:
|
|
||||||
- 'db/**/*'
|
|
||||||
- 'config/**/*'
|
|
||||||
- 'script/**/*'
|
|
||||||
- 'bin/**/*'
|
|
||||||
- !ruby/regexp /old_and_unused\.rb$/
|
|
||||||
@ -1 +1 @@
|
|||||||
2.4.2
|
2.6.6
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
ruby 2.4.2
|
ruby 2.7.2
|
||||||
|
|||||||
86
Gemfile
86
Gemfile
@ -1,63 +1,63 @@
|
|||||||
source 'http://rubygems.org'
|
source "http://rubygems.org"
|
||||||
ruby '2.4.2'
|
ruby "2.7.2"
|
||||||
|
|
||||||
gem 'dotenv-rails', :groups => [:development, :test]
|
gem "dotenv-rails", groups: %i[development test]
|
||||||
|
|
||||||
gem 'rails', '~> 5.1'
|
gem "rails", "~> 5.1"
|
||||||
|
|
||||||
# Bundle edge Rails instead:
|
# Bundle edge Rails instead:
|
||||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
# gem "rails", :git => "git://github.com/rails/rails.git"
|
||||||
|
|
||||||
gem 'administrate'
|
gem "administrate"
|
||||||
gem 'administrate-field-image'
|
gem "administrate-field-image"
|
||||||
gem 'aws-sdk'
|
gem "bourbon"
|
||||||
gem 'bourbon'
|
gem "coffee-rails"
|
||||||
gem 'coffee-rails'
|
gem "dragonfly"
|
||||||
gem 'dragonfly'
|
gem "dragonfly-s3_data_store"
|
||||||
gem 'dragonfly-s3_data_store'
|
gem "jquery-rails"
|
||||||
gem 'jquery-rails'
|
gem "kaminari"
|
||||||
gem 'kaminari'
|
gem "kramdown"
|
||||||
gem 'kramdown'
|
gem "mime-types"
|
||||||
gem 'mime-types'
|
gem "nokogiri"
|
||||||
gem 'nokogiri'
|
gem "oath"
|
||||||
gem 'oath'
|
gem "oath-generators"
|
||||||
gem 'oath-generators'
|
gem "pg"
|
||||||
gem 'pg'
|
gem "sass-rails"
|
||||||
gem 'sass-rails'
|
gem "simple_form"
|
||||||
gem 'simple_form'
|
gem "slugtastic"
|
||||||
gem 'slugtastic'
|
gem "uglifier"
|
||||||
gem 'uglifier'
|
gem "unf"
|
||||||
gem 'unf'
|
|
||||||
|
|
||||||
# Bundle gems for the local environment. Make sure to
|
# Bundle gems for the local environment. Make sure to
|
||||||
# put test-only gems in this group so their generators
|
# put test-only gems in this group so their generators
|
||||||
# and rake tasks are available in development mode:
|
# and rake tasks are available in development mode:
|
||||||
group :development do
|
group :development do
|
||||||
gem 'ruby_parser'
|
gem "better_errors"
|
||||||
gem 'powder'
|
gem "binding_of_caller"
|
||||||
gem 'better_errors'
|
gem "letter_opener"
|
||||||
gem 'binding_of_caller'
|
gem "powder"
|
||||||
gem 'letter_opener'
|
gem "ruby_parser"
|
||||||
|
gem "standardrb"
|
||||||
end
|
end
|
||||||
|
|
||||||
group :test, :development do
|
group :test, :development do
|
||||||
gem 'rspec-rails'
|
gem "pry"
|
||||||
gem 'rails-controller-testing'
|
gem "rails-controller-testing"
|
||||||
gem 'rubocop'
|
gem "rspec-rails"
|
||||||
gem 'pry'
|
gem "rubocop"
|
||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'factory_bot_rails'
|
gem "capybara-screenshot"
|
||||||
gem 'shoulda'
|
gem "database_cleaner"
|
||||||
gem 'poltergeist'
|
gem "factory_bot_rails"
|
||||||
gem 'database_cleaner'
|
gem "fivemat"
|
||||||
gem 'fivemat'
|
gem "poltergeist"
|
||||||
gem 'capybara-screenshot'
|
gem "shoulda"
|
||||||
gem 'simplecov'
|
gem "simplecov"
|
||||||
end
|
end
|
||||||
|
|
||||||
group :production do
|
group :production do
|
||||||
gem 'puma'
|
gem "puma"
|
||||||
gem 'rails_12factor'
|
gem "rails_12factor"
|
||||||
end
|
end
|
||||||
|
|||||||
433
Gemfile.lock
433
Gemfile.lock
@ -1,341 +1,344 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (5.2.2)
|
actioncable (5.2.6)
|
||||||
actionpack (= 5.2.2)
|
actionpack (= 5.2.6)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailer (5.2.2)
|
actionmailer (5.2.6)
|
||||||
actionpack (= 5.2.2)
|
actionpack (= 5.2.6)
|
||||||
actionview (= 5.2.2)
|
actionview (= 5.2.6)
|
||||||
activejob (= 5.2.2)
|
activejob (= 5.2.6)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (5.2.2)
|
actionpack (5.2.6)
|
||||||
actionview (= 5.2.2)
|
actionview (= 5.2.6)
|
||||||
activesupport (= 5.2.2)
|
activesupport (= 5.2.6)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0, >= 2.0.8)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||||
actionview (5.2.2)
|
actionview (5.2.6)
|
||||||
activesupport (= 5.2.2)
|
activesupport (= 5.2.6)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||||
activejob (5.2.2)
|
activejob (5.2.6)
|
||||||
activesupport (= 5.2.2)
|
activesupport (= 5.2.6)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (5.2.2)
|
activemodel (5.2.6)
|
||||||
activesupport (= 5.2.2)
|
activesupport (= 5.2.6)
|
||||||
activerecord (5.2.2)
|
activerecord (5.2.6)
|
||||||
activemodel (= 5.2.2)
|
activemodel (= 5.2.6)
|
||||||
activesupport (= 5.2.2)
|
activesupport (= 5.2.6)
|
||||||
arel (>= 9.0)
|
arel (>= 9.0)
|
||||||
activestorage (5.2.2)
|
activestorage (5.2.6)
|
||||||
actionpack (= 5.2.2)
|
actionpack (= 5.2.6)
|
||||||
activerecord (= 5.2.2)
|
activerecord (= 5.2.6)
|
||||||
marcel (~> 0.3.1)
|
marcel (~> 1.0.0)
|
||||||
activesupport (5.2.2)
|
activesupport (5.2.6)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 0.7, < 2)
|
i18n (>= 0.7, < 2)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
addressable (2.5.2)
|
addressable (2.8.0)
|
||||||
public_suffix (>= 2.0.2, < 4.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
administrate (0.11.0)
|
administrate (0.16.0)
|
||||||
actionpack (>= 4.2, < 6.0)
|
actionpack (>= 5.0)
|
||||||
actionview (>= 4.2, < 6.0)
|
actionview (>= 5.0)
|
||||||
activerecord (>= 4.2, < 6.0)
|
activerecord (>= 5.0)
|
||||||
autoprefixer-rails (>= 6.0)
|
|
||||||
datetime_picker_rails (~> 0.0.7)
|
datetime_picker_rails (~> 0.0.7)
|
||||||
jquery-rails (>= 4.0)
|
jquery-rails (>= 4.0)
|
||||||
kaminari (>= 1.0)
|
kaminari (>= 1.0)
|
||||||
momentjs-rails (~> 2.8)
|
momentjs-rails (~> 2.8)
|
||||||
sass-rails (~> 5.0)
|
sassc-rails (~> 2.1)
|
||||||
selectize-rails (~> 0.6)
|
selectize-rails (~> 0.6)
|
||||||
administrate-field-image (1.1.0)
|
administrate-field-image (1.1.0)
|
||||||
administrate (>= 0.2.0.rc1)
|
administrate (>= 0.2.0.rc1)
|
||||||
arel (9.0.0)
|
arel (9.0.0)
|
||||||
ast (2.4.0)
|
ast (2.4.2)
|
||||||
autoprefixer-rails (9.1.4)
|
bcrypt (3.1.16)
|
||||||
execjs
|
better_errors (2.9.1)
|
||||||
aws-sdk (2.11.176)
|
|
||||||
aws-sdk-resources (= 2.11.176)
|
|
||||||
aws-sdk-core (2.11.176)
|
|
||||||
aws-sigv4 (~> 1.0)
|
|
||||||
jmespath (~> 1.0)
|
|
||||||
aws-sdk-resources (2.11.176)
|
|
||||||
aws-sdk-core (= 2.11.176)
|
|
||||||
aws-sigv4 (1.0.3)
|
|
||||||
bcrypt (3.1.11)
|
|
||||||
better_errors (2.5.0)
|
|
||||||
coderay (>= 1.0.0)
|
coderay (>= 1.0.0)
|
||||||
erubi (>= 1.0.0)
|
erubi (>= 1.0.0)
|
||||||
rack (>= 0.9.0)
|
rack (>= 0.9.0)
|
||||||
binding_of_caller (0.8.0)
|
binding_of_caller (1.0.0)
|
||||||
debug_inspector (>= 0.0.1)
|
debug_inspector (>= 0.0.1)
|
||||||
bourbon (5.1.0)
|
bourbon (7.0.0)
|
||||||
sass (~> 3.4)
|
thor (~> 1.0)
|
||||||
thor (~> 0.19)
|
builder (3.2.4)
|
||||||
builder (3.2.3)
|
capybara (3.35.3)
|
||||||
capybara (3.9.0)
|
|
||||||
addressable
|
addressable
|
||||||
mini_mime (>= 0.1.3)
|
mini_mime (>= 0.1.3)
|
||||||
nokogiri (~> 1.8)
|
nokogiri (~> 1.8)
|
||||||
rack (>= 1.6.0)
|
rack (>= 1.6.0)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
xpath (~> 3.1)
|
regexp_parser (>= 1.5, < 3.0)
|
||||||
capybara-screenshot (1.0.22)
|
xpath (~> 3.2)
|
||||||
|
capybara-screenshot (1.0.25)
|
||||||
capybara (>= 1.0, < 4)
|
capybara (>= 1.0, < 4)
|
||||||
launchy
|
launchy
|
||||||
cliver (0.3.2)
|
cliver (0.3.2)
|
||||||
coderay (1.1.2)
|
coderay (1.1.3)
|
||||||
coffee-rails (4.2.2)
|
coffee-rails (5.0.0)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
railties (>= 4.0.0)
|
railties (>= 5.2.0)
|
||||||
coffee-script (2.4.1)
|
coffee-script (2.4.1)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.12.2)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.1.3)
|
concurrent-ruby (1.1.9)
|
||||||
crass (1.0.5)
|
crass (1.0.6)
|
||||||
database_cleaner (1.7.0)
|
database_cleaner (2.0.1)
|
||||||
|
database_cleaner-active_record (~> 2.0.0)
|
||||||
|
database_cleaner-active_record (2.0.1)
|
||||||
|
activerecord (>= 5.a)
|
||||||
|
database_cleaner-core (~> 2.0.0)
|
||||||
|
database_cleaner-core (2.0.1)
|
||||||
datetime_picker_rails (0.0.7)
|
datetime_picker_rails (0.0.7)
|
||||||
momentjs-rails (>= 2.8.1)
|
momentjs-rails (>= 2.8.1)
|
||||||
debug_inspector (0.0.3)
|
debug_inspector (1.1.0)
|
||||||
diff-lcs (1.3)
|
diff-lcs (1.4.4)
|
||||||
docile (1.3.0)
|
docile (1.4.0)
|
||||||
dotenv (2.5.0)
|
dotenv (2.7.6)
|
||||||
dotenv-rails (2.5.0)
|
dotenv-rails (2.7.6)
|
||||||
dotenv (= 2.5.0)
|
dotenv (= 2.7.6)
|
||||||
railties (>= 3.2, < 6.0)
|
railties (>= 3.2)
|
||||||
dragonfly (1.1.5)
|
dragonfly (1.4.0)
|
||||||
addressable (~> 2.3)
|
addressable (~> 2.3)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
rack (>= 1.3)
|
rack (>= 1.3)
|
||||||
dragonfly-s3_data_store (1.3.0)
|
dragonfly-s3_data_store (1.3.0)
|
||||||
dragonfly (~> 1.0)
|
dragonfly (~> 1.0)
|
||||||
fog-aws
|
fog-aws
|
||||||
erubi (1.7.1)
|
erubi (1.10.0)
|
||||||
excon (0.71.1)
|
excon (0.85.0)
|
||||||
execjs (2.7.0)
|
execjs (2.8.1)
|
||||||
factory_bot (4.11.1)
|
factory_bot (6.2.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 5.0.0)
|
||||||
factory_bot_rails (4.11.1)
|
factory_bot_rails (6.2.0)
|
||||||
factory_bot (~> 4.11.1)
|
factory_bot (~> 6.2.0)
|
||||||
railties (>= 3.0.0)
|
railties (>= 5.0.0)
|
||||||
ffi (1.9.25)
|
ffi (1.15.3)
|
||||||
fivemat (1.3.7)
|
fivemat (1.3.7)
|
||||||
fog-aws (1.4.0)
|
fog-aws (3.10.0)
|
||||||
fog-core (~> 1.38)
|
fog-core (~> 2.1)
|
||||||
fog-json (~> 1.0)
|
fog-json (~> 1.1)
|
||||||
fog-xml (~> 0.1)
|
fog-xml (~> 0.1)
|
||||||
ipaddress (~> 0.8)
|
ipaddress (~> 0.8)
|
||||||
fog-core (1.44.3)
|
fog-core (2.2.4)
|
||||||
builder
|
builder
|
||||||
excon (~> 0.49)
|
excon (~> 0.71)
|
||||||
formatador (~> 0.2)
|
formatador (~> 0.2)
|
||||||
fog-json (1.0.2)
|
mime-types
|
||||||
fog-core (~> 1.0)
|
fog-json (1.2.0)
|
||||||
|
fog-core
|
||||||
multi_json (~> 1.10)
|
multi_json (~> 1.10)
|
||||||
fog-xml (0.1.3)
|
fog-xml (0.1.3)
|
||||||
fog-core
|
fog-core
|
||||||
nokogiri (>= 1.5.11, < 2.0.0)
|
nokogiri (>= 1.5.11, < 2.0.0)
|
||||||
formatador (0.2.5)
|
formatador (0.3.0)
|
||||||
globalid (0.4.1)
|
globalid (0.4.2)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
i18n (1.1.1)
|
i18n (1.8.10)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
ipaddress (0.8.3)
|
ipaddress (0.8.3)
|
||||||
jaro_winkler (1.5.2)
|
jquery-rails (4.4.0)
|
||||||
jmespath (1.4.0)
|
|
||||||
jquery-rails (4.3.3)
|
|
||||||
rails-dom-testing (>= 1, < 3)
|
rails-dom-testing (>= 1, < 3)
|
||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
json (2.1.0)
|
kaminari (1.2.1)
|
||||||
kaminari (1.1.1)
|
|
||||||
activesupport (>= 4.1.0)
|
activesupport (>= 4.1.0)
|
||||||
kaminari-actionview (= 1.1.1)
|
kaminari-actionview (= 1.2.1)
|
||||||
kaminari-activerecord (= 1.1.1)
|
kaminari-activerecord (= 1.2.1)
|
||||||
kaminari-core (= 1.1.1)
|
kaminari-core (= 1.2.1)
|
||||||
kaminari-actionview (1.1.1)
|
kaminari-actionview (1.2.1)
|
||||||
actionview
|
actionview
|
||||||
kaminari-core (= 1.1.1)
|
kaminari-core (= 1.2.1)
|
||||||
kaminari-activerecord (1.1.1)
|
kaminari-activerecord (1.2.1)
|
||||||
activerecord
|
activerecord
|
||||||
kaminari-core (= 1.1.1)
|
kaminari-core (= 1.2.1)
|
||||||
kaminari-core (1.1.1)
|
kaminari-core (1.2.1)
|
||||||
kramdown (1.17.0)
|
kramdown (2.3.1)
|
||||||
launchy (2.4.3)
|
rexml
|
||||||
addressable (~> 2.3)
|
launchy (2.5.0)
|
||||||
|
addressable (~> 2.7)
|
||||||
letter_opener (1.7.0)
|
letter_opener (1.7.0)
|
||||||
launchy (~> 2.2)
|
launchy (~> 2.2)
|
||||||
loofah (2.3.1)
|
loofah (2.10.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.7.1)
|
mail (2.7.1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
marcel (0.3.3)
|
marcel (1.0.1)
|
||||||
mimemagic (~> 0.3.2)
|
method_source (1.0.0)
|
||||||
method_source (0.9.2)
|
mime-types (3.3.1)
|
||||||
mime-types (3.2.2)
|
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2018.0812)
|
mime-types-data (3.2021.0704)
|
||||||
mimemagic (0.3.2)
|
mini_mime (1.1.0)
|
||||||
mini_mime (1.0.1)
|
mini_portile2 (2.5.3)
|
||||||
mini_portile2 (2.4.0)
|
minitest (5.14.4)
|
||||||
minitest (5.11.3)
|
|
||||||
momentjs-rails (2.20.1)
|
momentjs-rails (2.20.1)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
multi_json (1.13.1)
|
multi_json (1.15.0)
|
||||||
nio4r (2.3.1)
|
nio4r (2.5.7)
|
||||||
nokogiri (1.10.4)
|
nokogiri (1.11.7)
|
||||||
mini_portile2 (~> 2.4.0)
|
mini_portile2 (~> 2.5.0)
|
||||||
|
racc (~> 1.4)
|
||||||
oath (1.1.0)
|
oath (1.1.0)
|
||||||
bcrypt
|
bcrypt
|
||||||
rails
|
rails
|
||||||
warden
|
warden
|
||||||
oath-generators (1.0.1)
|
oath-generators (1.0.1)
|
||||||
oath (>= 0.0.12)
|
oath (>= 0.0.12)
|
||||||
parallel (1.13.0)
|
parallel (1.20.1)
|
||||||
parser (2.6.0.0)
|
parser (3.0.2.0)
|
||||||
ast (~> 2.4.0)
|
ast (~> 2.4.1)
|
||||||
pg (1.1.3)
|
pg (1.2.3)
|
||||||
poltergeist (1.18.1)
|
poltergeist (1.18.1)
|
||||||
capybara (>= 2.1, < 4)
|
capybara (>= 2.1, < 4)
|
||||||
cliver (~> 0.3.1)
|
cliver (~> 0.3.1)
|
||||||
websocket-driver (>= 0.2.0)
|
websocket-driver (>= 0.2.0)
|
||||||
powder (0.4.0)
|
powder (0.4.0)
|
||||||
thor (>= 0.11.5)
|
thor (>= 0.11.5)
|
||||||
powerpack (0.1.2)
|
pry (0.14.1)
|
||||||
pry (0.11.3)
|
coderay (~> 1.1)
|
||||||
coderay (~> 1.1.0)
|
method_source (~> 1.0)
|
||||||
method_source (~> 0.9.0)
|
public_suffix (4.0.6)
|
||||||
public_suffix (3.0.3)
|
puma (5.3.2)
|
||||||
puma (3.12.0)
|
nio4r (~> 2.0)
|
||||||
rack (2.0.6)
|
racc (1.5.2)
|
||||||
|
rack (2.2.3)
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rails (5.2.2)
|
rails (5.2.6)
|
||||||
actioncable (= 5.2.2)
|
actioncable (= 5.2.6)
|
||||||
actionmailer (= 5.2.2)
|
actionmailer (= 5.2.6)
|
||||||
actionpack (= 5.2.2)
|
actionpack (= 5.2.6)
|
||||||
actionview (= 5.2.2)
|
actionview (= 5.2.6)
|
||||||
activejob (= 5.2.2)
|
activejob (= 5.2.6)
|
||||||
activemodel (= 5.2.2)
|
activemodel (= 5.2.6)
|
||||||
activerecord (= 5.2.2)
|
activerecord (= 5.2.6)
|
||||||
activestorage (= 5.2.2)
|
activestorage (= 5.2.6)
|
||||||
activesupport (= 5.2.2)
|
activesupport (= 5.2.6)
|
||||||
bundler (>= 1.3.0)
|
bundler (>= 1.3.0)
|
||||||
railties (= 5.2.2)
|
railties (= 5.2.6)
|
||||||
sprockets-rails (>= 2.0.0)
|
sprockets-rails (>= 2.0.0)
|
||||||
rails-controller-testing (1.0.4)
|
rails-controller-testing (1.0.5)
|
||||||
actionpack (>= 5.0.1.x)
|
actionpack (>= 5.0.1.rc1)
|
||||||
actionview (>= 5.0.1.x)
|
actionview (>= 5.0.1.rc1)
|
||||||
activesupport (>= 5.0.1.x)
|
activesupport (>= 5.0.1.rc1)
|
||||||
rails-dom-testing (2.0.3)
|
rails-dom-testing (2.0.3)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.0.4)
|
rails-html-sanitizer (1.3.0)
|
||||||
loofah (~> 2.2, >= 2.2.2)
|
loofah (~> 2.3)
|
||||||
rails_12factor (0.0.3)
|
rails_12factor (0.0.3)
|
||||||
rails_serve_static_assets
|
rails_serve_static_assets
|
||||||
rails_stdout_logging
|
rails_stdout_logging
|
||||||
rails_serve_static_assets (0.0.5)
|
rails_serve_static_assets (0.0.5)
|
||||||
rails_stdout_logging (0.0.5)
|
rails_stdout_logging (0.0.5)
|
||||||
railties (5.2.2)
|
railties (5.2.6)
|
||||||
actionpack (= 5.2.2)
|
actionpack (= 5.2.6)
|
||||||
activesupport (= 5.2.2)
|
activesupport (= 5.2.6)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.19.0, < 2.0)
|
thor (>= 0.19.0, < 2.0)
|
||||||
rainbow (3.0.0)
|
rainbow (3.0.0)
|
||||||
rake (12.3.1)
|
rake (13.0.6)
|
||||||
rb-fsevent (0.10.3)
|
regexp_parser (2.1.1)
|
||||||
rb-inotify (0.9.10)
|
rexml (3.2.5)
|
||||||
ffi (>= 0.5.0, < 2)
|
rspec-core (3.10.1)
|
||||||
rspec-core (3.8.0)
|
rspec-support (~> 3.10.0)
|
||||||
rspec-support (~> 3.8.0)
|
rspec-expectations (3.10.1)
|
||||||
rspec-expectations (3.8.2)
|
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.8.0)
|
rspec-support (~> 3.10.0)
|
||||||
rspec-mocks (3.8.0)
|
rspec-mocks (3.10.2)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.8.0)
|
rspec-support (~> 3.10.0)
|
||||||
rspec-rails (3.8.1)
|
rspec-rails (5.0.1)
|
||||||
actionpack (>= 3.0)
|
actionpack (>= 5.2)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 5.2)
|
||||||
railties (>= 3.0)
|
railties (>= 5.2)
|
||||||
rspec-core (~> 3.8.0)
|
rspec-core (~> 3.10)
|
||||||
rspec-expectations (~> 3.8.0)
|
rspec-expectations (~> 3.10)
|
||||||
rspec-mocks (~> 3.8.0)
|
rspec-mocks (~> 3.10)
|
||||||
rspec-support (~> 3.8.0)
|
rspec-support (~> 3.10)
|
||||||
rspec-support (3.8.0)
|
rspec-support (3.10.2)
|
||||||
rubocop (0.63.0)
|
rubocop (1.18.3)
|
||||||
jaro_winkler (~> 1.5.1)
|
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 2.5, != 2.5.1.1)
|
parser (>= 3.0.0.0)
|
||||||
powerpack (~> 0.1)
|
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
|
rexml
|
||||||
|
rubocop-ast (>= 1.7.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (~> 1.4.0)
|
unicode-display_width (>= 1.4.0, < 3.0)
|
||||||
ruby-progressbar (1.10.0)
|
rubocop-ast (1.8.0)
|
||||||
ruby_parser (3.12.0)
|
parser (>= 3.0.1.1)
|
||||||
sexp_processor (~> 4.9)
|
rubocop-performance (1.11.4)
|
||||||
sass (3.5.7)
|
rubocop (>= 1.7.0, < 2.0)
|
||||||
sass-listen (~> 4.0.0)
|
rubocop-ast (>= 0.4.0)
|
||||||
sass-listen (4.0.0)
|
ruby-progressbar (1.11.0)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
ruby_parser (3.16.0)
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
sexp_processor (~> 4.15, >= 4.15.1)
|
||||||
sass-rails (5.0.7)
|
sass-rails (6.0.0)
|
||||||
railties (>= 4.0.0, < 6)
|
sassc-rails (~> 2.1, >= 2.1.1)
|
||||||
sass (~> 3.1)
|
sassc (2.4.0)
|
||||||
sprockets (>= 2.8, < 4.0)
|
ffi (~> 1.9)
|
||||||
sprockets-rails (>= 2.0, < 4.0)
|
sassc-rails (2.1.2)
|
||||||
tilt (>= 1.1, < 3)
|
railties (>= 4.0.0)
|
||||||
selectize-rails (0.12.5)
|
sassc (>= 2.0)
|
||||||
sexp_processor (4.11.0)
|
sprockets (> 3.0)
|
||||||
shoulda (3.5.0)
|
sprockets-rails
|
||||||
shoulda-context (~> 1.0, >= 1.0.1)
|
tilt
|
||||||
shoulda-matchers (>= 1.4.1, < 3.0)
|
selectize-rails (0.12.6)
|
||||||
shoulda-context (1.2.2)
|
sexp_processor (4.15.3)
|
||||||
shoulda-matchers (2.8.0)
|
shoulda (4.0.0)
|
||||||
activesupport (>= 3.0.0)
|
shoulda-context (~> 2.0)
|
||||||
simple_form (4.1.0)
|
shoulda-matchers (~> 4.0)
|
||||||
actionpack (>= 5.0)
|
shoulda-context (2.0.0)
|
||||||
activemodel (>= 5.0)
|
shoulda-matchers (4.5.1)
|
||||||
simplecov (0.16.1)
|
activesupport (>= 4.2.0)
|
||||||
|
simple_form (5.1.0)
|
||||||
|
actionpack (>= 5.2)
|
||||||
|
activemodel (>= 5.2)
|
||||||
|
simplecov (0.21.2)
|
||||||
docile (~> 1.1)
|
docile (~> 1.1)
|
||||||
json (>= 1.8, < 3)
|
simplecov-html (~> 0.11)
|
||||||
simplecov-html (~> 0.10.0)
|
simplecov_json_formatter (~> 0.1)
|
||||||
simplecov-html (0.10.2)
|
simplecov-html (0.12.3)
|
||||||
|
simplecov_json_formatter (0.1.3)
|
||||||
slugtastic (2.0.1)
|
slugtastic (2.0.1)
|
||||||
sprockets (3.7.2)
|
sprockets (4.0.2)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (> 1, < 3)
|
rack (> 1, < 3)
|
||||||
sprockets-rails (3.2.1)
|
sprockets-rails (3.2.2)
|
||||||
actionpack (>= 4.0)
|
actionpack (>= 4.0)
|
||||||
activesupport (>= 4.0)
|
activesupport (>= 4.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
thor (0.20.3)
|
standard (1.1.5)
|
||||||
|
rubocop (= 1.18.3)
|
||||||
|
rubocop-performance (= 1.11.4)
|
||||||
|
standardrb (1.0.0)
|
||||||
|
standard
|
||||||
|
thor (1.1.0)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.8)
|
tilt (2.0.10)
|
||||||
tzinfo (1.2.5)
|
tzinfo (1.2.9)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (4.1.20)
|
uglifier (4.2.0)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
unf_ext (0.0.7.4)
|
unf_ext (0.0.7.7)
|
||||||
unicode-display_width (1.4.1)
|
unicode-display_width (2.0.0)
|
||||||
warden (1.2.7)
|
warden (1.2.9)
|
||||||
rack (>= 1.0)
|
rack (>= 2.0.9)
|
||||||
websocket-driver (0.7.0)
|
websocket-driver (0.7.5)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.3)
|
websocket-extensions (0.1.5)
|
||||||
xpath (3.2.0)
|
xpath (3.2.0)
|
||||||
nokogiri (~> 1.8)
|
nokogiri (~> 1.8)
|
||||||
|
|
||||||
@ -345,7 +348,6 @@ PLATFORMS
|
|||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
administrate
|
administrate
|
||||||
administrate-field-image
|
administrate-field-image
|
||||||
aws-sdk
|
|
||||||
better_errors
|
better_errors
|
||||||
binding_of_caller
|
binding_of_caller
|
||||||
bourbon
|
bourbon
|
||||||
@ -381,11 +383,12 @@ DEPENDENCIES
|
|||||||
simple_form
|
simple_form
|
||||||
simplecov
|
simplecov
|
||||||
slugtastic
|
slugtastic
|
||||||
|
standardrb
|
||||||
uglifier
|
uglifier
|
||||||
unf
|
unf
|
||||||
|
|
||||||
RUBY VERSION
|
RUBY VERSION
|
||||||
ruby 2.4.2p198
|
ruby 2.7.2p137
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.16.1
|
1.17.2
|
||||||
|
|||||||
2
Rakefile
2
Rakefile
@ -2,6 +2,6 @@
|
|||||||
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
||||||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
||||||
|
|
||||||
require File.expand_path('../config/application', __FILE__)
|
require File.expand_path("../config/application", __FILE__)
|
||||||
|
|
||||||
DanBarberPhoto::Application.load_tasks
|
DanBarberPhoto::Application.load_tasks
|
||||||
|
|||||||
3
app/assets/config/manifest.js
Normal file
3
app/assets/config/manifest.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
//= link_tree ../images
|
||||||
|
//= link_directory ../javascripts .js
|
||||||
|
//= link_directory ../stylesheets .sass
|
||||||
@ -1,9 +1,9 @@
|
|||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
def page_title(title)
|
def page_title(title)
|
||||||
if title.present?
|
if title.present?
|
||||||
"#{title} - #{APP_CONFIG['page_title']}"
|
"#{title} - #{APP_CONFIG["page_title"]}"
|
||||||
else
|
else
|
||||||
APP_CONFIG['page_title']
|
APP_CONFIG["page_title"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
module PhotosHelper
|
module PhotosHelper
|
||||||
def link_to_photo(photo)
|
def link_to_photo(photo)
|
||||||
link_to '', photo.image.url, rel: 'photos', class: 'fancy', data: { id: photo.id }
|
link_to "", photo.image.url, rel: "photos", class: "fancy", data: {id: photo.id}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
class Notifier < ActionMailer::Base
|
class Notifier < ActionMailer::Base
|
||||||
default from: 'enquiries@danbarberphoto.com'
|
default from: "enquiries@danbarberphoto.com"
|
||||||
|
|
||||||
def contact_notification(sender)
|
def contact_notification(sender)
|
||||||
@sender = sender
|
@sender = sender
|
||||||
mail(to: 'enquiries@danbarberphoto.com', from: sender.email, subject: sender.subject)
|
mail(to: "enquiries@danbarberphoto.com", from: sender.email, subject: sender.subject)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# This file is used by Rack-based servers to start the application.
|
# This file is used by Rack-based servers to start the application.
|
||||||
|
|
||||||
require ::File.expand_path('../config/environment', __FILE__)
|
require ::File.expand_path("../config/environment", __FILE__)
|
||||||
run DanBarberPhoto::Application
|
run DanBarberPhoto::Application
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
require File.expand_path('../boot', __FILE__)
|
require File.expand_path("../boot", __FILE__)
|
||||||
|
|
||||||
require 'rails/all'
|
require "rails/all"
|
||||||
|
|
||||||
if defined?(Bundler)
|
if defined?(Bundler)
|
||||||
# If you precompile assets before deploying to production, use this line
|
# If you precompile assets before deploying to production, use this line
|
||||||
Bundler.require *Rails.groups(:assets => %w(development test))
|
Bundler.require *Rails.groups(assets: %w[development test])
|
||||||
# If you want your assets lazily compiled in production, use this line
|
# If you want your assets lazily compiled in production, use this line
|
||||||
# Bundler.require(:default, :assets, Rails.env)
|
# Bundler.require(:default, :assets, Rails.env)
|
||||||
end
|
end
|
||||||
@ -30,7 +30,7 @@ module DanBarberPhoto
|
|||||||
# config.time_zone = 'Central Time (US & Canada)'
|
# config.time_zone = 'Central Time (US & Canada)'
|
||||||
|
|
||||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||||
config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
config.i18n.load_path += Dir[Rails.root.join("my", "locales", "*.{rb,yml}").to_s]
|
||||||
config.i18n.enforce_available_locales = true
|
config.i18n.enforce_available_locales = true
|
||||||
config.i18n.default_locale = :en
|
config.i18n.default_locale = :en
|
||||||
|
|
||||||
@ -43,10 +43,10 @@ module DanBarberPhoto
|
|||||||
# Enable the asset pipeline
|
# Enable the asset pipeline
|
||||||
config.assets.enabled = true
|
config.assets.enabled = true
|
||||||
|
|
||||||
config.assets.precompile += %w(favicon.ico fancybox/sprite.png fancybox/loading.gif fancybox/blank.gif fancybox/overlay.png)
|
config.assets.precompile += %w[favicon.ico fancybox/sprite.png fancybox/loading.gif fancybox/blank.gif fancybox/overlay.png]
|
||||||
|
|
||||||
# Version of your assets, change this if you want to expire all your assets
|
# Version of your assets, change this if you want to expire all your assets
|
||||||
config.assets.version = '1.0'
|
config.assets.version = "1.0"
|
||||||
|
|
||||||
# Prefer SASS syntax for stylesheets
|
# Prefer SASS syntax for stylesheets
|
||||||
config.sass.preferred_syntax = :sass
|
config.sass.preferred_syntax = :sass
|
||||||
@ -54,7 +54,7 @@ module DanBarberPhoto
|
|||||||
# Configure factories
|
# Configure factories
|
||||||
config.generators do |g|
|
config.generators do |g|
|
||||||
g.test_framework :rspec, fixture: true
|
g.test_framework :rspec, fixture: true
|
||||||
g.fixture_replacement :factory_girl, dir: 'spec/factories'
|
g.fixture_replacement :factory_girl, dir: "spec/factories"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
require 'rubygems'
|
require "rubygems"
|
||||||
|
|
||||||
# Set up gems listed in the Gemfile.
|
# Set up gems listed in the Gemfile.
|
||||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
|
||||||
|
|
||||||
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# Load the rails application
|
# Load the rails application
|
||||||
require File.expand_path('../application', __FILE__)
|
require File.expand_path("../application", __FILE__)
|
||||||
|
|
||||||
# Initialize the rails application
|
# Initialize the rails application
|
||||||
DanBarberPhoto::Application.initialize!
|
DanBarberPhoto::Application.initialize!
|
||||||
|
|||||||
@ -33,6 +33,5 @@ DanBarberPhoto::Application.configure do
|
|||||||
|
|
||||||
config.action_mailer.delivery_method = :letter_opener
|
config.action_mailer.delivery_method = :letter_opener
|
||||||
|
|
||||||
config.action_mailer.default_url_options = { :host => "danbarberphoto.dev" }
|
config.action_mailer.default_url_options = {host: "danbarberphoto.dev"}
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@ -49,7 +49,7 @@ DanBarberPhoto::Application.configure do
|
|||||||
# config.action_controller.asset_host = "http://assets.example.com"
|
# config.action_controller.asset_host = "http://assets.example.com"
|
||||||
|
|
||||||
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
||||||
config.assets.precompile += %w(administrate/overrides.css)
|
config.assets.precompile += %w[administrate/overrides.css]
|
||||||
|
|
||||||
# Disable delivery errors, bad email addresses will be ignored
|
# Disable delivery errors, bad email addresses will be ignored
|
||||||
# config.action_mailer.raise_delivery_errors = false
|
# config.action_mailer.raise_delivery_errors = false
|
||||||
@ -66,15 +66,14 @@ DanBarberPhoto::Application.configure do
|
|||||||
|
|
||||||
# Settings for Sendgrid Free on Heroku
|
# Settings for Sendgrid Free on Heroku
|
||||||
ActionMailer::Base.smtp_settings = {
|
ActionMailer::Base.smtp_settings = {
|
||||||
:address => 'smtp.sendgrid.net',
|
address: "smtp.sendgrid.net",
|
||||||
:port => '587',
|
port: "587",
|
||||||
:authentication => :plain,
|
authentication: :plain,
|
||||||
:user_name => ENV['SENDGRID_USERNAME'],
|
user_name: ENV["SENDGRID_USERNAME"],
|
||||||
:password => ENV['SENDGRID_PASSWORD'],
|
password: ENV["SENDGRID_PASSWORD"],
|
||||||
:domain => 'heroku.com'
|
domain: "heroku.com",
|
||||||
}
|
}
|
||||||
ActionMailer::Base.delivery_method = :smtp
|
ActionMailer::Base.delivery_method = :smtp
|
||||||
|
|
||||||
config.action_mailer.default_url_options = { :host => "danbarberphoto.com" }
|
config.action_mailer.default_url_options = {host: "danbarberphoto.com"}
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Version of your assets, change this if you want to expire all your assets.
|
# Version of your assets, change this if you want to expire all your assets.
|
||||||
Rails.application.config.assets.version = '1.0'
|
Rails.application.config.assets.version = "1.0"
|
||||||
|
|
||||||
# Add additional assets to the asset load path
|
# Add additional assets to the asset load path
|
||||||
# Rails.application.config.assets.paths << Emoji.images_path
|
# Rails.application.config.assets.paths << Emoji.images_path
|
||||||
|
|
||||||
# Precompile additional assets.
|
# Precompile additional assets.
|
||||||
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||||
Rails.application.config.assets.precompile += %w( administrate/overrides.css )
|
Rails.application.config.assets.precompile += %w[administrate/overrides.css]
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
require 'dragonfly'
|
require "dragonfly"
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
Dragonfly.app.configure do
|
Dragonfly.app.configure do
|
||||||
@ -9,35 +9,35 @@ Dragonfly.app.configure do
|
|||||||
|
|
||||||
url_format "/media/:job/:name"
|
url_format "/media/:job/:name"
|
||||||
|
|
||||||
if Rails.env.in?(%w(development production))
|
if Rails.env.in?(%w[development production])
|
||||||
datastore :s3,
|
datastore :s3,
|
||||||
bucket_name: ENV['AWS_BUCKET'],
|
bucket_name: ENV["AWS_BUCKET"],
|
||||||
access_key_id: ENV['AWS_KEY'],
|
access_key_id: ENV["AWS_KEY"],
|
||||||
secret_access_key: ENV['AWS_SECRET'],
|
secret_access_key: ENV["AWS_SECRET"],
|
||||||
region: 'eu-west-1'
|
region: "eu-west-1"
|
||||||
else
|
else
|
||||||
datastore :file,
|
datastore :file,
|
||||||
root_path: Rails.root.join('public/system/dragonfly', Rails.env),
|
root_path: Rails.root.join("public/system/dragonfly", Rails.env),
|
||||||
server_root: Rails.root.join('public')
|
server_root: Rails.root.join("public")
|
||||||
end
|
end
|
||||||
|
|
||||||
processor :preview do |content| content.process! :thumb, '600x600' end
|
processor :preview do |content| content.process! :thumb, "600x600" end
|
||||||
|
|
||||||
processor :admin do |content| content.process! :thumb, '140x140#' end
|
processor :admin do |content| content.process! :thumb, "140x140#" end
|
||||||
|
|
||||||
processor :size17 do |content| content.process! :thumb, '476x476#' end
|
processor :size17 do |content| content.process! :thumb, "476x476#" end
|
||||||
processor :size11 do |content| content.process! :thumb, '308x308#' end
|
processor :size11 do |content| content.process! :thumb, "308x308#" end
|
||||||
processor :size8 do |content| content.process! :thumb, '224x224#' end
|
processor :size8 do |content| content.process! :thumb, "224x224#" end
|
||||||
processor :size5 do |content| content.process! :thumb, '140x140#' end
|
processor :size5 do |content| content.process! :thumb, "140x140#" end
|
||||||
processor :size3 do |content| content.process! :thumb, '84x84#' end
|
processor :size3 do |content| content.process! :thumb, "84x84#" end
|
||||||
processor :size2 do |content| content.process! :thumb, '56x56#' end
|
processor :size2 do |content| content.process! :thumb, "56x56#" end
|
||||||
|
|
||||||
processor :size17x2 do |content| content.process! :thumb, '952x952#' end
|
processor :size17x2 do |content| content.process! :thumb, "952x952#" end
|
||||||
processor :size11x2 do |content| content.process! :thumb, '616x616#' end
|
processor :size11x2 do |content| content.process! :thumb, "616x616#" end
|
||||||
processor :size8x2 do |content| content.process! :thumb, '448x448#' end
|
processor :size8x2 do |content| content.process! :thumb, "448x448#" end
|
||||||
processor :size5x2 do |content| content.process! :thumb, '280x280#' end
|
processor :size5x2 do |content| content.process! :thumb, "280x280#" end
|
||||||
processor :size3x2 do |content| content.process! :thumb, '168x168#' end
|
processor :size3x2 do |content| content.process! :thumb, "168x168#" end
|
||||||
processor :size2x2 do |content| content.process! :thumb, '112x112#' end
|
processor :size2x2 do |content| content.process! :thumb, "112x112#" end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Logger
|
# Logger
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
DanBarberPhoto::Application.config.session_store :cookie_store, key: '_danbarberphoto_session'
|
DanBarberPhoto::Application.config.session_store :cookie_store, key: "_danbarberphoto_session"
|
||||||
|
|
||||||
# Use the database for sessions instead of the cookie-based default,
|
# Use the database for sessions instead of the cookie-based default,
|
||||||
# which shouldn't be used to store highly confidential information
|
# which shouldn't be used to store highly confidential information
|
||||||
|
|||||||
@ -55,7 +55,7 @@ SimpleForm.setup do |config|
|
|||||||
config.boolean_style = :nested
|
config.boolean_style = :nested
|
||||||
|
|
||||||
# Default class for buttons
|
# Default class for buttons
|
||||||
config.button_class = 'btn'
|
config.button_class = "btn"
|
||||||
|
|
||||||
# Method used to tidy up errors. Specify any Rails Array method.
|
# Method used to tidy up errors. Specify any Rails Array method.
|
||||||
# :first lists the first message for each field.
|
# :first lists the first message for each field.
|
||||||
@ -66,7 +66,7 @@ SimpleForm.setup do |config|
|
|||||||
config.error_notification_tag = :div
|
config.error_notification_tag = :div
|
||||||
|
|
||||||
# CSS class to add for error notification helper.
|
# CSS class to add for error notification helper.
|
||||||
config.error_notification_class = 'alert alert-error'
|
config.error_notification_class = "alert alert-error"
|
||||||
|
|
||||||
# ID to add for error notification helper.
|
# ID to add for error notification helper.
|
||||||
# config.error_notification_id = nil
|
# config.error_notification_id = nil
|
||||||
@ -95,7 +95,7 @@ SimpleForm.setup do |config|
|
|||||||
# config.label_text = lambda { |label, required| "#{required} #{label}" }
|
# config.label_text = lambda { |label, required| "#{required} #{label}" }
|
||||||
|
|
||||||
# You can define the class to use on all labels. Default is nil.
|
# You can define the class to use on all labels. Default is nil.
|
||||||
config.label_class = 'control-label'
|
config.label_class = "control-label"
|
||||||
|
|
||||||
# You can define the class to use on all forms. Default is simple_form.
|
# You can define the class to use on all forms. Default is simple_form.
|
||||||
# config.form_class = :simple_form
|
# config.form_class = :simple_form
|
||||||
|
|||||||
@ -1,18 +1,18 @@
|
|||||||
workers Integer(ENV['PUMA_WORKERS'] || 3)
|
workers Integer(ENV["PUMA_WORKERS"] || 3)
|
||||||
threads Integer(ENV['MIN_THREADS'] || 1), Integer(ENV['MAX_THREADS'] || 16)
|
threads Integer(ENV["MIN_THREADS"] || 1), Integer(ENV["MAX_THREADS"] || 16)
|
||||||
|
|
||||||
preload_app!
|
preload_app!
|
||||||
|
|
||||||
rackup DefaultRackup
|
rackup DefaultRackup
|
||||||
port ENV['PORT'] || 3000
|
port ENV["PORT"] || 3000
|
||||||
environment ENV['RACK_ENV'] || 'development'
|
environment ENV["RACK_ENV"] || "development"
|
||||||
|
|
||||||
on_worker_boot do
|
on_worker_boot do
|
||||||
# worker specific setup
|
# worker specific setup
|
||||||
ActiveSupport.on_load(:active_record) do
|
ActiveSupport.on_load(:active_record) do
|
||||||
config = ActiveRecord::Base.configurations[Rails.env] ||
|
config = ActiveRecord::Base.configurations[Rails.env] ||
|
||||||
Rails.application.config.database_configuration[Rails.env]
|
Rails.application.config.database_configuration[Rails.env]
|
||||||
config['pool'] = ENV['MAX_THREADS'] || 16
|
config["pool"] = ENV["MAX_THREADS"] || 16
|
||||||
ActiveRecord::Base.establish_connection(config)
|
ActiveRecord::Base.establish_connection(config)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
require 'oath/constraints/signed_in'
|
require "oath/constraints/signed_in"
|
||||||
require 'oath/constraints/signed_out'
|
require "oath/constraints/signed_out"
|
||||||
|
|
||||||
DanBarberPhoto::Application.routes.draw do
|
DanBarberPhoto::Application.routes.draw do
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
@ -32,6 +32,6 @@ DanBarberPhoto::Application.routes.draw do
|
|||||||
|
|
||||||
resources :contacts, only: [:new, :create]
|
resources :contacts, only: [:new, :create]
|
||||||
|
|
||||||
get '/:name' => 'pages#show', as: :page
|
get "/:name" => "pages#show", :as => :page
|
||||||
root to: 'home#index'
|
root to: "home#index"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class CreateCategories < ActiveRecord::Migration
|
class CreateCategories < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :categories do |t|
|
create_table :categories do |t|
|
||||||
t.string :name
|
t.string :name
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class CreatePhotos < ActiveRecord::Migration
|
class CreatePhotos < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :photos do |t|
|
create_table :photos do |t|
|
||||||
t.integer :category_id
|
t.integer :category_id
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class AddPhotoToCategory < ActiveRecord::Migration
|
class AddPhotoToCategory < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :categories, :photo_id, :integer
|
add_column :categories, :photo_id, :integer
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class AddDetailsToPhoto < ActiveRecord::Migration
|
class AddDetailsToPhoto < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :photos, :title, :string
|
add_column :photos, :title, :string
|
||||||
add_column :photos, :description, :text
|
add_column :photos, :description, :text
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class AddColourToCategory < ActiveRecord::Migration
|
class AddColourToCategory < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :categories, :base_colour, :string
|
add_column :categories, :base_colour, :string
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class AddSortOrders < ActiveRecord::Migration
|
class AddSortOrders < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :photos, :sort, :integer
|
add_column :photos, :sort, :integer
|
||||||
add_column :categories, :sort, :integer
|
add_column :categories, :sort, :integer
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
class MoveToManyToMany < ActiveRecord::Migration
|
class MoveToManyToMany < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
remove_column :photos, :category_id
|
remove_column :photos, :category_id
|
||||||
create_table :categories_photos, :id => false do |t|
|
create_table :categories_photos, id: false do |t|
|
||||||
t.integer :category_id
|
t.integer :category_id
|
||||||
t.integer :photo_id
|
t.integer :photo_id
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
class CreateAdminUsers < ActiveRecord::Migration
|
class CreateAdminUsers < ActiveRecord::Migration[5.1]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
create_table :admin_users do |t|
|
create_table :admin_users do |t|
|
||||||
t.string :first_name, :default => "", :null => false
|
t.string :first_name, default: "", null: false
|
||||||
t.string :last_name, :default => "", :null => false
|
t.string :last_name, default: "", null: false
|
||||||
t.string :role, :null => false
|
t.string :role, null: false
|
||||||
t.string :email, :null => false
|
t.string :email, null: false
|
||||||
t.boolean :status, :default => false
|
t.boolean :status, default: false
|
||||||
t.string :token, :null => false
|
t.string :token, null: false
|
||||||
t.string :salt, :null => false
|
t.string :salt, null: false
|
||||||
t.string :crypted_password, :null => false
|
t.string :crypted_password, null: false
|
||||||
t.string :preferences
|
t.string :preferences
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
@ -18,5 +17,4 @@ class CreateAdminUsers < ActiveRecord::Migration
|
|||||||
def self.down
|
def self.down
|
||||||
drop_table :admin_users
|
drop_table :admin_users
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class CreatePages < ActiveRecord::Migration
|
class CreatePages < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :pages do |t|
|
create_table :pages do |t|
|
||||||
t.string :name
|
t.string :name
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
class PhotoShowcase < ActiveRecord::Migration
|
class PhotoShowcase < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :photos, :featured, :boolean, :default => false
|
add_column :photos, :featured, :boolean, default: false
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
class AddEnabledToPhotos < ActiveRecord::Migration
|
class AddEnabledToPhotos < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :photos, :enabled, :boolean, :default => true
|
add_column :photos, :enabled, :boolean, default: true
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class AddTakenDateToPhoto < ActiveRecord::Migration
|
class AddTakenDateToPhoto < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :photos, :taken_at, :datetime
|
add_column :photos, :taken_at, :datetime
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
class AddViewCountToPhotos < ActiveRecord::Migration
|
class AddViewCountToPhotos < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :photos, :views, :integer, :default => 0
|
add_column :photos, :views, :integer, default: 0
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
class AddSessionsTable < ActiveRecord::Migration
|
class AddSessionsTable < ActiveRecord::Migration[5.1]
|
||||||
def up
|
def up
|
||||||
create_table :sessions do |t|
|
create_table :sessions do |t|
|
||||||
t.string :session_id, :null => false
|
t.string :session_id, null: false
|
||||||
t.text :data
|
t.text :data
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,18 +1,18 @@
|
|||||||
class RemoveAdminUsers < ActiveRecord::Migration
|
class RemoveAdminUsers < ActiveRecord::Migration[5.1]
|
||||||
def self.up
|
def self.up
|
||||||
drop_table :admin_users
|
drop_table :admin_users
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
create_table :admin_users do |t|
|
create_table :admin_users do |t|
|
||||||
t.string :first_name, :default => "", :null => false
|
t.string :first_name, default: "", null: false
|
||||||
t.string :last_name, :default => "", :null => false
|
t.string :last_name, default: "", null: false
|
||||||
t.string :role, :null => false
|
t.string :role, null: false
|
||||||
t.string :email, :null => false
|
t.string :email, null: false
|
||||||
t.boolean :status, :default => false
|
t.boolean :status, default: false
|
||||||
t.string :token, :null => false
|
t.string :token, null: false
|
||||||
t.string :salt, :null => false
|
t.string :salt, null: false
|
||||||
t.string :crypted_password, :null => false
|
t.string :crypted_password, null: false
|
||||||
t.string :preferences
|
t.string :preferences
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
class CreateDeviseAdminUsers < ActiveRecord::Migration
|
class CreateDeviseAdminUsers < ActiveRecord::Migration[5.1]
|
||||||
def up
|
def up
|
||||||
create_table(:admin_users) do |t|
|
create_table(:admin_users) do |t|
|
||||||
# Database authenticatable
|
# Database authenticatable
|
||||||
t.string :email, :null => false, :default => ""
|
t.string :email, null: false, default: ""
|
||||||
t.string :encrypted_password, :null => false, :default => ""
|
t.string :encrypted_password, null: false, default: ""
|
||||||
|
|
||||||
# Recoverable
|
# Recoverable
|
||||||
t.string :reset_password_token
|
t.string :reset_password_token
|
||||||
@ -13,7 +13,7 @@ class CreateDeviseAdminUsers < ActiveRecord::Migration
|
|||||||
t.datetime :remember_created_at
|
t.datetime :remember_created_at
|
||||||
|
|
||||||
# Trackable
|
# Trackable
|
||||||
t.integer :sign_in_count, :default => 0
|
t.integer :sign_in_count, default: 0
|
||||||
t.datetime :current_sign_in_at
|
t.datetime :current_sign_in_at
|
||||||
t.datetime :last_sign_in_at
|
t.datetime :last_sign_in_at
|
||||||
t.string :current_sign_in_ip
|
t.string :current_sign_in_ip
|
||||||
@ -26,17 +26,17 @@ class CreateDeviseAdminUsers < ActiveRecord::Migration
|
|||||||
t.string :unconfirmed_email # Only if using reconfirmable
|
t.string :unconfirmed_email # Only if using reconfirmable
|
||||||
|
|
||||||
# Lockable
|
# Lockable
|
||||||
t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
t.integer :failed_attempts, default: 0 # Only if lock strategy is :failed_attempts
|
||||||
t.string :unlock_token # Only if unlock strategy is :email or :both
|
t.string :unlock_token # Only if unlock strategy is :email or :both
|
||||||
t.datetime :locked_at
|
t.datetime :locked_at
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index :admin_users, :email, :unique => true
|
add_index :admin_users, :email, unique: true
|
||||||
add_index :admin_users, :reset_password_token, :unique => true
|
add_index :admin_users, :reset_password_token, unique: true
|
||||||
add_index :admin_users, :confirmation_token, :unique => true
|
add_index :admin_users, :confirmation_token, unique: true
|
||||||
add_index :admin_users, :unlock_token, :unique => true
|
add_index :admin_users, :unlock_token, unique: true
|
||||||
# add_index :admin_users, :authentication_token, :unique => true
|
# add_index :admin_users, :authentication_token, :unique => true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class AddSlugToCategories < ActiveRecord::Migration
|
class AddSlugToCategories < ActiveRecord::Migration[5.1]
|
||||||
def change
|
def change
|
||||||
add_column :categories, :slug, :string
|
add_column :categories, :slug, :string
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class AddDragonflyImageToPhotos < ActiveRecord::Migration
|
class AddDragonflyImageToPhotos < ActiveRecord::Migration[5.1]
|
||||||
def change
|
def change
|
||||||
add_column :photos, :image_uid, :string
|
add_column :photos, :image_uid, :string
|
||||||
add_column :photos, :image_name, :string
|
add_column :photos, :image_name, :string
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class RemovePaperclipColumnsFromPhotos < ActiveRecord::Migration
|
class RemovePaperclipColumnsFromPhotos < ActiveRecord::Migration[5.1]
|
||||||
def change
|
def change
|
||||||
remove_column :photos, :photo_file_name
|
remove_column :photos, :photo_file_name
|
||||||
remove_column :photos, :photo_content_type
|
remove_column :photos, :photo_content_type
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class AddIndexToCategoriesPhotos < ActiveRecord::Migration
|
class AddIndexToCategoriesPhotos < ActiveRecord::Migration[5.1]
|
||||||
def change
|
def change
|
||||||
add_index :categories_photos, [:category_id, :photo_id], unique: true
|
add_index :categories_photos, [:category_id, :photo_id], unique: true
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class RemoveDeviseAdminUsers < ActiveRecord::Migration
|
class RemoveDeviseAdminUsers < ActiveRecord::Migration[5.1]
|
||||||
def up
|
def up
|
||||||
drop_table :admin_users
|
drop_table :admin_users
|
||||||
end
|
end
|
||||||
@ -6,8 +6,8 @@ class RemoveDeviseAdminUsers < ActiveRecord::Migration
|
|||||||
def down
|
def down
|
||||||
create_table(:admin_users) do |t|
|
create_table(:admin_users) do |t|
|
||||||
# Database authenticatable
|
# Database authenticatable
|
||||||
t.string :email, :null => false, :default => ""
|
t.string :email, null: false, default: ""
|
||||||
t.string :encrypted_password, :null => false, :default => ""
|
t.string :encrypted_password, null: false, default: ""
|
||||||
|
|
||||||
# Recoverable
|
# Recoverable
|
||||||
t.string :reset_password_token
|
t.string :reset_password_token
|
||||||
@ -17,7 +17,7 @@ class RemoveDeviseAdminUsers < ActiveRecord::Migration
|
|||||||
t.datetime :remember_created_at
|
t.datetime :remember_created_at
|
||||||
|
|
||||||
# Trackable
|
# Trackable
|
||||||
t.integer :sign_in_count, :default => 0
|
t.integer :sign_in_count, default: 0
|
||||||
t.datetime :current_sign_in_at
|
t.datetime :current_sign_in_at
|
||||||
t.datetime :last_sign_in_at
|
t.datetime :last_sign_in_at
|
||||||
t.string :current_sign_in_ip
|
t.string :current_sign_in_ip
|
||||||
@ -30,16 +30,16 @@ class RemoveDeviseAdminUsers < ActiveRecord::Migration
|
|||||||
t.string :unconfirmed_email # Only if using reconfirmable
|
t.string :unconfirmed_email # Only if using reconfirmable
|
||||||
|
|
||||||
# Lockable
|
# Lockable
|
||||||
t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
t.integer :failed_attempts, default: 0 # Only if lock strategy is :failed_attempts
|
||||||
t.string :unlock_token # Only if unlock strategy is :email or :both
|
t.string :unlock_token # Only if unlock strategy is :email or :both
|
||||||
t.datetime :locked_at
|
t.datetime :locked_at
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index :admin_users, :email, :unique => true
|
add_index :admin_users, :email, unique: true
|
||||||
add_index :admin_users, :reset_password_token, :unique => true
|
add_index :admin_users, :reset_password_token, unique: true
|
||||||
add_index :admin_users, :confirmation_token, :unique => true
|
add_index :admin_users, :confirmation_token, unique: true
|
||||||
add_index :admin_users, :unlock_token, :unique => true
|
add_index :admin_users, :unlock_token, unique: true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class CreateUsers < ActiveRecord::Migration
|
class CreateUsers < ActiveRecord::Migration[5.1]
|
||||||
def change
|
def change
|
||||||
create_table :users do |t|
|
create_table :users do |t|
|
||||||
t.string :email, null: false
|
t.string :email, null: false
|
||||||
|
|||||||
38
db/schema.rb
38
db/schema.rb
@ -10,20 +10,20 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20151028124718) do
|
ActiveRecord::Schema.define(version: 2015_10_23_165644) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
||||||
create_table "categories", force: :cascade do |t|
|
create_table "categories", force: :cascade do |t|
|
||||||
t.string "name", limit: 255
|
t.string "name"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at", null: false
|
||||||
t.integer "photo_id"
|
t.integer "photo_id"
|
||||||
t.string "base_colour", limit: 255
|
t.string "base_colour"
|
||||||
t.integer "sort"
|
t.integer "sort"
|
||||||
t.string "slug", limit: 255
|
t.string "slug"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "categories_photos", id: false, force: :cascade do |t|
|
create_table "categories_photos", id: false, force: :cascade do |t|
|
||||||
@ -33,33 +33,33 @@ ActiveRecord::Schema.define(version: 20151028124718) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
create_table "pages", force: :cascade do |t|
|
create_table "pages", force: :cascade do |t|
|
||||||
t.string "name", limit: 255
|
t.string "name"
|
||||||
t.string "title", limit: 255
|
t.string "title"
|
||||||
t.text "content"
|
t.text "content"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at", null: false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "photos", force: :cascade do |t|
|
create_table "photos", force: :cascade do |t|
|
||||||
t.string "flickr_url", limit: 255
|
t.string "flickr_url"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at", null: false
|
||||||
t.string "title", limit: 255
|
t.string "title"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.integer "sort"
|
t.integer "sort"
|
||||||
t.boolean "featured", default: false
|
t.boolean "featured", default: false
|
||||||
t.boolean "enabled", default: true
|
t.boolean "enabled", default: true
|
||||||
t.datetime "taken_at"
|
t.datetime "taken_at"
|
||||||
t.integer "views", default: 0
|
t.integer "views", default: 0
|
||||||
t.string "image_uid", limit: 255
|
t.string "image_uid"
|
||||||
t.string "image_name", limit: 255
|
t.string "image_name"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "sessions", force: :cascade do |t|
|
create_table "sessions", force: :cascade do |t|
|
||||||
t.string "session_id", limit: 255, null: false
|
t.string "session_id", null: false
|
||||||
t.text "data"
|
t.text "data"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at", null: false
|
||||||
t.index ["session_id"], name: "index_sessions_on_session_id"
|
t.index ["session_id"], name: "index_sessions_on_session_id"
|
||||||
t.index ["updated_at"], name: "index_sessions_on_updated_at"
|
t.index ["updated_at"], name: "index_sessions_on_updated_at"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
Thread.new do
|
Thread.new {
|
||||||
require "objspace"
|
require "objspace"
|
||||||
ObjectSpace.trace_object_allocations_start
|
ObjectSpace.trace_object_allocations_start
|
||||||
GC.start()
|
GC.start
|
||||||
ObjectSpace.dump_all(output: File.open("heap.json", "w"))
|
ObjectSpace.dump_all(output: File.open("heap.json", "w"))
|
||||||
end.join
|
}.join
|
||||||
|
|||||||
@ -5,8 +5,8 @@ describe Contact do
|
|||||||
it { is_expected.to validate_presence_of(:name) }
|
it { is_expected.to validate_presence_of(:name) }
|
||||||
it { is_expected.to validate_presence_of(:message) }
|
it { is_expected.to validate_presence_of(:message) }
|
||||||
|
|
||||||
it { is_expected.to allow_value('test@test.com').for(:email) }
|
it { is_expected.to allow_value("test@test.com").for(:email) }
|
||||||
it { is_expected.not_to allow_value('test@test').for(:email) }
|
it { is_expected.not_to allow_value("test@test").for(:email) }
|
||||||
|
|
||||||
let(:contact) { build(:contact) }
|
let(:contact) { build(:contact) }
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
||||||
ENV['RAILS_ENV'] ||= 'test'
|
ENV["RAILS_ENV"] ||= "test"
|
||||||
require File.expand_path('../../config/environment', __FILE__)
|
require File.expand_path("../../config/environment", __FILE__)
|
||||||
require 'rspec/rails'
|
require "rspec/rails"
|
||||||
require 'capybara/rspec'
|
require "capybara/rspec"
|
||||||
require 'capybara/poltergeist'
|
require "capybara/poltergeist"
|
||||||
|
|
||||||
# For code coverage
|
# For code coverage
|
||||||
require 'simplecov'
|
require "simplecov"
|
||||||
SimpleCov.start
|
SimpleCov.start
|
||||||
|
|
||||||
# Use Poltergeist
|
# Use Poltergeist
|
||||||
@ -14,7 +14,7 @@ Capybara.javascript_driver = :poltergeist
|
|||||||
|
|
||||||
# Requires supporting ruby files with custom matchers and macros, etc,
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
||||||
# in spec/support/ and its subdirectories.
|
# in spec/support/ and its subdirectories.
|
||||||
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
|
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
||||||
|
|
||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
# ## Mock Framework
|
# ## Mock Framework
|
||||||
@ -46,7 +46,7 @@ RSpec.configure do |config|
|
|||||||
# order dependency and want to debug it, you can fix the order by providing
|
# order dependency and want to debug it, you can fix the order by providing
|
||||||
# the seed, which is printed after each run.
|
# the seed, which is printed after each run.
|
||||||
# --seed 1234
|
# --seed 1234
|
||||||
config.order = 'random'
|
config.order = "random"
|
||||||
|
|
||||||
config.before(:suite) do
|
config.before(:suite) do
|
||||||
DatabaseCleaner.clean_with(:truncation)
|
DatabaseCleaner.clean_with(:truncation)
|
||||||
|
|||||||
@ -2,7 +2,7 @@ module Ajax
|
|||||||
def wait_for_ajax
|
def wait_for_ajax
|
||||||
Timeout.timeout(Capybara.default_max_wait_time) do
|
Timeout.timeout(Capybara.default_max_wait_time) do
|
||||||
loop do
|
loop do
|
||||||
active = page.evaluate_script('jQuery.active')
|
active = page.evaluate_script("jQuery.active")
|
||||||
break if active == 0
|
break if active == 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user