fun_with_patterns 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWI2MTM0MDJiN2ExNWJlOTQwM2M2OTJiNzYyZGJhZDQ3YjdhMmMwYQ==
4
+ ZmVjYzY0ODYzZjIxYTQxNjQ5YWYzMzYwNGMzMzBjY2ZlNjA5ZTk0ZQ==
5
5
  data.tar.gz: !binary |-
6
- YjAwZDFhZDQ2NjEwODUzZTUxYWZiNmU3MDk2OWMyMDI1MmNhMjYzMw==
6
+ YzRkMzZkOWMxMTI3NDdkMjYxNWY3ZjkxMGFiZTIzMTAzNTZlMzkwOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MmUxNDc0YjMwMThjMmMxOTA5ZjFmNjkyODM1MmQ4MTMyNzVhZWNkYjg4OTVk
10
- ZmRlZWQ1NjJjNTIzODk2ZGQ2YjRjMjZiNDAwOTdlOGQ3NGM4NWUyYmY4OTcy
11
- OWU2N2Q5M2IzNTAyNmZlZDg2YzYwOGRmMmM2NjAwNDA3NTA0MmM=
9
+ NDA0OTllMTE0OWZmYTI2NDEyYzhhNmMyYzllM2RmMDBkNWVkYThiYjkwMjY5
10
+ MmUxMDE0MmU2OGVkY2VmYjQ1Mjc3ZmNkMjIyY2I0Njg3ZDA5NGRjNzU0YzJm
11
+ NjMxOGEzZTBmZGQ4ODk3NjRhYTg5OWYxNDkzNDdiNzcxOWYyZmQ=
12
12
  data.tar.gz: !binary |-
13
- YzU1ODdlNDQ0MjJjY2I1M2Y0NDQ3OGUyYjNiMGU3ZDMwMGNiOTc3M2MwN2U5
14
- NjU0OGEzYzNkNmMzYjliZTY4YjgyMjA5YWI2N2E1NmU1OTg1OTQ1MzA1YWYz
15
- YzRjYjU0YmYwZjU2NWE2NWQ5MWFiNTA3MzViODU4YTQ1NTExNDg=
13
+ MWFmODI1ZmIwMzZkM2M5ZDlmNDVhY2FkNjNlOWE5ZGJlODE1ZTljODhmOTI2
14
+ MTM0Yzk4NDQ3NjExODJmMTBjNjVkZDFlNGE2YTczNDNkYzJmODE3ODVhOThi
15
+ YzQwNzA4MTRiNTI3NzRmMzkyZTVhMzhjNWJjZjE2N2RmM2JjMDM=
data/Gemfile CHANGED
@@ -10,7 +10,8 @@ group :development do
10
10
  gem "rdoc", "~> 3.12"
11
11
  gem "bundler", "~> 1.5"
12
12
  gem "jeweler", "~> 2.0"
13
-
13
+ gem "fun_with_testing"
14
+ gem "debugger"
14
15
  end
15
16
 
16
17
  gem "fun_with_files", "~> 0"
data/README.rdoc CHANGED
@@ -1,9 +1,9 @@
1
- = fun_with_patterns
1
+ = fun_with_patterns =
2
2
 
3
- A collection of patterns that I seem to keep re-implementing. I'll be adding them here as I find time to revise and refactor. Until then, the only one I've gotten around to is...
3
+ A collection of patterns that I seem to keep re-implementing. I'll be adding them here as I find time to revise and refactor. Until then, the only ones I've gotten around to are...
4
4
 
5
5
 
6
- == Loader Pattern
6
+ == Loader Pattern ==
7
7
 
8
8
  The Loader pattern is a good way to customize/modularize part of your app's functionality.
9
9
 
@@ -61,6 +61,26 @@ You can get some interesting behavior by overwriting individual methods. For ex
61
61
 
62
62
 
63
63
 
64
+ == Reloadable ==
65
+
66
+ You're in the command line, developing a new class, and you find yourself forever restarting the whole project to affect changes, or constantly copy-pasting the class into the command line. Tired? Frustrated? Let .reloadable! help! Just put the method inside your class / module definition, and call Klass.reload! whenever you like.
67
+
68
+ require 'fun_with_patterns'
69
+
70
+ module SausageFest
71
+ class BratwurstCounter
72
+ reloadable!
73
+
74
+ def initialize( initial_brat_count )
75
+ ... and so on
76
+
77
+
78
+ (irb) >> SausageFest::BratwurstCounter.reload!
79
+
80
+ Easy as peasy. Note, it may be buggy if the file only contains part of the definition, defines other classes as well, or performs other actions. Use at your own risk, and at great peril to your coworkers.
81
+
82
+
83
+
64
84
  == Contributing to fun_with_patterns
65
85
 
66
86
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -10,3 +10,7 @@ FunWith::Files::RootPath.rootify( FunWith::Patterns, __FILE__.fwf_filepath.dirna
10
10
  FunWith::VersionStrings.version( FunWith::Patterns )
11
11
 
12
12
  FunWith::Patterns.root("lib", "fun_with").requir
13
+
14
+ Class.send( :include, FunWith::Patterns::MakeInstancesReloadable )
15
+ Module.send( :include, FunWith::Patterns::MakeInstancesReloadable )
16
+ FunWith::Patterns::Reloadable.extend( FunWith::Patterns::ClassReloaderMethod )
data/test/helper.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'bundler'
3
+ require 'fun_with_testing'
4
+ require 'debugger'
3
5
 
4
6
  begin
5
7
  Bundler.setup(:default, :development)
@@ -25,4 +27,5 @@ class Test::Unit::TestCase
25
27
  end
26
28
 
27
29
  class FunWith::Patterns::TestCase < Test::Unit::TestCase
30
+ include FunWith::Testing::Assertions::Basics
28
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fun_with_patterns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryce Anderson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-21 00:00:00.000000000 Z
11
+ date: 2014-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fun_with_files
@@ -94,6 +94,34 @@ dependencies:
94
94
  - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '2.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: fun_with_testing
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: debugger
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
97
125
  description: A collection of useful patterns
98
126
  email: keeputahweird@gmail.com
99
127
  executables: []