statcounter 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/statcounter/projects.rb +2 -1
- data/lib/statcounter/version.rb +1 -1
- data/spec/projects_spec.rb +2 -2
- data/statcounter.gemspec +1 -1
- metadata +7 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc6a3c1060b42dec69671e5a7872562cc0eb8eb4
|
4
|
+
data.tar.gz: 12d1bfe90cab12272646f431c349ea79c865881b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1503bf79617cb05bd6fa280029463a5486dfc6b36de6b3f45aaffe7febfefa60a31b088831eed8649973f254bf230e0a9f9e987415cc4f5d12b54b5f28efe85
|
7
|
+
data.tar.gz: 779975bcdb8c5098eb818a045412e1e51d42ea53155ad3e134f711cc0fc6f3fb5fdd5576271f84ceb93cae048f7116ce4e7f21978b15cbbceff1bc70da464ee2
|
data/README.md
CHANGED
data/lib/statcounter/projects.rb
CHANGED
@@ -11,11 +11,12 @@ module Statcounter
|
|
11
11
|
response[:sc_data].size > 1 ? response[:sc_data] : response[:sc_data][0]
|
12
12
|
end
|
13
13
|
|
14
|
-
def self.create(project_name:, url:, public_stats: false, credentials: nil)
|
14
|
+
def self.create(project_name:, url:, public_stats: false, timezone: Statcounter.config.timezone, credentials: nil)
|
15
15
|
params = {
|
16
16
|
wt: project_name,
|
17
17
|
wu: url,
|
18
18
|
ps: public_stats ? 1 : 0,
|
19
|
+
tz: timezone,
|
19
20
|
}
|
20
21
|
|
21
22
|
response = Statcounter.client.get('add_project', params: params, credentials: credentials)
|
data/lib/statcounter/version.rb
CHANGED
data/spec/projects_spec.rb
CHANGED
@@ -61,7 +61,7 @@ RSpec.describe Statcounter::Projects do
|
|
61
61
|
project_name: project_name,
|
62
62
|
url: url,
|
63
63
|
public_stats: public_stats,
|
64
|
-
credentials: default_credentials
|
64
|
+
credentials: default_credentials,
|
65
65
|
)
|
66
66
|
end
|
67
67
|
|
@@ -70,7 +70,7 @@ RSpec.describe Statcounter::Projects do
|
|
70
70
|
let(:public_stats) { false }
|
71
71
|
|
72
72
|
before do
|
73
|
-
stub_request(:get, "http://api.statcounter.com/add_project?wt=#{project_name}&wu=#{url}&ps=0&vn=3&t=1466614800&u=john_brown&f=json&sha1=
|
73
|
+
stub_request(:get, "http://api.statcounter.com/add_project?wt=#{project_name}&wu=#{url}&ps=0&vn=3&t=1466614800&tz=America/New_York&u=john_brown&f=json&sha1=a5f33c87787cce79f12569e781bd32df4c8d3573")
|
74
74
|
.to_return(body: File.read('spec/assets/add_project.json'))
|
75
75
|
end
|
76
76
|
|
data/statcounter.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
17
17
|
spec.require_paths = ['lib']
|
18
18
|
|
19
|
-
spec.add_dependency 'faraday', '>= 0.8'
|
19
|
+
spec.add_dependency 'faraday', '>= 0.8', '<= 0.15.2'
|
20
20
|
spec.add_dependency 'faraday_middleware', '0.12.2'
|
21
21
|
|
22
22
|
spec.add_development_dependency 'bundler', '1.16.1'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statcounter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Šarūnas Kūjalis"
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.8'
|
20
|
+
- - "<="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.15.2
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '0.8'
|
30
|
+
- - "<="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.15.2
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: faraday_middleware
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|