unidom-price 1.6 → 1.6.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54dba26b1759af63edd3a82665dbba5f6a154c8a
|
4
|
+
data.tar.gz: cc12a505cdb054facb422692749ee16d54faed9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e74b523d59f2a857d386b946ff17a5d5a922c9c916c33dcf78817827c382caa9613a063d28d7021bec9e5486ed2b4ebead54686f1517676be7c9e976df80b2b0
|
7
|
+
data.tar.gz: c9fd27bc48fc43666a9904f3078709d3bebc2caad98e1fdc390a44fee2ad3e0bc5f65f6d5485a1c6ed258786228a874c17fa215ff7280012c83fafca87d9f331
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Unidom Price 价格领域模型引擎
|
2
2
|
|
3
|
+
[![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/unidom-price/frames)
|
3
4
|
[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
|
5
|
+
|
4
6
|
[![Gem Version](https://badge.fury.io/rb/unidom-price.svg)](https://badge.fury.io/rb/unidom-price)
|
5
7
|
[![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-price.svg)](https://gemnasium.com/github.com/topbitdu/unidom-price)
|
6
8
|
|
@@ -20,6 +20,8 @@ class Unidom::Price::Price < Unidom::Price::ApplicationRecord
|
|
20
20
|
code :calculation, Unidom::Price::Calculation
|
21
21
|
code :charging, Unidom::Price::Charging
|
22
22
|
|
23
|
+
##
|
24
|
+
# 将物品 priced 定价为 amount , 定价者是 pricer。
|
23
25
|
def self.price!(priced, amount: 0, pricer: nil, calculation_code: 'AMNT', pricing_code: 'BASE', charging_code: 'ONCE', opened_at: Time.now)
|
24
26
|
price = priced_is(priced).calculation_coded_as(calculation_code).pricing_coded_as(pricing_code).charging_coded_as(charging_code).valid_at.alive.first
|
25
27
|
if price.present?
|
data/lib/unidom/price/engine.rb
CHANGED
@@ -1,19 +1,13 @@
|
|
1
|
-
require 'unidom/common/yaml_helper'
|
2
|
-
|
3
1
|
module Unidom
|
4
2
|
module Price
|
5
3
|
|
6
4
|
class Engine < ::Rails::Engine
|
7
5
|
|
8
|
-
|
6
|
+
include Unidom::Common::EngineExtension
|
9
7
|
|
10
|
-
|
11
|
-
Unidom::Common::YamlHelper.load_enum config: app.config, root: config.root
|
12
|
-
end
|
8
|
+
isolate_namespace ::Unidom::Price
|
13
9
|
|
14
|
-
|
15
|
-
config.paths['db/migrate'].expanded.each { |expanded_path| app.config.paths['db/migrate'] << expanded_path } unless app.root.to_s.match root.to_s
|
16
|
-
end
|
10
|
+
enable_initializer enum_enabled: true, migration_enabled: true
|
17
11
|
|
18
12
|
end
|
19
13
|
|
data/lib/unidom/price/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-price
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.6.1
|
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-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: '1.8'
|
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.8'
|
27
27
|
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
28
28
|
The Price domain model engine includes Pricing and its relative models. Unidom (统一领域对象模型)是一系列的领域模型引擎。价格领域模型引擎包括定价及其相关的模型。
|
29
29
|
email:
|