auchandirect-scrAPI 0.2.0 → 0.2.1

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: 9556cd0d6ccba68fa4273213e66b8249400ba175
4
- data.tar.gz: f4d0ba344bb0318639779c364235f21977b72587
3
+ metadata.gz: da85baea18c9892825b603e963724cf03a268115
4
+ data.tar.gz: 8eae477d988b9d184449cc4bc966a1c89fac60fa
5
5
  SHA512:
6
- metadata.gz: 44991b554adf1f08a87d01851210c2644a84ab9649d5e2260b73d6d618f115ca0ef50b93f508a58d24052dae2bca158bf4cdcf9cb5bfb95a53ac1c3ba1c645c5
7
- data.tar.gz: 1ddc92e17d7826830a2ac0690381118928a659a49ff31c53f2c30b245cd01142bfdc237bd94cb73f4c78814c10b236c2725a84e2a73c5295a2e2472938b25841
6
+ metadata.gz: 01513b5c508dab584d38d257199c0f9a69e75e1d5a2f01bfaab680e2ab755104e9efab18b93ab001b9df5eb9da390af104231c58257f0ee21303c10426f694b7
7
+ data.tar.gz: bc8f3dd14c9b3f3205ba656d62f56b10a3d3c2be1e09064cc5888ceaf3f2a651fd8f38e5db7bcd5707389c6862359153ad14b561adba49f2254961f428ebba03
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -10,3 +10,6 @@ matrix:
10
10
  env:
11
11
  - AUCHANDIRECT_TEST_EMAIL=auchandirect.scrapi.200@mailinator.com
12
12
  - AUCHANDIRECT_TEST_PASSWORD=123secret
13
+ addons:
14
+ code_climate:
15
+ repo_token: d1c08ceac5738bb9edacbd19e9a9172cf918e4a0f82378aa4011feab06b5d998
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://travis-ci.org/philou/auchandirect-scrAPI.svg?branch=master)](https://travis-ci.org/philou/auchandirect-scrAPI) [![Test Coverage](https://codeclimate.com/github/philou/auchandirect-scrAPI/badges/coverage.svg)](https://codeclimate.com/github/philou/auchandirect-scrAPI) [![Code Climate](https://codeclimate.com/github/philou/auchandirect-scrAPI/badges/gpa.svg)](https://codeclimate.com/github/philou/auchandirect-scrAPI)
2
+
1
3
  # Auchandirect::ScrAPI
2
4
 
3
5
  A ruby gem providing, through scrapping, an API to the french www.auchandirect.fr online grocery
@@ -16,12 +16,14 @@ Gem::Specification.new do |spec|
16
16
  spec.files = `git ls-files`.split($/).reject {|f| f.match(/^offline_sites/)}
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.add_dependency 'storexplore', '~> 0.2'
19
+ spec.add_dependency 'storexplore', '~> 0.3'
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.3"
22
- spec.add_development_dependency "rake", "~> 10.1"
23
- spec.add_development_dependency "guard-rspec", "~> 4.0"
24
- spec.add_development_dependency "net-ping", "~> 1.7"
25
- spec.add_development_dependency "spec_combos", "~> 0.2"
21
+ spec.add_development_dependency "bundler"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "guard-rspec"
24
+ spec.add_development_dependency "net-ping"
25
+ spec.add_development_dependency "spec_combos"
26
+ spec.add_development_dependency "rspec-collection_matchers"
27
+ spec.add_development_dependency "codeclimate-test-reporter"
26
28
 
27
29
  end
@@ -21,7 +21,7 @@
21
21
 
22
22
  module Auchandirect
23
23
  module ScrAPI
24
- VERSION = "0.2.0"
24
+ VERSION = "0.2.1"
25
25
  end
26
26
  end
27
27
 
@@ -76,7 +76,7 @@ shared_examples_for "Any Cart" do |store_cart_class, store_url|
76
76
  end
77
77
 
78
78
  after(:all) do
79
- @session.logout
79
+ @session.logout unless @session.nil?
80
80
  end
81
81
 
82
82
  # Some tests are redudant with what is item extractions, but the followings
@@ -30,13 +30,13 @@ shared_examples_for "Any Client Cart" do |store_cart_class, please_login_text|
30
30
 
31
31
  it "logs in and out through HTTP" do
32
32
  @client = Mechanize.new
33
- expect(logged_in?).to(be_false, "should not be logged in at the begining")
33
+ expect(logged_in?).to (be false), "should not be logged in at the begining"
34
34
 
35
35
  login
36
- expect(logged_in?).to(be_true, "should be logged in after submitting the login form")
36
+ expect(logged_in?).to (be true), "should be logged in after submitting the login form"
37
37
 
38
38
  logout
39
- expect(logged_in?).to(be_false, "should he logged out after clicking the logout link")
39
+ expect(logged_in?).to (be false), "should he logged out after clicking the logout link"
40
40
  end
41
41
 
42
42
  private
@@ -19,7 +19,11 @@
19
19
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
20
  # MA 02110-1301 USA
21
21
 
22
+ require "codeclimate-test-reporter"
23
+ CodeClimate::TestReporter.start
24
+
22
25
  require 'auchandirect/scrAPI'
26
+ require 'rspec/collection_matchers'
23
27
  require 'spec_combos'
24
28
 
25
29
  # Offline testing
@@ -30,9 +34,18 @@ include OfflineTestHelper
30
34
  # Gem root dir
31
35
  AUCHANDIRECT_SCRAPI_ROOT_DIR = File.join(File.dirname(__FILE__), '..')
32
36
 
33
-
34
37
  # Dummy store generation
35
38
  require 'storexplore/testing'
36
39
  Storexplore::Testing.config do |config|
37
40
  config.dummy_store_generation_dir= File.join(AUCHANDIRECT_SCRAPI_ROOT_DIR, 'tmp')
38
41
  end
42
+
43
+ # Timeout examples when they take more that 1 minute
44
+ require 'timeout'
45
+ RSpec.configure do |c|
46
+ c.around(:each) do |example|
47
+ Timeout::timeout(60) {
48
+ example.run
49
+ }
50
+ end
51
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auchandirect-scrAPI
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philou
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDkjCCAnqgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMRkwFwYDVQQDDBBwaGls
13
+ MIIDQjCCAiqgAwIBAgIBAjANBgkqhkiG9w0BAQUFADBHMRkwFwYDVQQDDBBwaGls
14
14
  aXBwZS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Gzmig/4PuBF4q3nhwPgxV6H3SH4/Py7QF5COZPQlCdBwPYczqW
30
- XxIbXhRVXcgjBHT0w2HsXkOwmmYvBzbrfqtTx5NswwHcIeQZB/NID7berIf9awx3
31
- yLcl1cmm5ALtJ/+Bkkmp0i4amXeTDMvq9r8PBsVsQwxYOYJBP+Umxz3PX6HjFHrQ
32
- XdkXx3oZ
23
+ OIWEwedl6j+X0OD5OYki3QaTAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQD
24
+ AgSwMB0GA1UdDgQWBBSZy8+NDp7v3X6S0oqVORYE8uli5jANBgkqhkiG9w0BAQUF
25
+ AAOCAQEAjTpuKjUclY0kNioKIcwD9nEkAwxeGiMNrY2zc7FfabSVhNKa0GafjHiz
26
+ 6STN4S4j03wgmD8YMnA6uqQBSCgb3mcySr9sfglxub4sC9c3Ma+A3G7JEE+KPeLE
27
+ gcVYqRPSgVV5naFYaFu4HK0o8ZY8smY30BM3uFmW3cQ9cTKNtaqgUQ177fMmXuYa
28
+ QOTMg5o5t1YFdpg/RwQNoUX5DyAC8gWJY8vlVJbiIKvvB0z4+o7d5nEuuE3jvKQr
29
+ LKjGZUoe+A3/FKYHWLPZAArCXrXLhpjAfopLBNmOAju0e30ObcjPQDWcj7z5jfJl
30
+ ILiFgo6hdHrp/tFaDv14PiMRm6sZaQ==
33
31
  -----END CERTIFICATE-----
34
- date: 2014-04-26 00:00:00.000000000 Z
32
+ date: 2014-11-04 00:00:00.000000000 Z
35
33
  dependencies:
36
34
  - !ruby/object:Gem::Dependency
37
35
  name: storexplore
@@ -39,84 +37,112 @@ dependencies:
39
37
  requirements:
40
38
  - - "~>"
41
39
  - !ruby/object:Gem::Version
42
- version: '0.2'
40
+ version: '0.3'
43
41
  type: :runtime
44
42
  prerelease: false
45
43
  version_requirements: !ruby/object:Gem::Requirement
46
44
  requirements:
47
45
  - - "~>"
48
46
  - !ruby/object:Gem::Version
49
- version: '0.2'
47
+ version: '0.3'
50
48
  - !ruby/object:Gem::Dependency
51
49
  name: bundler
52
50
  requirement: !ruby/object:Gem::Requirement
53
51
  requirements:
54
- - - "~>"
52
+ - - ">="
55
53
  - !ruby/object:Gem::Version
56
- version: '1.3'
54
+ version: '0'
57
55
  type: :development
58
56
  prerelease: false
59
57
  version_requirements: !ruby/object:Gem::Requirement
60
58
  requirements:
61
- - - "~>"
59
+ - - ">="
62
60
  - !ruby/object:Gem::Version
63
- version: '1.3'
61
+ version: '0'
64
62
  - !ruby/object:Gem::Dependency
65
63
  name: rake
66
64
  requirement: !ruby/object:Gem::Requirement
67
65
  requirements:
68
- - - "~>"
66
+ - - ">="
69
67
  - !ruby/object:Gem::Version
70
- version: '10.1'
68
+ version: '0'
71
69
  type: :development
72
70
  prerelease: false
73
71
  version_requirements: !ruby/object:Gem::Requirement
74
72
  requirements:
75
- - - "~>"
73
+ - - ">="
76
74
  - !ruby/object:Gem::Version
77
- version: '10.1'
75
+ version: '0'
78
76
  - !ruby/object:Gem::Dependency
79
77
  name: guard-rspec
80
78
  requirement: !ruby/object:Gem::Requirement
81
79
  requirements:
82
- - - "~>"
80
+ - - ">="
83
81
  - !ruby/object:Gem::Version
84
- version: '4.0'
82
+ version: '0'
85
83
  type: :development
86
84
  prerelease: false
87
85
  version_requirements: !ruby/object:Gem::Requirement
88
86
  requirements:
89
- - - "~>"
87
+ - - ">="
90
88
  - !ruby/object:Gem::Version
91
- version: '4.0'
89
+ version: '0'
92
90
  - !ruby/object:Gem::Dependency
93
91
  name: net-ping
94
92
  requirement: !ruby/object:Gem::Requirement
95
93
  requirements:
96
- - - "~>"
94
+ - - ">="
97
95
  - !ruby/object:Gem::Version
98
- version: '1.7'
96
+ version: '0'
99
97
  type: :development
100
98
  prerelease: false
101
99
  version_requirements: !ruby/object:Gem::Requirement
102
100
  requirements:
103
- - - "~>"
101
+ - - ">="
104
102
  - !ruby/object:Gem::Version
105
- version: '1.7'
103
+ version: '0'
106
104
  - !ruby/object:Gem::Dependency
107
105
  name: spec_combos
108
106
  requirement: !ruby/object:Gem::Requirement
109
107
  requirements:
110
- - - "~>"
108
+ - - ">="
111
109
  - !ruby/object:Gem::Version
112
- version: '0.2'
110
+ version: '0'
113
111
  type: :development
114
112
  prerelease: false
115
113
  version_requirements: !ruby/object:Gem::Requirement
116
114
  requirements:
117
- - - "~>"
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ - !ruby/object:Gem::Dependency
119
+ name: rspec-collection_matchers
120
+ requirement: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ type: :development
126
+ prerelease: false
127
+ version_requirements: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ - !ruby/object:Gem::Dependency
133
+ name: codeclimate-test-reporter
134
+ requirement: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ type: :development
140
+ prerelease: false
141
+ version_requirements: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
118
144
  - !ruby/object:Gem::Version
119
- version: '0.2'
145
+ version: '0'
120
146
  description: Through scrapping, an API to the french www.auchandirect.fr online grocery
121
147
  email:
122
148
  - philippe.bourgau@gmail.com
metadata.gz.sig CHANGED
Binary file