method_annotation 0.2.1 → 0.2.2

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: f8d9b27ee0706f184c6f7a7aade7cc72fb0e4cfc
4
- data.tar.gz: e0d0de2acdd0753fc733da3fe1fec7c7bf462bd5
3
+ metadata.gz: 6925dc1e7c828cfddd9bae35a14119041f722ed1
4
+ data.tar.gz: 5bec416ec9822fe12f64dc3d69bc53ae2bba7676
5
5
  SHA512:
6
- metadata.gz: 807e915e1d54789cb8839ee8cb462223de87c00d985cbe8a525e5513c2e19591eef0df364490dd04820dfa1644f22254413b530145fdeafc2bc3f79b6966957a
7
- data.tar.gz: 98079a56c935c56a5dec9208458da0d70289841208cbd57c67d2f24faaed745e5f94df475cf60e1bac341e1a76b28c06be33cbdcb11faf45d73113596ee4a1e0
6
+ metadata.gz: 11686070fb63ee1b266a8a9937533334df0ce28d11ae005ca8dea818b6fd114cfe6245a2895517d1efaf6ca4d2a34525823cc10af5be1295243cfd2082ef7677
7
+ data.tar.gz: 5a4c2d5465879dd8cb092011dbcac391a38dd1926ab1f7922a50ad0b5d9f3d4134a16c858a9abb3522f689f28ed4577e0e0ba072d4c4b1adc5635efe07c7d776
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- method_annotation (0.2.1)
4
+ method_annotation (0.2.2)
5
5
  activesupport (~> 4.2.3)
6
6
 
7
7
  GEM
@@ -42,4 +42,4 @@ DEPENDENCIES
42
42
  bundler (~> 1.9)
43
43
  method_annotation!
44
44
  rake (~> 10.0)
45
- rspec
45
+ rspec (~> 3.4.0)
data/README.md CHANGED
@@ -129,31 +129,30 @@ About MethodAnnotation
129
129
  => bar
130
130
  => after
131
131
 
132
- - MethodAnnotation::Annotations::Cache
132
+ - MethodAnnotation::Cache
133
133
 
134
134
  It is cached after the second time the execution result of the method is returned from the cache
135
135
 
136
- require 'method_annotation'
137
- require 'annotations'
136
+ require 'method_annotation'
138
137
 
139
- class Foo
140
- include MethodAnnotation::Enable
138
+ class Foo
139
+ include MethodAnnotation::Enable
141
140
 
142
- cache
143
- def bar
144
- puts 'exec'
145
- 'return value'
141
+ cache
142
+ def bar
143
+ puts 'exec'
144
+ 'return value'
145
+ end
146
146
  end
147
- end
148
147
 
149
- foo = Foo.new
150
- foo.bar
151
- => exec
152
- => "return value"
148
+ foo = Foo.new
149
+ foo.bar
150
+ => exec
151
+ => "return value"
153
152
 
154
- # The second time is not puts 'exec'
155
- foo.bar
156
- => "return value"
153
+ # The second time is not puts 'exec'
154
+ foo.bar
155
+ => "return value"
157
156
 
158
157
  Example1
159
158
 
@@ -1,11 +1,3 @@
1
- require 'active_support/dependencies/autoload'
2
-
1
+ # Deprecated. Removed in version 0.3
3
2
  module Annotations
4
- extend ActiveSupport::Autoload
5
-
6
- eager_autoload do
7
- autoload :Cache
8
- end
9
3
  end
10
-
11
- Annotations.eager_load!
@@ -6,4 +6,10 @@ module MethodAnnotation
6
6
 
7
7
  autoload :Base
8
8
  autoload :Enable
9
+
10
+ eager_autoload do
11
+ autoload :Cache
12
+ end
9
13
  end
14
+
15
+ MethodAnnotation.eager_load!
@@ -1,6 +1,4 @@
1
- require 'method_annotation'
2
-
3
- module Annotations
1
+ module MethodAnnotation
4
2
  class Cache < MethodAnnotation::Base
5
3
  self.annotation_name = 'cache'
6
4
  self.describe = 'It is cached after the second time the execution result of the method is returned from the cache'
@@ -1,3 +1,3 @@
1
1
  module MethodAnnotation
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -26,7 +26,7 @@ Note translation function can also be added simply tagged to only cross-processi
26
26
 
27
27
  spec.add_development_dependency "bundler", "~> 1.9"
28
28
  spec.add_development_dependency "rake", "~> 10.0"
29
- spec.add_development_dependency "rspec"
29
+ spec.add_development_dependency "rspec", "~> 3.4.0"
30
30
 
31
31
  # add
32
32
  spec.add_dependency "activesupport", "~> 4.2.3"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: method_annotation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - masatoshi-watanuki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-15 00:00:00.000000000 Z
11
+ date: 2015-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 3.4.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
- version: '0'
54
+ version: 3.4.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activesupport
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -83,9 +83,9 @@ files:
83
83
  - bin/console
84
84
  - bin/setup
85
85
  - lib/annotations.rb
86
- - lib/annotations/cache.rb
87
86
  - lib/method_annotation.rb
88
87
  - lib/method_annotation/base.rb
88
+ - lib/method_annotation/cache.rb
89
89
  - lib/method_annotation/enable.rb
90
90
  - lib/method_annotation/version.rb
91
91
  - method_annotation.gemspec