119 liens privés
Bundler behavior changed.
A great change, probably the one change I was expecting.
Simple to use :
- Read csv using headers to name symbols
- Parse table like each row is a hash where each column header is a symbol's name.
- do whatever you want with value.
Example :
require 'smarter_csv'
# Class CodePostaux
class CodePostaux
attr_accessor :csv_file_path, :cp_hash
def initialize(csv_file_path)
@csv_file_path = csv_file_path
@cp_hash = Hash.new
end
def read_csv
SmarterCSV.process(@csv_file_path, {col_sep: ';'})
end
end
output = File.open('./test/minitest/fixtures/code_postaux_provisioning.rb', 'w')
codes_postaux.each do |value|
output.write("PostCode.create(code: '#{value[:code_postal]} #{value[:nom_commune]}')\n")
end
output.close
gem TVA
On github. Book about gem development.
A collection of awesome Ruby gems, tools, frameworks and software.
Excellent website to know what's updated, followed etc.
This gem implements a flexible time-ordered activity feeds commonly used within social networking applications. As events occur, they are pushed into the Feed and distributed to all users that need to see the event. Upon the user visiting their "feed page", a pre-populated ordered list of events is returned by the library.
Easy enough API to encrypt/decrypt.
Only works with ruby 2.2.2 for now.
Source is here : https://github.com/loureirorg/rb2exe
Also works with rails apparently.
I have not tested this gem. But it's worth mentioning it exists.
And yes... this is not a snippet
require 'tty'
require 'tty-prompt'
prompt = TTY::Prompt.new
answer = prompt.select("my question") do |item|
item.choice 'One', 'Pika'
item.choice "Two", 'Boo'
end
puts "My answer was : #{answer}"
(with gem TTY)