method_not_missing 0.0.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06147e051c9f300ddf0e41c9c0cb62bfe6b6b8a0
4
- data.tar.gz: cc676d94dc391bac66cdb6117709a5275331c571
3
+ metadata.gz: c9c96a4b8f7cee591197f2770f7b3daf9752f9f3
4
+ data.tar.gz: bbf8e991c0b1fe38d69ebb9c9d08099c15e68ff7
5
5
  SHA512:
6
- metadata.gz: 68d0785a3db5e69bd680105b456c67a39af3e855c2e612c4df8a355f6a424a6c6762db2baf4652eb896571edfa0fa8e92772057c5d8a8123c8022057a3403054
7
- data.tar.gz: bc0217a33617303934f53707d40375892e484e5be7273602d53918f0bff8662c8ef4ed94879662872824c9e42e464f34e1d3f9b45f4451c53ffb3c9f8615588b
6
+ metadata.gz: d467ce90165d28dff3b785acc685b820657bd51394292ce27adb9c497f1a1f4b4dea07e407e84fbf6e3e55fea848b91da34ebc8001d7db6199672334abafcd0d
7
+ data.tar.gz: 9521f93b70240edb319b7377961c8e73835288c938d870c152216cf1762d81940c5249fcc2da8132dd05336865adda65bdc82c2387fa0946926930e0bef6d767
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.1
data/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # Method *not* missing
2
+ [![Build Status](https://travis-ci.org/Jell/method_not_missing.svg?branch=master)](https://travis-ci.org/Jell/method_not_missing)
2
3
 
3
- By including the module `MethodNotMissing`, an object's `method_missing`
4
- will be replaced by googling to rdoc and implemented on the
5
- fly. Instance variables are added where missing and missing constants
6
- are also declared on the fly.
4
+ Implements missing methods on the fly by googling their implementation
5
+ on rubydoc.info. Because Ruby.
6
+
7
+ Intance variables are added when needed and missing classes are also
8
+ declared at runtime.
7
9
 
8
10
  There's some backtracking if the implementation found raises an error
9
11
  (like stack overflows) or if a nested method lookup fails.
@@ -15,9 +17,10 @@ gem install method_not_missing
15
17
  ```
16
18
 
17
19
  ## External dependencies
20
+
18
21
  - PhantomJS ( `brew install phantomjs` on OSX )
19
22
 
20
- # Warnings
23
+ # Warning
21
24
 
22
25
  This is insane.
23
26
 
data/Rakefile CHANGED
@@ -1,2 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rake/testtask'
2
3
 
4
+ Rake::TestTask.new do |t|
5
+ t.test_files = Dir.glob('test/**/test_*')
6
+ end
7
+
8
+ task(default: :test)
@@ -1,3 +1,3 @@
1
1
  module MethodNotMissing
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -23,4 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_runtime_dependency 'launchy', '~> 2.4'
24
24
  spec.add_development_dependency "bundler", "~> 1.6"
25
25
  spec.add_development_dependency "rake", '~> 10.3'
26
+ spec.add_development_dependency "minitest", '~> 4.7'
26
27
  end
@@ -0,0 +1,12 @@
1
+ require 'method_not_missing'
2
+ require 'minitest/autorun'
3
+
4
+ describe "MethodNotMissing" do
5
+ let(:object) { MethodNotMissing::OmnipotentObject.new }
6
+ it "works" do
7
+ object.methods.wont_include :update
8
+ object.update([3]).must_equal [3]
9
+ object.methods.must_include :update
10
+ object.update([4]).must_equal [3, 4]
11
+ end
12
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: method_not_missing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jell
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '10.3'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '4.7'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '4.7'
83
97
  description: 'WARNING: CONTAINS TRACES OF SARCASM'
84
98
  email:
85
99
  - jean-louis@jawaninja.com
@@ -88,6 +102,7 @@ extensions: []
88
102
  extra_rdoc_files: []
89
103
  files:
90
104
  - ".gitignore"
105
+ - ".travis.yml"
91
106
  - Gemfile
92
107
  - LICENSE.txt
93
108
  - README.md
@@ -97,6 +112,7 @@ files:
97
112
  - lib/method_not_missing/omnipotent_object.rb
98
113
  - lib/method_not_missing/version.rb
99
114
  - method_not_missing.gemspec
115
+ - test/test_method_not_missing.rb
100
116
  homepage: https://github.com/Jell/method_not_missing
101
117
  licenses:
102
118
  - MIT
@@ -122,5 +138,6 @@ signing_key:
122
138
  specification_version: 4
123
139
  summary: Implement missing methods by googling their implementation on the fly. Because
124
140
  Ruby.
125
- test_files: []
141
+ test_files:
142
+ - test/test_method_not_missing.rb
126
143
  has_rdoc: