octothorpe 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bc534ef4336a77b76543f3516e116638fa32689c
4
+ data.tar.gz: bea9afa7dbf04641ad087876739b196bb144eae5
5
+ SHA512:
6
+ metadata.gz: f0aefe4fe287dde92571b523f81d556c66140e44cab5c0b5287d789400c08eec22d01eff403f858692a20fcd40dbc1ddec8ea7f5de5c44018b3c7c10bb23500f
7
+ data.tar.gz: e873feb328edecb076cd126c92861d0f7032d2fc4bca4b21ef732c8a7c75d3c8be1a46a84e37008559a8b9f2069721e4da01309bcc1b43eeccef1525f5521d25
@@ -1 +1 @@
1
- 1.9.3-p551
1
+ 2.2.2
@@ -41,7 +41,7 @@ class Octothorpe
41
41
  def_delegators :@inner_hash, :select, :map, :reject, :inject
42
42
 
43
43
  # Gem version number
44
- VERSION = '0.1.0'
44
+ VERSION = '0.1.1'
45
45
 
46
46
 
47
47
  # Generic Octothorpe error class
@@ -121,6 +121,7 @@ class Octothorpe
121
121
  def get(key); @store.store[key.to_sym]; end
122
122
 
123
123
  alias send get
124
+ alias [] get
124
125
 
125
126
 
126
127
  ##
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  Meant to facilitate message-passing between classes.
22
22
  DESCRIPTION
23
23
 
24
- spec.homepage = ""
24
+ spec.homepage = "https://github.com/andy-twosticks/octothorpe"
25
25
  spec.license = "MIT"
26
26
 
27
27
  spec.files = `hg status -macn0`.split("\x0")
@@ -67,6 +67,16 @@ describe Octothorpe do
67
67
  end
68
68
 
69
69
 
70
+ describe "#[]" do
71
+
72
+ it "acts just like get" do
73
+ expect( @ot[:one] ).to eq @hash2[:one]
74
+ expect( @ot[:two] ).to eq @hash2[:two]
75
+ end
76
+
77
+ end
78
+
79
+
70
80
  describe "#to_h" do
71
81
 
72
82
  it "dumps the OT as a hash" do
metadata CHANGED
@@ -1,119 +1,101 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octothorpe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 0.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Andy Jones
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-09-08 00:00:00.000000000 Z
11
+ date: 2015-11-05 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
21
19
  version: '1.7'
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
29
26
  version: '1.7'
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
37
33
  version: '10.0'
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
45
40
  version: '10.0'
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
53
47
  version: '0'
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
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: pry
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
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
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: pry-doc
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
- description: ! 'A very simple hash-like class that borrows a little from OpenStruct,
95
- etc.
96
-
83
+ description: |
84
+ A very simple hash-like class that borrows a little from OpenStruct, etc.
97
85
  * Treats string and symbol keys as equal
98
-
99
86
  * Access member objects with ot.>>.keyname
100
-
101
87
  * Guard conditions allow you to control what returns if key is not present
102
-
103
88
  * Pretty much read-only, for better or worse
104
-
105
89
  Meant to facilitate message-passing between classes.
106
-
107
- '
108
90
  email:
109
91
  - andy@twosticksconsulting.co.uk
110
92
  executables: []
111
93
  extensions: []
112
94
  extra_rdoc_files: []
113
95
  files:
114
- - .hgignore
115
- - .rspec
116
- - .ruby-version
96
+ - ".hgignore"
97
+ - ".rspec"
98
+ - ".ruby-version"
117
99
  - Gemfile
118
100
  - LICENSE.txt
119
101
  - README.md
@@ -123,30 +105,29 @@ files:
123
105
  - spec/doc_no_pending.rb
124
106
  - spec/octothorpe_spec.rb
125
107
  - spec/spec_helper.rb
126
- homepage: ''
108
+ homepage: https://github.com/andy-twosticks/octothorpe
127
109
  licenses:
128
110
  - MIT
111
+ metadata: {}
129
112
  post_install_message:
130
113
  rdoc_options: []
131
114
  require_paths:
132
115
  - lib
133
116
  required_ruby_version: !ruby/object:Gem::Requirement
134
- none: false
135
117
  requirements:
136
- - - ! '>='
118
+ - - ">="
137
119
  - !ruby/object:Gem::Version
138
120
  version: '0'
139
121
  required_rubygems_version: !ruby/object:Gem::Requirement
140
- none: false
141
122
  requirements:
142
- - - ! '>='
123
+ - - ">="
143
124
  - !ruby/object:Gem::Version
144
125
  version: '0'
145
126
  requirements: []
146
127
  rubyforge_project:
147
- rubygems_version: 1.8.23.2
128
+ rubygems_version: 2.4.5
148
129
  signing_key:
149
- specification_version: 3
130
+ specification_version: 4
150
131
  summary: Like a Hash. Better for message passing between classes, I hope.
151
132
  test_files:
152
133
  - spec/doc_no_pending.rb