This file contains 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
{ | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"dev": "echo \"Error: no test specified\" && exit 1", | |
"start": "echo \"Error: no test specified\" && exit 1" | |
} | |
} |
This file contains 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
#!/usr/bin/env ruby | |
require 'filewatcher' | |
require 'net/ssh' | |
require 'net/sftp' | |
## Validando a entrado dos parâmetros. | |
if (ARGV.size == 2) | |
# diretorio local |
This file contains 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
class CreateCouponsByBatchAmount | |
def self.go(amount,coupon_type,value,lifetime,gift_card = true,separator = ",") | |
puts "Start:\n" | |
labels = "" | |
(amount).times do |x| | |
tmp_coupon = Basico::Coupon.random_coupon(coupon_type,value) | |
tmp_coupon.valid_until = DateTime.now + lifetime.days | |
tmp_coupon.gift_card = gift_card || nil | |
tmp_coupon.save | |
labels += [tmp_coupon.label.upcase,separator].join("") |