analytics 0.1.2 → 0.1.3

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/VERSION +1 -1
  2. data/analytics.gemspec +2 -2
  3. data/lib/analytics.rb +2 -2
  4. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
data/analytics.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{analytics}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jun Tsai"]
12
- s.date = %q{2011-02-23}
12
+ s.date = %q{2011-02-24}
13
13
  s.description = %q{Analytics System}
14
14
  s.email = %q{jcai@fepss.com}
15
15
  s.extra_rdoc_files = [
data/lib/analytics.rb CHANGED
@@ -69,7 +69,7 @@ module Analytics
69
69
  def gatherDayVisitor
70
70
  now,yesterday_start,yesterday_end = Util.day_query_time
71
71
  pv = @client.query("select count(id) from visitors where site_id=#{@site_id} and created_at > #{yesterday_start} and created_at < #{yesterday_end}",:as=>:array).first.first
72
- ipv = @client.query("select count(distinct ip) from visitors where site_id=#{@site_id} and created_at > #{yesterday_start} and created_at < #{yesterday_end}").first.first
72
+ ipv = @client.query("select count(distinct ip_id) from visitors where site_id=#{@site_id} and created_at > #{yesterday_start} and created_at < #{yesterday_end}").first.first
73
73
  @client.query("insert into site_day_gather(site_id,pv,ipv,day_time,created_at)
74
74
  values( #{@site_id},
75
75
  #{pv},
@@ -81,7 +81,7 @@ module Analytics
81
81
  def gatherHourVisitor
82
82
  now,last_hour_start,last_hour_end = Util.hour_query_time
83
83
  pv = @client.query("select count(id) from visitors where site_id=#{@site_id} and created_at >= #{last_hour_start} and created_at <= #{last_hour_end}",:as=>:array).first.first
84
- ipv = @client.query("select count(distinct ip) from visitors where site_id=#{@site_id} and created_at >= #{last_hour_start} and created_at <= #{last_hour_end}").first.first
84
+ ipv = @client.query("select count(distinct ip_id) from visitors where site_id=#{@site_id} and created_at >= #{last_hour_start} and created_at <= #{last_hour_end}").first.first
85
85
  @client.query("insert into site_hour_gather(site_id,pv,ipv,hour_time,created_at) " +
86
86
  "values( #{@site_id},
87
87
  #{pv},
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: analytics
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jun Tsai
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-23 00:00:00 +08:00
18
+ date: 2011-02-24 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency