origin 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,16 @@
6
6
 
7
7
  ### Resolved Issues
8
8
 
9
+ ## 1.0.11
10
+
11
+ ### Resolved Issues
12
+
13
+ * \#58 Retain milliseconds precision when evolving times. (Steve Valaitis)
14
+
15
+ * \#56 Selector values are no longer modified in place.
16
+
17
+ * \#55 Allow #only and #without to take array arguments. (Egor Lynko)
18
+
9
19
  ## 1.0.10
10
20
 
11
21
  ### Resolved Issues
@@ -14,10 +14,11 @@ module Origin
14
14
  #
15
15
  # @since 1.0.0
16
16
  def __evolve_time__
17
+ usec = strftime("%6N").to_f
17
18
  if utc?
18
- ::Time.utc(year, month, day, hour, min, sec)
19
+ ::Time.utc(year, month, day, hour, min, sec, usec)
19
20
  else
20
- ::Time.local(year, month, day, hour, min, sec).utc
21
+ ::Time.local(year, month, day, hour, min, sec, usec).utc
21
22
  end
22
23
  end
23
24
 
@@ -124,6 +124,7 @@ module Origin
124
124
  #
125
125
  # @since 1.0.0
126
126
  def only(*args)
127
+ args = args.flatten
127
128
  option(*args) do |options|
128
129
  options.store(
129
130
  :fields, args.inject({}){ |sub, field| sub.tap { sub[field] = 1 }}
@@ -232,6 +233,7 @@ module Origin
232
233
  #
233
234
  # @since 1.0.0
234
235
  def without(*args)
236
+ args = args.flatten
235
237
  option(*args) do |options|
236
238
  options.store(
237
239
  :fields, args.inject({}){ |sub, field| sub.tap { sub[field] = 0 }}
@@ -112,7 +112,7 @@ module Origin
112
112
  #
113
113
  # @since 1.0.0
114
114
  def evolve_array(serializer, value)
115
- value.map! do |_value|
115
+ value.map do |_value|
116
116
  evolve(serializer, _value)
117
117
  end
118
118
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Origin
3
- VERSION = "1.0.10"
3
+ VERSION = "1.0.11"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-31 00:00:00.000000000 Z
12
+ date: 2012-11-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -145,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  segments:
147
147
  - 0
148
- hash: 2691554022904402478
148
+ hash: 3828253959999818789
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements: