Suppose you're opening an issue and there's a lot noisey logs that may be useful.
Rather than wrecking readability, wrap it in a <details>
tag!
<details>
<summary>Summary Goes Here</summary>
# run using ```rvm jruby-1.6.7 do jruby "-J-Xmx2000m" "--1.9" tej.rb``` | |
require 'rubygems' | |
require 'nokogiri' | |
require 'csv' | |
f = File.open("/tmp/preview.html") | |
doc = Nokogiri::HTML(f) | |
csv = CSV.open("/tmp/output.csv", 'w',{:col_sep => ",", :quote_char => '\'', :force_quotes => true}) |
# Read and write spreadsheets with ruby using the spreadsheet gem | |
# Full Docs: http://spreadsheet.rubyforge.org/GUIDE_txt.html | |
require 'spreadsheet' | |
# Open source spreadsheet | |
workbook = Spreadsheet.open 'source.xls' | |
# READ |
source 'https://rubygems.org' | |
ruby '2.3.1' | |
gem 'rails', '4.2.6' | |
gem 'spree', '~> 3.1.0' | |
gem 'spree_gateway', '~> 3.1.0' |
//= require jquery2 | |
//= require jquery_ujs | |
//= require spree/backend | |
//= require_tree . |
First, Create a folder inside of lib
called seeds
Put your CSV file example.csv
into the lib/seeds
folder. In the example below, the file is called real_estate_transactions.csv
Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.
GIT | |
remote: https://github.com/InnovativeOperations/kiba.git | |
revision: 4ec2c0b35c2dacd575b9d518be0b79e9981baef1 | |
branch: parsing-params | |
specs: | |
kiba (1.0.0) | |
GIT | |
remote: https://github.com/InnovativeOperations/spree_mail_settings.git | |
revision: 578dfaef402cfbf604930a149268389de85b515c |
source 'https://rubygems.org' | |
ruby '2.3.3' | |
gem 'rails', '5.0.2' | |
gem 'mime-types', ['~> 2.6', '>= 2.6.1'], require: 'mime/types/columnar' | |
gem 'rollbar' | |
gem 'oj', '~> 2.12.14' | |
gem 'bourbon', '~> 4.2.0' |
# I use this in conjunction with Contentful CMS to render blocks of markdown into my static middleman templates. | |
# In your gemfile, add Redcarpet: | |
gem 'redcarpet' | |
# ...and do a bundle install | |
# In your config.rb, add this line: | |
set :markdown_engine, :redcarpet |