dalliance 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -0
- data/config/locales/en.yml +6 -4
- data/lib/dalliance/version.rb +1 -1
- data/lib/dalliance.rb +1 -1
- data/lib/generators/dalliance/progress_meter/progress_meter_generator.rb +2 -2
- data/spec/dalliance/dalliance_spec.rb +14 -1
- data/spec/spec_helper.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db5d9527ed1b1dcfbfae86c153bb1de4f1a1c53b
|
4
|
+
data.tar.gz: f539fefa59ae983528b6a7acce1b5ed68b70b0b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 294f9ddc6c675c2c06ba4cf3d1f484916e07d10449b9bae4eae8d7509bbfcabd2144e4ad8bf1817bba5ab69b36807e8a9fa11f2761d3d0b5f631b1590de32e8a
|
7
|
+
data.tar.gz: f4173e1e059088be3ccbc70a24f603f09abe943a758903ad2c6a9d60ff12346e29495d6d511c16d199817556fb6f2e979003cbd13414f38284b5f27018f15b1c
|
data/Gemfile
CHANGED
data/config/locales/en.yml
CHANGED
@@ -8,7 +8,9 @@ en:
|
|
8
8
|
validation_error: Validation Error
|
9
9
|
processing_error: Processing Error
|
10
10
|
completed: Completed
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
attributes:
|
12
|
+
dalliance_status: Status
|
13
|
+
dalliance_error_hash: Errors
|
14
|
+
dalliance_duration: Processing Time
|
15
|
+
dalliance:
|
16
|
+
dalliance_status_in: Status
|
data/lib/dalliance/version.rb
CHANGED
data/lib/dalliance.rb
CHANGED
@@ -119,7 +119,7 @@ module Dalliance
|
|
119
119
|
|
120
120
|
module ClassMethods
|
121
121
|
def dalliance_status_in_load_select_array
|
122
|
-
state_machine(:dalliance_status).states.map {|state| [state.human_name, state.name] }
|
122
|
+
state_machine(:dalliance_status).states.sort_by(&:name).map {|state| [state.human_name, state.name.to_s] }
|
123
123
|
end
|
124
124
|
|
125
125
|
def dalliance_durations
|
@@ -1,4 +1,17 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
RSpec.describe 'Dalliance' do
|
4
|
-
|
4
|
+
subject { DallianceModel.create }
|
5
|
+
|
6
|
+
context "self#dalliance_status_in_load_select_array" do
|
7
|
+
it "should return [state, human_name]" do
|
8
|
+
expect(DallianceModel.dalliance_status_in_load_select_array).to eq([
|
9
|
+
["pending", :pending],
|
10
|
+
["processing", :processing],
|
11
|
+
["validation error", :validation_error],
|
12
|
+
["processing error", :processing_error],
|
13
|
+
["completed", :completed]
|
14
|
+
])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dalliance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Sullivan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|