edm 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/edm.gemspec +1 -0
- data/lib/edm/version.rb +1 -1
- data/lib/edm.rb +3 -4
- metadata +13 -2
data/Rakefile
CHANGED
data/edm.gemspec
CHANGED
data/lib/edm/version.rb
CHANGED
data/lib/edm.rb
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
require "edm/version"
|
2
2
|
|
3
3
|
module Edm
|
4
|
-
|
5
|
-
|
6
|
-
sign = generate_sign(options)
|
4
|
+
def self.batch_create_contacts(key, options = {})
|
5
|
+
sign = generate_sign(key, options)
|
7
6
|
options["sign"] = sign
|
8
7
|
result = remote_request('post', 'http://0.0.0.0:3000/api/contacts/batch_create.json', options)
|
9
8
|
end
|
10
9
|
|
11
|
-
def self.generate_sign(options = {})
|
10
|
+
def self.generate_sign(key, options = {})
|
12
11
|
if options.length > 0
|
13
12
|
options.to_a.sort.map { |c| "#{c[0]}=#{c[1]}" }.join('&')
|
14
13
|
sign = Digest::SHA1.hexdigest("#{str}#{key}")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,18 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
date: 2011-12-30 00:00:00.000000000Z
|
13
|
-
dependencies:
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: spec
|
16
|
+
requirement: &70203233039780 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70203233039780
|
14
25
|
description: demohour edm api
|
15
26
|
email:
|
16
27
|
- lijiping@demohour.com
|