qmin 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +5 -0
- data/lib/qmin/core_ext/string.rb +9 -18
- data/lib/qmin/resque/background_call_job.rb +0 -1
- data/lib/qmin/version.rb +1 -1
- metadata +5 -21
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 69e96cc20325d7b8809946ac027cbb9de06c7112
|
4
|
+
data.tar.gz: 59e9483bfa81502f4346e2d1e4f09a7a21121b58
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 565eb2604a080306eb7e729213a9f2b4f6b554787eeeae3cf6efc631407bd21efe4f9cbb463f78c45c844ea6c72287833edb287aaa319ff34e108277172cd0d9
|
7
|
+
data.tar.gz: e486391dd19b23339113ef26ef0ccb660e85db02578f74bb6286f89191ea5b45d72d57c2f44193870b0a5092d6cda9fd10b04db32e1c02402a6adf5c574e769f
|
data/.travis.yml
CHANGED
data/lib/qmin/core_ext/string.rb
CHANGED
@@ -13,29 +13,20 @@ class String
|
|
13
13
|
names = self.split('::')
|
14
14
|
names.shift if names.empty? || names.first.empty?
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
else
|
20
|
-
candidate = constant.const_get(name)
|
21
|
-
args = Module.method(:const_defined?).arity != 1 ? [false] : []
|
22
|
-
next candidate if constant.const_defined?(name, *args)
|
23
|
-
next candidate unless Object.const_defined?(name)
|
24
|
-
|
25
|
-
# Go down the ancestors to check it it's owned
|
26
|
-
# directly before we reach Object or the end of ancestors.
|
27
|
-
constant = constant.ancestors.inject do |const, ancestor|
|
28
|
-
break const if ancestor == Object
|
29
|
-
break ancestor if ancestor.const_defined?(name, *args)
|
30
|
-
const
|
31
|
-
end
|
16
|
+
constant = Object
|
17
|
+
names.each do |name|
|
18
|
+
args = Module.method(:const_get).arity != 1 ? [false] : []
|
32
19
|
|
33
|
-
|
34
|
-
constant.const_get(name
|
20
|
+
if constant.const_defined?(name, *args)
|
21
|
+
constant = constant.const_get(name)
|
22
|
+
else
|
23
|
+
constant = constant.const_missing(name)
|
35
24
|
end
|
36
25
|
end
|
26
|
+
constant
|
37
27
|
end unless String.respond_to?(:constantize)
|
38
28
|
|
29
|
+
|
39
30
|
def to_queue_name
|
40
31
|
gsub('::','').underscore
|
41
32
|
end
|
data/lib/qmin/version.rb
CHANGED
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.7
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- the-architect
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-01-10 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: mocha
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -113,33 +104,26 @@ files:
|
|
113
104
|
homepage: https://github.com/qmin/qmin
|
114
105
|
licenses:
|
115
106
|
- MIT
|
107
|
+
metadata: {}
|
116
108
|
post_install_message:
|
117
109
|
rdoc_options: []
|
118
110
|
require_paths:
|
119
111
|
- lib
|
120
112
|
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
113
|
requirements:
|
123
114
|
- - '>='
|
124
115
|
- !ruby/object:Gem::Version
|
125
116
|
version: '0'
|
126
|
-
segments:
|
127
|
-
- 0
|
128
|
-
hash: -2111192109713405080
|
129
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
118
|
requirements:
|
132
119
|
- - '>='
|
133
120
|
- !ruby/object:Gem::Version
|
134
121
|
version: '0'
|
135
|
-
segments:
|
136
|
-
- 0
|
137
|
-
hash: -2111192109713405080
|
138
122
|
requirements: []
|
139
123
|
rubyforge_project:
|
140
|
-
rubygems_version: 1.
|
124
|
+
rubygems_version: 2.1.10
|
141
125
|
signing_key:
|
142
|
-
specification_version:
|
126
|
+
specification_version: 4
|
143
127
|
summary: Simple framwork to coordinate background tasks
|
144
128
|
test_files:
|
145
129
|
- spec/qmin/core_ext/class_spec.rb
|