moped 1.0.0.beta → 1.0.0.rc

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of moped might be problematic. Click here for more details.

@@ -9,22 +9,58 @@ module Moped
9
9
  module Threaded
10
10
  extend self
11
11
 
12
- # Begin a thread-local stack for +name+.
12
+ # Begin entry into a named thread local stack.
13
+ #
14
+ # @example Begin entry into the stack.
15
+ # Threaded.begin(:create)
16
+ #
17
+ # @param [ String ] name The name of the stack.
18
+ #
19
+ # @return [ true ] True.
20
+ #
21
+ # @since 1.0.0
13
22
  def begin(name)
14
- stack(name).push true
23
+ stack(name).push(true)
15
24
  end
16
25
 
17
- # @return [Boolean] whether the stack is being executed
26
+ # Are in the middle of executing the named stack
27
+ #
28
+ # @example Are we in the stack execution?
29
+ # Threaded.executing?(:create)
30
+ #
31
+ # @param [ Symbol ] name The name of the stack.
32
+ #
33
+ # @return [ true ] If the stack is being executed.
34
+ #
35
+ # @since 1.0.0
18
36
  def executing?(name)
19
37
  !stack(name).empty?
20
38
  end
21
39
 
22
- # End the thread-local stack for +name+.
40
+ # Exit from a named thread local stack.
41
+ #
42
+ # @example Exit from the stack.
43
+ # Threaded.end(:create)
44
+ #
45
+ # @param [ Symbol ] name The name of the stack
46
+ #
47
+ # @return [ true ] True.
48
+ #
49
+ # @since 1.0.0
23
50
  def end(name)
24
51
  stack(name).pop
25
52
  end
26
53
 
27
- # @return [Array] a named, thread-local stack.
54
+ # Get the named stack.
55
+ #
56
+ # @example Get a stack by name
57
+ # Threaded.stack(:create)
58
+ #
59
+ # @param [ Symbol ] name The name of the stack
60
+ #
61
+ # @return [ Array ] The stack.
62
+ #
63
+ # @since 1.0.0
28
64
  def stack(name)
29
65
  Thread.current["[moped]:#{name}-stack"] ||= []
30
66
  end
data/lib/moped/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Moped
3
- VERSION = "1.0.0.beta"
3
+ VERSION = "1.0.0.rc"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moped
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta
4
+ version: 1.0.0.rc
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-20 00:00:00.000000000 Z
12
+ date: 2012-05-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -99,7 +99,7 @@ files:
99
99
  - lib/moped/threaded.rb
100
100
  - lib/moped/version.rb
101
101
  - lib/moped.rb
102
- - MIT_LICENSE
102
+ - LICENSE
103
103
  - README.md
104
104
  homepage: http://mongoid.org/moped
105
105
  licenses: []
@@ -115,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  segments:
117
117
  - 0
118
- hash: 1633791536105860928
118
+ hash: 300852990070970581
119
119
  required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  none: false
121
121
  requirements:
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: 1.3.1
125
125
  requirements: []
126
126
  rubyforge_project:
127
- rubygems_version: 1.8.19
127
+ rubygems_version: 1.8.24
128
128
  signing_key:
129
129
  specification_version: 3
130
130
  summary: A MongoDB driver for Ruby.
data/MIT_LICENSE DELETED
@@ -1,19 +0,0 @@
1
- Copyright (C) 2011 Bernerd Schaefer
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of
4
- this software and associated documentation files (the "Software"), to deal in
5
- the Software without restriction, including without limitation the rights to
6
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
- of the Software, and to permit persons to whom the Software is furnished to do
8
- so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in all
11
- copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- SOFTWARE.