repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/app/models/fitbit_account.rb
app/models/fitbit_account.rb
# == Schema Information # # Table name: fitbit_accounts # # id :integer not null, primary key # uid :string(255) # oauth_token :string(255) # oauth_token_secret :string(255) # user_id :integer # created_at :datetime # updated_at :datetime ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/app/models/journal_entry.rb
app/models/journal_entry.rb
# == Schema Information # # Table name: journal_entries # # id :integer not null, primary key # feelings :text # happiness :integer # strategies :text # created_at :datetime # updated_at :datetime # user_id :integer # e...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/app/models/foursquare_account.rb
app/models/foursquare_account.rb
# == Schema Information # # Table name: foursquare_accounts # # id :integer not null, primary key # uid :string(255) # oauth_token :string(255) # activated_at :datetime # synced_at :datetime # user_id :integer # created_at :datetime # updated_at :datetime # class Foursq...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/app/models/meal.rb
app/models/meal.rb
# == Schema Information # # Table name: meals # # id :integer not null, primary key # date :date # calories :integer # carbohydrates :integer # protein :integer # fat :integer # user_id :integer # description :string(255) # created_at :datetime # up...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/app/models/weight.rb
app/models/weight.rb
# == Schema Information # # Table name: weights # # id :integer not null, primary key # type :string(255) # user_id :integer # bmi :float # value :float # lean_mass :float # fat_mass :float # fat_percent :float # date :datetime # created_at :datetime # ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/app/models/sleep.rb
app/models/sleep.rb
# == Schema Information # # Table name: sleeps # # id :integer not null, primary key # start :datetime # end :datetime # user_id :integer # created_at :datetime # updated_at :datetime # meta :hstore # source :string(255) # class Sleep < ActiveRecord::Base attr_access...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/app/models/withings_account.rb
app/models/withings_account.rb
# == Schema Information # # Table name: withings_accounts # # id :integer not null, primary key # userid :string(255) # created_at :datetime # updated_at :datetime # oauth_token :string(255) # user_id :integer # oauth_token_secret :string(255...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/app/models/user.rb
app/models/user.rb
# == Schema Information # # Table name: users # # id :integer not null, primary key # created_at :datetime # updated_at :datetime # email :string(255) default(""), not null # encrypted_password :string(255) default(""), not null # ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/app/models/concerns/data_provider.rb
app/models/concerns/data_provider.rb
# DataProvider makes assumptions about the structure and source of data providers. These # providers will typically be device manufacturers who grant open API access to consumers. # We abstract the common API authentication behaviour here. # All schemas for DataProviders should implement the following columns: # => sy...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/seeds.rb
db/seeds.rb
# This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/schema.rb
db/schema.rb
# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative sou...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130323055451_add_name_to_users.rb
db/migrate/20130323055451_add_name_to_users.rb
class AddNameToUsers < ActiveRecord::Migration def change add_column :users, :name, :string end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130803175122_rename_locations_to_places.rb
db/migrate/20130803175122_rename_locations_to_places.rb
class RenameLocationsToPlaces < ActiveRecord::Migration def change rename_table :locations, :places end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140109041557_create_sleeps.rb
db/migrate/20140109041557_create_sleeps.rb
class CreateSleeps < ActiveRecord::Migration def change create_table :sleeps do |t| t.datetime :start t.datetime :end t.integer :user_id t.timestamps end end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130819210218_add_authentication_token_to_user.rb
db/migrate/20130819210218_add_authentication_token_to_user.rb
class AddAuthenticationTokenToUser < ActiveRecord::Migration def change add_column :users, :authentication_token, :string add_index :users, :authentication_token, :unique => true end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130615173023_setup_hstore.rb
db/migrate/20130615173023_setup_hstore.rb
class SetupHstore < ActiveRecord::Migration def self.up execute "CREATE EXTENSION IF NOT EXISTS hstore" end def self.down execute "DROP EXTENSION IF EXISTS hstore" end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130803051622_drop_measurements.rb
db/migrate/20130803051622_drop_measurements.rb
class DropMeasurements < ActiveRecord::Migration def up drop_table :measurements end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130913031613_change_datetime_to_date_on_meal.rb
db/migrate/20130913031613_change_datetime_to_date_on_meal.rb
class ChangeDatetimeToDateOnMeal < ActiveRecord::Migration def up connection = ActiveRecord::Base.connection() connection.execute "ALTER TABLE meals ALTER COLUMN date SET DATA TYPE date" end def down connection = ActiveRecord::Base.connection() connection.execute "ALTER ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140118211647_add_synced_at_to_fitbit_account.rb
db/migrate/20140118211647_add_synced_at_to_fitbit_account.rb
class AddSyncedAtToFitbitAccount < ActiveRecord::Migration def change add_column :fitbit_accounts, :synced_at, :datetime end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130507025853_add_oauth_token_secret_to_withings_account.rb
db/migrate/20130507025853_add_oauth_token_secret_to_withings_account.rb
class AddOauthTokenSecretToWithingsAccount < ActiveRecord::Migration def change add_column :withings_accounts, :oauth_token_secret, :string end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130420171616_set_name_as_empty_string.rb
db/migrate/20130420171616_set_name_as_empty_string.rb
class SetNameAsEmptyString < ActiveRecord::Migration def up User.all.each do |user| user.update_column(:name, "User") end end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140126060624_add_meta_to_sleep.rb
db/migrate/20140126060624_add_meta_to_sleep.rb
class AddMetaToSleep < ActiveRecord::Migration def change add_column :sleeps, :meta, :hstore add_column :sleeps, :source, :string add_hstore_index :sleeps, :meta end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130330165127_add_height_to_user.rb
db/migrate/20130330165127_add_height_to_user.rb
class AddHeightToUser < ActiveRecord::Migration def change add_column :users, :height, :float end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130622044752_add_source_to_weights.rb
db/migrate/20130622044752_add_source_to_weights.rb
class AddSourceToWeights < ActiveRecord::Migration def change add_column :weights, :source, :string end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130816020401_create_meals.rb
db/migrate/20130816020401_create_meals.rb
class CreateMeals < ActiveRecord::Migration def change create_table :meals do |t| t.datetime :date t.integer :calories t.integer :carbohydrates t.integer :protein t.integer :fat t.integer :user_id t.string :descripti...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130803162630_rename_weights_fields.rb
db/migrate/20130803162630_rename_weights_fields.rb
class RenameWeightsFields < ActiveRecord::Migration def change rename_column :weights, :lean_mass_value, :lean_mass rename_column :weights, :fat_mass_value, :fat_mass rename_column :weights, :fat_percentage, :fat_percent rename_column :weights, :recorded_at, :date end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130608214958_remove_oauth_verify_token_from_withings_account.rb
db/migrate/20130608214958_remove_oauth_verify_token_from_withings_account.rb
class RemoveOauthVerifyTokenFromWithingsAccount < ActiveRecord::Migration def change remove_column :withings_accounts, :oauth_verifier end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130728222444_setup_earthdistance.rb
db/migrate/20130728222444_setup_earthdistance.rb
class SetupEarthdistance < ActiveRecord::Migration def self.up execute "CREATE EXTENSION IF NOT EXISTS cube" execute "CREATE EXTENSION IF NOT EXISTS earthdistance" end def self.down execute "DROP EXTENSION IF EXISTS earthdistance" execute "DROP EXTENSION IF EXISTS cube" end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130913015037_add_time_zone_to_user.rb
db/migrate/20130913015037_add_time_zone_to_user.rb
class AddTimeZoneToUser < ActiveRecord::Migration def change add_column :users, :time_zone, :string, :default => "UTC" end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140125175905_convert_weights_to_kilograms.rb
db/migrate/20140125175905_convert_weights_to_kilograms.rb
class ConvertWeightsToKilograms < ActiveRecord::Migration def up Weight.all.each do |weight| weight.update_attribute(:value, Unit.new(weight.value, :pounds).to_system(:metric)) end end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130310195028_create_users.rb
db/migrate/20130310195028_create_users.rb
class CreateUsers < ActiveRecord::Migration def self.up create_table(:users) do |t| t.timestamps end end def self.down drop_table :users end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130420202841_add_oauth_token_to_withings_account.rb
db/migrate/20130420202841_add_oauth_token_to_withings_account.rb
class AddOauthTokenToWithingsAccount < ActiveRecord::Migration def change add_column :withings_accounts, :oauth_token, :string add_column :withings_accounts, :oauth_verifier, :string rename_column :withings_accounts, :uid, :userid add_column :withings_accounts, :user_id, :integer add_inde...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140124014335_add_activation_date_to_data_providers.rb
db/migrate/20140124014335_add_activation_date_to_data_providers.rb
class AddActivationDateToDataProviders < ActiveRecord::Migration def change add_column :fitbit_accounts, :activated_at, :datetime add_column :withings_accounts, :activated_at, :datetime end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130312014452_add_date_to_measurement.rb
db/migrate/20130312014452_add_date_to_measurement.rb
class AddDateToMeasurement < ActiveRecord::Migration def change add_column :measurements, :recorded_at, :datetime end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140712220030_add_encrypted_fields.rb
db/migrate/20140712220030_add_encrypted_fields.rb
class AddEncryptedFields < ActiveRecord::Migration def change add_column :journal_entries, :encrypted_happiness, :string add_column :journal_entries, :encrypted_strategies, :text add_column :journal_entries, :encrypted_feelings, :text remove_column :journal_entries, :recorded_at, :datetime end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140712150021_create_journal_entries.rb
db/migrate/20140712150021_create_journal_entries.rb
class CreateJournalEntries < ActiveRecord::Migration def change create_table :journal_entries do |t| t.datetime :recorded_at t.string :feelings t.integer :happiness t.string :strategies t.timestamps end end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130324040455_create_weights.rb
db/migrate/20130324040455_create_weights.rb
class CreateWeights < ActiveRecord::Migration def change create_table :weights do |t| t.string :type t.integer :user_id t.float :bmi t.float :value t.float :lean_mass_value t.float :fat_mass_value t.float :fat_percentage t.datetime :recorded_at t.timestamps ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130311013450_add_user_id_to_measurement.rb
db/migrate/20130311013450_add_user_id_to_measurement.rb
class AddUserIdToMeasurement < ActiveRecord::Migration def change add_column :measurements, :user_id, :integer add_index :measurements, :user_id end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140108154856_remove_auth_token_from_user.rb
db/migrate/20140108154856_remove_auth_token_from_user.rb
class RemoveAuthTokenFromUser < ActiveRecord::Migration def change remove_column :users, :authentication_token end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130728222738_create_locations.rb
db/migrate/20130728222738_create_locations.rb
class CreateLocations < ActiveRecord::Migration def change create_table :locations do |t| t.integer :user_id t.datetime :recorded_at t.decimal :lat t.decimal :lng t.timestamps end add_earthdistance_index :locations end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140110125408_add_index_to_sleeps_start.rb
db/migrate/20140110125408_add_index_to_sleeps_start.rb
class AddIndexToSleepsStart < ActiveRecord::Migration def change add_index :sleeps, :start end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140712190721_change_feelings_and_strategies_fields_to_text.rb
db/migrate/20140712190721_change_feelings_and_strategies_fields_to_text.rb
class ChangeFeelingsAndStrategiesFieldsToText < ActiveRecord::Migration def change change_column :journal_entries, :strategies, :text change_column :journal_entries, :feelings, :text end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130622161730_move_grpid_to_meta.rb
db/migrate/20130622161730_move_grpid_to_meta.rb
class MoveGrpidToMeta < ActiveRecord::Migration def up Weight.all.each do |weight| if weight.grpid.present? weight.meta['grpid'] = weight.grpid weight.source = "WithingsAccount" weight.save end end remove_column :weights, :grpid end def down add_column :weights, :...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130803175510_rename_places_fields.rb
db/migrate/20130803175510_rename_places_fields.rb
class RenamePlacesFields < ActiveRecord::Migration def change rename_column :places, :recorded_at, :date end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140712154647_add_journal_entry_to_user.rb
db/migrate/20140712154647_add_journal_entry_to_user.rb
class AddJournalEntryToUser < ActiveRecord::Migration def change add_column :journal_entries, :user_id, :integer end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130605043956_create_fitbit_accounts.rb
db/migrate/20130605043956_create_fitbit_accounts.rb
class CreateFitbitAccounts < ActiveRecord::Migration def change create_table :fitbit_accounts do |t| t.string :uid t.string :oauth_token t.string :oauth_token_secret t.integer :user_id t.timestamps end add_index :fitbit_accounts, :user_id end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140521021713_remove_moods.rb
db/migrate/20140521021713_remove_moods.rb
class RemoveMoods < ActiveRecord::Migration def up drop_table :moods end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130316044213_create_withings_accounts.rb
db/migrate/20130316044213_create_withings_accounts.rb
class CreateWithingsAccounts < ActiveRecord::Migration def change create_table :withings_accounts do |t| t.string :uid t.timestamps end end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130615174058_add_meta_to_weight.rb
db/migrate/20130615174058_add_meta_to_weight.rb
class AddMetaToWeight < ActiveRecord::Migration def change add_column :weights, :meta, :hstore add_hstore_index :weights, :meta end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130310155705_create_measurements.rb
db/migrate/20130310155705_create_measurements.rb
class CreateMeasurements < ActiveRecord::Migration def change create_table :measurements do |t| t.float :value t.string :type t.timestamps end end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130323044051_add_devise_to_users.rb
db/migrate/20130323044051_add_devise_to_users.rb
class AddDeviseToUsers < ActiveRecord::Migration def self.up change_table(:users) do |t| ## Database authenticatable t.string :email, :null => false, :default => "" t.string :encrypted_password, :null => false, :default => "" ## Recoverable t.string :reset_password_to...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130622203100_add_synced_at_to_withings_account.rb
db/migrate/20130622203100_add_synced_at_to_withings_account.rb
class AddSyncedAtToWithingsAccount < ActiveRecord::Migration def change add_column :withings_accounts, :synced_at, :datetime end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20140203025359_create_foursquare_table.rb
db/migrate/20140203025359_create_foursquare_table.rb
class CreateFoursquareTable < ActiveRecord::Migration def change create_table :foursquare_accounts do |t| t.string :uid t.string :oauth_token t.datetime :activated_at t.datetime :synced_at t.integer :user_id t.timestamps end add_index :foursquare_accounts, :user_id...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20131231024056_create_moods.rb
db/migrate/20131231024056_create_moods.rb
class CreateMoods < ActiveRecord::Migration def change create_table :moods do |t| t.datetime :date t.integer :user_id t.decimal :rating t.text :description t.timestamps end end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/db/migrate/20130514040006_add_grpid_to_weights_table.rb
db/migrate/20130514040006_add_grpid_to_weights_table.rb
class AddGrpidToWeightsTable < ActiveRecord::Migration def change add_column :weights, :grpid, :integer end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/shared_examples_a_data_provider.rb
spec/shared_examples_a_data_provider.rb
require 'spec_helper' shared_examples "a data provider" do let(:data_provider) { described_class.new() } it { should belong_to(:user) } describe "#provides_data_for" do context "with data types provided to #data_provider_for" do before do @provides_data_for = described_class.provides_data_for...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/spec_helper.rb
spec/spec_helper.rb
require 'rubygems' require 'webmock/rspec' # This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' require 'email_spec' require 'capybara/rspec' require 'capybara/...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/initializers/unit_spec.rb
spec/initializers/unit_spec.rb
require 'spec_helper' describe Unit do describe ".to_unit" do context "when converting 1 meter to feet" do it "is 3.28084" do Unit.new(1, :meters).to_unit(:feet).should eq(3.28084) end end context "when converting 1 pound to one pound (same unit)" do it "is 3.28084" do ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/support/devise.rb
spec/support/devise.rb
RSpec.configure do |config| config.include Devise::TestHelpers, :type => :controller end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/support/integration.rb
spec/support/integration.rb
require "#{Rails.root}/spec/support/integration/action_mailer_helpers.rb" require "#{Rails.root}/spec/support/integration/omniauth_helpers.rb" RSpec.configure do |config| config.include Integration::ActionMailerHelpers, type: :request config.include Integration::OmniauthHelpers, type: :request end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/support/be_a_data_provider_for_matcher.rb
spec/support/be_a_data_provider_for_matcher.rb
require 'rspec/expectations' RSpec::Matchers.define :be_a_data_provider_for do |expected| match do |actual| actual.provides_data_for.include? expected end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/support/deferred_garbage_collection.rb
spec/support/deferred_garbage_collection.rb
class DeferredGarbageCollection DEFERRED_GC_THRESHOLD = (ENV['DEFER_GC'] || 60.0).to_f @@last_gc_run = Time.now def self.start GC.disable if DEFERRED_GC_THRESHOLD > 0 end def self.reconsider if DEFERRED_GC_THRESHOLD > 0 && Time.now - @@last_gc_run >= DEFERRED_GC_THRESHOLD GC.enable GC....
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/support/action_mailer.rb
spec/support/action_mailer.rb
RSpec.configure do |config| config.before(:each) { ActionMailer::Base.deliveries.clear } end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/support/integration/action_mailer_helpers.rb
spec/support/integration/action_mailer_helpers.rb
module Integration module ActionMailerHelpers def mailer_should_have_delivery(recipient, subject, body) ActionMailer::Base.deliveries.should_not be_empty message = ActionMailer::Base.deliveries.any? do |email| email.to == [recipient] && email.subject =~ /#{subject}/i && em...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/support/integration/omniauth_helpers.rb
spec/support/integration/omniauth_helpers.rb
module Integration module OmniauthHelpers OmniAuth.config.mock_auth[:withings] = OmniAuth::AuthHash.new({ provider: "withings", uid: "0", userid: "0", info: { name: nil }, credentials: { token: "0", secret: "0" } }) OmniAuth.config.mock_au...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/routing/omniauth_callbacks_routing_spec.rb
spec/routing/omniauth_callbacks_routing_spec.rb
require "spec_helper" describe OmniauthCallbacksController do describe "routing" do # These specs exist to support the following devise config: # config.sign_out_via = :delete it "routes to #logout with DELETE" do expect(delete: "/users/sign_out").to route_to(controller: "devise/sessions", action...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/routing/dashboard_routing_spec.rb
spec/routing/dashboard_routing_spec.rb
require "spec_helper" describe DashboardController do describe "routing" do it "routes to #index" do pending #get("/").should route_to("dashboard#index") end end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/routing/places_routing_spec.rb
spec/routing/places_routing_spec.rb
require "spec_helper" describe PlacesController do describe "routing" do it "routes to #index" do get("/places").should route_to("places#index") end it "routes to #new" do get("/places/new").should route_to("places#new") end it "routes to #show" do get("/places/1").should rou...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/routing/sleeps_routing_spec.rb
spec/routing/sleeps_routing_spec.rb
require "spec_helper" describe SleepsController do describe "routing" do it "routes to #index" do get("/sleeps").should route_to("sleeps#index") end it "routes to #new" do get("/sleeps/new").should route_to("sleeps#new") end it "routes to #show" do get("/sleeps/1").should rou...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/routing/meals_routing_spec.rb
spec/routing/meals_routing_spec.rb
require "spec_helper" describe MealsController do describe "routing" do it "routes to #index" do get("/meals").should route_to("meals#index") end it "routes to #new" do get("/meals/new").should route_to("meals#new") end it "routes to #show" do get("/meals/1").should route_to(...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/routing/devise_routing_spec.rb
spec/routing/devise_routing_spec.rb
require 'spec_helper' describe Devise do end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/routing/weights_routing_spec.rb
spec/routing/weights_routing_spec.rb
require "spec_helper" describe WeightsController do describe "routing" do it "routes to #index" do get("/weights").should route_to("weights#index") end it "routes to #new" do get("/weights/new").should route_to("weights#new") end it "routes to #show" do get("/weights/1").shou...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/requests/sleeps_spec.rb
spec/requests/sleeps_spec.rb
require 'spec_helper' describe "Sleeps" do let(:user) {Fabricate(:user)} describe "GET /sleeps" do context "when not signed in" do it "redirects" do get sleeps_path expect( response.status ).to eq(302) # have to be signed in end end context "when signed ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/requests/weights_spec.rb
spec/requests/weights_spec.rb
require 'spec_helper' describe "Weights" do let(:user) {Fabricate(:user)} describe "GET /weights" do context "when not signed in" do it "redirects" do get weights_path expect( response.status ).to eq(302) # have to be signed in end end context "when sign...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/requests/meals_spec.rb
spec/requests/meals_spec.rb
require 'spec_helper' describe "Meals" do let(:user) {Fabricate(:user)} describe "GET /meals" do context "when not signed in" do it "redirects" do get meals_path expect( response.status ).to eq(302) # have to be signed in end end context "when signed in"...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/requests/places_spec.rb
spec/requests/places_spec.rb
require 'spec_helper' describe "Places" do let(:user) {Fabricate(:user)} describe "GET /places" do context "when not signed in" do it "redirects" do get places_path expect( response.status ).to eq(302) # have to be signed in end end context "when signed ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/helpers/sleeps_helper_spec.rb
spec/helpers/sleeps_helper_spec.rb
require 'spec_helper' describe SleepsHelper do let(:sleep) { Fabricate(:sleep) } describe '.formatted_duration' do it 'displays duration in hours' do expect(formatted_duration(sleep)).to eq("24.0 hours") end it 'uses singular in the case of a 1 hour duration' do sleep.end = sleep.start + ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/helpers/meals_helper_spec.rb
spec/helpers/meals_helper_spec.rb
require 'spec_helper' describe MealsHelper do # helper MealsHelper let(:meals) { 3.times do Fabricate(:meal) end Meal.all } describe '.macro_percent_for_meals' do it 'returns correct carb percentage for an array of meals' do expect(helper.macro_percent_for_meals(meals, :carbohydra...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/extensions/models/users/sleeps_spec.rb
spec/extensions/models/users/sleeps_spec.rb
require 'spec_helper' describe Users::Meals do include Users::Meals let(:user) { Fabricate(:user)} before do 3.times do |i| user.sleeps.create(start: Date.current - i.days, end: Date.current - i.days + 6.hours) end end describe "#sleeps_from" do context "search for 1 day ago" do ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/extensions/models/users/weights_spec.rb
spec/extensions/models/users/weights_spec.rb
require 'spec_helper' describe Users::Weights do include Users::Weights let(:user) { Fabricate.build(:user) } describe "#weight" do before(:each) do user.save 2.times do user.weights.create(date: Time.now, value: 1.0) end end it "returns a 7 day average from the last reco...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/extensions/models/users/meals_spec.rb
spec/extensions/models/users/meals_spec.rb
require 'spec_helper' describe Users::Meals do include Users::Meals let(:user) { Fabricate(:user)} before do 3.times do |i| user.meals.create(date: Date.current - i.days, calories: 0, carbohydrates: 0, fat: 0, protein: 0) end end describe "#meals_from" do context "search for 1 day ago"...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/controllers/meals_controller_spec.rb
spec/controllers/meals_controller_spec.rb
require 'spec_helper' describe MealsController do def valid_attributes { date: Time.now, calories: 0, carbohydrates: 0, fat: 0, protein: 0 } end let(:meal) {Fabricate(:meal)} let(:user) {Fabricate(:user)} let(:other_user) {Fabricate(:user)} describe "GET...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/controllers/places_controller_spec.rb
spec/controllers/places_controller_spec.rb
require 'spec_helper' describe PlacesController do def valid_attributes { lat: 0.0, lng: 0.0, date: Time.now } end let(:user) {Fabricate(:user)} let(:other_user) {Fabricate(:user)} describe "GET 'index'" do context "when a user isn't signed in" do it "should redirect" d...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/controllers/omniauth_callbacks_controller_spec.rb
spec/controllers/omniauth_callbacks_controller_spec.rb
require 'spec_helper' describe OmniauthCallbacksController do let(:user) {Fabricate(:user)} describe "GET 'withings'" do before do request.env["devise.mapping"] = Devise.mappings[:user] request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:withings] WithingsAccount.any_instance.stub(:im...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/controllers/users_controller_spec.rb
spec/controllers/users_controller_spec.rb
require 'spec_helper' describe UsersController do before (:each) do @user = Fabricate(:user) sign_in @user end describe "GET 'show'" do it "should be successful" do get :show, :id => @user.id response.should be_success end it "should find the right user" do get :show, :i...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/controllers/home_controller_spec.rb
spec/controllers/home_controller_spec.rb
require 'spec_helper' describe HomeController do def valid_session {} end describe "GET index" do it "loads a valid response" do get :index, {}, valid_session response.should be_successful end end end
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/controllers/journal_entries_controller_spec.rb
spec/controllers/journal_entries_controller_spec.rb
require 'spec_helper' describe JournalEntriesController do let(:user) { Fabricate(:user) } let(:valid_attributes) { { "happiness" => "1", "strategies" => "test string", "feelings" => "test string" } } describe "GET index" do context "when a user isn't signed in" do it...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/controllers/weights_controller_spec.rb
spec/controllers/weights_controller_spec.rb
require 'spec_helper' describe WeightsController do # This should return the minimal set of attributes required to create a valid # Weight. As you add validations to Weight, be sure to # update the return value of this method accordingly. def valid_attributes { value: 0.0, date: Time.now }...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/controllers/dashboard_controller_spec.rb
spec/controllers/dashboard_controller_spec.rb
require 'spec_helper' describe DashboardController do let(:user) {Fabricate(:user)} describe "GET 'index'" do context "when a user isn't signed in" do it "should redirect" do get :index response.should be_redirect end end context "when a user is signed in" do it "s...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/controllers/sleeps_controller_spec.rb
spec/controllers/sleeps_controller_spec.rb
require 'spec_helper' # This spec was generated by rspec-rails when you ran the scaffold generator. # It demonstrates how one might use RSpec to specify the controller code that # was generated by Rails when you ran the scaffold generator. # # It assumes that the implementation code is generated by the rails scaffold ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/models/place_spec.rb
spec/models/place_spec.rb
# == Schema Information # # Table name: places # # id :integer not null, primary key # user_id :integer # date :datetime # lat :decimal(, ) # lng :decimal(, ) # created_at :datetime # updated_at :datetime # meta :hstore # source :string(255) # response :json...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/models/meal_spec.rb
spec/models/meal_spec.rb
# == Schema Information # # Table name: meals # # id :integer not null, primary key # date :date # calories :integer # carbohydrates :integer # protein :integer # fat :integer # user_id :integer # description :string(255) # created_at :datetime # up...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/models/sleep_spec.rb
spec/models/sleep_spec.rb
# == Schema Information # # Table name: sleeps # # id :integer not null, primary key # start :datetime # end :datetime # user_id :integer # created_at :datetime # updated_at :datetime # meta :hstore # source :string(255) # require 'spec_helper' describe Sleep do it ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/models/fitbit_account_spec.rb
spec/models/fitbit_account_spec.rb
# == Schema Information # # Table name: fitbit_accounts # # id :integer not null, primary key # uid :string(255) # oauth_token :string(255) # oauth_token_secret :string(255) # user_id :integer # created_at :datetime # updated_at :datetime ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/models/foursquare_account_spec.rb
spec/models/foursquare_account_spec.rb
# == Schema Information # # Table name: foursquare_accounts # # id :integer not null, primary key # uid :string(255) # oauth_token :string(255) # activated_at :datetime # synced_at :datetime # user_id :integer # created_at :datetime # updated_at :datetime # require 'spe...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/models/journal_entry_spec.rb
spec/models/journal_entry_spec.rb
# == Schema Information # # Table name: journal_entries # # id :integer not null, primary key # feelings :text # happiness :integer # strategies :text # created_at :datetime # updated_at :datetime # user_id :integer # e...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/models/withings_account_spec.rb
spec/models/withings_account_spec.rb
# == Schema Information # # Table name: withings_accounts # # id :integer not null, primary key # userid :string(255) # created_at :datetime # updated_at :datetime # oauth_token :string(255) # user_id :integer # oauth_token_secret :string(255...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/models/user_spec.rb
spec/models/user_spec.rb
# == Schema Information # # Table name: users # # id :integer not null, primary key # created_at :datetime # updated_at :datetime # email :string(255) default(""), not null # encrypted_password :string(255) default(""), not null # ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/models/weight_spec.rb
spec/models/weight_spec.rb
# == Schema Information # # Table name: weights # # id :integer not null, primary key # type :string(255) # user_id :integer # bmi :float # value :float # lean_mass :float # fat_mass :float # fat_percent :float # date :datetime # created_at :datetime # ...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false
jdjkelly/quant
https://github.com/jdjkelly/quant/blob/b3a1d83466ff5bb3b80e29f4d9999d871c77d280/spec/fabricators/withings_account_fabricator.rb
spec/fabricators/withings_account_fabricator.rb
# == Schema Information # # Table name: withings_accounts # # id :integer not null, primary key # userid :string(255) # created_at :datetime # updated_at :datetime # oauth_token :string(255) # user_id :integer # oauth_token_secret :string(255...
ruby
MIT
b3a1d83466ff5bb3b80e29f4d9999d871c77d280
2026-01-04T17:44:17.025352Z
false