activegist 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  class ActiveGist::Files
2
2
  attr_reader :hash
3
3
  delegate :key?, :has_key?, :[], :[]=, :empty?, :as_json, :to_json, :as_xml, :to_xml, :inspect,
4
- :method_missing, :to => :hash
4
+ :to => :hash
5
5
 
6
6
  def initialize(hash = {})
7
7
  @hash = hash
@@ -19,6 +19,10 @@ class ActiveGist::Files
19
19
  @hash = hash
20
20
  end
21
21
 
22
+ def method_missing(name, *args, &block)
23
+ hash.send name, *args, &block
24
+ end
25
+
22
26
  private
23
27
  def deep_dup(obj)
24
28
  if obj.kind_of?(Array)
@@ -1,6 +1,6 @@
1
1
  class ActiveGist
2
2
  module Version
3
- MAJOR, MINOR, TINY = 0, 6, 1
3
+ MAJOR, MINOR, TINY = 0, 6, 2
4
4
  STRING = [MAJOR, MINOR, TINY].join '.'
5
5
  end
6
6
 
@@ -13,4 +13,12 @@ describe ActiveGist::Files do
13
13
  subject.as_json.should == { 'file1.txt' => { :content => 'data' } }.as_json
14
14
  end
15
15
  end
16
+
17
+ it "should delegate missing methods into hash" do
18
+ # sanity check
19
+ subject.should_not respond_to(:each)
20
+
21
+ subject.hash.should_receive(:each)
22
+ subject.each do end
23
+ end
16
24
  end
metadata CHANGED
@@ -1,104 +1,101 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: activegist
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.2
4
5
  prerelease:
5
- version: 0.6.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Colin MacKenzie IV
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-01-16 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2012-01-16 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: rspec
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2161317960 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
18
+ requirements:
21
19
  - - ~>
22
- - !ruby/object:Gem::Version
20
+ - !ruby/object:Gem::Version
23
21
  version: 2.8.0
24
22
  type: :development
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: fakeweb
28
23
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *2161317960
25
+ - !ruby/object:Gem::Dependency
26
+ name: fakeweb
27
+ requirement: &2161317400 !ruby/object:Gem::Requirement
30
28
  none: false
31
- requirements:
29
+ requirements:
32
30
  - - ~>
33
- - !ruby/object:Gem::Version
31
+ - !ruby/object:Gem::Version
34
32
  version: 1.3.0
35
33
  type: :development
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: rake
39
34
  prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *2161317400
36
+ - !ruby/object:Gem::Dependency
37
+ name: rake
38
+ requirement: &2161316900 !ruby/object:Gem::Requirement
41
39
  none: false
42
- requirements:
40
+ requirements:
43
41
  - - ~>
44
- - !ruby/object:Gem::Version
42
+ - !ruby/object:Gem::Version
45
43
  version: 0.9.2.2
46
44
  type: :development
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
49
- name: rdoc
50
45
  prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *2161316900
47
+ - !ruby/object:Gem::Dependency
48
+ name: rdoc
49
+ requirement: &2161316380 !ruby/object:Gem::Requirement
52
50
  none: false
53
- requirements:
51
+ requirements:
54
52
  - - ~>
55
- - !ruby/object:Gem::Version
56
- version: "3.12"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.12'
57
55
  type: :development
58
- version_requirements: *id004
59
- - !ruby/object:Gem::Dependency
60
- name: activemodel
61
56
  prerelease: false
62
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *2161316380
58
+ - !ruby/object:Gem::Dependency
59
+ name: activemodel
60
+ requirement: &2161315900 !ruby/object:Gem::Requirement
63
61
  none: false
64
- requirements:
62
+ requirements:
65
63
  - - ~>
66
- - !ruby/object:Gem::Version
64
+ - !ruby/object:Gem::Version
67
65
  version: 3.1.3
68
66
  type: :runtime
69
- version_requirements: *id005
70
- - !ruby/object:Gem::Dependency
71
- name: activesupport
72
67
  prerelease: false
73
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *2161315900
69
+ - !ruby/object:Gem::Dependency
70
+ name: activesupport
71
+ requirement: &2161315420 !ruby/object:Gem::Requirement
74
72
  none: false
75
- requirements:
73
+ requirements:
76
74
  - - ~>
77
- - !ruby/object:Gem::Version
75
+ - !ruby/object:Gem::Version
78
76
  version: 3.1.3
79
77
  type: :runtime
80
- version_requirements: *id006
81
- - !ruby/object:Gem::Dependency
82
- name: rest-client
83
78
  prerelease: false
84
- requirement: &id007 !ruby/object:Gem::Requirement
79
+ version_requirements: *2161315420
80
+ - !ruby/object:Gem::Dependency
81
+ name: rest-client
82
+ requirement: &2161314960 !ruby/object:Gem::Requirement
85
83
  none: false
86
- requirements:
84
+ requirements:
87
85
  - - ~>
88
- - !ruby/object:Gem::Version
86
+ - !ruby/object:Gem::Version
89
87
  version: 1.6.7
90
88
  type: :runtime
91
- version_requirements: *id007
92
- description: Wraps GitHub's Gist API with a class implementing the ActiveModel modules. So, it should be pretty familiar to anyone who's ever used models in Ruby on Rails.
93
- email:
89
+ prerelease: false
90
+ version_requirements: *2161314960
91
+ description: Wraps GitHub's Gist API with a class implementing the ActiveModel modules.
92
+ So, it should be pretty familiar to anyone who's ever used models in Ruby on Rails.
93
+ email:
94
94
  - sinisterchipmunk@gmail.com
95
95
  executables: []
96
-
97
96
  extensions: []
98
-
99
97
  extra_rdoc_files: []
100
-
101
- files:
98
+ files:
102
99
  - .gitignore
103
100
  - .travis.yml
104
101
  - CHANGELOG
@@ -134,32 +131,29 @@ files:
134
131
  - spec/support/fakeweb.rb
135
132
  homepage: http://github.com/sinisterchipmunk/active-gist
136
133
  licenses: []
137
-
138
134
  post_install_message:
139
135
  rdoc_options: []
140
-
141
- require_paths:
136
+ require_paths:
142
137
  - lib
143
- required_ruby_version: !ruby/object:Gem::Requirement
138
+ required_ruby_version: !ruby/object:Gem::Requirement
144
139
  none: false
145
- requirements:
146
- - - ">="
147
- - !ruby/object:Gem::Version
148
- version: "0"
149
- required_rubygems_version: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - ! '>='
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
145
  none: false
151
- requirements:
152
- - - ">="
153
- - !ruby/object:Gem::Version
154
- version: "0"
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
155
150
  requirements: []
156
-
157
151
  rubyforge_project: activegist
158
152
  rubygems_version: 1.8.10
159
153
  signing_key:
160
154
  specification_version: 3
161
155
  summary: Wraps GitHub's Gist API with an intuitive class based on ActiveModel.
162
- test_files:
156
+ test_files:
163
157
  - spec/fixtures/all_gists.json
164
158
  - spec/fixtures/gist_1.json
165
159
  - spec/fixtures/gist_1_star.json