tins 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/VERSION +1 -1
- data/lib/tins/annotate.rb +8 -0
- data/lib/tins/version.rb +1 -1
- data/tests/annotate_test.rb +12 -2
- data/tins.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3940d002444c8ce6ff859099c740bc83af5a99d
|
4
|
+
data.tar.gz: a4c5b863f9f4f0c89025ebed67c972d6533e901f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a44c6230b85681f8b819e39ce446fecdeb84848d5fbd3bb5ad06646458f9ad464825357a1e48253d10c0144c9a3bc1ec567e7623a77002e28836b561c3af2de0
|
7
|
+
data.tar.gz: 61d93d4a71c99980a296c2f67e1bcaf16b5b46605556870c8b7cdfcedb8ee2e45436e0c5a289e74abe650a458e7cddd541862a4b681fa1549a02f50e10c24ebc
|
data/README.md
CHANGED
@@ -12,6 +12,9 @@ Non yet.
|
|
12
12
|
|
13
13
|
## Changes
|
14
14
|
|
15
|
+
* 2015-12-01 Release 1.8.0
|
16
|
+
- Add `foo_of` and `foo_annotations` methods to instances of classes with
|
17
|
+
annotated methods.
|
15
18
|
* 2015-11-09 Release 1.7.0
|
16
19
|
- Officially require ruby >= 2.0 and use new hash syntax.
|
17
20
|
- New feature attempt: sleep:-30 sleeps upto 30 seconds while retrying with
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.8.0
|
data/lib/tins/annotate.rb
CHANGED
@@ -26,5 +26,13 @@ module Tins::Annotate
|
|
26
26
|
instance_variable_set "@__annotation_#{name}__", nil
|
27
27
|
end
|
28
28
|
end
|
29
|
+
|
30
|
+
define_method("#{name}_annotations") do
|
31
|
+
self.class.__send__("#{name}_annotations")
|
32
|
+
end
|
33
|
+
|
34
|
+
define_method("#{name}_of") do |method_name|
|
35
|
+
self.class.__send__("#{name}_of", method_name)
|
36
|
+
end
|
29
37
|
end
|
30
38
|
end
|
data/lib/tins/version.rb
CHANGED
data/tests/annotate_test.rb
CHANGED
@@ -14,7 +14,7 @@ module Tins
|
|
14
14
|
bar 'test bar1'
|
15
15
|
def first
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
foo 'test foo2'
|
19
19
|
bar 'test bar2'
|
20
20
|
def second
|
@@ -25,7 +25,7 @@ module Tins
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
28
|
+
def test_annotations_via_class
|
29
29
|
assert_equal 'test foo1', A.foo_of(:first)
|
30
30
|
assert_equal 'test bar1', A.bar_of(:first)
|
31
31
|
assert_equal 'test foo2', A.foo_of(:second)
|
@@ -33,5 +33,15 @@ module Tins
|
|
33
33
|
assert_equal nil, A.foo_of(:third)
|
34
34
|
assert_equal 'test bar3', A.bar_of(:third)
|
35
35
|
end
|
36
|
+
|
37
|
+
def test_annotations_via_instance
|
38
|
+
a = A.new
|
39
|
+
assert_equal 'test foo1', a.foo_of(:first)
|
40
|
+
assert_equal 'test bar1', a.bar_of(:first)
|
41
|
+
assert_equal 'test foo2', a.foo_of(:second)
|
42
|
+
assert_equal 'test bar2', a.bar_of(:second)
|
43
|
+
assert_equal nil, a.foo_of(:third)
|
44
|
+
assert_equal 'test bar3', a.bar_of(:third)
|
45
|
+
end
|
36
46
|
end
|
37
47
|
end
|
data/tins.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: tins 1.
|
2
|
+
# stub: tins 1.8.0 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "tins"
|
6
|
-
s.version = "1.
|
6
|
+
s.version = "1.8.0"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib"]
|
10
10
|
s.authors = ["Florian Frank"]
|
11
|
-
s.date = "2015-
|
11
|
+
s.date = "2015-12-01"
|
12
12
|
s.description = "All the stuff that isn't good/big enough for a real library."
|
13
13
|
s.email = "flori@ping.de"
|
14
14
|
s.extra_rdoc_files = ["README.md", "lib/dslkit.rb", "lib/dslkit/polite.rb", "lib/dslkit/rude.rb", "lib/spruz.rb", "lib/tins.rb", "lib/tins/alias.rb", "lib/tins/annotate.rb", "lib/tins/ask_and_send.rb", "lib/tins/attempt.rb", "lib/tins/bijection.rb", "lib/tins/case_predicate.rb", "lib/tins/complete.rb", "lib/tins/concern.rb", "lib/tins/count_by.rb", "lib/tins/date_dummy.rb", "lib/tins/date_time_dummy.rb", "lib/tins/deep_const_get.rb", "lib/tins/deep_dup.rb", "lib/tins/dslkit.rb", "lib/tins/extract_last_argument_options.rb", "lib/tins/file_binary.rb", "lib/tins/find.rb", "lib/tins/generator.rb", "lib/tins/go.rb", "lib/tins/hash_symbolize_keys_recursive.rb", "lib/tins/hash_union.rb", "lib/tins/if_predicate.rb", "lib/tins/implement.rb", "lib/tins/limited.rb", "lib/tins/lines_file.rb", "lib/tins/memoize.rb", "lib/tins/method_description.rb", "lib/tins/minimize.rb", "lib/tins/module_group.rb", "lib/tins/named_set.rb", "lib/tins/null.rb", "lib/tins/once.rb", "lib/tins/p.rb", "lib/tins/partial_application.rb", "lib/tins/proc_compose.rb", "lib/tins/proc_prelude.rb", "lib/tins/range_plus.rb", "lib/tins/require_maybe.rb", "lib/tins/responding.rb", "lib/tins/secure_write.rb", "lib/tins/sexy_singleton.rb", "lib/tins/string_byte_order_mark.rb", "lib/tins/string_camelize.rb", "lib/tins/string_underscore.rb", "lib/tins/string_version.rb", "lib/tins/subhash.rb", "lib/tins/terminal.rb", "lib/tins/thread_local.rb", "lib/tins/time_dummy.rb", "lib/tins/to.rb", "lib/tins/to_proc.rb", "lib/tins/token.rb", "lib/tins/uniq_by.rb", "lib/tins/version.rb", "lib/tins/write.rb", "lib/tins/xt.rb", "lib/tins/xt/annotate.rb", "lib/tins/xt/ask_and_send.rb", "lib/tins/xt/attempt.rb", "lib/tins/xt/blank.rb", "lib/tins/xt/case_predicate.rb", "lib/tins/xt/complete.rb", "lib/tins/xt/concern.rb", "lib/tins/xt/count_by.rb", "lib/tins/xt/date_dummy.rb", "lib/tins/xt/date_time_dummy.rb", "lib/tins/xt/deep_const_get.rb", "lib/tins/xt/deep_dup.rb", "lib/tins/xt/dslkit.rb", "lib/tins/xt/extract_last_argument_options.rb", "lib/tins/xt/file_binary.rb", "lib/tins/xt/full.rb", "lib/tins/xt/hash_symbolize_keys_recursive.rb", "lib/tins/xt/hash_union.rb", "lib/tins/xt/if_predicate.rb", "lib/tins/xt/implement.rb", "lib/tins/xt/irb.rb", "lib/tins/xt/method_description.rb", "lib/tins/xt/named.rb", "lib/tins/xt/null.rb", "lib/tins/xt/p.rb", "lib/tins/xt/partial_application.rb", "lib/tins/xt/proc_compose.rb", "lib/tins/xt/proc_prelude.rb", "lib/tins/xt/range_plus.rb", "lib/tins/xt/require_maybe.rb", "lib/tins/xt/responding.rb", "lib/tins/xt/rotate.rb", "lib/tins/xt/secure_write.rb", "lib/tins/xt/sexy_singleton.rb", "lib/tins/xt/string.rb", "lib/tins/xt/string_byte_order_mark.rb", "lib/tins/xt/string_camelize.rb", "lib/tins/xt/string_underscore.rb", "lib/tins/xt/string_version.rb", "lib/tins/xt/subhash.rb", "lib/tins/xt/symbol_to_proc.rb", "lib/tins/xt/time_dummy.rb", "lib/tins/xt/time_freezer.rb", "lib/tins/xt/to.rb", "lib/tins/xt/uniq_by.rb", "lib/tins/xt/write.rb"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|