jan 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
- data/.travis.yml +3 -0
- data/lib/jan/code.rb +11 -0
- data/lib/jan/version.rb +1 -1
- data/spec/jan/code_spec.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb219c80ec39b892cb26016a2745e10140963a9c6dc9ee21c91c63264f5a4417
|
4
|
+
data.tar.gz: 342b4538022acef94a4f3f5520c683f2471eb9c8439113f46f601618666a6907
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b310cd1048cd3cfa70a55f479b3c13367f507691f93722e94cd2ecfb06821e027939fd142c497b98ea8c3dcb9180100a1c798ab8240ce67d0f0c6237a3647f6
|
7
|
+
data.tar.gz: eed13eb7f19cde0483510825f6a792c0d7edabbb81d8bb30f46ccc1fa62299230964bc3b641bb38b2ae6318aa16643b74a29c9e2f9e2bff6d6e83a737a5ff4c3
|
data/.travis.yml
CHANGED
data/lib/jan/code.rb
CHANGED
@@ -18,8 +18,19 @@ module Jan
|
|
18
18
|
end
|
19
19
|
|
20
20
|
# @return [boolean]
|
21
|
+
# @deprecated Use `instore_marking?` instead.
|
21
22
|
def instore_code?
|
23
|
+
instore_marking?
|
24
|
+
end
|
25
|
+
|
26
|
+
# @return [boolean]
|
27
|
+
def instore_marking?
|
22
28
|
@body.start_with?('2')
|
23
29
|
end
|
30
|
+
|
31
|
+
# @return [boolean]
|
32
|
+
def source_marking?
|
33
|
+
!instore_marking?
|
34
|
+
end
|
24
35
|
end
|
25
36
|
end
|
data/lib/jan/version.rb
CHANGED
data/spec/jan/code_spec.rb
CHANGED
@@ -45,4 +45,24 @@ describe Jan::Code do
|
|
45
45
|
it('is false'){ expect(described_class.new('4901277241126')).not_to be_instore_code }
|
46
46
|
end
|
47
47
|
end
|
48
|
+
|
49
|
+
describe '#instore_marking?' do
|
50
|
+
context 'instore marking' do
|
51
|
+
it('is true'){ expect(described_class.new('2101085089347')).to be_instore_marking }
|
52
|
+
end
|
53
|
+
|
54
|
+
context 'source marking' do
|
55
|
+
it('is false'){ expect(described_class.new('4901277241126')).not_to be_instore_marking }
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe '#source_marking?' do
|
60
|
+
context 'instore marking' do
|
61
|
+
it('is true'){ expect(described_class.new('4901277241126')).to be_source_marking }
|
62
|
+
end
|
63
|
+
|
64
|
+
context 'source marking' do
|
65
|
+
it('is false'){ expect(described_class.new('2101085089347')).not_to be_source_marking }
|
66
|
+
end
|
67
|
+
end
|
48
68
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jan
|
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
|
- OSA Shunsuke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|