unidom-order 1.3 → 1.3.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: 2a122ad78313c41f4eb11d252867052ca9e2162f
4
- data.tar.gz: 7084f6f7a1330793c369198f84d802e60f1174b2
3
+ metadata.gz: 8baef7094fe20940c1951436a5189df9e9a7d5d0
4
+ data.tar.gz: 8215033322516cbf301a82b5ed31693d2ca7cdc0
5
5
  SHA512:
6
- metadata.gz: c769c8a144ee715e1c5002be583d90f879601b8180655118dd8bab71b51ffe5ef18819b638ee2e8318b9b9f51d106605dc4b7cf3319895c405bd42eb3c0fbe41
7
- data.tar.gz: 9aae203adde1f5e273323251a667aff492f0f900f91f86d3499a439c38f804112ef46be78814b2b381b5d164b680afb2d1adacd4caf04e658ac6a67fb6a0270b
6
+ metadata.gz: 90abede70d38bf54a527b4169c7bcc9751a8908e95f7def10f58114f1bf961ae1846f8339cd0bc375c43e62632f9648b576850bbc11830d36f0370908e37ef0a
7
+ data.tar.gz: 2979a025042e971de8755f5bc131174109d5d4eb96127a2439994a648339317daef40194fab000236961b68eea43a8014ad8a959c221165fefd5a1db626a193a
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
4
4
  [![Gem Version](https://badge.fury.io/rb/unidom-order.svg)](https://badge.fury.io/rb/unidom-order)
5
+ [![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-order.svg)](https://gemnasium.com/github.com/topbitdu/unidom-order)
5
6
 
6
7
  Unidom (UNIfied Domain Object Model) is a series of domain model engines. The Order domain model engine includes Order, Order Item, and Order Adjustment models.
7
8
  Unidom (统一领域对象模型)是一系列的领域模型引擎。订单领域模型引擎包括订单、订单项和订单调整的模型。
@@ -110,15 +111,18 @@ include Unidom::Order::AsOrderTaker
110
111
  ```
111
112
 
112
113
  ### As Adjusted concern
114
+
113
115
  The As Adjusted concern do the following tasks for the includer automatically:
114
- 1. Define the has_many :adjustments macro as: ``has_many :adjustments, class_name: 'Unidom::Order::OrderAdjustment', as: :adjusted``
115
- 2. Define the #is_adjusted! method as: ``is_adjusted!(amount, due_to: 'FRGT', at: Time.now)``
116
+ 1. Define the has_many :adjustments macro as: ``has_many :adjustments, class_name: 'Unidom::Order::OrderAdjustment', as: :adjusted``
117
+ 2. Define the #is_adjusted! method as: ``is_adjusted!(amount, due_to: 'FRGT', at: Time.now)``
116
118
  3. Define the #is_adjusted? method as: ``is_adjusted?(due_to: 'FRGT', at: Time.now)``
117
119
 
118
120
  ### As Order Placer concern
121
+
119
122
  The As Order Placer concern do the following tasks for the includer automatically:
120
123
  1. Define the has_many :placed_orders macro as: ``has_many :placed_orders, class_name: 'Unidom::Order::Order', as: :placer``
121
124
 
122
125
  ### As Order Taker concern
126
+
123
127
  The As Order Taker concern do the following tasks for the includer automatically:
124
128
  1. Define the has_many :taken_orders macro as: ``has_many :taken_orders, class_name: 'Unidom::Order::Order', as: :taker``
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
10
10
  rdoc.rdoc_dir = 'rdoc'
11
11
  rdoc.title = 'Unidom Order'
12
12
  rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.rdoc')
13
+ rdoc.rdoc_files.include('README.md')
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
15
15
  end
16
16
 
@@ -20,5 +20,5 @@ load 'rails/tasks/statistics.rake'
20
20
 
21
21
 
22
22
 
23
- Bundler::GemHelper.install_tasks
23
+ require 'bundler/gem_tasks'
24
24
 
@@ -0,0 +1,2 @@
1
+ //= link_directory ../javascripts/unidom/order .js
2
+ //= link_directory ../stylesheets/unidom/order .css
@@ -5,7 +5,7 @@
5
5
  // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
6
  //
7
7
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
9
  //
10
10
  // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
@@ -6,9 +6,9 @@
6
6
  * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
7
  *
8
8
  * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
12
  *
13
13
  *= require_self
14
14
  */
@@ -1,2 +1,3 @@
1
1
  class Unidom::Order::ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
2
3
  end
@@ -0,0 +1,2 @@
1
+ class Unidom::Order::ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class Unidom::Order::ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class Unidom::Order::ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -1,6 +1,6 @@
1
1
  # Order 是订单。
2
2
 
3
- class Unidom::Order::Order < ActiveRecord::Base
3
+ class Unidom::Order::Order < Unidom::Order::ApplicationRecord
4
4
 
5
5
  self.table_name = 'unidom_orders'
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Order Adjustment 是订单调整项。
2
2
 
3
- class Unidom::Order::OrderAdjustment < ActiveRecord::Base
3
+ class Unidom::Order::OrderAdjustment < Unidom::Order::ApplicationRecord
4
4
 
5
5
  self.table_name = 'unidom_order_adjustments'
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Order Item 是订单项。
2
2
 
3
- class Unidom::Order::OrderItem < ActiveRecord::Base
3
+ class Unidom::Order::OrderItem < Unidom::Order::ApplicationRecord
4
4
 
5
5
  self.table_name = 'unidom_order_items'
6
6
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Order
3
- VERSION = '1.3'.freeze
3
+ VERSION = '1.3.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-order
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.3'
4
+ version: 1.3.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: 2016-09-26 00:00:00.000000000 Z
11
+ date: 2016-11-03 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.0'
19
+ version: '1.6'
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.0'
26
+ version: '1.6'
27
27
  description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
28
28
  The Order domain model engine includes Order, Order Item, and Order Adjustment models.
29
29
  Unidom (统一领域对象模型)是一系列的领域模型引擎。订单领域模型引擎包括订单、订单项和订单调整的模型。
@@ -36,10 +36,14 @@ files:
36
36
  - MIT-LICENSE
37
37
  - README.md
38
38
  - Rakefile
39
+ - app/assets/config/unidom-order_manifest.js
39
40
  - app/assets/javascripts/unidom/order/application.js
40
41
  - app/assets/stylesheets/unidom/order/application.css
41
42
  - app/controllers/unidom/order/application_controller.rb
42
43
  - app/helpers/unidom/order/application_helper.rb
44
+ - app/jobs/unidom/order/application_job.rb
45
+ - app/mailers/unidom/order/application_mailer.rb
46
+ - app/models/unidom/order/application_record.rb
43
47
  - app/models/unidom/order/concerns/as_adjusted.rb
44
48
  - app/models/unidom/order/concerns/as_order_placer.rb
45
49
  - app/models/unidom/order/concerns/as_order_taker.rb