mage-hand 0.4.6 → 0.4.7

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.6
1
+ 0.4.7
@@ -39,7 +39,7 @@ module MageHand
39
39
  end
40
40
 
41
41
  def wiki_pages
42
- @wiki_pages ||= MageHand::WikiPage.load_wiki_pages(self.id)
42
+ @wiki_pages ||= MageHand::WikiPage.load_wiki_pages(self)
43
43
  end
44
44
 
45
45
  def posts
@@ -19,9 +19,9 @@ module MageHand
19
19
  attr_instance :campaign
20
20
  inflate_if_nil :campaign
21
21
 
22
- def self.load_wiki_pages(campaign_id)
23
- wiki_hashes = JSON.parse(client.access_token.get(collection_url(campaign_id)).body)
24
- wiki_hashes.map {|hash| WikiPage.new(hash)}
22
+ def self.load_wiki_pages(campaign)
23
+ wiki_hashes = JSON.parse(campaign.client.access_token.get(collection_url(campaign.id)).body)
24
+ wiki_hashes.map {|hash| WikiPage.new(campaign.client, hash)}
25
25
  end
26
26
 
27
27
  def campaign=(campaign_hash)
@@ -61,6 +61,8 @@ module MageHand
61
61
  @response = client.access_token.post(self.class.collection_url(self.campaign.id),
62
62
  json_body, {'content-type' => 'application/x-www-form-urlencoded'})
63
63
  puts @response.inspect
64
+ puts @response.message
65
+ puts @response.body
64
66
  self.update_attributes!(JSON.parse(@response.body))
65
67
  end
66
68
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "mage-hand"
8
- s.version = "0.4.6"
8
+ s.version = "0.4.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Steven Hammond"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mage-hand
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -221,7 +221,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
221
221
  version: '0'
222
222
  segments:
223
223
  - 0
224
- hash: 750370700880792971
224
+ hash: -1021386638790416384
225
225
  required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  none: false
227
227
  requirements: