spree_piwik 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- M2U5ZGU3MmIzMzA5MjcwMDQ1MGVjNmQzNWFmNzBlMDJlYjBhNDQyYQ==
5
- data.tar.gz: !binary |-
6
- NDI0NzM1NGU4M2ExMzZjMzVjMjc4YzZlOWI3ZDFmOTI1NDgzZWU0OA==
2
+ SHA1:
3
+ metadata.gz: 6a6e350640d04c6d2222263843777c5373fd197f
4
+ data.tar.gz: 8614175ea0e02bbe33cd2a770a861bb8561dd0cd
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZDg0ZjI5NDQ3MzBmYjM1ODJiNTM2ZDQyYmQ1MDdiZDdhZjcxZGY4OGRiNmE1
10
- YmY4MWE1NTczMGVkNDZhYTBiOWMzM2Y0MWVhMDdhZTU0ZTNhMjg0YjJhMGJh
11
- MzExYzMyZDU1ZjM3MWQ4NzU5NzQ1ODlhOGY2ZWVlNTExMmQwNDY=
12
- data.tar.gz: !binary |-
13
- NmQwMWMxNmM5OGI5ZTlkNDE0MzNlODVhODQxOTg1YjVhNzcxODQzZWYzYzY2
14
- Zjk3YzYyMTlmZGY4YjJmNmJiY2I2MjgyMjNjNjJhM2YxYTYyZWQ0NjI2N2Rm
15
- MTJjMDdkNmU5MzNhMGVhMTRiZmFlMzk0MjAzMTA1OGFmZGRiYzI=
6
+ metadata.gz: fc7a4a16fe9427d50843de2225a40ed578a90b61d977b858665da568930930887363e30456bb98dc56fffb1b918a88e5177aec22645a4074e2ac00978c3d5b87
7
+ data.tar.gz: d37766fb0f2427aca7565c449970e8cbf38b8edb2046ede194c35cbaebf307ce35120525517b2a291119e919e44236fd5aa451ca05b68923986881e182c2ed5b
@@ -0,0 +1 @@
1
+ 2.1.0
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'spree', github: 'spree/spree', branch: '2-3-stable'
3
+ gem 'spree', github: 'spree/spree', branch: '3-0-stable'
4
4
  # Provides basic authentication functionality for testing parts of your engine
5
- gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-3-stable'
5
+ gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'
6
6
 
7
7
  gemspec
@@ -1,19 +1,22 @@
1
1
  require "spec_helper"
2
2
 
3
3
  feature "OrderProcess", type: :feature do
4
- scenario "An anonymous gets a checkout confirmation" do
5
- @order = create(:completed_order_with_totals, number: 'R1337', line_items_count: 2)
6
- @order.products.first.update_attributes(name: "RoR Shirt")
7
- @order.products.second.update_attributes(name: "RoR Sticker")
4
+ let(:user) { create(:user) }
5
+ let(:order) { OrderWalkthrough.up_to(:delivery) }
8
6
 
9
- # FactoryGirl is not very suited for these setups.
10
- # So we stick with the default of 100 for shipment 0 for tax.
11
- # Sanity check.
12
- expect(@order.ship_total).to eq 100.0
13
- expect(@order.tax_total).to eq 0.0
7
+ before do
8
+ order.update_attribute(:number, 'R1337')
9
+ order.products.update_all(name: 'RoR Shirt')
10
+ allow_any_instance_of(Spree::CheckoutController).to receive_messages(current_order: order)
11
+ allow_any_instance_of(Spree::CheckoutController).to receive_messages(try_spree_current_user: user)
12
+ allow_any_instance_of(Spree::OrdersController).to receive_messages(try_spree_current_user: user)
14
13
 
15
- visit "orders/#{@order.number}/token/#{@order.guest_token}"
14
+ visit spree.checkout_state_path(:delivery)
15
+ click_button "Save and Continue"
16
+ click_button "Save and Continue"
17
+ end
16
18
 
19
+ scenario "An anonymous gets a checkout confirmation" do
17
20
  tag_component = PiwikTagComponent.new
18
21
  expect(tag_component.as_ecma).to eq fixture("completed_order.js")
19
22
  end
@@ -10,9 +10,6 @@ feature "TrackingTagForIndex", type: :feature do
10
10
  scenario "An anonymous user is tracked on the home page" do
11
11
  visit "/"
12
12
 
13
- # Sanity check
14
- expect(page).to have_content "Powered by Spree"
15
-
16
13
  tag_component = PiwikTagComponent.new
17
14
  expect(tag_component).to be_in_html
18
15
  expect(tag_component.tracker_url_assigment).to include("piwik.example.com")
@@ -9,19 +9,12 @@ _paq.push(['addEcommerceItem',
9
9
  10.0,
10
10
  1
11
11
  ]);
12
- _paq.push(['addEcommerceItem',
13
- 'SKU-2',
14
- 'RoR Sticker',
15
- [],
16
- 10.0,
17
- 1
18
- ]);
19
12
  _paq.push(['trackEcommerceOrder',
20
13
  'R1337',
21
- 120.0,
22
14
  20.0,
15
+ 10.0,
23
16
  0.0,
24
- 100.0,
17
+ 10.0,
25
18
  false
26
19
  ]);
27
20
  _paq.push(['trackPageView']);
@@ -25,6 +25,7 @@ require 'ffaker'
25
25
  Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
26
26
 
27
27
  # Requires factories and other useful helpers defined in spree_core.
28
+ require 'spree/testing_support/order_walkthrough'
28
29
  require 'spree/testing_support/authorization_helpers'
29
30
  require 'spree/testing_support/capybara_ext'
30
31
  require 'spree/testing_support/controller_requests'
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_piwik'
5
- s.version = '1.0.0'
5
+ s.version = '1.1.0'
6
6
  s.summary = 'Adds piwik tracking with Ecommerce tracking'
7
7
  s.description = File.read(File.join(File.dirname(__FILE__), 'README.md'))
8
8
  s.required_ruby_version = '>= 1.9.3'
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.require_path = 'lib'
18
18
  s.requirements << 'none'
19
19
 
20
- s.add_dependency 'spree_core', '~> 2.3'
20
+ s.add_dependency 'spree_core', '~> 3.0'
21
21
 
22
22
  s.add_development_dependency 'therubyracer', '~> 0.12'
23
23
  s.add_development_dependency 'capybara', '~> 2.4'
metadata CHANGED
@@ -1,342 +1,298 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_piwik
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bèr Kessels
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-14 00:00:00.000000000 Z
11
+ date: 2015-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.3'
19
+ version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.3'
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: therubyracer
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0.12'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.12'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: capybara
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.4'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: coffee-rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '4.1'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '4.1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: database_cleaner
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.4'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.4'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: factory_girl
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '4.5'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '4.5'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: ffaker
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '1'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec-rails
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '3.1'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '3.1'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: spring-commands-rspec
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '1'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '1'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rkelly-remix
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: launchy
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ~>
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: '2.4'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ~>
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '2.4'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: sass-rails
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ~>
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
173
  version: '4.0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ~>
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: '4.0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: selenium-webdriver
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ~>
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
187
  version: '2.44'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ~>
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: '2.44'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: simplecov
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ~>
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ~>
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: sqlite3
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - ~>
213
+ - - "~>"
214
214
  - !ruby/object:Gem::Version
215
215
  version: '1.3'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - ~>
220
+ - - "~>"
221
221
  - !ruby/object:Gem::Version
222
222
  version: '1.3'
223
- description: ! 'SpreePiwik
224
-
223
+ description: |
224
+ SpreePiwik
225
225
  ==========
226
226
 
227
-
228
227
  Adds piwik tracking with Ecommerce tracking
229
228
 
230
-
231
229
  Status
232
-
233
230
  ------
234
231
 
235
-
236
232
  [![Build Status](https://travis-ci.org/berkes/spree_piwik.svg?branch=develop)](https://travis-ci.org/berkes/spree_piwik)
237
-
238
233
  [![Code Climate](https://codeclimate.com/github/berkes/spree_piwik/badges/gpa.svg)](https://codeclimate.com/github/berkes/spree_piwik)
239
234
 
240
-
241
235
  Installation
242
-
243
236
  ------------
244
237
 
245
-
246
238
  Add spree_piwik to your Gemfile:
247
239
 
248
-
249
240
  ```ruby
250
-
251
- gem ''spree_piwik''
252
-
241
+ gem 'spree_piwik'
253
242
  ```
254
243
 
255
-
256
244
  Bundle your dependencies and run the installation generator:
257
245
 
258
-
259
246
  ```shell
260
-
261
247
  bundle
262
-
263
248
  bundle exec rails g spree_piwik:install
264
-
265
249
  ```
266
250
 
267
-
268
251
  Add your Piwik URL and site-id to the `config/initializers/spree_piwik.rb`
269
252
 
270
-
271
253
  For example:
272
-
273
254
  ```ruby
274
-
275
255
  Spree::Piwik::Config[:piwik_url] = "piwik.example.com"
276
-
277
256
  Spree::Piwik::Config[:piwik_id] = 1337
278
257
 
279
-
280
258
  ```
281
-
282
259
  Will use http(s)://piwik.example.com/ as url for your Piwik. And track
283
-
284
260
  stats for the site that has the id 1337 in Piwik.
285
261
 
286
262
 
287
-
288
263
  Screenshot
289
-
290
264
  ----------
291
265
 
292
-
293
266
  ![Screenshot of the Ecommerce functionality in action with this extension](doc/spree_piwik.png).
294
267
 
295
-
296
268
  Testing
297
-
298
269
  -------
299
270
 
300
-
301
- First bundle your dependencies, then run `rake`. `rake` will default to building
302
- the dummy app if it does not exist, then it will run specs. The dummy app can be
303
- regenerated by using `rake test_app`.
304
-
271
+ First bundle your dependencies, then run `rake`. `rake` will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using `rake test_app`.
305
272
 
306
273
  ```shell
307
-
308
274
  bundle
309
-
310
275
  bundle exec rake
311
-
312
276
  ```
313
277
 
314
-
315
- When testing your applications integration with this extension you may use it''s
316
- factories.
317
-
278
+ When testing your applications integration with this extension you may use it's factories.
318
279
  Simply add this require statement to your spec_helper:
319
280
 
320
281
 
321
-
322
282
  License
323
-
324
283
  -------
325
284
 
326
-
327
- SpreePiwik is released under the [New BSD License](https://github.com/spree/spree/blob/master/license.md)
328
- similar to Spree.
329
-
330
- '
285
+ SpreePiwik is released under the [New BSD License](https://github.com/spree/spree/blob/master/license.md) similar to Spree.
331
286
  email: ber@berk.es
332
287
  executables: []
333
288
  extensions: []
334
289
  extra_rdoc_files: []
335
290
  files:
336
- - .gitignore
337
- - .hound.yml
338
- - .rspec
339
- - .travis.yml
291
+ - ".gitignore"
292
+ - ".hound.yml"
293
+ - ".rspec"
294
+ - ".ruby-version"
295
+ - ".travis.yml"
340
296
  - Gemfile
341
297
  - README.md
342
298
  - Rakefile
@@ -393,18 +349,18 @@ require_paths:
393
349
  - lib
394
350
  required_ruby_version: !ruby/object:Gem::Requirement
395
351
  requirements:
396
- - - ! '>='
352
+ - - ">="
397
353
  - !ruby/object:Gem::Version
398
354
  version: 1.9.3
399
355
  required_rubygems_version: !ruby/object:Gem::Requirement
400
356
  requirements:
401
- - - ! '>='
357
+ - - ">="
402
358
  - !ruby/object:Gem::Version
403
359
  version: '0'
404
360
  requirements:
405
361
  - none
406
362
  rubyforge_project:
407
- rubygems_version: 2.4.5
363
+ rubygems_version: 2.2.0
408
364
  signing_key:
409
365
  specification_version: 4
410
366
  summary: Adds piwik tracking with Ecommerce tracking