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
#!/bin/bash | |
# Thu Nov 7 18:43:39 IST 2013, [email protected] (ramonrails) | |
# Borrowed from gitflow & bumpversion (URLs referenced below) and enhanced further | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" | |
# this script will display the current version, automatically |
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
#!/bin/bash | |
# Thu Nov 7 18:43:39 IST 2013, [email protected] (ramonrails) | |
# Borrowed from gitflow & bumpversion (URLs referenced below) and enhanced further | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" | |
# this script will display the current version, automatically |
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 | |
# The MIT License (MIT) | |
# Copyright (c) 2016 Ram Kumar (ramonrails) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
#!/bin/bash | |
# The MIT License (MIT) | |
# Copyright (c) 2016 Ram Kumar (ramonrails) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
#!/bin/bash | |
# The MIT License (MIT) | |
# Copyright (c) 2016 Ram Kumar (ramonrails) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
# config/initializers/assets.rb | |
javascripts = [...] | |
stylesheets = [...] | |
images = [...] | |
fonts = [...] | |
# NOTE: dynamically include for precompile: controller specific .coffee, .js and .scss, .css | |
# | |
# step 1: collect controller basenames | |
controllers = Dir.glob(File.join(Rails.root, 'app', 'controllers', '*.rb')) |
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
#!/bin/bash | |
# author: ramonrails.in | |
# version: 1.0 | |
# release date: 7-Aug-2017 | |
# license: MIT | |
# style for output | |
bold=$(tput bold) | |
cyan=$(tput setaf 6) |
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
# What is it? | |
# => Helper methods for Apartment::Tenant gem | |
# How does it work? | |
# * bin/rails console => auto-loads and asks to switch tenant | |
# * T.ask => anytime in console, to switch tenant from a list | |
# * T.me => same as Apartment::Tenant.current | |
# * T.hash => hash of tenants. Example: { 0 => "public", 1 => "tenant-a" } | |
# * T.names => array with all existing tenant names from DB | |
# * T.exists?(arg) => returns true/false if `arg` exists as tenant in DB | |
require "rubygems" |
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
// developer: RamOnRails.in | |
// purpose: fetch form data as JSON | |
// parameters: | |
// form: the form object | |
// arg: [optional] query selector to pick elements | |
// defaults: arg: "input, select, textarea" | |
function toJSON(form, arg = null) { | |
// we will capture the elements and their values in this object | |
let hash = {}; | |
// arg converted to string |
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
Scenario Outline: Shipping options | |
Given the following shipping_options: | |
| description | price | | |
| UPS Overnight shipping | 60 | | |
| UPS 2 day shipping | 28 | | |
| UPS Ground Shipping | 16 | | |
And "default" coupon_code for "direct_to_consumer" group has "<_ship>" shipping | |
When I go to the online store | |
And I choose "product_complete" | |
And I choose "S2228" |
OlderNewer