endeavour 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9efb61a646f24ddb802b9fe4b472fee135780745
4
- data.tar.gz: 944e69df23747c928288cf0c09d84838b0be2043
3
+ metadata.gz: 07b7f145d64b15fc7039971cfef53dd2f8d17c0e
4
+ data.tar.gz: 1ca5d657d4c8acb0f7d51ba6bb3f100dcc3c50b6
5
5
  SHA512:
6
- metadata.gz: e8da32b5f6bb5a501524643683808f1fac116bbba09d55fb56a10f9c1a36a250e9caa54bf786624f2badaeea2a472b8ea2885daeafceff67d78ba7493a83d9ca
7
- data.tar.gz: 807220a7c68ac07de4b0b47928d02fcf6c79b16dcbe629a10fc84da5ad73df59b9684f189f9b0a0fdc288f6ddf1477efc6f90596963f8f17345051a4ae9dc048
6
+ metadata.gz: 49b213464e8c7eb7d60c6b4fbacd65b53b96634c6d6bf86cc72c5b63c36d20be21de813525f7f023a62453e3aae796ab63afd0a348c45bea7b3a90f0a0d9ed37
7
+ data.tar.gz: 6c077c53f1acd331e76bf2786283ac01f5ae03b10184339b6e7337059f98a82e285dbabe27bbffa0abce36bf5e09bd7b0bd9182394444129ecf3f25c3b12b676
data/README.md CHANGED
@@ -5,6 +5,8 @@ instances. `try` permits calling a method on an object and returning `nil`
5
5
  rather than `NoMethodError` if the object is `nil` or does not respond to
6
6
  the method.
7
7
 
8
+ [![CircleCI](https://circleci.com/gh/allspiritseve/endeavour/tree/master.svg?style=svg)](https://circleci.com/gh/allspiritseve/endeavour/tree/master)
9
+
8
10
  ## Usage
9
11
 
10
12
  There are two ways to use `try`:
@@ -12,6 +12,12 @@ class Endeavour
12
12
  @object = object
13
13
  end
14
14
 
15
+ %w(inspect to_s).each do |method|
16
+ define_method(method) do |*args, &block|
17
+ self.class.call(@object, method, *args, &block)
18
+ end
19
+ end
20
+
15
21
  def method_missing(method, *args, &block)
16
22
  self.class.call(@object, method, *args, &block)
17
23
  end
@@ -0,0 +1,2 @@
1
+ require 'endeavour'
2
+ Endeavour.hook!
@@ -1,3 +1,3 @@
1
1
  class Endeavour
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: endeavour
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cory Kaufman-Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-26 00:00:00.000000000 Z
11
+ date: 2017-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest-reporters
@@ -98,6 +98,7 @@ files:
98
98
  - lib/endeavour/core_ext.rb
99
99
  - lib/endeavour/core_ext/nil_class/try.rb
100
100
  - lib/endeavour/core_ext/object/try.rb
101
+ - lib/endeavour/hook.rb
101
102
  - lib/endeavour/railtie.rb
102
103
  - lib/endeavour/version.rb
103
104
  homepage: https://github.com/allspiritseve/endeavour
@@ -120,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
121
  version: '0'
121
122
  requirements: []
122
123
  rubyforge_project:
123
- rubygems_version: 2.5.1
124
+ rubygems_version: 2.6.13
124
125
  signing_key:
125
126
  specification_version: 4
126
127
  summary: Try, but better.