jonuts-garb 0.2.4 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  class Array
2
- def group_by
2
+ def group_to_array
3
3
  h = Hash.new
4
4
 
5
5
  each do |element|
data/lib/garb/account.rb CHANGED
@@ -9,7 +9,7 @@ module Garb
9
9
  end
10
10
 
11
11
  def self.all
12
- Profile.all.group_by{|p| p.account_id}.map{|profiles| new(profiles)}
12
+ Profile.all.group_to_array{|p| p.account_id}.map{|profiles| new(profiles)}
13
13
  end
14
14
  end
15
15
  end
data/lib/garb/profile.rb CHANGED
@@ -42,9 +42,9 @@ module Garb
42
42
  @table_id.from_ga
43
43
  end
44
44
 
45
- def self.all(email=nil)
45
+ def self.all
46
46
  email = Session.email(email)
47
- url = "https://www.google.com/analytics/feeds/accounts/#{email}"
47
+ url = "https://www.google.com/analytics/feeds/accounts/default"
48
48
  response = DataRequest.new(url).send_request(email)
49
49
  Entry.parse(response.body).map {|entry| new(entry, email)}
50
50
  end
data/lib/garb/session.rb CHANGED
@@ -44,7 +44,7 @@ module Garb
44
44
  attr_reader :email
45
45
 
46
46
  def profiles
47
- Profile.all(@email)
47
+ Profile.all
48
48
  end
49
49
 
50
50
  end
data/lib/garb/version.rb CHANGED
@@ -3,7 +3,7 @@ module Garb
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 2
6
- TINY = 4
6
+ TINY = 6
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
@@ -7,8 +7,7 @@ module Garb
7
7
 
8
8
  should "be able to return a list of all profiles" do
9
9
  Session.stubs(:email).with(nil).returns('user@host.com')
10
-
11
- url = 'https://www.google.com/analytics/feeds/accounts/user@host.com'
10
+ url = 'https://www.google.com/analytics/feeds/accounts/default'
12
11
 
13
12
  xml = read_fixture('profile_feed.xml')
14
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jonuts-garb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Pitale
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2009-06-19 00:00:00 -07:00
14
+ date: 2009-06-30 00:00:00 -07:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency