unidom-article_number 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -10
- data/app/controllers/unidom/article_number/application_controller.rb +3 -0
- data/app/jobs/unidom/article_number/application_job.rb +3 -0
- data/app/mailers/unidom/article_number/application_mailer.rb +3 -0
- data/app/models/unidom/article_number/application_record.rb +3 -0
- data/app/models/unidom/article_number/ean13_barcode.rb +1 -1
- data/app/models/unidom/article_number/ean8_barcode.rb +1 -1
- data/app/models/unidom/article_number/marking.rb +1 -1
- data/app/models/unidom/article_number/vehicle_identification_number.rb +1 -1
- data/lib/unidom/article_number/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17922bcfb65355b5a241c94d1f8be0138955bae4
|
4
|
+
data.tar.gz: 4ab94d6cc2d4d7a7de60e8df99eda235f41dd6ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b50467ec96efad5cca52417a71b5122e1147910580ea33fb336b764db0448b6d3a570b5a748299a6cadbccdea2d9bf2140d7fb3a3d84d07bd113e7e582448a28
|
7
|
+
data.tar.gz: a1a5970abe0664c246c69cc5a97a763ce05d6422178303f46308dda2c4b3440dcf7ff63916502862d8f4552d55bd0ebcbfa5e185992998a60bb1731d7a9662c6
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# Unidom Article Number 物品编码领域模型引擎
|
2
2
|
|
3
|
+
[![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/unidom-article_number/frames)
|
3
4
|
[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
|
4
5
|
[![Gem Version](https://badge.fury.io/rb/unidom-article_number.svg)](https://badge.fury.io/rb/unidom-article_number)
|
5
6
|
[![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-accession.svg)](https://gemnasium.com/github.com/topbitdu/unidom-accession)
|
@@ -63,28 +64,28 @@ include Unidom::ArticleNumber::Concerns::AsEan8Marked
|
|
63
64
|
|
64
65
|
### As Barcode concern
|
65
66
|
|
66
|
-
The As Barcode concern do the following tasks for the includer automatically:
|
67
|
-
1. Define the has_many :markings macro as: ``has_many :markings, class_name: 'Unidom::ArticleNumber::Marking', as: :barcode``
|
68
|
-
2. Define the #mark! method as: ``mark!(marked, by: nil, at: Time.now)``
|
67
|
+
The As Barcode concern do the following tasks for the includer automatically:
|
68
|
+
1. Define the has_many :markings macro as: ``has_many :markings, class_name: 'Unidom::ArticleNumber::Marking', as: :barcode``
|
69
|
+
2. Define the #mark! method as: ``mark!(marked, by: nil, at: Time.now)``
|
69
70
|
3. Define the #mark? mathod as: ``mark?(marked, at: Time.now)``
|
70
71
|
|
71
72
|
### As Marked concern
|
72
73
|
|
73
|
-
The As Marked concern do the following tasks for the includer automatically:
|
74
|
-
1. Define the has_many :markings macro as: ``has_many :markings, class_name: 'Unidom::ArticleNumber::Marking', as: :marked``
|
75
|
-
2. Define the #is_marked! method as: ``is_marked!(as: nil, by: nil, at: Time.now)``
|
74
|
+
The As Marked concern do the following tasks for the includer automatically:
|
75
|
+
1. Define the has_many :markings macro as: ``has_many :markings, class_name: 'Unidom::ArticleNumber::Marking', as: :marked``
|
76
|
+
2. Define the #is_marked! method as: ``is_marked!(as: nil, by: nil, at: Time.now)``
|
76
77
|
3. Define the #is_marked? method as: ``is_marked?(as: nil, at: Time.now)``
|
77
78
|
|
78
79
|
### As EAN-13 Marked concern
|
79
80
|
|
80
|
-
The As EAN-13 Marked concern do the following tasks for the includer automatically:
|
81
|
-
1. Include the As Marked concern
|
81
|
+
The As EAN-13 Marked concern do the following tasks for the includer automatically:
|
82
|
+
1. Include the As Marked concern
|
82
83
|
2. Define the has_many :ean13_barcodes macro as: ``has_many :ean13_barcodes, through: :markings, source: :barcode, source_type: 'Unidom::ArticleNumber::Ean13Barcode'``
|
83
84
|
|
84
85
|
### As EAN-8 Marked concern
|
85
86
|
|
86
|
-
The As EAN-8 Marked concern do the following tasks for the includer automatically:
|
87
|
-
1. Include the As Marked concern
|
87
|
+
The As EAN-8 Marked concern do the following tasks for the includer automatically:
|
88
|
+
1. Include the As Marked concern
|
88
89
|
2. Define the has_many :ean8_barcodes macro as: ``has_many :ean8_barcodes, through: :markings, source: :barcode, source_type: 'Unidom::ArticleNumber::Ean8Barcode'``
|
89
90
|
|
90
91
|
|
@@ -96,3 +97,19 @@ The As EAN-8 Marked concern do the following tasks for the includer automaticall
|
|
96
97
|
```ruby
|
97
98
|
validates :vin, presence: true, 'unidom/article_number/vehicle_identification_number': true
|
98
99
|
```
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
## Disable the Model & Migration
|
104
|
+
|
105
|
+
If you only need the app components other than models, the migrations should be neglected, and the models should not be loaded.
|
106
|
+
```ruby
|
107
|
+
# config/initializers/unidom.rb
|
108
|
+
Unidom::Common.configure do |options|
|
109
|
+
|
110
|
+
options[:neglected_namespaces] = %w{
|
111
|
+
Unidom::ArticleNumber
|
112
|
+
}
|
113
|
+
|
114
|
+
end
|
115
|
+
```
|
@@ -33,4 +33,4 @@ class Unidom::ArticleNumber::Ean13Barcode < Unidom::ArticleNumber::ApplicationRe
|
|
33
33
|
self.class::RESTRICTED_DISTRIBUTION_GS1_PREFIXES.include? gs1_prefix
|
34
34
|
end
|
35
35
|
|
36
|
-
end
|
36
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::ArticleNumber::Ean13Barcode'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-article_number
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.9'
|
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: '1.
|
26
|
+
version: '1.9'
|
27
27
|
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
28
28
|
The Article Number domain model engine includes EAN-13, EAN-8, and IMEI models.
|
29
29
|
Unidom (统一领域对象模型)是一系列的领域模型引擎。物品编码领域模型引擎包括EAN-13、EAN-8和IMEI的模型。
|