source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
drnic/appscrolls
https://github.com/drnic/appscrolls
Thorfile
Ruby
mit
217
master
325
require 'active_support/inflector' class Default < Thor include Thor::Actions attr_reader :name source_root File.expand_path("../templates", __FILE__) desc "new NAME", "Create a new scroll" def new(name) @name = name template "new_scroll.tt", "scrolls/#{name}.rb" `open scrolls/#{name}.rb` end...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
sample.rb
Ruby
mit
217
master
3,032
# >---------------------------------------------------------------------------< # # ___ ____ ____ # / _ | ___ ___ / __/__________ / / /__ # / __ |/ _ \/ _ \ _\ \/ __/ __/ _ \/ / (_-< # /_/ |_/ .__/ .__/ /___/\__/_/ \__...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
features/support/env.rb
Ruby
mit
217
master
670
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../../lib')) require 'bundler/setup' require 'appscrolls' path = ENV['PATH'] Before do @tmp_root = File.dirname(__FILE__) + "/../../tmp" @active_project_folder = @tmp_root @home_path = File.expand_path(File.join(@tmp_root, "home")) @lib_path ...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
features/support/common.rb
Ruby
mit
217
master
1,315
module CommonHelpers def get_command_output strip_color_codes(File.read(@stdout)).chomp end def strip_color_codes(text) text.gsub(/\e\[\d+m/, '') end def in_tmp_folder(&block) FileUtils.chdir(@tmp_root, &block) end def in_project_folder(&block) project_folder = @active_project_folder ||...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
features/step_definitions/common_steps.rb
Ruby
mit
217
master
6,705
Given /^this project is active project folder/ do @active_project_folder = File.expand_path(File.dirname(__FILE__) + "/../..") end Given /^env variable \$([\w_]+) set to( project path|) "(.*)"/ do |env_var, path, value| in_project_folder { value = File.expand_path(value) } unless path.empty? ENV[env_var] =...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
lib/appscrolls.rb
Ruby
mit
217
master
328
require 'appscrolls/scrolls' require 'appscrolls/scroll' require 'appscrolls/config' require 'appscrolls/template' Dir[File.dirname(__FILE__) + '/../scrolls/*.rb'].each do |path| key = File.basename(path, '.rb') scroll = AppScrollsScrolls::Scroll.generate(key, File.open(path)) AppScrollsScrolls::Scrolls.add(scro...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
lib/appscrolls/template.rb
Ruby
mit
217
master
1,802
module AppScrollsScrolls class Template attr_reader :scrolls, :unknown_scroll_names def initialize(scrolls) @unknown_scroll_names = [] @scrolls = scrolls.inject([]) do |list, name| scroll = AppScrollsScrolls::Scroll.from_mongo(name) if scroll list << scroll else ...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
lib/appscrolls/config.rb
Ruby
mit
217
master
2,072
require 'active_support/ordered_hash' module AppScrollsScrolls class Config attr_reader :questions def initialize(schema) @questions = ActiveSupport::OrderedHash.new schema.each do |hash| key = hash.keys.first details = hash.values.first kind = details['type'] r...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
lib/appscrolls/scroll.rb
Ruby
mit
217
master
2,671
require 'appscrolls/config' require 'active_support/inflector' require 'yaml' require 'erb' module AppScrollsScrolls class Scroll extend Comparable def self.<=>(another) return -1 if another.run_after.include?(self.key) || self.run_before.include?(another.key) return 1 if another.run_before...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
lib/appscrolls/scrolls.rb
Ruby
mit
217
master
839
module AppScrollsScrolls module Scrolls @@categories = {} @@list = {} def self.add(scroll) AppScrollsScrolls::Scrolls.const_set ActiveSupport::Inflector.camelize(scroll.key.gsub("-", "_")), scroll @@list[scroll.key] = scroll (@@categories[scroll.category.to_s] ||= []) << scroll.key ...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
lib/appscrolls/command.rb
Ruby
mit
217
master
3,235
require 'appscrolls' require 'thor' module AppScrollsScrolls class Command < Thor include Thor::Actions desc "new APP_NAME", "create a new Rails app" method_option :scrolls, :type => :array, :aliases => "-s", :desc => "List scrolls, e.g. -s resque rails_basics jquery" method_option :template, :type =...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
lib/rails/generators/run_template/run_template_generator.rb
Ruby
mit
217
master
342
class RunTemplateGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) argument :template_path, :desc => "Path to an application template" def apply_template path = template_path unless path =~ /^https?:\/\// path = File.expand_path(path, Dir.pwd) end ...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
spec/appscrolls/config_spec.rb
Ruby
mit
217
master
3,113
require 'spec_helper' describe AppScrollsScrolls::Config do describe '#initialize' do subject{ AppScrollsScrolls::Config.new(YAML.load(@schema)) } it 'should add a question key for each key of the schema' do @schema = <<-YAML - test: type: string YAML subject.questions.sho...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
spec/appscrolls/scrolls_spec.rb
Ruby
mit
217
master
702
require 'spec_helper' describe AppScrollsScrolls::Scrolls do subject{ AppScrollsScrolls::Scrolls } let(:scroll){ AppScrollsScrolls::Scroll.generate("scroll_test", "# Testing", :name => "Test Scroll", :category => "test", :description => "Just a test.")} before(:all) do AppScrollsScrolls::Scrolls.add(scroll)...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
spec/appscrolls/template_spec.rb
Ruby
mit
217
master
1,628
require 'spec_helper' describe AppScrollsScrolls::Template do subject{ AppScrollsScrolls::Template } let(:scroll){ AppScrollsScrolls::Scroll.generate('name','# test') } describe '#initialize' do it 'should work with classes' do subject.new([scroll]).scrolls.should == [scroll] end end describe...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
spec/appscrolls/scroll_spec.rb
Ruby
mit
217
master
3,020
require 'spec_helper' describe AppScrollsScrolls::Scroll do context "with a generated scroll" do subject{ AppScrollsScrolls::Scroll.generate('scroll_example', "# this is a test", :category => 'example', :name => "AppScrolls Example") } context 'string setter methods' do (AppScrollsScrolls::Scroll::ATT...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
spec/appscrolls/scrolls/sanity_spec.rb
Ruby
mit
217
master
1,023
require 'spec_helper' # This is a simple set of tests to make sure that # all of the scrolls conform to the base requirements. AppScrollsScrolls::Scrolls.list_classes.each do |scroll| describe scroll do it("should have a name"){ scroll.name.should be_kind_of(String) } it("should have a description"){ sc...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
spec/support/template_runner.rb
Ruby
mit
217
master
632
class TemplateRunner attr_reader :template, :config, :app_name, :dir, :rails_dir, :output def initialize(template, config) @template = template @config = config end def run(app_name = 'rails_app') @app_name = app_name @dir = Dir.mktmpdir @rails_dir = File.join(@dir, @app_name) Dir.chrdi...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
spec/support/rails_directory.rb
Ruby
mit
217
master
247
class RailsDirectory def initialize(path) @path = path end def file_path(path) File.join(@path, path) end def has_file?(path) File.exist?(file_path(path)) end def [](path) File.open(file_path(path)).read end end
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/simple_form.rb
Ruby
mit
217
master
377
gem 'simple_form' after_bundler do if scroll? "twitter_bootstrap" generate "simple_form:install --bootstrap" else generate "simple_form:install" end end __END__ name: Simple Form description: Install Simple Form to generate nicely formatted forms. author: jonochang website: https://github.com/plataform...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/eycloud.rb
Ruby
mit
217
master
3,021
@name = File.basename(File.expand_path(".")) gem_group :development do gem 'ey_cli', '>= 0.3.0' end gem 'ey_config' # for partner services required_dbs = %w[mysql postgresql] required_app_servers = %w[unicorn passenger] # TODO trinidad puma thin selected_db = required_dbs.find { |db| scroll? db } unless selected_...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/rails_basics.rb
Ruby
mit
217
master
1,133
# create rvmrc file # create_file ".rvmrc", "rvm gemset create '#{app_name}' \nrvm gemset use '#{app_name}'" gem "warbler" if jruby? after_bundler do # clean up rails defaults remove_file "public/index.html" remove_file "public/images/rails.png" generate "controller home index" gsub_file "app/controllers/ho...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/sidekiq.rb
Ruby
mit
217
master
1,840
gem "sidekiq" # slim/sinatra are used for the sidekiq monitoring UI at /sidekiq/SECRET gem "slim" gem "sinatra", ">= 1.3.0", require: false initializer "sidekiq.rb", <<-RUBY if $redis_config[:password] redis_url = "redis://:\#{$redis_config[:password]}@\#{$redis_config[:host]}:\#{$redis_config[:port]}/0" else redi...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/git.rb
Ruby
mit
217
master
299
before_everything do git :init git :add => '.' git :commit => '-m "Initial import."' end __END__ name: Git description: "Provides basic Git setup for the Rails app and commits the initial repository." author: mbleigh exclusive: scm category: deployment run_before: [git, eycloud, heroku]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/prototype.rb
Ruby
mit
217
master
392
gem "prototype-rails" after_bundler do gsub_file "app/assets/javascripts/application.js", "//= require prototype_ujs", <<-EOS //= require prototype_ujs //= require effects //= require dragdrop //= require controls EOS end __END__ name: Prototype description: "Prototype.JS as the JavaScript framework" author: mblei...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/puma.rb
Ruby
mit
217
master
458
gem 'puma' after_bundler do gsub_file "config/environments/production.rb", "# config.threadsafe!", "config.threadsafe!" gsub_file "script/rails", "require 'rails/commands'", <<-RUBY require 'rack/handler' Rack::Handler::WEBrick = Rack::Handler.get(:puma) require 'rails/commands' RUBY end __END__ name: Puma de...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/eycloud_recipes_on_deploy.rb
Ruby
mit
217
master
488
gem "engineyard-recipes", :group => [:development] after_bundler do say_custom "eycloud", "Setting up deploy hooks..." run "bundle exec ey-recipes init --on-deploy --chef" run "bundle update" end __END__ name: Recipes on Deploy description: Run Engine Yard Cloud recipes during deployment instead of independen...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/cucumber.rb
Ruby
mit
217
master
513
gem_group :test do gem 'cucumber-rails', :require => false # https://github.com/cucumber/cucumber-rails/issues/202 gem 'capybara' gem 'database_cleaner' end after_bundler do rake "db:create" generate "cucumber:install --capybara#{' --rspec' if scrolls.include?('rspec')}#{' -D' unless scrolls.include?('activ...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/redis.rb
Ruby
mit
217
master
827
gem 'redis' initializer "redis.rb", <<-RUBY if ENV['VCAP_SERVICES'] $vcap_services ||= JSON.parse(ENV['VCAP_SERVICES']) redis_service_name = $vcap_services.keys.find { |svc| svc =~ /redis/i } redis_service = $vcap_services[redis_service_name].first $redis_config = { host: redis_service['credentials']['host...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/rails_admin.rb
Ruby
mit
217
master
323
gem 'rails_admin' after_bundler do generate "rails_admin:install" end __END__ name: RailsAdmin description: "An engine that provides an easy-to-use interface for managing your data" website: https://github.com/sferik/rails_admin author: sferik exclusive: administration category: administration tags: [administratio...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/sqlite3.rb
Ruby
mit
217
master
216
gem "sqlite3", :group => [:development, :test] __END__ name: Sqlite3 description: Use Sqlite3 for development and testing (not available for production) author: drnic category: persistence tags: [sql, orm, mysql]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/rspec.rb
Ruby
mit
217
master
413
gem 'rspec-rails', :group => [:development, :test] inject_into_file "config/initializers/generators.rb", :after => "Rails.application.config.generators do |g|\n" do " g.test_framework = :rspec\n" end after_bundler do generate 'rspec:install' end __END__ name: RSpec description: "Use RSpec for unit testing fo...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/capybara.rb
Ruby
mit
217
master
622
gem 'capybara', :group => [:development, :test] after_bundler do create_file "spec/support/capybara.rb", <<-RUBY require 'capybara/rails' require 'capybara/rspec' RUBY create_file "spec/requests/home_spec.rb", <<-RUBY require 'spec_helper' describe 'visiting the homepage' do before do visit '/' end it...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/twitter_bootstrap.rb
Ruby
mit
217
master
1,105
gem_group :assets do gem 'twitter-bootstrap-rails' gem 'less-rails' if jruby? gem 'therubyrhino' else gem 'therubyracer' end end after_bundler do generate "bootstrap:install" layout = config["twitter_bootstrap_layout"] generate "bootstrap:layout application #{layout} -f" html_to_find = lay...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/mysql.rb
Ruby
mit
217
master
417
gem "mysql2" after_bundler do rake "db:create:all" rakefile("sample.rake") do <<-RUBY namespace :db do desc "Populate the database with sample data" task :sample => :environment do end task :populate => :sample end RUBY end end __END__ name: MySQL description: Use MySQL for dev & production dat...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/cf.rb
Ruby
mit
217
master
3,340
# Scroll is based on the following documentation # * http://blog.cloudfoundry.com/2012/03/15/using-cloud-foundry-services-with-ruby-part-2-run-time-support-for-ruby-applications/ # * http://blog.cloudfoundry.com/2012/04/19/deploying-jruby-on-rails-applications-on-cloud-foundry/ require "yaml" @vmc_version = '0.3.23' ...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/guard.rb
Ruby
mit
217
master
1,515
prepend_file 'Gemfile' do <<-RUBY require 'rbconfig' HOST_OS = RbConfig::CONFIG['host_os'] RUBY end append_file 'Gemfile' do <<-RUBY guard_notifications = #{config['guard_notifications'].inspect} group :development do case HOST_OS when /darwin/i gem 'rb-fsevent' gem 'ruby_gntp' if guard_notifications w...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/postgresql.rb
Ruby
mit
217
master
908
gsub_file "config/database.yml", /username: .*/, "username: #{config['pg_username']}" gsub_file "config/database.yml", /password: .*/, "password: #{config['pg_password']}" %w[development test production].each do |env| gsub_file "config/database.yml", /^#{env}:/, "#{env}:\n host: localhost" end after_bundler do ra...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/delayed_job.rb
Ruby
mit
217
master
1,822
gem 'delayed_job_active_record' gem 'delayed_job_admin' inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do <<-RUBY def delayed_job_admin_authentication # authentication_logic_goes_here true end RUBY end create_file "readmes/delayed_job_admin.md", <<-MD # Delayed Job Admin ...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/resque.rb
Ruby
mit
217
master
1,691
gem 'resque', :require => "resque/server" say_wizard 'Applying fix suggested in https://github.com/defunkt/resque/pull/403...' append_file "Rakefile", "\ntask 'resque:setup' => :environment # for https://github.com/defunkt/resque/pull/403\n" if scroll? "eycloud_recipes_on_deploy" gem 'eycloud-recipe-resque', :grou...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/env_yaml.rb
Ruby
mit
217
master
946
say_wizard "Generating config/env.yaml..." append_file "config/application.rb", <<-RUBY require 'env_yaml' RUBY create_file "lib/env_yaml.rb", <<-RUBY require 'yaml' begin env_yaml = YAML.load_file(File.dirname(__FILE__) + '/../config/env.yml') if env_hash = env_yaml[ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'devel...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/active_admin.rb
Ruby
mit
217
master
371
#unless scrolls.include? 'sass-rails' # gem 'sass-rails' #end gem 'activeadmin' after_everything do generate "active_admin:install" end __END__ name: Active Admin description: "The administration framework for Ruby on Rails applications" author: jonochang website: http://activeadmin.info/ exclusive: administrati...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/github.rb
Ruby
mit
217
master
1,023
if `which hub`.strip == "" say_custom "hub", "Please install hub. https://github.com/defunkt/hub" exit 1 end after_everything do github_private = multiple_choice "Create a GitHub repository?", [["Public", false], ["Private", true]] # Usage: hub create [NAME] [-p] [-d DESCRIPTION] [-h HOMEPAGE] tried_cr...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/split.rb
Ruby
mit
217
master
964
gem 'split', :require => 'split/dashboard' after_bundler do route %{match '/split/#{config['split_admin_secret']}', :to => Split::Dashboard, :anchor => false} initializer "split_config.rb", <<-RUBY Split.configure do |config| config.db_failover = true # handle redis errors gracefully config.db_failover_on_d...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/nifty_generators.rb
Ruby
mit
217
master
413
gem "nifty-generators" after_bundler do remove_file 'app/views/layouts/application.html.erb' # use nifty layout instead if scrolls.include? 'haml' generate 'nifty:layout --haml' else generate 'nifty:layout' end generate 'nifty:config' end __END__ name: nifty-generators description: "Use RyanB's ...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/mongo_mapper.rb
Ruby
mit
217
master
302
gem 'bson_ext' gem 'mongo_mapper', '>=0.9' after_bundler do generate 'mongo_mapper:config' end __END__ name: MongoMapper description: "Use MongoDB with MongoMapper as your primary datastore." author: mbleigh exclusive: orm category: persistence tags: [mongodb, orm] args: ["-O"] # TODO eycloud
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/settingslogic.rb
Ruby
mit
217
master
811
gem 'settingslogic' say_wizard "Generating config/application.yml..." append_file "config/application.rb", <<-RUBY require 'settings' RUBY create_file "lib/settings.rb", <<-RUBY class Settings < Settingslogic source "#\{Rails.root\}/config/application.yml" namespace Rails.env end RUBY create_file "config/appl...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/activerecord.rb
Ruby
mit
217
master
1,920
if config['database'] say_wizard "Configuring '#{config['database']}' database settings..." old_gem = gem_for_database @options = @options.dup.merge(:database => config['database']) # SQLite3 gem requires special treatment. gem_string = case gem_for_database when "sqlite3"; "gem 'sqlite3-ruby', :require =>...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/carrierwave_direct.rb
Ruby
mit
217
master
289
gem 'carrierwave_direct' __END__ name: Carrierwave Direct description: "Use Carrierwave Direct for uploading carrierwave files directly to Amazon S3" author: jonochang exclusive: file-uploads category: file-uploads tags: [file-uploads] run_after: [carrierwave] requires: [carrierwave]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/paper_trail.rb
Ruby
mit
217
master
340
gem 'paper_trail', '~> 2' after_bundler do generate "paper_trail:install" end __END__ name: Paper Trail description: Plugin for tracking changes to your models' data. Good for auditing or versioning. category: persistence exclusive: activerecord_versioning tags: [activerecord_versioning] # TODO eycloud partner ...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/pow.rb
Ruby
mit
217
master
229
run "ln -s #{destination_root} ~/.pow/#{app_name}" say_wizard "App is available at http://#{app_name}.dev/" __END__ name: Pow description: "Automatically create a symlink for Pow." author: mbleigh category: other tags: [dev]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/factory_girl.rb
Ruby
mit
217
master
842
gem 'factory_girl', :group => [:development, :test] gem 'factory_girl_rails', :group => [:development, :test] after_bundler do File.open('spec/factories.rb', 'w') {|f| f.write("FactoryGirl.define do end")} factory_user = <<-RB FactoryGirl.define do factory :user do factory_password = Forgery(:basic).passwor...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/devise_invitable.rb
Ruby
mit
217
master
505
gem 'devise_invitable' after_bundler do generate 'devise_invitable:install' generate 'devise_invitable user' generate 'devise_invitable:views users' end __END__ name: Devise Invitable description: Utilize Devise Invitable to allow users to invite other users to sign up to the system author: jonochang category...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/forgery.rb
Ruby
mit
217
master
278
gem 'forgery' after_bundler do generate "forgery" end __END__ name: Forgery description: A fake data generator that provides not only a host of basics and a rememberable syntax, but a customizable library to boot. category: testing exclusive: fake-data tags: [fake-data]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/cancan.rb
Ruby
mit
217
master
257
gem 'cancan' after_bundler do rake "db:migrate" generate "cancan:ability" end __END__ name: Cancan description: "Utilize Cancan for authorization." author: amolk category: authentication exclusive: authorization tags: [authorization, authentication]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/rails_footnotes.rb
Ruby
mit
217
master
328
gem 'rails-footnotes', :group => :development after_bundler do generate 'rails_footnotes:install' end __END__ name: Rails Footnotes description: Displays footnotes in your application for easy debugging, such as sessions, request parameters, cookies, filter chain, routes, queries, etc category: other tags: [debu...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/spork.rb
Ruby
mit
217
master
345
gem 'spork', '~> 1.0.rc' after_bundler do run "bundle exec spork --bootstrap" end __END__ name: Spork description: DRb server for testing frameworks that forks before each run to ensure a clean testing state author: drnic website: https://github.com/sporkrb/spork requires: [] run_after: [] run_before: [] categor...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/jammit.rb
Ruby
mit
217
master
1,062
gem 'jammit' after_bundler do if config['pre_commit'] say_wizard "Adding git pre-commit hook to compile assets..." create_file ".git/hooks/pre-commit", <<-BASH #!/bin/sh echo "Packaging assets with Jammit..." jammit git add public/assets BASH run "chmod +x .git/hooks/pre-commit" end create_file "co...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/omniauth.rb
Ruby
mit
217
master
1,369
strategy_gem = "" while strategy_gem.size == 0 strategy_gem = ask_wizard "Which rubygem contains the strategy you choose? (e.g. 'omniauth-github'; press ENTER to see all)" if strategy_gem.size == 0 say_custom "omniauth", "Displaying all strategies" run "gem list --remote omniauth-" end end gem 'omniauth...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/heroku.rb
Ruby
mit
217
master
1,636
heroku_name = app_name.gsub('_','') after_everything do if config['create'] say_wizard "Creating Heroku app '#{heroku_name}.heroku.com'" while !system("heroku create #{heroku_name}") heroku_name = ask_wizard("What do you want to call your app? ") end end if config['staging'] staging_name...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/shoulda_matchers.rb
Ruby
mit
217
master
217
gem 'shoulda-matchers', :group => [:test] __END__ name: shoulda-matchers description: "Collection of testing matchers extracted from Shoulda." author: lightyrs category: testing run_after: [rspec] requires: [rspec]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/jasmine.rb
Ruby
mit
217
master
208
gem 'jasmine', :group => [:development, :test] after_bundler do generate "jasmine:install" end __END__ category: testing name: Jasmine description: Install jasmine for javascript testing author: jtarchie
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/mootools.rb
Ruby
mit
217
master
681
inside "public/javascripts" do get "https://github.com/kevinvaldek/mootools-ujs/raw/master/Source/rails.js", "rails.js" get "http://ajax.googleapis.com/ajax/libs/mootools/1.3.1/mootools-yui-compressed.js", "mootools.min.js" end gsub_file "config/application.rb", /# JavaScript.*\n/, "" gsub_file "config/application...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/devise.rb
Ruby
mit
217
master
1,661
gem 'devise' inject_into_file 'config/environments/development.rb', "\nconfig.action_mailer.default_url_options = { :host => 'localhost:3000' }\n", :after => "Application.configure do" inject_into_file 'config/environments/test.rb', "\nconfig.action_mailer.default_url_options = { :host => 'localhost:7000' }\n",...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/oa_oauth.rb
Ruby
mit
217
master
214
gem 'oa-oauth' __END__ name: OA-Oauth description: "Include oa-oauth to use with Omniauth" author: porta category: authentication tags: [devise, oauth] requires: [devise, omniauth] run_after: [devise, omniauth]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/mini_magick.rb
Ruby
mit
217
master
223
gem 'mini_magick' __END__ name: Mini Magick description: "Use Mini Magick to manipulate images via ImageMagick" author: jonochang category: other exclusive: image-manipulation tags: [image-manipulation] # TODO eycloud
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/carrierwave.rb
Ruby
mit
217
master
1,008
gem 'fog' gem 'carrierwave' region = config['region'] bucket = ask_wizard("Please enter S3 bucket") carrierwave_initializer = <<-RB CarrierWave.configure do |config| config.fog_credentials = { :provider => 'AWS', :aws_access_key_id => 'CHANGEME', :aws_secret_access_key => 'CHANGEME',...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/rails_dev_tweaks.rb
Ruby
mit
217
master
240
gem 'rails-dev-tweaks', '~> 0.5.0', :group => :development __END__ name: Rails Dev Tweaks description: "Use Rails Dev Tweaks to speed up asset serving in Rails 3.1 dev environment" author: jonochang category: dev-tools tags: [dev-tools]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/intercom.rb
Ruby
mit
217
master
785
# gem 'intercom-ruby', :group => [:development] # for API communication gem 'intercom-rails' # to generate the javascript in the layout # during initial generation (after "rails new") # signin to intercom.io, fetch token, or enter tokens # create new intercom app and get metadata after_bundler do generate %Q|int...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/sequel.rb
Ruby
mit
217
master
230
gem 'sequel-rails' application "require 'sequel-rails/railtie'" __END__ name: Sequel description: "Utilize Sequel as the primary ORM for your application." author: mbleigh exclusive: orm category: persistence tags: [orm, sql]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/hoptoad.rb
Ruby
mit
217
master
727
gem 'hoptoad_notifier' if config['use_heroku'] after_everything do say_wizard "Adding hoptoad:basic Heroku addon (you can always upgrade later)" run "heroku addons:add hoptoad:basic" generate "hoptoad --heroku" end else after_bundler do generate "hoptoad --api-key #{config['api_key']}" end end ...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/mongohq.rb
Ruby
mit
217
master
1,395
if config['use_heroku'] header = <<-YAML <% if ENV['MONGOHQ_URL'] %> <% mongohq = URI.parse(ENV['MONGOHQ_URL']) %> mongohq: host: <%= mongohq.host %> port: <%= mongohq.port %> database: <%= mongohq.path.sub '/', '' %> username: <%= mongohq.user %> password: <%= mongohq.password %> <% end %> YAML after...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/fixture_builder.rb
Ruby
mit
217
master
906
gem 'fixture_builder', :group => [:test] gem 'mocha', :group => [:test] after_everything do create_file "spec/support/fixture_builder.rb", <<-RUBY FixtureBuilder.configure do |fbuilder| # rebuild fixtures automatically when these files change: fbuilder.files_to_check += Dir["spec/factories/*.rb", "spec/support/...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/event_calendar.rb
Ruby
mit
217
master
258
gem 'event-calendar', :require => 'event_calendar' __END__ name: Event Calendar description: "Use Event Calendar to show multiple overlapping events across calendar days and rows" author: jonochang exclusive: calendar category: calendar tags: [calendar]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/sass.rb
Ruby
mit
217
master
250
unless scrolls.include? 'haml' gem 'haml', '>= 3.0.0' end __END__ name: SASS description: "Utilize SASS (through the HAML gem) for really awesome stylesheets!" author: mbleigh exclusive: css_replacement category: assets tags: [css, stylesheet]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/mongoid.rb
Ruby
mit
217
master
275
gem 'bson_ext' gem 'mongoid', '>= 2.0.1' after_bundler do generate 'mongoid:config' end __END__ name: Mongoid description: "Utilize MongoDB with Mongoid as the ORM." author: mbleigh category: persistence exclusive: orm tags: [orm, mongodb] args: ["-O"] # TODO eycloud
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/vanity.rb
Ruby
mit
217
master
587
# FIXME recipe failing due to https://github.com/assaf/vanity/issues/105 gem 'vanity' after_bundler do generate "vanity" rake "db:migrate" inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do " use_vanity :current_user\n" end end after_everything do end __END_...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/inherited_resources.rb
Ruby
mit
217
master
212
gem 'inherited_resources' __END__ name: Inherited Resources description: "Use Inherited Resources to DRY your controllers" author: jonochang exclusive: controllers category: controllers tags: [controllers]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/newrelic.rb
Ruby
mit
217
master
280
gem 'newrelic_rpm' __END__ name: New Relic RPM description: Monitor applications with New Relic author: drnic website: https://support.cloud.engineyard.com/entries/21016493-monitor-applications-with-new-relic-on-engine-yard-cloud category: deployment exclusive: app-monitoring
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/ransack.rb
Ruby
mit
217
master
1,309
gem 'ransack' create_file "config/initializers/ransack.rb", <<-RUBY Ransack.configure do |config| # config.add_predicate 'equals_diddly', # Name your predicate # # What non-compound ARel predicate will it use? (eq, matches, etc) # :arel_predicate => 'eq', # ...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/thinking_sphinx.rb
Ruby
mit
217
master
296
gem 'thinking-sphinx', '>= 2.0.4', :require => 'thinking_sphinx' __END__ name: Thinking Sphinx description: "Include thinking sphinx to enable search" author: porta website: http://freelancing-god.github.com/ts/en/ category: search tags: [thinking_sphinx, search] requires: [thinking_sphinx]
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/cartographer.rb
Ruby
mit
217
master
944
after_bundler do #fixes missing Command error when running rails plugin if File.open('script/rails').grep(/module Commands; end/) == [] source_rails = <<-RB APP_PATH = File.expand_path('../../config/application', __FILE__) RB add_commands = <<-RB module Commands; end APP_PATH = File.expand_path('../../...
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/rmagick.rb
Ruby
mit
217
master
235
gem 'rmagick', :require => "RMagick" __END__ name: RMagick description: "Use RMagick to manipulate images via ImageMagick" author: jonochang category: other exclusive: image-manipulation tags: [image-manipulation] # TODO eycloud
github
drnic/appscrolls
https://github.com/drnic/appscrolls
scrolls/untested/ffaker.rb
Ruby
mit
217
master
408
gem 'ffaker' after_bundler do # TODO - necessary to add this? or will bundler do it? inject_into_file "spec/spec_helper.rb", :after => "require 'rspec/rails'\n" do "require 'ffaker'\n" end end __END__ name: ffaker description: "Fast Faker: Faker refactored for speed" author: lightyrs # necessary? require...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
Gemfile
Ruby
mit
217
master
366
source 'https://rubygems.org' # Specify your gem's dependencies in signed_form.gemspec gemspec rails_version = ENV['RAILS_VERSION'] || 'master' case rails_version when /master/ gem 'rails', github: 'rails/rails' gem 'arel', github: 'rails/arel' when /-stable$/ gem 'rails', github: 'rails/rails', branch: rails_...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
signed_form.gemspec
Ruby
mit
217
master
1,215
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'signed_form/version' Gem::Specification.new do |spec| spec.name = "signed_form" spec.version = SignedForm::VERSION spec.authors = ["Erich Menge", "Johnneylee Jack Rolli...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
lib/signed_form.rb
Ruby
mit
217
master
1,138
# frozen_string_literal: true require 'action_view' require 'action_controller' require 'signed_form/version' require 'signed_form/errors' require 'signed_form/form_builder' require 'signed_form/hmac' require 'signed_form/digest_stores' require 'signed_form/digestor' require 'signed_form/action_view/form_helper' requ...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
lib/signed_form/test_helper.rb
Ruby
mit
217
master
394
module SignedForm module TestHelper def permit_all_parameters @controller.instance_eval do def params @permit_all_parameters ||= super.permit! end end if block_given? yield @controller.remove_instance_variable :@permit_all_parameters @controller...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
lib/signed_form/gate_keeper.rb
Ruby
mit
217
master
1,554
# frozen_string_literal: true module SignedForm class GateKeeper attr_reader :allowed_attributes def initialize(controller) @controller = controller @params = controller.params @request = controller.request extract_and_verify_form_signature verify_destination veri...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
lib/signed_form/hmac.rb
Ruby
mit
217
master
1,041
require "openssl" module SignedForm class HMAC attr_accessor :secret_key def initialize(options = {}) self.secret_key = options[:secret_key] if secret_key.nil? || secret_key.empty? if defined?(::Rails) and ::Rails.application.respond_to?(:secrets) self.secret_key = ::Rails.app...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
lib/signed_form/form_builder.rb
Ruby
mit
217
master
4,693
module SignedForm module FormBuilder FIELDS_TO_SIGN = [{:select => :multiple_select?}, {:collection_select => :multiple_select?}, {:grouped_collection_select => :multiple_select?}, :time_zone_select, :collection_radio_buttons, {:collection_check_boxes => []}, ...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
lib/signed_form/digestor.rb
Ruby
mit
217
master
1,547
require 'set' module SignedForm class Digestor attr_accessor :view_paths def initialize(template) @view_paths = Set.new @views = Set.new self << template end def <<(template) virtual_path = get_virtual_path(template) raise Errors::UnableToDigest, "Unable to get virtua...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
lib/signed_form/errors.rb
Ruby
mit
217
master
284
module SignedForm module Errors class NoSecretKey < StandardError; end class InvalidSignature < StandardError; end class InvalidURL < StandardError; end class UnableToDigest < StandardError; end class ExpiredForm < StandardError; end end end
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
lib/signed_form/action_view/form_helper.rb
Ruby
mit
217
master
1,459
module SignedForm module ActionView module FormHelper # @option options :sign_destination [Boolean] Only the URL given/created will be allowed to receive the form. # @option options :digest [Boolean] Digest and verify the views have not been modified # @option options :digest_grace_period [Inte...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
lib/signed_form/action_controller/permit_signed_params.rb
Ruby
mit
217
master
1,072
module SignedForm module ActionController # This module is required for parameter verification on the controller. # Include it in controllers that will be receiving signed forms. module PermitSignedParams def self.included(base) if base.respond_to? :prepend_before_action base.pr...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
spec/digestor_spec.rb
Ruby
mit
217
master
2,788
require 'spec_helper' describe SignedForm::Digestor do let(:view_paths) { [File.join(File.dirname(__FILE__), 'fixtures', 'views')] } let(:template) { double(view_paths: view_paths) } before do def template.virtual_path=(path) @virtual_path = path end template.virtual_path = 'form' end it...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
spec/form_builder_spec.rb
Ruby
mit
217
master
13,163
require 'spec_helper' class User extend ActiveModel::Naming attr_accessor :name, :options, :widgets_attributes def to_key [1] end end class Widget extend ActiveModel::Naming attr_accessor :name def persisted? false end end class ControllerRenderer < AbstractController::Base include Abst...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
spec/spec_helper.rb
Ruby
mit
217
master
1,604
require 'action_view' require 'action_view/template' require 'action_controller' require 'active_model' require 'action_controller' require 'active_support/core_ext' require 'coveralls' Coveralls.wear! do add_filter "/spec/" end require 'signed_form' module SignedFormViewHelper include ActionView::Helpers if ...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
spec/permit_signed_params_spec.rb
Ruby
mit
217
master
4,144
require 'spec_helper' class Controller < ActionController::Base include SignedForm::ActionController::PermitSignedParams public :permit_signed_form_data def view_paths [File.join(File.dirname(__FILE__), 'fixtures', 'views')] end end describe SignedForm::ActionController::PermitSignedParams do let(:con...
github
erichmenge/signed_form
https://github.com/erichmenge/signed_form
spec/gate_keeper_spec.rb
Ruby
mit
217
master
1,180
# frozen_string_literal: true module SignedForm RSpec.describe GateKeeper do before do SignedForm.config do |c| c.secret_key = 'hunter2' end end let :url do 'http://www.example.com/posts/1/comments/2' end let :controller do attributes = { 'foo' => 'bar' } d...