https://github.com/AGWA/git-crypt
Adiciona uma camada de criptografia de arquivos em repositórios git.
| module ContractTemplates | |
| module Update | |
| class TryCreateRevision < Micro::Case | |
| attributes :company, :params | |
| def call! | |
| return Success(:skipped_contract_revision) unless term_changed? | |
| ContractRevision.create!(contract_revision_params) |
| require "active_record" | |
| require "sqlite3" | |
| ActiveRecord::Base.establish_connection( | |
| :adapter => 'sqlite3', | |
| :host => "localhost", | |
| :database => ':memory:' | |
| ) | |
| ActiveRecord::Schema.define do |
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'u-case' | |
| gem 'pry' | |
| end | |
| class Sum < Micro::Case | |
| attributes :a, :b |
| // Steps: | |
| // 1. Open your browser console | |
| // 2. Enable artoo.js (http://medialab.github.io/artoo/) | |
| // 3. Replace USER_OR_ORG and REPO in the COMMIT_URL and COMPARE_URL | |
| // 4. Copy paste the following script in the console | |
| var COMMIT_URL = 'https://gitlab.com/USER_OR_ORG/REPO/-/commit/'; | |
| var COMPARE_URL = 'https://gitlab.com/USER_OR_ORG/REPO/-/compare/'; | |
| var $rows = artoo.$('.deploys tr').filter(':not(.table-title)'); |
| <% if @bar %> | |
| <p><%= yield %></p> | |
| <% end %> |
| # | |
| # Métodos globais | |
| # | |
| def calc_sum(a, b) | |
| a + b | |
| end | |
| puts calc_sum(1, 3) | |
| # Classes com métodos estáticos |
https://github.com/AGWA/git-crypt
Adiciona uma camada de criptografia de arquivos em repositórios git.
| # frozen_string_literal: true | |
| # == Gemfile == | |
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'u-test', '0.9.0' |
| .tool-versions |