repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/01_core_ext_try.rb
try/01_core_ext_try.rb
require 'gibbler/mixins' ## has String#clear "".respond_to? :clear #=> true
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/10_standalone_try.rb
try/10_standalone_try.rb
require 'gibbler' @sha256_digest = if Tryouts.sysinfo.vm == :java require 'openssl' OpenSSL::Digest::SHA256 else Digest::SHA256 end ## Default delimiter Gibbler.delimiter #=> ':' ## Create a digest from flattened Array Gibbler.digest [1, :sym, ['string', 2,3]].flatten.join(':') #=> 'd84d6ad2bd5c9589842fb02cf3...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/11_basic_try.rb
try/11_basic_try.rb
require 'gibbler/mixins' #Gibbler.enable_debug # include Gibbler raises exception begin a = Class.new a.send :include, Gibbler rescue TypeError :success end #=> :success # Symbol digests are consistent :kimmy.gibbler #=> '52be7494a602d85ff5d8a8ab4ffe7f1b171587df' # String digests are consistent ...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/18_proc_try.rb
try/18_proc_try.rb
require 'gibbler/mixins' class ::MyProc < Proc; end ## Proc.new can gibbler Proc.new() { }.gibbler #=> '12075835e94be34438376cd7a54c8db7e746f15d' # Proc can gibbler Proc.gibbler #=> '8640f7abcbcb80e3825ed827bf36819e26119e16' ## proc can gibbler proc {}.gibbler #=> '12075835e94be34438376cd7a54c8db7e746f15d...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/12_basic_sha256_try.rb
try/12_basic_sha256_try.rb
require 'gibbler/mixins' # NOTE: JRuby requires that we use OpenSSL::Digest::SHA256 if Tryouts.sysinfo.vm == :java require 'openssl' Gibbler.digest_type = OpenSSL::Digest::SHA256 else Gibbler.digest_type = Digest::SHA256 end ## A Symbol can gibbler :anything.gibbler #=> '754f87ca720ec256633a286d9270d68478850...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/14_extended_try.rb
try/14_extended_try.rb
require 'gibbler/mixins' ## true can gibbler true.gibbler #=> 'f2b0150c84c5c834406ec9cdec989a0fa938b4ad' # false can gibbler false.gibbler #=> 'abee839edf5f9c101c505c28987ca35c31c7fc8d' # TrueClass can gibbler TrueClass.gibbler #=> '583fb214ec50d2c4a123cc52de0c65e801d13516' # FalseClass can gibbler False...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/51_hash_history_try.rb
try/51_hash_history_try.rb
require 'gibbler/mixins' require 'gibbler/history' class ::Hash include Gibbler::History end ## "doesn't reveal self.__gibbler_history instance variable", a = {} a.gibbler # We need to gibbler first so it sets a value to the instance var val = RUBY_VERSION >= '1.9' ? :'self.__gibbler_history' : 'self.__gibbl...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/59_history_exceptions_try.rb
try/59_history_exceptions_try.rb
require 'gibbler/mixins' require 'gibbler/history' # "raises exception when reverting to unknown gibble" begin a = {} a.gibbler_commit a.gibbler_revert! '2222222222222222222222222222222222222222' rescue Gibbler::BadDigest :success end #=> :success # "raises exception when reverting and there's ...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/20_time_try.rb
try/20_time_try.rb
require 'date' require 'gibbler/mixins' # "Date instance can gibbler Date.parse('2009-08-25').gibbler #=> 'c8403fc35481fdf7f6f4a0e7262b1c9610bdebaa' # "Time instance can gibbler Time.parse('2009-08-25 16:43:53 UTC').gibbler #=> '73b4635fc63b8dd32b622776201f98a37478be90' # "Time instance can gibbler with single d...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/53_string_history_try.rb
try/53_string_history_try.rb
require 'gibbler/mixins' require 'gibbler/history' class String include Gibbler::History end # "can take a String snapshot" a = "kimmy" a.gibbler_commit #=> 'c8027100ecc54945ab15ddac529230e38b1ba6a1' # "return a String history" a = "kimmy" a.gibbler_commit a << " gibbler" a.gibbler_commit a.gibbler_h...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/52_array_history_try.rb
try/52_array_history_try.rb
require 'gibbler/mixins' require 'gibbler/history' class Array include Gibbler::History end # "can take a Array snapshot" a = [:jesse] a.gibbler_commit #=> 'd95fcabb498ae282f356eba63da541e4f72c6efa' # "return an Array history" a = [:jesse] a.gibbler_commit a << :joey a.gibbler_commit a.gibbler_histor...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/90_alias_try.rb
try/90_alias_try.rb
require 'gibbler/aliases' require 'gibbler/history' # "has digest" :kimmy.gibbler == :kimmy.digest #=> true # "has digest_cache", true a = :kimmy.gibbler a.gibbler_cache == a.digest_cache #=> true # "has changed?" a = "kimmy" a.digest a << '+ dj' a.gibbled? #=> true # "can convert short digest in...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/80_performance_try.rb
try/80_performance_try.rb
## DISABLED. Tryouts 2.0 doesn't do performance ## # # library :gibbler, File.dirname(__FILE__), '..', 'lib' # group "Performance" # # tryouts "Speed", :benchmark do # # NOTE: gibbler is slower when history is enabled. # drill "Setup variables" do # @@array = (1..1000).map { rand } # values = (1..1000).m...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/02_compat_try.rb
try/02_compat_try.rb
require 'gibbler/mixins' ## Gibbler Objects have gibbler_cache method "kimmy".respond_to? :gibbler_cache #=> true ## Gibbler Objects have __gibbler_cache method "kimmy".respond_to? :__gibbler_cache #=> true ## __gibbler_cache returns the same value as gibbler_cache @a = "kimmy" and @a.gibbler @a.gibbler_cach...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/57_arbitrary_history_try.rb
try/57_arbitrary_history_try.rb
require 'gibbler/mixins' require 'gibbler/history' class ::FullHouse include Gibbler::Complex include Gibbler::History attr_accessor :roles end # "can take a FullHouse snapshot" a = FullHouse.new a.gibbler_commit #=> '4192d4cb59975813f117a51dcd4454ac16df6703' # "return a FullHouse history" a = FullHouse....
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/15_file_try.rb
try/15_file_try.rb
require 'tempfile' require 'gibbler/mixins' @tempfile = "tryouts-9000-awesome.txt" ## File can gibbler file = File.new(File.join('.', 'CHANGES.txt')) file.gibbler #=> 'c052e87bd0acb7e08c98dad7f8b09b4382a08ef6' ## Gibbler is different for each path file1 = File.new(File.join('.', 'CHANGES.txt')) file2 = ...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/16_uri_try.rb
try/16_uri_try.rb
require 'uri' require 'gibbler/mixins' # "URI::HTTP can gibbler" uri = URI.parse "http://localhost:3114/spaceship" uri.gibbler #=> "9efe60a5db66aecf9b5fb8655b0bab0fcc7bd0c5" # "URI::HTTPS can gibbler" uri = URI.parse "https://localhost:3114/spaceship" uri.gibbler #=> "b75d3c34e60d6feafa796ddbb51e45710f6b106d"...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/50_history_try.rb
try/50_history_try.rb
require 'gibbler/mixins' require 'gibbler/history' # can convert short digest into long a = { :magic => :original } g = a.gibbler_commit.short a.gibbler_find_long(g) #=> "d7049916ddb25e6cc438b1028fb957e5139f9910" # can return most recent stamp a = { :magic => :original } a.gibbler_commit a.gibbler_stamp.c...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/17_complex_object_try.rb
try/17_complex_object_try.rb
require 'gibbler/mixins' require 'time' # arbitrary objects can specify instance variables to gibbler class ::FullHouse include Gibbler::Complex attr_accessor :roles attr_accessor :stamp attr_accessor :ready gibbler :roles end a = FullHouse.new a.roles = [:jesse, :joey, :danny, :kimmy, :mic...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/30_secret_try.rb
try/30_secret_try.rb
require 'uri' require 'gibbler/mixins' # "Can set a sexy global secret Gibbler.secret = 'kimmy'.gibbler Gibbler.secret #=> "c8027100ecc54945ab15ddac529230e38b1ba6a1" # "When the secret is set, digests are different 'kimmy'.gibbler #=> "62e645351505cb89a0b06a0f5df8383ea754f71d" # "When the secret is set, digest...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
delano/gibbler
https://github.com/delano/gibbler/blob/74f34302f8d2eaa035cd19cde823337c3d8a0752/try/05_gibbler_digest_try.rb
try/05_gibbler_digest_try.rb
require 'gibbler/mixins' ## has short method "kimmy".gibbler.short #=> Gibbler::Digest.new("c8027100") # can Gibbler::Digest#short Gibbler::Digest.new("1234567890").short #=> Gibbler::Digest.new("12345678") # == is strict (only exact matches) Gibbler::Digest.new("1234567890") != "12345678" #=> true # === is ...
ruby
MIT
74f34302f8d2eaa035cd19cde823337c3d8a0752
2026-01-04T17:37:13.874436Z
false
francesc/rails-translate-routes
https://github.com/francesc/rails-translate-routes/blob/a6f0794e825799ceaa24bb05c7ed848f946c887d/test/test_rails-translate-routes.rb
test/test_rails-translate-routes.rb
require 'helper' class TestRailsTranslateRoutes < Test::Unit::TestCase should "probably rename this file and start testing for real" do flunk "hey buddy, you should probably rename this file and start testing for real" end end
ruby
MIT
a6f0794e825799ceaa24bb05c7ed848f946c887d
2026-01-04T17:37:20.269872Z
false
francesc/rails-translate-routes
https://github.com/francesc/rails-translate-routes/blob/a6f0794e825799ceaa24bb05c7ed848f946c887d/test/helper.rb
test/helper.rb
# coding: UTF-8 require 'rubygems' require 'bundler' begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e $stderr.puts e.message $stderr.puts "Run `bundle install` to install missing gems" exit e.status_code end require 'minitest/autorun' $LOAD_PATH.unshift(File.join(File.dirname(__F...
ruby
MIT
a6f0794e825799ceaa24bb05c7ed848f946c887d
2026-01-04T17:37:20.269872Z
false
francesc/rails-translate-routes
https://github.com/francesc/rails-translate-routes/blob/a6f0794e825799ceaa24bb05c7ed848f946c887d/lib/controller_test_helper.rb
lib/controller_test_helper.rb
# This monkey patch injects the locale in the controller's params # Reason: ActionController::TestCase doesn't support "default_url_options" # # Example: when the request you are testing needs the locale, e.g. # get :show, :id => 1, :locale => 'en' # # if the monkey patch was loaded, you can just do: # get :show, :...
ruby
MIT
a6f0794e825799ceaa24bb05c7ed848f946c887d
2026-01-04T17:37:20.269872Z
false
francesc/rails-translate-routes
https://github.com/francesc/rails-translate-routes/blob/a6f0794e825799ceaa24bb05c7ed848f946c887d/lib/rails-translate-routes.rb
lib/rails-translate-routes.rb
# coding: UTF-8 # This class knows nothing about Rails.root or Rails.application.routes, # and therefore is easier to test without a Rails app. class RailsTranslateRoutes TRANSLATABLE_SEGMENT = /^([\w-]+)(\()?/.freeze LOCALE_PARAM_KEY = :locale.freeze ROUTE_HELPER_CONTAINER = [ ActionController::Base, Ac...
ruby
MIT
a6f0794e825799ceaa24bb05c7ed848f946c887d
2026-01-04T17:37:20.269872Z
false
grimen/devise_facebook_connectable
https://github.com/grimen/devise_facebook_connectable/blob/07f59fff1822c449fd40d6e03f7356c6e5d96315/rails/init.rb
rails/init.rb
# encoding: utf-8 require 'devise_facebook_connectable'
ruby
MIT
07f59fff1822c449fd40d6e03f7356c6e5d96315
2026-01-04T17:37:17.200618Z
false
grimen/devise_facebook_connectable
https://github.com/grimen/devise_facebook_connectable/blob/07f59fff1822c449fd40d6e03f7356c6e5d96315/generators/devise_facebook_connectable/devise_facebook_connectable_generator.rb
generators/devise_facebook_connectable/devise_facebook_connectable_generator.rb
# encoding: utf-8 class DeviseFacebookConnectableGenerator < Rails::Generator::Base #:nodoc: default_options :api_key => "YOUR_APP_API_KEY", :secret_key => "YOUR_APP_SECRET_KEY" def manifest record do |m| m.dependency 'xd_receiver', [], options.merge(:collision => :skip) m.templ...
ruby
MIT
07f59fff1822c449fd40d6e03f7356c6e5d96315
2026-01-04T17:37:17.200618Z
false
grimen/devise_facebook_connectable
https://github.com/grimen/devise_facebook_connectable/blob/07f59fff1822c449fd40d6e03f7356c6e5d96315/lib/devise_facebook_connectable.rb
lib/devise_facebook_connectable.rb
# encoding: utf-8 require 'devise' require 'facebooker' require 'devise_facebook_connectable/model' # QUESTION: should this really be here? Autoloaded below... require 'devise_facebook_connectable/strategy' require 'devise_facebook_connectable/schema' require 'devise_facebook_connectable/routes' require 'devise_facebo...
ruby
MIT
07f59fff1822c449fd40d6e03f7356c6e5d96315
2026-01-04T17:37:17.200618Z
false
grimen/devise_facebook_connectable
https://github.com/grimen/devise_facebook_connectable/blob/07f59fff1822c449fd40d6e03f7356c6e5d96315/lib/devise_facebook_connectable/version.rb
lib/devise_facebook_connectable/version.rb
module Devise module FacebookConnectable VERSION = "0.2.2".freeze end end
ruby
MIT
07f59fff1822c449fd40d6e03f7356c6e5d96315
2026-01-04T17:37:17.200618Z
false
grimen/devise_facebook_connectable
https://github.com/grimen/devise_facebook_connectable/blob/07f59fff1822c449fd40d6e03f7356c6e5d96315/lib/devise_facebook_connectable/view_helpers.rb
lib/devise_facebook_connectable/view_helpers.rb
# encoding: utf-8 require 'devise/mapping' require 'facebooker/rails/helpers' module Devise #:nodoc: module FacebookConnectable #:nodoc: # Facebook Connect view helpers, i.e. sign in/out (connect) links, etc. # # == Dependencies: # # * devise.facebook_connectable.js (is generated with the gen...
ruby
MIT
07f59fff1822c449fd40d6e03f7356c6e5d96315
2026-01-04T17:37:17.200618Z
false
grimen/devise_facebook_connectable
https://github.com/grimen/devise_facebook_connectable/blob/07f59fff1822c449fd40d6e03f7356c6e5d96315/lib/devise_facebook_connectable/strategy.rb
lib/devise_facebook_connectable/strategy.rb
# encoding: utf-8 require 'devise/strategies/base' require 'facebooker/session' module Devise #:nodoc: module FacebookConnectable #:nodoc: module Strategies #:nodoc: # Default strategy for signing in a user using Facebook Connect (a Facebook account). # Redirects to sign_in page if it's not authenti...
ruby
MIT
07f59fff1822c449fd40d6e03f7356c6e5d96315
2026-01-04T17:37:17.200618Z
false
grimen/devise_facebook_connectable
https://github.com/grimen/devise_facebook_connectable/blob/07f59fff1822c449fd40d6e03f7356c6e5d96315/lib/devise_facebook_connectable/controller_filters.rb
lib/devise_facebook_connectable/controller_filters.rb
# encoding: utf-8 require 'facebooker/session' require 'action_controller' module Devise #:nodoc: module FacebookConnectable #:nodoc: module Controllers #:nodoc: # Controller filters (extensions) needed for Facebook Connect. # module Filters # == References # # For mor...
ruby
MIT
07f59fff1822c449fd40d6e03f7356c6e5d96315
2026-01-04T17:37:17.200618Z
false
grimen/devise_facebook_connectable
https://github.com/grimen/devise_facebook_connectable/blob/07f59fff1822c449fd40d6e03f7356c6e5d96315/lib/devise_facebook_connectable/routes.rb
lib/devise_facebook_connectable/routes.rb
# encoding: utf-8 ActionController::Routing::RouteSet::Mapper.class_eval do protected # Setup routes for +FacebookSessionsController+. # alias :facebook_connectable :database_authenticatable end
ruby
MIT
07f59fff1822c449fd40d6e03f7356c6e5d96315
2026-01-04T17:37:17.200618Z
false
grimen/devise_facebook_connectable
https://github.com/grimen/devise_facebook_connectable/blob/07f59fff1822c449fd40d6e03f7356c6e5d96315/lib/devise_facebook_connectable/model.rb
lib/devise_facebook_connectable/model.rb
# encoding: utf-8 require 'devise/models' require 'facebooker/session' module Devise #:nodoc: # module FacebookConnectable #:nodoc: module Models #:nodoc: # Facebook Connectable Module, responsible for validating authenticity of a # user and storing credentials while signing in using their Facebook ...
ruby
MIT
07f59fff1822c449fd40d6e03f7356c6e5d96315
2026-01-04T17:37:17.200618Z
false
grimen/devise_facebook_connectable
https://github.com/grimen/devise_facebook_connectable/blob/07f59fff1822c449fd40d6e03f7356c6e5d96315/lib/devise_facebook_connectable/schema.rb
lib/devise_facebook_connectable/schema.rb
# encoding: utf-8 require 'devise/schema' module Devise #:nodoc: module FacebookConnectable #:nodoc: module Schema # Database migration schema for Facebook Connect. # def facebook_connectable apply_schema ::Devise.facebook_uid_field, Integer, :limit => 8 # BIGINT unsigned / 64-bit in...
ruby
MIT
07f59fff1822c449fd40d6e03f7356c6e5d96315
2026-01-04T17:37:17.200618Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/helpers/writefully/sites_helper.rb
app/helpers/writefully/sites_helper.rb
module Writefully module SitesHelper STATE_PARTIAL = { true => 'yes', false => 'no' } def processing_partial site 'writefully/sites/processing/' + STATE_PARTIAL[site.processing] end def healthy_partial site 'writefully/sites/healthy/' + STATE_PARTIAL[site.healthy] ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/helpers/writefully/posts_helper.rb
app/helpers/writefully/posts_helper.rb
module Writefully module PostsHelper def publish_tag post partial = post.published_at.present? ? 'published' : 'not_published' 'writefully/posts/' + partial end end end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/helpers/writefully/application_helper.rb
app/helpers/writefully/application_helper.rb
module Writefully module ApplicationHelper def path_active?(path) request.path == path ? 'active' : nil end def link_icon(icon) content_tag :span, nil,class: "glyphicon glyphicon-#{icon}" if icon end def activeable_link_to(type, name, path, options = {}) render 'activeable_link...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/helpers/writefully/flash_helper.rb
app/helpers/writefully/flash_helper.rb
module Writefully module FlashHelper def render_flash render 'flash' if can_flash? end def can_flash? flash.keys.sort == [:from, :object_id, :object_type, :type] and \ flash.to_hash.values.compact.count == flash_values_count end def flash_values_count action_name == "crea...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/controllers/writefully/posts_controller.rb
app/controllers/writefully/posts_controller.rb
require_dependency "writefully/application_controller" module Writefully class PostsController < ApplicationController def index @site = get_site @posts = @site.posts end def show @site = get_site @post = @site.posts.friendly.find(params[:id]) end protected def ge...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/controllers/writefully/profiles_controller.rb
app/controllers/writefully/profiles_controller.rb
require_dependency "writefully/application_controller" module Writefully class ProfilesController < ApplicationController before_filter :authenticate_wf_authorship! def edit @authorship = current_wf_authorship end end end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/controllers/writefully/hooks_controller.rb
app/controllers/writefully/hooks_controller.rb
require_dependency "writefully/application_controller" module Writefully class HooksController < ApplicationController before_filter :check_signature HMAC_DIGEST = OpenSSL::Digest::Digest.new('sha1') class InvalidSignature < StandardError; end def create self.__send__ request.headers["X-Gith...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/controllers/writefully/sites_controller.rb
app/controllers/writefully/sites_controller.rb
require_dependency "writefully/application_controller" module Writefully class SitesController < ApplicationController before_filter :authenticate_wf_authorship! VALID_TABS = %w(processing errors) def index @sites = current_wf_authorship.owned_sites redirect_to new_site_path if @sites.empty...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/controllers/writefully/authorships_controller.rb
app/controllers/writefully/authorships_controller.rb
require_dependency "writefully/application_controller" module Writefully class AuthorshipsController < ApplicationController before_filter :authenticate_wf_owner! end end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/controllers/writefully/sessions_controller.rb
app/controllers/writefully/sessions_controller.rb
require_dependency "writefully/application_controller" module Writefully class SessionsController < ApplicationController def new @github_app = Writefully.github_app end def create @auth = Writefully.github_app.get_token(params[:code]) @github = Github.new oauth_token: @auth.token ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/controllers/writefully/application_controller.rb
app/controllers/writefully/application_controller.rb
module Writefully class ApplicationController < ActionController::Base def authenticate_wf_authorship! redirect_to signin_path unless wf_authorship_signed_in? end def wf_authorship_signed_in? current_wf_authorship.present? end def set_flash(type, object: nil) flash[:namespace]...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/models/writefully/tag.rb
app/models/writefully/tag.rb
module Writefully class Tag < ActiveRecord::Base self.table_name = "writefully_tags" has_many :taggings, dependent: :destroy has_many :posts, through: :taggings class << self def ids_from_tokens tokens taxon = Taxon.new(tokens, pluck(:name), name) import taxon.non_existing ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/models/writefully/post.rb
app/models/writefully/post.rb
module Writefully class Post < ActiveRecord::Base self.table_name = "writefully_posts" extend FriendlyId include Writefully::Postable friendly_id :title, use: :slugged has_many :taggings, dependent: :destroy wf_taxonomize :tags, through: :taggings belongs_to :authorship belongs_to ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/models/writefully/tagging.rb
app/models/writefully/tagging.rb
module Writefully class Tagging < ActiveRecord::Base self.table_name = "writefully_taggings" belongs_to :tag, class_name: "Writefully::Tag" belongs_to :post, class_name: "Writefully::Post" end end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/models/writefully/site.rb
app/models/writefully/site.rb
module Writefully class Site < ActiveRecord::Base self.table_name = "writefully_sites" extend FriendlyId HOOK_EVENTS = %w(push collaborator) friendly_id :name, use: :slugged after_save :setup_repository, if: -> { repository.nil? } after_save :clear_errors, if: -> { healthy_changed? and...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/app/models/writefully/authorship.rb
app/models/writefully/authorship.rb
module Writefully class Authorship < ActiveRecord::Base self.table_name = "writefully_authorships" belongs_to :user has_many :posts has_many :owned_sites, class_name: "Writefully::Site", foreign_key: :owner_id store_accessor :data, :name, :email, :uid, :user_name, :auth_token, :bio def to_...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/db/migrate/20140402200330_create_writefully_authorships.rb
db/migrate/20140402200330_create_writefully_authorships.rb
class CreateWritefullyAuthorships < ActiveRecord::Migration def change create_table :writefully_authorships do |t| t.references :user, index: true t.hstore :data t.string :role t.boolean :active, default: true t.timestamps end end end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/db/migrate/20140501094825_add_trashed_to_posts.rb
db/migrate/20140501094825_add_trashed_to_posts.rb
class AddTrashedToPosts < ActiveRecord::Migration def change add_column :writefully_posts, :trashed, :boolean, default: false end end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/db/migrate/20140402091204_create_writefully_posts.rb
db/migrate/20140402091204_create_writefully_posts.rb
class CreateWritefullyPosts < ActiveRecord::Migration def change create_table :writefully_posts do |t| t.string :title t.string :slug t.string :type t.text :content t.hstore :details t.datetime :published_at t.integer :position t.string ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/db/migrate/20140402091415_create_writefully_taggings.rb
db/migrate/20140402091415_create_writefully_taggings.rb
class CreateWritefullyTaggings < ActiveRecord::Migration def change create_table :writefully_taggings do |t| t.references :tag, index: true t.references :post, index: true t.timestamps end end end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/db/migrate/20140402091244_create_writefully_tags.rb
db/migrate/20140402091244_create_writefully_tags.rb
class CreateWritefullyTags < ActiveRecord::Migration def change create_table :writefully_tags do |t| t.string :name t.string :slug t.string :type t.timestamps end add_index :writefully_tags, :slug, unique: true add_index :writefully_tags, :type end end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/db/migrate/20140403181629_create_writefully_sites.rb
db/migrate/20140403181629_create_writefully_sites.rb
class CreateWritefullySites < ActiveRecord::Migration def change create_table :writefully_sites do |t| t.string :name t.string :branch, default: 'master' t.string :slug t.hstore :repository t.string :domain t.boolean :processing, default: true t.boolean :healt...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/spec_helper.rb
spec/spec_helper.rb
# This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../dummy/config/environment", __FILE__) require 'rspec/rails' require 'rspec/its' require 'capybara/rspec' require 'pry' require 'coveralls' Coveralls.wear! require 'writefully' # Requir...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/controllers/writefully/hooks_controller_spec.rb
spec/controllers/writefully/hooks_controller_spec.rb
require 'spec_helper' module Writefully describe HooksController, type: :controller do routes { Writefully::Engine.routes } let(:github_push_hook) { open(File.dirname(__FILE__) + "/../../fixtures/writefully/github_push_hook.json").read } let(:github_member_add_hook) { open(File.dirname(__FILE__) ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/controllers/writefully/posts_controller_spec.rb
spec/controllers/writefully/posts_controller_spec.rb
require 'spec_helper' module Writefully describe PostsController, type: :controller do routes { Writefully::Engine.routes } fixtures :"writefully/sites" fixtures :"writefully/posts" fixtures :"writefully/authorships" let(:owner) { writefully_authorships(:wf_owner_1) } let(:site) { write...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/controllers/writefully/authorships_controller_spec.rb
spec/controllers/writefully/authorships_controller_spec.rb
require 'spec_helper' module Writefully describe AuthorshipsController do end end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/controllers/writefully/sites_controller_spec.rb
spec/controllers/writefully/sites_controller_spec.rb
require 'spec_helper' module Writefully describe SitesController, type: :controller do routes { Writefully::Engine.routes } fixtures :"writefully/sites" fixtures :"writefully/posts" fixtures :"writefully/authorships" let(:owner) { writefully_authorships(:wf_owner_1) } let(:site) { writefu...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/controllers/writefully/profiles_controller_spec.rb
spec/controllers/writefully/profiles_controller_spec.rb
require 'spec_helper' module Writefully describe ProfilesController, type: :controller do end end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/features/writefully/sites_feature_spec.rb
spec/features/writefully/sites_feature_spec.rb
require 'spec_helper' feature "WritefullySitesFeature" do fixtures :"writefully/sites" fixtures :"writefully/posts" fixtures :"writefully/authorships" let(:owner) { writefully_authorships(:wf_owner_1) } let(:site) { writefully_sites(:codemy_net) } let(:post_1) { writefully_posts(:hash_selector_pattern) ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/content/codemy-net/posts/1-hash-selector-pattern/benchmark/selector.rb
spec/dummy/content/codemy-net/posts/1-hash-selector-pattern/benchmark/selector.rb
require 'benchmark' class Selector def initialize(key) @key = key end def selector_if if @key == :success 'alert-success' elsif @key == :error 'alert-danger' elsif @key == :warn 'alert-warning' elsif @key == :info 'alert-info' end end def selector_case ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/app/controllers/application_controller.rb
spec/dummy/app/controllers/application_controller.rb
class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/app/models/playlist.rb
spec/dummy/app/models/playlist.rb
class Playlist < Writefully::Tag end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/app/models/post.rb
spec/dummy/app/models/post.rb
class Post < Writefully::Post wf_taxonomize :playlists, -> { where(type: 'Playlist') }, through: :taggings, source: :tag end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/db/schema.rb
spec/dummy/db/schema.rb
# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative sou...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/application.rb
spec/dummy/config/application.rb
require File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require(*Rails.groups) require "writefully" module Dummy class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/environment.rb
spec/dummy/config/environment.rb
# Load the Rails application. require File.expand_path('../application', __FILE__) # Initialize the Rails application. Dummy::Application.initialize!
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/routes.rb
spec/dummy/config/routes.rb
Rails.application.routes.draw do mount Writefully::Engine, at: '/writefully' end
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/boot.rb
spec/dummy/config/boot.rb
# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__) require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/initializers/filter_parameter_logging.rb
spec/dummy/config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [:password]
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/initializers/session_store.rb
spec/dummy/config/initializers/session_store.rb
# Be sure to restart your server when you modify this file. Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/initializers/wrap_parameters.rb
spec/dummy/config/initializers/wrap_parameters.rb
# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters f...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/initializers/inflections.rb
spec/dummy/config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflec...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/initializers/backtrace_silencers.rb
spec/dummy/config/initializers/backtrace_silencers.rb
# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a probl...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/initializers/mime_types.rb
spec/dummy/config/initializers/mime_types.rb
# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/initializers/secret_token.rb
spec/dummy/config/initializers/secret_token.rb
# Be sure to restart your server when you modify this file. # Your secret key is used for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to diction...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/environments/test.rb
spec/dummy/config/environments/test.rb
Dummy::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test sui...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/environments/development.rb
spec/dummy/config/environments/development.rb
Dummy::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web ser...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/dummy/config/environments/production.rb
spec/dummy/config/environments/production.rb
Dummy::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both thread web server...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/taxon_spec.rb
spec/lib/writefully/taxon_spec.rb
require 'spec_helper' module Writefully describe Taxon do subject(:taxon) { Taxon.new(["Ruby", "Functional"], ["Ruby"], "Writefully::Tag")} it "#non_existing" do expect(subject.non_existing.first.name).to eq "Functional" end its(:selector) { is_expected.to eq :"writefully/tag" } its(:ty...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/source_spec.rb
spec/lib/writefully/source_spec.rb
require 'spec_helper' module Writefully describe Source do subject(:source) { Writefully::Source } let(:indices) { [{site: 'codemy-net', resource: 'posts', slug: '1-hash-selector-pattern'}, {site: 'codemy-net', resource: 'posts', slug: '2-rails-flash-partials'} ]} let(:samp...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/content_spec.rb
spec/lib/writefully/content_spec.rb
require 'spec_helper' module Writefully describe Content do let(:index) { {site: 'codemy-net', resource: 'posts', slug: '1-hash-selector-pattern' } } let(:meta) { { "title" => "Ruby Hash Selector Pattern", "tags" => ["Ruby"], "playlists" => ["A Shot of Ruby"], "deta...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/postable_spec.rb
spec/lib/writefully/postable_spec.rb
require 'spec_helper' module Writefully describe Postable do subject { ::Post.new } describe "#klass_from" do it "should return Writefully::Tag" do expect(subject.klass_from("tag")).to eq "Writefully::Tag" end it "should turn Playlist" do expect(subject.klass_from("pl...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/asset_spec.rb
spec/lib/writefully/asset_spec.rb
require 'spec_helper' module Writefully describe Asset do let(:index) { {site: 'codemy-net', resource: 'posts', slug: '1-hash-selector-pattern' } } subject(:asset) { Asset.new(index) } let(:url) { "https://codemycasts.s3.amazonaws.com/codemy-net/posts/1-hash-selector-pattern/assets/" } let(:conte...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/indices_spec.rb
spec/lib/writefully/indices_spec.rb
require 'spec_helper' module Writefully describe Indices do let(:full_path) { ['/Users/zacksiri/Repositories/writefully/spec/dummy/content/codemy-net/posts/1-hash-selector-pattern/README.md'] } let(:index) { [{site: 'codemy-net', resource: 'posts', slug: '1-hash-selector-pattern' }] } subject { Indi...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/workers/journalist_spec.rb
spec/lib/writefully/workers/journalist_spec.rb
require 'spec_helper' require 'celluloid' require 'writefully/tools' require 'writefully/workers' module Writefully module Workers describe Journalist do let(:message) { { resource: 'posts', slug: '1-hash-selector-pattern' } } let(:message_with_tries) { message.merge({tries: 2, run: false}) } ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/workers/handyman_spec.rb
spec/lib/writefully/workers/handyman_spec.rb
require 'spec_helper' require 'celluloid' require 'writefully/tools' require 'writefully/workers' module Writefully module Workers describe Handyman do fixtures :"writefully/sites" let(:build_message) { { task: :build, user_name: 'zacksiri', auth_token: 'sampletoken', ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/tools/hammer_spec.rb
spec/lib/writefully/tools/hammer_spec.rb
require 'spec_helper' require 'celluloid' require 'writefully/tools' module Writefully module Tools describe Hammer do let(:user_name) { 'zacksiri' } let(:domain) { 'http://www.codemy.net' } let(:site_slug) { 'codemy-net' } let(:token) { 'sampletoken' } let(:message) { {aut...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/tools/dispatcher_spec.rb
spec/lib/writefully/tools/dispatcher_spec.rb
require 'spec_helper' require 'celluloid' require 'writefully/tools' module Writefully module Tools describe Dispatcher do let(:job) { { worker: :journalists, message: { resource: 'posts', slug: '1-hash-selector-pattern' } }} let(:retry_data) { { worker: job[:wo...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/tools/initializer_spec.rb
spec/lib/writefully/tools/initializer_spec.rb
require 'spec_helper' require 'celluloid' require 'writefully/tools' module Writefully module Tools describe Initializer do let(:message) { { user_name: "zacksiri", auth_token: 'sampletoken', site_slug: 'codemy-net', ssh_url: 'blah@blah.com:zacksiri/blah.git' } } it "should have the correct command...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/tools/synchronizer_spec.rb
spec/lib/writefully/tools/synchronizer_spec.rb
require 'spec_helper' require 'celluloid' require 'writefully/tools' module Writefully module Tools describe Synchronizer do let(:message) { { site_slug: 'codemy-net' } } it "should have the correct command" do sync = Synchronizer.new(message) expect(sync.sync_command).to include m...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/spec/lib/writefully/tools/pencil_spec.rb
spec/lib/writefully/tools/pencil_spec.rb
require 'spec_helper' require 'celluloid' require 'writefully/tools' module Writefully module Tools describe Pencil do fixtures :"writefully/sites" fixtures :"writefully/posts" let(:index) { {site: 'codemy-net', resource: 'posts', slug: '1-hash-selector-pattern' } } let(:index_2) { ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/lib/writefully.rb
lib/writefully.rb
require 'yaml' require 'hashie' require 'celluloid' require 'github_api' require 'active_record' require 'activerecord-import' require 'connection_pool' require 'redis' require 'redis-namespace' module Writefully end require 'writefully/engine' require 'writefully/loader'
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/lib/template.rb
lib/template.rb
gem 'writefully' inside app_name do run "bundle install" run "bundle binstubs writefully" end rake "writefully:install:migrations" generate :model, "Post", "--skip-migration --parent=writefully/post" route "root to: 'posts#index'" route "resources :posts, only: [:index, :show]" route "mount Writefully::Engine,...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/lib/writefully/storage.rb
lib/writefully/storage.rb
module Writefully module Storage class << self def directory @directory ||= connection.directories.get(Writefully.options[:storage_folder]) end def store_file(path, body) directory.files.create({ key: path, body: body, public: true }) ...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false
code-ops-show/writefully-old
https://github.com/code-ops-show/writefully-old/blob/be98e3b37d7c1dc4db637bc3571d21febdd7dda7/lib/writefully/source.rb
lib/writefully/source.rb
require 'base64' module Writefully module Source class << self def content_path Writefully.options[:content] end def models_path File.join(Writefully.options[:app_directory], 'app', 'models') end def sample_content file open(File.dirname(__FILE__) + "/../s...
ruby
MIT
be98e3b37d7c1dc4db637bc3571d21febdd7dda7
2026-01-04T17:37:21.208640Z
false