RubyGems
npm
Organizations
Log in
Sign up
RubyGems
dolzenko
Versions diffs
0.0.21 → 0.0.22
dolzenko 0.0.21 → 0.0.22
Sign up to get
free
protection for your applications and to get access to all the features.
Files changed (6)
hide
show
data/lib/dolzenko/acts_as.rb
+2
-0
data/lib/dolzenko/core_ext/kernel/r.rb
+1
-0
data/lib/dolzenko/global_net_http_debug.rb
+2
-0
data/lib/dolzenko/remote_download.rb
+1
-0
data/lib/dolzenko/try_block.rb
+2
-0
metadata
+2
-2
data/lib/dolzenko/acts_as.rb
CHANGED
Viewed
@@ -1,3 +1,5 @@
1
+
# My attempt at abstracting `acts_as_*` pattern. Need to get rid of `InstanceMethods`
2
+
# class to make it year 2010 compatible.
1
3
class Class
2
4
def acts_as(*args)
3
5
modules_with_options = []
data/lib/dolzenko/core_ext/kernel/r.rb
CHANGED
Viewed
@@ -1,4 +1,5 @@
1
1
module Kernel
2
+
# `puts` for web application debugging
2
3
def r(*args)
3
4
raise (args.size == 1 ? args[0] : args).inspect
4
5
end
data/lib/dolzenko/global_net_http_debug.rb
CHANGED
Viewed
@@ -1,5 +1,7 @@
1
1
require "net/http"
2
2
3
+
# Turns on Net::HTTP debugging globally so that you know whatever underlying
4
+
# library is accessing network and what it does.
3
5
module Net
4
6
class HTTP < Protocol
5
7
private
data/lib/dolzenko/remote_download.rb
CHANGED
Viewed
@@ -1,4 +1,5 @@
1
1
module Dolzenko
2
+
# Simple `Net::HTTP` mumbo jumbo we all have to use occasionally.
2
3
module RemoteDownload
3
4
# Returns IO object to be used with attachment_fu models, if retrieval fails - return nil
4
5
def get_uploaded_data(url, follow_redirect = 2)
data/lib/dolzenko/try_block.rb
CHANGED
Viewed
@@ -1,3 +1,5 @@
1
+
# My attempt of [Guarded Evaluation](http://weblog.raganwald.com/2008/01/objectandand-objectme-in-ruby.html)
2
+
# problem solution. Everyone has that :)
1
3
module TryBlock
2
4
def self.install!
3
5
unless Object.include?(self)
metadata
CHANGED
Viewed
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
segments:
6
6
- 0
7
7
- 0
8
-
-
21
9
-
version: 0.0.
21
8
+
-
22
9
+
version: 0.0.
22
10
10
platform: ruby
11
11
authors:
12
12
- Evgeniy Dolzhenko