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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.travis.yml +3 -0
- data/README.md +2 -0
- data/auchandirect-scrAPI.gemspec +8 -6
- data/lib/auchandirect/scrAPI/version.rb +1 -1
- data/spec/lib/auchandirect/scrAPI/cart_shared_examples.rb +1 -1
- data/spec/lib/auchandirect/scrAPI/client_cart_shared_examples.rb +3 -3
- data/spec/spec_helper.rb +14 -1
- metadata +62 -36
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da85baea18c9892825b603e963724cf03a268115
|
4
|
+
data.tar.gz: 8eae477d988b9d184449cc4bc966a1c89fac60fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01513b5c508dab584d38d257199c0f9a69e75e1d5a2f01bfaab680e2ab755104e9efab18b93ab001b9df5eb9da390af104231c58257f0ee21303c10426f694b7
|
7
|
+
data.tar.gz: bc8f3dd14c9b3f3205ba656d62f56b10a3d3c2be1e09064cc5888ceaf3f2a651fd8f38e5db7bcd5707389c6862359153ad14b561adba49f2254961f428ebba03
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
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
|
data/auchandirect-scrAPI.gemspec
CHANGED
@@ -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.
|
19
|
+
spec.add_dependency 'storexplore', '~> 0.3'
|
20
20
|
|
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"
|
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
|
@@ -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(
|
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(
|
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(
|
39
|
+
expect(logged_in?).to (be false), "should he logged out after clicking the logout link"
|
40
40
|
end
|
41
41
|
|
42
42
|
private
|
data/spec/spec_helper.rb
CHANGED
@@ -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.
|
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
|
-
|
13
|
+
MIIDQjCCAiqgAwIBAgIBAjANBgkqhkiG9w0BAQUFADBHMRkwFwYDVQQDDBBwaGls
|
14
14
|
aXBwZS5ib3VyZ2F1MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/Is
|
15
|
-
|
15
|
+
ZAE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Ya
|
28
|
+
QOTMg5o5t1YFdpg/RwQNoUX5DyAC8gWJY8vlVJbiIKvvB0z4+o7d5nEuuE3jvKQr
|
29
|
+
LKjGZUoe+A3/FKYHWLPZAArCXrXLhpjAfopLBNmOAju0e30ObcjPQDWcj7z5jfJl
|
30
|
+
ILiFgo6hdHrp/tFaDv14PiMRm6sZaQ==
|
33
31
|
-----END CERTIFICATE-----
|
34
|
-
date: 2014-04
|
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.
|
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.
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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
|
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
|
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
|