Last active
August 29, 2015 14:13
-
-
Save be9/c549ff6469d5627aa900 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source 'https://rubygems.org' | |
| gem 'activerecord', '4.2.0' | |
| gem 'sqlite3' | |
| gem 'bcrypt', '~> 3.1.7' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GEM | |
| remote: https://rubygems.org/ | |
| specs: | |
| activemodel (4.2.0) | |
| activesupport (= 4.2.0) | |
| builder (~> 3.1) | |
| activerecord (4.2.0) | |
| activemodel (= 4.2.0) | |
| activesupport (= 4.2.0) | |
| arel (~> 6.0) | |
| activesupport (4.2.0) | |
| i18n (~> 0.7) | |
| json (~> 1.7, >= 1.7.7) | |
| minitest (~> 5.1) | |
| thread_safe (~> 0.3, >= 0.3.4) | |
| tzinfo (~> 1.1) | |
| arel (6.0.0) | |
| bcrypt (3.1.9) | |
| builder (3.2.2) | |
| i18n (0.7.0) | |
| json (1.8.1) | |
| minitest (5.5.0) | |
| sqlite3 (1.3.10) | |
| thread_safe (0.3.4) | |
| tzinfo (1.2.2) | |
| thread_safe (~> 0.1) | |
| PLATFORMS | |
| ruby | |
| DEPENDENCIES | |
| activerecord (= 4.2.0) | |
| bcrypt (~> 3.1.7) | |
| sqlite3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'bundler/setup' | |
| require 'bcrypt' | |
| require 'psych' | |
| BCrypt::Password.create("my password").to_yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'bundler/setup' | |
| Bundler.require(:default) | |
| require 'active_record' | |
| ActiveRecord::Base.establish_connection( | |
| adapter: "sqlite3", | |
| database: ":memory:") | |
| ActiveRecord::Migration.create_table :users do |t| | |
| t.string :password_digest | |
| end | |
| class User < ActiveRecord::Base | |
| has_secure_password | |
| end | |
| user = User.new | |
| user.password = 's3cr3t' | |
| user.to_yaml |
be9
commented
Jan 8, 2015
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment