summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/en_US.yml2
-rw-r--r--lib/tasks/invite_code.rake21
2 files changed, 23 insertions, 0 deletions
diff --git a/lib/en_US.yml b/lib/en_US.yml
index b5ba63b..a94e2fc 100644
--- a/lib/en_US.yml
+++ b/lib/en_US.yml
@@ -119,6 +119,8 @@ en_US:
account_settings: Account Settings
username: Username
password: Password
+ password_confirmation: Password confirmation
+ invite_code: Invite code
change_password: Change Password
invalid_user_pass: Not a valid username/password combination
invalid_ephemeral: Invalid random key used. This looked like an attempt to hack the
diff --git a/lib/tasks/invite_code.rake b/lib/tasks/invite_code.rake
new file mode 100644
index 0000000..d6e2b49
--- /dev/null
+++ b/lib/tasks/invite_code.rake
@@ -0,0 +1,21 @@
+
+
+desc "Generate a batch of invite codes"
+task :generate_invites, [:n, :u] => :environment do |task, args|
+
+ codes = args.n
+ codes = codes.to_i
+
+ if args.u != nil
+ max_uses = args.u
+ end
+
+ codes.times do |x|
+ x = InviteCode.new
+ x.max_uses = max_uses
+ x.save
+ puts x.invite_code
+ end
+
+end
+