only_once 0.1 → 0.1.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.
Files changed (4) hide show
  1. data.tar.gz.sig +0 -0
  2. data/lib/only_once.rb +4 -1
  3. metadata +60 -38
  4. metadata.gz.sig +3 -0
Binary file
@@ -1,8 +1,11 @@
1
1
  #!/usr/bin/ruby
2
+ # This is free and unencumbered software released into the public domain.
2
3
 
3
4
  # Do something, but only once (in the lifetime of the program). This is based on
4
5
  # the output of caller() and the value of _args_, so there's some possibility
5
- # for error if you've reloaded files, etc.
6
+ # for error if you've reloaded files, etc. Additionally, you should be strongly
7
+ # cautioned that objects given as arguments to only_once() will persist in
8
+ # memory until program termination.
6
9
  def only_once(*args)
7
10
  $only_once_previously_called_from ||= Array.new
8
11
  unless $only_once_previously_called_from.include? [caller[0], args]
metadata CHANGED
@@ -1,66 +1,88 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: only_once
3
- version: !ruby/object:Gem::Version
4
- hash: 9
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 1
9
- version: "0.1"
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - katmagic
13
9
  autorequire:
14
10
  bindir: bin
15
- cert_chain: []
11
+ cert_chain:
12
+ - ! '-----BEGIN CERTIFICATE-----
16
13
 
17
- date: 2010-11-20 00:00:00 -05:00
14
+ MIIDQDCCAiigAwIBAgIBADANBgkqhkiG9w0BAQUFADBGMRgwFgYDVQQDDA90aGUu
15
+
16
+ bWFnaWNhbC5rYXQxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixk
17
+
18
+ ARkWA2NvbTAeFw0xMTAyMTUwNDU0MDZaFw0xMjAyMTUwNDU0MDZaMEYxGDAWBgNV
19
+
20
+ BAMMD3RoZS5tYWdpY2FsLmthdDEVMBMGC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+ date: 2011-02-15 00:00:00.000000000 -05:00
18
54
  default_executable:
19
55
  dependencies: []
20
-
21
56
  description: Run a block only once during the lifetime of a program.
22
57
  email: the.magical.kat@gmail.com
23
58
  executables: []
24
-
25
59
  extensions: []
26
-
27
60
  extra_rdoc_files: []
28
-
29
- files:
61
+ files:
30
62
  - lib/only_once.rb
31
63
  has_rdoc: true
32
64
  homepage: https://github.com/katmagic/only_once
33
65
  licenses: []
34
-
35
66
  post_install_message:
36
67
  rdoc_options: []
37
-
38
- require_paths:
68
+ require_paths:
39
69
  - lib
40
- required_ruby_version: !ruby/object:Gem::Requirement
70
+ required_ruby_version: !ruby/object:Gem::Requirement
41
71
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 0
48
- version: "0"
49
- required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
50
77
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- hash: 3
55
- segments:
56
- - 0
57
- version: "0"
78
+ requirements:
79
+ - - ! '>='
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
58
82
  requirements: []
59
-
60
83
  rubyforge_project: only_once
61
- rubygems_version: 1.3.7
84
+ rubygems_version: 1.5.2
62
85
  signing_key:
63
86
  specification_version: 3
64
87
  summary: Execute something, but only once.
65
88
  test_files: []
66
-
@@ -0,0 +1,3 @@
1
+ N����!Q3�NQ�e�@=�˙�;�����K$��^tG��Em#� ���J�o�����a�n#�1�$��k�
2
+ ��]��%��d���ѫ�Y�J���{�8�F���}�S7����␳k0�儰�%>���J�� �Q�
3
+ �VG��e��9�X�p��56�Q�F���d1���6�����Y�=.�-~u�ʷZB�&�d2�/�� \�ńY��@�,.�Q9�