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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36a8fa5c79cf90bb7cbf83a2c9488131a87c365b
4
- data.tar.gz: 8a75690f1096d7ada1a043ac66539ab0e80ade94
3
+ metadata.gz: fc6a3c1060b42dec69671e5a7872562cc0eb8eb4
4
+ data.tar.gz: 12d1bfe90cab12272646f431c349ea79c865881b
5
5
  SHA512:
6
- metadata.gz: 58441705bbc4ccceba2cae02ee27bcade566bfdcbc7e6c66f1a79e1002dd5d586f510f3026068d73f265fbe724d7c6d6da21a705553ab6d69e50b2353853795a
7
- data.tar.gz: 89e05c79f038ef8d581e6ec5b36e8935f294e6902f984b776d5470f10d4f3842c450a355400e82d5ec8d1292cb14e494ec3789110633360dc6c76d5267aa5829
6
+ metadata.gz: a1503bf79617cb05bd6fa280029463a5486dfc6b36de6b3f45aaffe7febfefa60a31b088831eed8649973f254bf230e0a9f9e987415cc4f5d12b54b5f28efe85
7
+ data.tar.gz: 779975bcdb8c5098eb818a045412e1e51d42ea53155ad3e134f711cc0fc6f3fb5fdd5576271f84ceb93cae048f7116ce4e7f21978b15cbbceff1bc70da464ee2
data/README.md CHANGED
@@ -115,6 +115,7 @@ Statcounter::Projects.create(
115
115
  project_name: 'mywebsite1.com',
116
116
  url: 'https://www.mywebsite2.com',
117
117
  public_stats: true, # default false
118
+ timezone: 'Europe/Vilnius',
118
119
  )
119
120
 
120
121
  # returns hash with id and security code
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Statcounter
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
@@ -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=46f09a1b09f4c144508966353f406c8e109295f9")
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
 
@@ -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.2
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