spree_cpf 2.1.3 → 2.1.7

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: 8658f733538a4b37cc561417258368ebd244c633
4
- data.tar.gz: 5fd599f6867656cca08add246195a357cf049b12
3
+ metadata.gz: 85154b4a986d48adc20672ab333c560f6650ebc5
4
+ data.tar.gz: da8f5a6e7b942e238667bf7e4f38689dd7446d9c
5
5
  SHA512:
6
- metadata.gz: 5b8ce891b9dcc486935927080ee4e0b4f5cb5d2eee77287b690df3a8251d94b6c9d61d8a1745693e5fd690b49cfd3b15428f884a919b24b9630144f9f98797b3
7
- data.tar.gz: dcbcc32f8211c80cdc76d96bc4948a7aadc6c1ee70f0356cadac006bb641f6f9a48afbb94697081c16464bb7aeae753048e95588ca764758fe14d83fde1767b1
6
+ metadata.gz: 4465bcfb38ff50b54e37903a095ffd64aa0388031f04e1b1da5ba5e0ec9d5bda7f50df6f411d20d845d29006169a6e274f492b9e2ecb9ccb5b7041ad67c177d2
7
+ data.tar.gz: b33a4a45fb7d80e597c05755247f6ed3a974c90191fabdba8efdf9ae180d53866204b8dc9be832ec62bbdd39a303a083e766405a517b2163c48afcd25642d1ba
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.1.0
1
+ 2.1.2
data/.travis.yml CHANGED
@@ -11,7 +11,7 @@ notifications:
11
11
  rvm:
12
12
  - 1.9.3
13
13
  - 2.0.0
14
- - 2.1.0
14
+ - 2.1.2
15
15
  - jruby-19mode
16
16
  matrix:
17
17
  allow_failures:
data/Gemfile CHANGED
@@ -2,6 +2,9 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'spree', github: 'spree/spree', branch: '2-1-stable'
4
4
 
5
+ # Sprockets 2.12 is behaving strangely
6
+ gem 'sprockets', '~> 2.11.0'
7
+
5
8
  platforms :jruby do
6
9
  gem 'activerecord-jdbcsqlite3-adapter'
7
10
  gem 'activerecord-jdbcpostgresql-adapter'
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  SpreeCpf
2
2
  ========
3
3
 
4
- [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/tiagoamaro/spree_cpf/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
5
4
  [![Build Status](https://travis-ci.org/tiagoamaro/spree_cpf.png?branch=2-1-stable)](https://travis-ci.org/tiagoamaro/spree_cpf)
6
5
  [![Coverage Status](https://coveralls.io/repos/tiagoamaro/spree_cpf/badge.png?branch=2-1-stable)](https://coveralls.io/r/tiagoamaro/spree_cpf?branch=2-1-stable)
7
6
  [![Dependency Status](https://gemnasium.com/tiagoamaro/spree_cpf.png)](https://gemnasium.com/tiagoamaro/spree_cpf)
@@ -50,4 +49,4 @@ Simply add this require statement to your spec_helper:
50
49
  require 'spree_cpf/factories'
51
50
  ```
52
51
 
53
- Copyright (c) 2013 Tiago Amaro, released under the MIT License
52
+ Copyright (c) 2014 Tiago Amaro, released under the MIT License
@@ -1,5 +1,10 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
1
  en:
5
- hello: "Hello world"
2
+ activerecord:
3
+ errors:
4
+ models:
5
+ spree/order:
6
+ attributes:
7
+ ship_address:
8
+ cpf_invalid: CPF is invalid
9
+ bill_address:
10
+ cpf_invalid: CPF is invalid
@@ -15,6 +15,21 @@ describe "Checkout" do
15
15
  stock_location.stock_items.update_all(count_on_hand: 1)
16
16
  end
17
17
 
18
+ describe 'errors messages', js: true do
19
+ before(:each) do
20
+ Spree::Config[:ship_address_has_cpf] = true
21
+ end
22
+
23
+ it 'has a valid error message regarding CPF field' do
24
+ add_mug_and_checkout
25
+ fill_in_address type: 'bill', cpf: 'invalid cpf', fill_cpf: true
26
+ click_button "Save and Continue"
27
+
28
+ page.should have_content 'Bill address CPF is invalid'
29
+ page.should have_content 'Ship address CPF is invalid'
30
+ end
31
+ end
32
+
18
33
  context "full checkout", js: true do
19
34
  before do
20
35
  shipping_method.calculator.preferred_amount = 10
@@ -62,6 +77,7 @@ describe "Checkout" do
62
77
  end
63
78
 
64
79
  def fill_in_address(opts = {})
80
+ cpf = opts[:cpf] || "036.142.049-87"
65
81
  type = opts[:type] || 'bill'
66
82
  fill_cpf ||= opts[:fill_cpf]
67
83
 
@@ -70,7 +86,7 @@ describe "Checkout" do
70
86
  fill_in "#{address}_lastname", :with => "Bigg"
71
87
  fill_in "#{address}_address1", :with => "143 Swan Street"
72
88
  fill_in "#{address}_city", :with => "Richmond"
73
- fill_in "#{address}_cpf", :with => "036.142.049-87" if fill_cpf
89
+ fill_in "#{address}_cpf", :with => cpf if fill_cpf
74
90
  select "United States of America", :from => "#{address}_country_id"
75
91
  select "Alabama", :from => "#{address}_state_id"
76
92
  fill_in "#{address}_zipcode", :with => "12345"
data/spree_cpf.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_cpf'
5
- s.version = '2.1.3'
5
+ s.version = '2.1.7'
6
6
  s.summary = 'Spree extension that adds CPF to address field'
7
7
  s.description = 'Spree extension that adds CPF to address field'
8
8
  s.required_ruby_version = '>= 1.9.3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_cpf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Amaro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-07 00:00:00.000000000 Z
11
+ date: 2014-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
238
  requirements:
239
239
  - none
240
240
  rubyforge_project:
241
- rubygems_version: 2.2.0
241
+ rubygems_version: 2.2.2
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: Spree extension that adds CPF to address field