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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b55db866341d1d1e57aea0a7de67a02f276be1390d825a5807038031a2c306e3
4
- data.tar.gz: 545ee260f625ceda5ba1f9cb2c143affaab7ea7c87b81f7da040920085b41b8a
3
+ metadata.gz: fb219c80ec39b892cb26016a2745e10140963a9c6dc9ee21c91c63264f5a4417
4
+ data.tar.gz: 342b4538022acef94a4f3f5520c683f2471eb9c8439113f46f601618666a6907
5
5
  SHA512:
6
- metadata.gz: af8c1e536e522fa7b59d01c5177dd80b725f4e12dd4a9aa033a794d8d65cdc19c6e1a96a4e1d6d2d1cc0c653a7597189e947e1f3554ceb273bed7b028bfac967
7
- data.tar.gz: 3decd703b98afe0855a13e5911484ba5ddb2e8b28c3be13b2993236bf2a248d83bd82a734c133d3c4e6e0bea14ba57969e0f22c48ebf8df4b971cbef8a34c518
6
+ metadata.gz: 4b310cd1048cd3cfa70a55f479b3c13367f507691f93722e94cd2ecfb06821e027939fd142c497b98ea8c3dcb9180100a1c798ab8240ce67d0f0c6237a3647f6
7
+ data.tar.gz: eed13eb7f19cde0483510825f6a792c0d7edabbb81d8bb30f46ccc1fa62299230964bc3b641bb38b2ae6318aa16643b74a29c9e2f9e2bff6d6e83a737a5ff4c3
data/.travis.yml CHANGED
@@ -2,3 +2,6 @@ language: ruby
2
2
  rvm:
3
3
  - 2.6.1
4
4
  - 2.5.3
5
+ before_install:
6
+ - gem update --system
7
+ - gem install bundler
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
@@ -1,3 +1,3 @@
1
1
  module Jan
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -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.0
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-03-01 00:00:00.000000000 Z
11
+ date: 2019-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler