opendelivery 0.0.23 → 0.0.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/opendelivery/domain.rb +13 -0
  2. metadata +2 -2
@@ -58,5 +58,18 @@ module OpenDelivery
58
58
  item.attributes.set(key => [value])
59
59
  end
60
60
  end
61
+
62
+ def load_domain(domain, json_file)
63
+ json = File.read(json_file)
64
+ obj = JSON.parse(json)
65
+
66
+ obj.each do |item, attributes|
67
+ attributes.each do |key,value|
68
+ AWS::SimpleDB.consistent_reads do
69
+ @sdb.domains[domain].items[item].attributes.set(key => [value])
70
+ end
71
+ end
72
+ end
73
+ end
61
74
  end
62
75
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opendelivery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23
4
+ version: 0.0.24
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-10-22 00:00:00.000000000 Z
14
+ date: 2013-10-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec