easily_typable 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 +13 -5
- data/README.md +1 -1
- data/lib/easily_typable.rb +19 -1
- metadata +60 -32
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NmY1Y2QzNjQ1N2VlNDk1NWY1YTg5MTg5MGY3YThhNDE3NGQ0ZjkxYw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
M2JkZGI4MDcxMGI5ZGJjOTM3NWI1MTg4ZThjZGNkZDk4ODY2ODAzMw==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MjExM2RmYTM1MWE5MjgxMTU5NmU0Yjg5MGQ2OGUzYjMwNDEzZGEwNTkxMTVk
|
10
|
+
MDg0NWI0MGMxNDY2NjAzZjY4Zjk1NDAwYmIyMjg3YzYwY2JjYmE4MjMzNmM4
|
11
|
+
ZmZmYzZmZjdjZjYxNTZiYzVlMDlmZmRhODdjZTRjNmZmNmEzMGM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NWE4NGRlOTFiMGMyYzgyZmMxNGE1MGRmYjNkMjQ0MDZiZDZlZDQzYWE3ZmU4
|
14
|
+
ZDM2YzM2MjI5MDBjN2NhMTVlOWNiNGY4YjRkYmU2MjEzZjMwMGQyNzQ4Nzk4
|
15
|
+
M2NkOGZhMmUyNmVmMmMxNDdiODc0OGFjY2E3MjEzMTk1MDUzNTQ=
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Easily Typable v1.0.
|
1
|
+
# Easily Typable v1.0.1
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/easily_typable.svg)](http://badge.fury.io/rb/easily_typable)
|
3
3
|
[![Build Status](https://api.travis-ci.org/AndyObtiva/easily_typable.svg?branch=master)](https://travis-ci.org/AndyObtiva/easily_typable)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/AndyObtiva/easily_typable/badge.svg?branch=master)](https://coveralls.io/r/AndyObtiva/easily_typable?branch=master)
|
data/lib/easily_typable.rb
CHANGED
@@ -13,6 +13,24 @@ module EasilyTypable
|
|
13
13
|
end_eval
|
14
14
|
end
|
15
15
|
|
16
|
+
# NOTE: Rails Specific Feature
|
17
|
+
# Retroactively load Rails model class matching missing method name to add to
|
18
|
+
# EasilyTypable hierarchy when it fails on first attempt.
|
19
|
+
# This shall result in it working on second attempt if model class exists.
|
20
|
+
# Example:
|
21
|
+
alias method_missing_without_easily_typable method_missing
|
22
|
+
def method_missing(name, *args, &block)
|
23
|
+
if name.to_s.end_with?('?') && !@easily_typable_class_load_attempted
|
24
|
+
# attempt to load Rails class and re-invoke once
|
25
|
+
class_name = name.to_s.sub(/\?$/, '').split('_').map(&:capitalize).join
|
26
|
+
Object.const_get(class_name) rescue nil
|
27
|
+
@easily_typable_class_load_attempted = true
|
28
|
+
send(name, *args, &block)
|
29
|
+
else
|
30
|
+
method_missing_without_easily_typable(name, *args, &block)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
16
34
|
module SubClassMethods
|
17
35
|
def self.included(subclass_constant)
|
18
36
|
super
|
@@ -41,5 +59,5 @@ module EasilyTypable
|
|
41
59
|
gsub(/([a-z])([A-Z])/,'\1_\2').
|
42
60
|
downcase
|
43
61
|
end
|
44
|
-
|
62
|
+
|
45
63
|
end
|
metadata
CHANGED
@@ -1,125 +1,153 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easily_typable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AndyObtiva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jeweler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 2.0.1
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 5.0.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 5.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 3.5.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 3.5.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: coveralls
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.8.5
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 0.8.5
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: simplecov
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.10.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.10.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: codeclimate-test-reporter
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.
|
89
|
+
version: 1.0.5
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.
|
96
|
+
version: 1.0.5
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 10.4.2
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 10.4.2
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rack
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.6.5
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ~>
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 1.6.5
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
126
|
+
name: nokogiri
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
100
128
|
requirements:
|
101
|
-
- -
|
129
|
+
- - ~>
|
102
130
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.6.
|
131
|
+
version: 1.6.8.1
|
104
132
|
type: :development
|
105
133
|
prerelease: false
|
106
134
|
version_requirements: !ruby/object:Gem::Requirement
|
107
135
|
requirements:
|
108
|
-
- -
|
136
|
+
- - ~>
|
109
137
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.6.
|
138
|
+
version: 1.6.8.1
|
111
139
|
- !ruby/object:Gem::Dependency
|
112
140
|
name: term-ansicolor
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
114
142
|
requirements:
|
115
|
-
- -
|
143
|
+
- - ~>
|
116
144
|
- !ruby/object:Gem::Version
|
117
145
|
version: 1.3.2
|
118
146
|
type: :development
|
119
147
|
prerelease: false
|
120
148
|
version_requirements: !ruby/object:Gem::Requirement
|
121
149
|
requirements:
|
122
|
-
- -
|
150
|
+
- - ~>
|
123
151
|
- !ruby/object:Gem::Version
|
124
152
|
version: 1.3.2
|
125
153
|
description: Although polymorphism is a recommended standard in Object-Oriented programming
|
@@ -151,12 +179,12 @@ require_paths:
|
|
151
179
|
- lib
|
152
180
|
required_ruby_version: !ruby/object:Gem::Requirement
|
153
181
|
requirements:
|
154
|
-
- -
|
182
|
+
- - ! '>='
|
155
183
|
- !ruby/object:Gem::Version
|
156
184
|
version: '0'
|
157
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
186
|
requirements:
|
159
|
-
- -
|
187
|
+
- - ! '>='
|
160
188
|
- !ruby/object:Gem::Version
|
161
189
|
version: '0'
|
162
190
|
requirements: []
|