summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-05-19 07:55:04 -0700
committermo khan <mo@mokhan.ca>2015-05-21 21:26:10 -0600
commite89bc7cb1467063ce65e3e78d77c8f4635132d0f (patch)
tree4e7664935ebe396ac0b048e0421e15a034f15b61 /bin
parentb769c085489679d362ccacd4e5d514f663379089 (diff)
create a workout record for each recors in the sqlite db.
Diffstat (limited to 'bin')
-rwxr-xr-x[-rw-r--r--]bin/bootstrap-vagrant-user.sh0
-rwxr-xr-x[-rw-r--r--]bin/bootstrap.sh0
-rwxr-xr-xbin/rails18
-rwxr-xr-xbin/rake22
-rwxr-xr-xbin/rspec4
-rwxr-xr-xbin/setup37
-rwxr-xr-xbin/spring23
7 files changed, 50 insertions, 54 deletions
diff --git a/bin/bootstrap-vagrant-user.sh b/bin/bootstrap-vagrant-user.sh
index b42a110..b42a110 100644..100755
--- a/bin/bootstrap-vagrant-user.sh
+++ b/bin/bootstrap-vagrant-user.sh
diff --git a/bin/bootstrap.sh b/bin/bootstrap.sh
index 098a62e..098a62e 100644..100755
--- a/bin/bootstrap.sh
+++ b/bin/bootstrap.sh
diff --git a/bin/rails b/bin/rails
index 657440d..5191e69 100755
--- a/bin/rails
+++ b/bin/rails
@@ -1,16 +1,4 @@
#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'rails' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-require 'pathname'
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
- Pathname.new(__FILE__).realpath)
-
-require 'rubygems'
-require 'bundler/setup'
-
-load Gem.bin_path('railties', 'rails')
+APP_PATH = File.expand_path('../../config/application', __FILE__)
+require_relative '../config/boot'
+require 'rails/commands'
diff --git a/bin/rake b/bin/rake
index 26c7a2d..8017a02 100755
--- a/bin/rake
+++ b/bin/rake
@@ -1,16 +1,8 @@
#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'rake' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-require 'pathname'
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
- Pathname.new(__FILE__).realpath)
-
-require 'rubygems'
-require 'bundler/setup'
-
-load Gem.bin_path('rake', 'rake')
+begin
+ load File.expand_path("../spring", __FILE__)
+rescue LoadError
+end
+require_relative '../config/boot'
+require 'rake'
+Rake.application.run
diff --git a/bin/rspec b/bin/rspec
index 0c86b5c..5318d0c 100755
--- a/bin/rspec
+++ b/bin/rspec
@@ -1,4 +1,8 @@
#!/usr/bin/env ruby
+begin
+ load File.expand_path("../spring", __FILE__)
+rescue LoadError
+end
#
# This file was generated by Bundler.
#
diff --git a/bin/setup b/bin/setup
index 0fc0627..acdb2c1 100755
--- a/bin/setup
+++ b/bin/setup
@@ -1,16 +1,29 @@
#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'setup' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
require 'pathname'
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
- Pathname.new(__FILE__).realpath)
-require 'rubygems'
-require 'bundler/setup'
+# path to your application root.
+APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+
+Dir.chdir APP_ROOT do
+ # This script is a starting point to setup your application.
+ # Add necessary setup steps to this file:
+
+ puts "== Installing dependencies =="
+ system "gem install bundler --conservative"
+ system "bundle check || bundle install"
+
+ # puts "\n== Copying sample files =="
+ # unless File.exist?("config/database.yml")
+ # system "cp config/database.yml.sample config/database.yml"
+ # end
+
+ puts "\n== Preparing database =="
+ system "bin/rake db:setup"
+
+ puts "\n== Removing old logs and tempfiles =="
+ system "rm -f log/*"
+ system "rm -rf tmp/cache"
-load Gem.bin_path('factory_girl_rails', 'setup')
+ puts "\n== Restarting application server =="
+ system "touch tmp/restart.txt"
+end
diff --git a/bin/spring b/bin/spring
index 38fee6f..7b45d37 100755
--- a/bin/spring
+++ b/bin/spring
@@ -1,16 +1,15 @@
#!/usr/bin/env ruby
-#
-# This file was generated by Bundler.
-#
-# The application 'spring' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-require 'pathname'
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
- Pathname.new(__FILE__).realpath)
+# This file loads spring without using Bundler, in order to be fast.
+# It gets overwritten when you run the `spring binstub` command.
-require 'rubygems'
-require 'bundler/setup'
+unless defined?(Spring)
+ require "rubygems"
+ require "bundler"
-load Gem.bin_path('spring', 'spring')
+ if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
+ Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
+ gem "spring", match[1]
+ require "spring/binstub"
+ end
+end