mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-08 15:54:43 -04:00
Merge pull request #1391 from Br3nda/feature/bundle-update-and-heroku-api-change
Bundle update and change to platform-api instead of heroku
This commit is contained in:
@@ -31,6 +31,7 @@ PreCommit:
|
||||
enabled: true
|
||||
on_fail: warn
|
||||
command: ['npm', 'run', 'coffeelint']
|
||||
required_executable: 'npm'
|
||||
HardTabs:
|
||||
enabled: true
|
||||
AuthorEmail:
|
||||
@@ -42,6 +43,7 @@ PreCommit:
|
||||
exclude:
|
||||
- '**/bootstrap.min.css'
|
||||
command: ['npm', 'run', 'csslint']
|
||||
required_executable: 'npm'
|
||||
HamlLint:
|
||||
enabled: true
|
||||
command: ['bundle', 'exec', 'haml-lint', 'app/views']
|
||||
@@ -60,6 +62,7 @@ PreCommit:
|
||||
- 'spec/javascripts/support/vendor/**'
|
||||
- '**/bootstrap*'
|
||||
command: ['npm', 'run', 'jshint']
|
||||
required_executable: 'npm'
|
||||
ScssLint:
|
||||
enabled: true
|
||||
RailsSchemaUpToDate:
|
||||
@@ -69,11 +72,6 @@ PreCommit:
|
||||
YamlLint:
|
||||
enabled: true
|
||||
|
||||
PostCommit:
|
||||
GitGuilt:
|
||||
enabled: true
|
||||
command: ['npm', 'run', 'git-guilt']
|
||||
|
||||
PostCheckout:
|
||||
ALL:
|
||||
quiet: false
|
||||
|
||||
17
.travis.yml
17
.travis.yml
@@ -1,4 +1,4 @@
|
||||
sudo: false
|
||||
sudo: required
|
||||
language: ruby
|
||||
cache:
|
||||
bundler: true
|
||||
@@ -17,13 +17,23 @@ env:
|
||||
before_install:
|
||||
- ./script/install_phantomjs;
|
||||
- export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
|
||||
# Force Travis to use Elastic Search 2.4.0
|
||||
- >
|
||||
if [ "${GROWSTUFF_ELASTICSEARCH}" = "true" ]; then
|
||||
sudo dpkg -r elasticsearch;
|
||||
curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.4.0/elasticsearch-2.4.0.deb;
|
||||
sudo dpkg -i --force-confnew elasticsearch-2.4.0.deb;
|
||||
sudo service elasticsearch start;
|
||||
sleep 10;
|
||||
curl localhost:9200;
|
||||
fi
|
||||
before_script:
|
||||
- bundle exec rake db:create db:migrate db:test:prepare
|
||||
- set -e
|
||||
- >
|
||||
if [ "${STATIC_CHECKS}" = "true" ]; then
|
||||
./script/install_linters;
|
||||
else
|
||||
bundle exec rake db:create db:migrate db:test:prepare;
|
||||
bundle exec rake assets:precompile;
|
||||
fi
|
||||
- set +e
|
||||
@@ -38,9 +48,6 @@ script:
|
||||
bundle exec rake jasmine:ci;
|
||||
fi;
|
||||
- set +e
|
||||
|
||||
services:
|
||||
- elasticsearch
|
||||
before_deploy:
|
||||
- bundle exec script/heroku_maintenance.rb on
|
||||
deploy:
|
||||
|
||||
4
Gemfile
4
Gemfile
@@ -106,7 +106,7 @@ group :development do
|
||||
# A debugger and irb alternative. Pry doesn't play nice
|
||||
# with unicorn, so start a Webrick server when debugging
|
||||
# with Pry
|
||||
gem 'better_errors'
|
||||
gem 'better_errors', '~> 2.2.0'
|
||||
gem 'binding_of_caller'
|
||||
gem 'guard'
|
||||
gem 'guard-rspec'
|
||||
@@ -145,5 +145,5 @@ group :test do
|
||||
end
|
||||
|
||||
group :travis do
|
||||
gem 'heroku-api'
|
||||
gem 'platform-api'
|
||||
end
|
||||
|
||||
91
Gemfile.lock
91
Gemfile.lock
@@ -20,18 +20,18 @@ GEM
|
||||
erubis (~> 2.7.0)
|
||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||
active_link_to (1.0.4)
|
||||
active_link_to (1.0.5)
|
||||
actionpack
|
||||
addressable
|
||||
active_merchant-paypal-bogus-gateway (0.1.0)
|
||||
activemerchant
|
||||
active_utils (3.3.7)
|
||||
active_utils (3.3.8)
|
||||
activesupport (>= 3.2, < 5.2.0)
|
||||
i18n
|
||||
activejob (4.2.9)
|
||||
activesupport (= 4.2.9)
|
||||
globalid (>= 0.3.0)
|
||||
activemerchant (1.69.0)
|
||||
activemerchant (1.72.0)
|
||||
activesupport (>= 3.2.14, < 6.x)
|
||||
builder (>= 2.1.2, < 4.0.0)
|
||||
i18n (>= 0.6.9)
|
||||
@@ -51,11 +51,11 @@ GEM
|
||||
acts_as_paranoid (0.5.0)
|
||||
activerecord (>= 4.0, < 5.1)
|
||||
activesupport (>= 4.0, < 5.1)
|
||||
addressable (2.5.1)
|
||||
public_suffix (~> 2.0, >= 2.0.2)
|
||||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
arel (6.0.4)
|
||||
ast (2.3.0)
|
||||
autoprefixer-rails (7.1.2.3)
|
||||
autoprefixer-rails (7.1.4)
|
||||
execjs
|
||||
bcrypt (3.1.11)
|
||||
better_errors (2.2.0)
|
||||
@@ -68,7 +68,7 @@ GEM
|
||||
bonsai-elasticsearch-rails (0.2.0)
|
||||
elasticsearch-model (~> 0)
|
||||
elasticsearch-rails (~> 0)
|
||||
bootstrap-datepicker-rails (1.6.4.1)
|
||||
bootstrap-datepicker-rails (1.7.1.1)
|
||||
railties (>= 3.0)
|
||||
bootstrap-kaminari-views (0.0.5)
|
||||
kaminari (>= 0.13)
|
||||
@@ -81,11 +81,11 @@ GEM
|
||||
bullet (5.6.1)
|
||||
activesupport (>= 3.0.0)
|
||||
uniform_notifier (~> 1.10.0)
|
||||
byebug (9.0.6)
|
||||
byebug (9.1.0)
|
||||
cancancan (2.0.0)
|
||||
capybara (2.14.4)
|
||||
capybara (2.15.1)
|
||||
addressable
|
||||
mime-types (>= 1.16)
|
||||
mini_mime (>= 0.1.3)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
@@ -106,7 +106,7 @@ GEM
|
||||
simplecov (<= 0.13)
|
||||
codemirror-rails (5.16.0)
|
||||
railties (>= 3.0, < 6.0)
|
||||
coderay (1.1.1)
|
||||
coderay (1.1.2)
|
||||
coffee-rails (4.2.2)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (>= 4.0.0)
|
||||
@@ -170,7 +170,7 @@ GEM
|
||||
faraday
|
||||
multi_json
|
||||
erubis (2.7.0)
|
||||
excon (0.58.0)
|
||||
excon (0.59.0)
|
||||
execjs (2.7.0)
|
||||
factory_girl (4.8.0)
|
||||
activesupport (>= 3.0.0)
|
||||
@@ -186,7 +186,7 @@ GEM
|
||||
font-awesome-sass (4.7.0)
|
||||
sass (>= 3.2)
|
||||
formatador (0.2.5)
|
||||
friendly_id (5.2.1)
|
||||
friendly_id (5.2.3)
|
||||
activerecord (>= 4.0.0)
|
||||
geocoder (1.4.4)
|
||||
gibbon (1.2.1)
|
||||
@@ -211,7 +211,7 @@ GEM
|
||||
guard (~> 2.1)
|
||||
guard-compat (~> 1.1)
|
||||
rspec (>= 2.99.0, < 4.0)
|
||||
haml (5.0.2)
|
||||
haml (5.0.3)
|
||||
temple (>= 0.8.0)
|
||||
tilt
|
||||
haml-i18n-extractor (0.5.9)
|
||||
@@ -233,9 +233,11 @@ GEM
|
||||
rubocop (>= 0.47.0)
|
||||
sysexits (~> 1.1)
|
||||
hashie (3.5.6)
|
||||
heroku-api (0.4.2)
|
||||
excon (~> 0.45)
|
||||
multi_json (~> 1.8)
|
||||
heroics (0.0.24)
|
||||
erubis (~> 2.0)
|
||||
excon
|
||||
moneta
|
||||
multi_json (>= 1.9.2)
|
||||
highline (1.7.8)
|
||||
html2haml (2.2.0)
|
||||
erubis (~> 2.7.0)
|
||||
@@ -255,19 +257,19 @@ GEM
|
||||
parser (>= 2.2.3.0)
|
||||
term-ansicolor (>= 1.3.2)
|
||||
terminal-table (>= 1.5.1)
|
||||
jasmine (2.7.0)
|
||||
jasmine-core (>= 2.7.0, < 3.0.0)
|
||||
jasmine (2.8.0)
|
||||
jasmine-core (>= 2.8.0, < 3.0.0)
|
||||
phantomjs
|
||||
rack (>= 1.2.1)
|
||||
rake
|
||||
jasmine-core (2.7.0)
|
||||
jasmine-core (2.8.0)
|
||||
jquery-rails (4.3.1)
|
||||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
jquery-ui-rails (5.0.5)
|
||||
railties (>= 3.2.16)
|
||||
js-routes (1.3.3)
|
||||
js-routes (1.4.1)
|
||||
railties (>= 3.2)
|
||||
sprockets-rails
|
||||
json (2.1.0)
|
||||
@@ -285,7 +287,7 @@ GEM
|
||||
kaminari-core (= 1.0.1)
|
||||
kaminari-core (1.0.1)
|
||||
kgio (2.11.0)
|
||||
kramdown (1.14.0)
|
||||
kramdown (1.15.0)
|
||||
launchy (2.4.3)
|
||||
addressable (~> 2.3)
|
||||
leaflet-markercluster-rails (0.7.0)
|
||||
@@ -308,15 +310,17 @@ GEM
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2016.0521)
|
||||
mimemagic (0.3.2)
|
||||
mini_portile2 (2.2.0)
|
||||
mini_mime (0.1.4)
|
||||
mini_portile2 (2.3.0)
|
||||
minitest (5.10.3)
|
||||
moneta (0.8.1)
|
||||
multi_json (1.11.3)
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.0.0)
|
||||
nenv (0.3.0)
|
||||
newrelic_rpm (4.3.0.335)
|
||||
nokogiri (1.8.0)
|
||||
mini_portile2 (~> 2.2.0)
|
||||
newrelic_rpm (4.4.0.336)
|
||||
nokogiri (1.8.1)
|
||||
mini_portile2 (~> 2.3.0)
|
||||
notiffany (0.1.1)
|
||||
nenv (~> 0.1)
|
||||
shellany (~> 0.0)
|
||||
@@ -355,18 +359,20 @@ GEM
|
||||
ast (~> 2.2)
|
||||
pg (0.21.0)
|
||||
phantomjs (2.1.1.0)
|
||||
platform-api (2.1.0)
|
||||
heroics (~> 0.0.23)
|
||||
moneta (~> 0.8.1)
|
||||
plupload-rails (1.2.1)
|
||||
rails (>= 3.1)
|
||||
poltergeist (1.15.0)
|
||||
poltergeist (1.16.0)
|
||||
capybara (~> 2.1)
|
||||
cliver (~> 0.3.1)
|
||||
websocket-driver (>= 0.2.0)
|
||||
powerpack (0.1.1)
|
||||
pry (0.10.4)
|
||||
pry (0.11.0)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
public_suffix (2.0.5)
|
||||
public_suffix (3.0.0)
|
||||
quiet_assets (1.1.0)
|
||||
railties (>= 3.1, < 5.0)
|
||||
rack (1.6.8)
|
||||
@@ -407,8 +413,8 @@ GEM
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rainbow (2.1.0)
|
||||
raindrops (0.18.0)
|
||||
rake (12.0.0)
|
||||
raindrops (0.19.0)
|
||||
rake (12.1.0)
|
||||
rb-fsevent (0.10.2)
|
||||
rb-inotify (0.9.10)
|
||||
ffi (>= 0.5.0, < 2)
|
||||
@@ -432,7 +438,7 @@ GEM
|
||||
rspec-mocks (3.6.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.6.0)
|
||||
rspec-rails (3.6.0)
|
||||
rspec-rails (3.6.1)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
@@ -447,8 +453,8 @@ GEM
|
||||
rainbow (>= 1.99.1, < 3.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (~> 1.0, >= 1.0.1)
|
||||
ruby-progressbar (1.8.1)
|
||||
ruby-units (2.1.0)
|
||||
ruby-progressbar (1.8.3)
|
||||
ruby-units (2.2.0)
|
||||
ruby_dep (1.5.0)
|
||||
ruby_parser (3.10.1)
|
||||
sexp_processor (~> 4.9)
|
||||
@@ -464,7 +470,7 @@ GEM
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
tilt (>= 1.1, < 3)
|
||||
selenium-webdriver (3.4.4)
|
||||
selenium-webdriver (3.5.2)
|
||||
childprocess (~> 0.5)
|
||||
rubyzip (~> 1.0)
|
||||
sexp_processor (4.10.0)
|
||||
@@ -478,14 +484,13 @@ GEM
|
||||
docile (~> 1.1.0)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-html (0.10.1)
|
||||
slop (3.6.0)
|
||||
simplecov-html (0.10.2)
|
||||
sparkpost_rails (1.4.0)
|
||||
rails (>= 4.0, < 5.1)
|
||||
sprockets (3.7.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
sprockets-rails (3.2.0)
|
||||
sprockets-rails (3.2.1)
|
||||
actionpack (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
sprockets (>= 3.0.0)
|
||||
@@ -517,11 +522,11 @@ GEM
|
||||
nokogiri (>= 1.2.0)
|
||||
rack (>= 1.0)
|
||||
rack-test (>= 0.5.3)
|
||||
websocket-driver (0.6.5)
|
||||
websocket-driver (0.7.0)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.2)
|
||||
will_paginate (3.1.6)
|
||||
xmlrpc (0.2.1)
|
||||
xmlrpc (0.3.0)
|
||||
xpath (2.1.0)
|
||||
nokogiri (~> 1.3)
|
||||
|
||||
@@ -533,7 +538,7 @@ DEPENDENCIES
|
||||
active_utils
|
||||
activemerchant
|
||||
acts_as_paranoid (~> 0.5.0)
|
||||
better_errors
|
||||
better_errors (~> 2.2.0)
|
||||
binding_of_caller
|
||||
bluecloth
|
||||
bonsai-elasticsearch-rails
|
||||
@@ -574,7 +579,6 @@ DEPENDENCIES
|
||||
haml-rails
|
||||
haml_lint
|
||||
hashie (>= 3.5.3)
|
||||
heroku-api
|
||||
i18n-tasks
|
||||
jasmine
|
||||
jquery-rails
|
||||
@@ -591,6 +595,7 @@ DEPENDENCIES
|
||||
omniauth-flickr (>= 0.0.15)
|
||||
omniauth-twitter
|
||||
pg
|
||||
platform-api
|
||||
poltergeist
|
||||
pry
|
||||
quiet_assets
|
||||
|
||||
@@ -17,7 +17,7 @@ class PlantingPredictions
|
||||
def percentage_grown
|
||||
return nil unless @planting.days_before_maturity && @planting.planted?
|
||||
|
||||
days = (Date.current - @planting.planted_at.to_date).to_i
|
||||
days = (Date.current - @planting.planted_at.to_date).to_f
|
||||
|
||||
return 0 if Date.current < @planting.planted_at
|
||||
return 100 if days > @planting.days_before_maturity
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
"coffeelint": "^1.16.0",
|
||||
"csslint": "^1.0.5",
|
||||
"eslint": "^3.17.1",
|
||||
"git-guilt": "^0.1.1",
|
||||
"jshint": "^2.9.4"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user