coerce 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +15 -0
  2. data/Rakefile +2 -0
  3. data/coerce.gemspec +2 -1
  4. data/lib/coerce.rb +17 -1
  5. metadata +7 -10
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OGJkZWI0MjY5YTg0ODcyYWIxMWRmMTU5MTlkMmY2ZDcyODIyN2NkOQ==
5
+ data.tar.gz: !binary |-
6
+ ZDVkYWUwOWVjNzBlOWE4MTU1YTdmOTVkMmQ3NWNlMTU2NTY1MzQ2MQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MjAxM2QxOWExNWJjZjUwNzZmOTcyMjM1ZDc4MmJlZTgwYmM3Mjg0YTYyYjc3
10
+ MzMyMTEzNTJkYTM3MDBlNGNhMWI5MWExODU2M2YyOWZiODc2YmNlMzJkZWIw
11
+ ODJiZGUwMzk0NTE4MmIzNjg0MTlhYjg3MWFlYWE4MGE0NTZiZTU=
12
+ data.tar.gz: !binary |-
13
+ YmMwMzgxZmMwMzg3ZDM4ZDEzYzQwZmI0ZGEyNTJkMmY3MjcyMDQzYzcyODgz
14
+ NTA3ZjVjNDIwODllYjlmMzA3NzgzYTY5NWZhYzk2NjY1ZmY2MTExOTYwOGIy
15
+ OWMwZjQ4ZjlhMDY0ODFkM2M3MTM1MDcxYzkyZWVlMGY0ZjEwMjk=
data/Rakefile CHANGED
@@ -90,6 +90,7 @@ task :gemspec do
90
90
  test_files = test(?e, "test/#{ lib }.rb") ? "test/#{ lib }.rb" : nil
91
91
  summary = object.respond_to?(:summary) ? object.summary : "summary: #{ lib } kicks the ass"
92
92
  description = object.respond_to?(:description) ? object.description : "description: #{ lib } kicks the ass"
93
+ license = object.respond_to?(:license) ? object.license : "same as ruby's"
93
94
 
94
95
  if This.extensions.nil?
95
96
  This.extensions = []
@@ -127,6 +128,7 @@ task :gemspec do
127
128
  spec.platform = Gem::Platform::RUBY
128
129
  spec.summary = <%= lib.inspect %>
129
130
  spec.description = <%= description.inspect %>
131
+ spec.license = <%= license.inspect %>
130
132
 
131
133
  spec.files =\n<%= files.sort.pretty_inspect %>
132
134
  spec.executables = <%= executables.inspect %>
@@ -3,10 +3,11 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "coerce"
6
- spec.version = "0.0.4"
6
+ spec.version = "0.0.5"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "coerce"
9
9
  spec.description = "description: coerce kicks the ass"
10
+ spec.license = "same as ruby's"
10
11
 
11
12
  spec.files =
12
13
  ["README", "Rakefile", "coerce.gemspec", "lib", "lib/coerce.rb"]
@@ -9,7 +9,7 @@ module Coerce
9
9
 
10
10
  ## version
11
11
  #
12
- Coerce::Version = '0.0.4'
12
+ Coerce::Version = '0.0.5'
13
13
 
14
14
  def self.version
15
15
  Coerce::Version
@@ -148,6 +148,22 @@ module Coerce
148
148
  [*objs].flatten.join(',').split(/[\n,]/).map{|item| item.strip}.delete_if{|item| item.strip.empty?}
149
149
  end
150
150
 
151
+ coerce :array do |*objs|
152
+ [*objs].flatten.join(',').split(/[\n,]/).map{|item| item.strip}.delete_if{|item| item.strip.empty?}
153
+ end
154
+
155
+ coerce :hash do |*objs|
156
+ list = Coerce.list(*objs)
157
+ hash = Hash.new
158
+ list.each do |pair|
159
+ k, v = pair.split(/[=:]+/, 2)
160
+ key = k.to_s.strip
161
+ val = v.to_s.strip
162
+ hash[key] = val
163
+ end
164
+ hash
165
+ end
166
+
151
167
  # add list_of_xxx methods
152
168
  #
153
169
  List.dup.each do |type|
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
5
- prerelease:
4
+ version: 0.0.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ara T. Howard
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-03 00:00:00.000000000 Z
11
+ date: 2013-12-14 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: chronic
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -38,27 +35,27 @@ files:
38
35
  - coerce.gemspec
39
36
  - lib/coerce.rb
40
37
  homepage: https://github.com/ahoward/coerce
41
- licenses: []
38
+ licenses:
39
+ - same as ruby's
40
+ metadata: {}
42
41
  post_install_message:
43
42
  rdoc_options: []
44
43
  require_paths:
45
44
  - lib
46
45
  required_ruby_version: !ruby/object:Gem::Requirement
47
- none: false
48
46
  requirements:
49
47
  - - ! '>='
50
48
  - !ruby/object:Gem::Version
51
49
  version: '0'
52
50
  required_rubygems_version: !ruby/object:Gem::Requirement
53
- none: false
54
51
  requirements:
55
52
  - - ! '>='
56
53
  - !ruby/object:Gem::Version
57
54
  version: '0'
58
55
  requirements: []
59
56
  rubyforge_project: codeforpeople
60
- rubygems_version: 1.8.23
57
+ rubygems_version: 2.0.3
61
58
  signing_key:
62
- specification_version: 3
59
+ specification_version: 4
63
60
  summary: coerce
64
61
  test_files: []