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: 8213fae471e8288934e33eb3998d8e963415a15c
4
- data.tar.gz: 3858cd7e5803f75875e33dbfbe44372ef8d10336
3
+ metadata.gz: 54dba26b1759af63edd3a82665dbba5f6a154c8a
4
+ data.tar.gz: cc12a505cdb054facb422692749ee16d54faed9b
5
5
  SHA512:
6
- metadata.gz: a92d9872083c5354cca02e3aee0045bc09dcb669d8fe172693d7c882233f86a0e20bca455a8578d4e51c062304d33636afaf67945b6ba047d409563ab3a2f712
7
- data.tar.gz: 35b588b28ae53121b89fd326c840d2439dccd6f545d5bd382ab21b3c206e1481e3420b9a720165dfea8214b3fc863289b253dcaf66077eb18b350ea82bab37f7
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
 
@@ -1,3 +1,6 @@
1
+ ##
2
+ # As Priced 是被定价物品的领域逻辑关注点。
3
+
1
4
  module Unidom::Price::Concerns::AsPriced
2
5
 
3
6
  extend ActiveSupport::Concern
@@ -1,3 +1,6 @@
1
+ ##
2
+ # As Pricer 是定价者的领域逻辑关注点。
3
+
1
4
  module Unidom::Price::Concerns::AsPricer
2
5
 
3
6
  extend ActiveSupport::Concern
@@ -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?
@@ -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
- isolate_namespace ::Unidom::Price
6
+ include Unidom::Common::EngineExtension
9
7
 
10
- initializer :load_config_initializers do |app|
11
- Unidom::Common::YamlHelper.load_enum config: app.config, root: config.root
12
- end
8
+ isolate_namespace ::Unidom::Price
13
9
 
14
- initializer :append_migrations do |app|
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
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Price
3
- VERSION = '1.6'.freeze
3
+ VERSION = '1.6.1'.freeze
4
4
  end
5
5
  end
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: '1.6'
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-05 00:00:00.000000000 Z
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.7.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.7.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: