dropwallet 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  *.rbc
3
+ *.svn*
3
4
  .bundle
4
5
  .config
5
6
  .yardoc
data/README.md CHANGED
@@ -19,5 +19,5 @@ Or install it yourself as:
19
19
  ## Usage
20
20
 
21
21
  ### Gem Setup
22
- Dropwallet::username = 'username'
23
- Dropwallet::password = 'password'
22
+ Dropwallet::username = 'username'
23
+ Dropwallet::password = 'password'
@@ -3,7 +3,7 @@ require 'rest_client'
3
3
  class Dropwallet::CDN::File
4
4
  ServiceUrl = 'http://localhost:2000'
5
5
 
6
- def self.upload(path)
7
- return JSON.parse(RestClient.post("#{ServiceUrl}/files",:file => File.new(path)))
6
+ def self.upload(path, container, name)
7
+ return JSON.parse(RestClient.post("#{ServiceUrl}/files",{:file => File.new(path), :container=>container, :name=> name}))
8
8
  end
9
9
  end
@@ -0,0 +1,3 @@
1
+ class Dropwallet::Core::Address < Dropwallet::Core::Model
2
+
3
+ end
@@ -0,0 +1,3 @@
1
+ class Dropwallet::Core::Cart < Dropwallet::Core::Model
2
+
3
+ end
@@ -0,0 +1,3 @@
1
+ class Dropwallet::Core::CartItem < Dropwallet::Core::Model
2
+
3
+ end
@@ -11,10 +11,13 @@ class Dropwallet::Core::Model
11
11
  @new = options[:new]
12
12
  return @attributes
13
13
  end
14
+
15
+ def isNew?
16
+ return @new
17
+ end
14
18
 
15
19
  def self.create(attributes = {}, options = {})
16
20
  model = self.new(attributes, options)
17
-
18
21
  return model
19
22
  end
20
23
 
@@ -55,8 +58,6 @@ class Dropwallet::Core::Model
55
58
  true
56
59
  end
57
60
 
58
-
59
-
60
61
  def to_s
61
62
  return @attributes.to_s
62
63
  end
@@ -66,18 +67,28 @@ class Dropwallet::Core::Model
66
67
  end
67
68
 
68
69
  #Default Restful Calls
69
- def self.find(id)
70
- item = JSON.parse(RestClient.get("#{serviceUrl}/#{id}", {:accept => :json}))
70
+ def self.find(id, options = {})
71
+ defaults = {:path => "#{serviceUrl}/#{id}}"}
72
+ defaults.merge(options)
73
+ item = JSON.parse(RestClient.get(defaults[:path], {:accept => :json}))
71
74
  if debug?
72
75
  puts item.to_s
73
76
  end
74
- return self.new(item)
77
+ if item.include? 'errorMessage'
78
+ raise item['errorMessage']
79
+ end
80
+ return self.new(item, :new=>false)
75
81
  end
76
82
 
77
- def self.all()
78
- items = JSON.parse(RestClient.get("#{serviceUrl}", {:accept => :json}))
83
+ def self.all(page = 0, options={})
84
+ defaults = {:path => "#{serviceUrl}"}
85
+ defaults.merge(options)
86
+ items = JSON.parse(RestClient.get(defaults[:path], {:accept => :json}))
87
+ if items.include? 'errorMessage'
88
+ raise items['errorMessage']
89
+ end
79
90
  if debug?
80
- puts item.to_s
91
+ puts items.to_s
81
92
  end
82
93
  objects = []
83
94
  items.each do |item|
@@ -85,4 +96,52 @@ class Dropwallet::Core::Model
85
96
  end
86
97
  return items
87
98
  end
99
+
100
+
101
+ def self.count
102
+ return 0
103
+ end
104
+
105
+ def save(options = {})
106
+ unless isNew?
107
+ return update
108
+ end
109
+ defaults = {:path => "#{serviceUrl}"}
110
+ defaults.merge(options)
111
+ item = JSON.parse(RestClient.post(defaults[:path], to_json, {:accept => :json}))
112
+ if item.include? 'errorMessage'
113
+ raise item['errorMessage']
114
+ end
115
+ @attributes = item
116
+ return self
117
+ end
118
+
119
+ def update(options = {})
120
+ if isNew?
121
+ return save
122
+ end
123
+ defaults = {:path => "#{serviceUrl}/#{id}"}
124
+ defaults.merge(options)
125
+ return JSON.parse(RestClient.put(defaults[:path], to_json, {:accept => :json}))
126
+ end
127
+
128
+ def delete(options={})
129
+ defaults = {:path => "#{serviceUrl}/#{id}"}
130
+ defaults.merge(options)
131
+ item = JSON.parse(RestClient.delete(defaults[:path], {:accept => :json}))
132
+ if item.include? 'errorMessage'
133
+ raise item['errorMessage']
134
+ end
135
+ @attributes = item
136
+ return self
137
+ end
138
+
139
+ def self.delete(itemId, options={})
140
+ defaults = {:path => "#{serviceUrl}/#{itemId}"}
141
+ defaults.merge(options)
142
+ item = JSON.parse(RestClient.delete(defaults[:path], {:accept => :json}))
143
+ if item.include? 'errorMessage'
144
+ raise item['errorMessage']
145
+ end
146
+ end
88
147
  end
@@ -0,0 +1,9 @@
1
+ class Dropwallet::Core::Order < Dropwallet::Core::Model
2
+ field :id
3
+ field :grandtotal
4
+ field :total
5
+ field :productName
6
+ field :status
7
+ field :productSku
8
+ field :qty
9
+ end
@@ -0,0 +1,3 @@
1
+ class Dropwallet::Core::PaymentMethod < Dropwallet::Core::Model
2
+
3
+ end
@@ -1,5 +1,6 @@
1
1
  module Dropwallet
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
3
+
3
4
  def self.username
4
5
  @username
5
6
  end
@@ -12,6 +13,13 @@ module Dropwallet
12
13
  def self.password=(password)
13
14
  @password = password
14
15
  end
16
+ def self.cache=(cache)
17
+ @cache = cache
18
+ end
19
+ def self.cache
20
+ return @cache
21
+ end
22
+
15
23
  module Core
16
24
  end
17
25
  module CDN
data/test/testCdnFile.rb CHANGED
@@ -4,7 +4,7 @@ require 'dropwallet'
4
4
  class TestCdnFile < Test::Unit::TestCase
5
5
  def testUpload
6
6
  assert_nothing_raised do
7
- #Dropwallet::CDN::File.upload('/Users/bcentinaro/Desktop/RealSimple_DropWalletLogo.png')
7
+ Dropwallet::CDN::File.upload('/Users/bcentinaro/Desktop/RealSimple_DropWalletLogo.png' ,'Test', 'folder/secondFolder/logo.png')
8
8
  end
9
9
  end
10
10
  end
data/test/testProduct.rb CHANGED
@@ -7,10 +7,10 @@ class TestProduct < Test::Unit::TestCase
7
7
  RestClient.log = "stdout"
8
8
  Dropwallet::username = 'dropwallet'
9
9
  Dropwallet::password = 'icuetv789'
10
- product = Dropwallet::Core::Product.find(92296)
10
+ product = Dropwallet::Core::Product.find(123)
11
11
  assert_not_nil product
12
12
  end
13
- def testFind
13
+ def testAll
14
14
  RestClient.log = "stdout"
15
15
  Dropwallet::username = 'dropwallet'
16
16
  Dropwallet::password = 'icuetv789'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dropwallet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-07 00:00:00.000000000 Z
13
+ date: 2012-09-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -85,38 +85,22 @@ extensions: []
85
85
  extra_rdoc_files: []
86
86
  files:
87
87
  - .gitignore
88
- - .svn/all-wcprops
89
- - .svn/dir-prop-base
90
- - .svn/entries
91
- - .svn/text-base/.gitignore.svn-base
92
- - .svn/text-base/Gemfile.svn-base
93
- - .svn/text-base/LICENSE.svn-base
94
- - .svn/text-base/README.md.svn-base
95
- - .svn/text-base/Rakefile.svn-base
96
- - .svn/text-base/dropwallet.gemspec.svn-base
97
88
  - Gemfile
98
89
  - LICENSE
99
90
  - README.md
100
91
  - Rakefile
101
92
  - dropwallet.gemspec
102
- - lib/.svn/all-wcprops
103
- - lib/.svn/entries
104
- - lib/.svn/text-base/dropwallet.rb.svn-base
105
93
  - lib/dropwallet.rb
106
- - lib/dropwallet/.svn/all-wcprops
107
- - lib/dropwallet/.svn/entries
108
- - lib/dropwallet/.svn/text-base/model.rb.svn-base
109
- - lib/dropwallet/.svn/text-base/user.rb.svn-base
110
- - lib/dropwallet/.svn/text-base/version.rb.svn-base
111
94
  - lib/dropwallet/cdn/file.rb
95
+ - lib/dropwallet/core/address.rb
96
+ - lib/dropwallet/core/cart.rb
97
+ - lib/dropwallet/core/cartItem.rb
112
98
  - lib/dropwallet/core/model.rb
99
+ - lib/dropwallet/core/order.rb
100
+ - lib/dropwallet/core/paymentMethod.rb
113
101
  - lib/dropwallet/core/product.rb
114
102
  - lib/dropwallet/core/user.rb
115
103
  - lib/dropwallet/version.rb
116
- - test/.svn/all-wcprops
117
- - test/.svn/entries
118
- - test/.svn/text-base/testUser.rb.svn-base
119
- - test/.svn/text-base/testVersion.rb.svn-base
120
104
  - test/testCdnFile.rb
121
105
  - test/testProduct.rb
122
106
  - test/testUser.rb
@@ -146,10 +130,6 @@ signing_key:
146
130
  specification_version: 3
147
131
  summary: Dropwallet API Bindings for Ruby
148
132
  test_files:
149
- - test/.svn/all-wcprops
150
- - test/.svn/entries
151
- - test/.svn/text-base/testUser.rb.svn-base
152
- - test/.svn/text-base/testVersion.rb.svn-base
153
133
  - test/testCdnFile.rb
154
134
  - test/testProduct.rb
155
135
  - test/testUser.rb
data/.svn/all-wcprops DELETED
@@ -1,45 +0,0 @@
1
- K 26
2
- svn:wc:ra_dav:activity-url
3
- V 28
4
- /repos/dw_frontend/!svn/act/
5
- K 25
6
- svn:wc:ra_dav:version-url
7
- V 51
8
- /repos/dw_frontend/!svn/ver/371/trunk/dropwalletGem
9
- END
10
- dropwallet.gemspec
11
- K 25
12
- svn:wc:ra_dav:version-url
13
- V 70
14
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/dropwallet.gemspec
15
- END
16
- LICENSE
17
- K 25
18
- svn:wc:ra_dav:version-url
19
- V 59
20
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/LICENSE
21
- END
22
- Rakefile
23
- K 25
24
- svn:wc:ra_dav:version-url
25
- V 60
26
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/Rakefile
27
- END
28
- .gitignore
29
- K 25
30
- svn:wc:ra_dav:version-url
31
- V 62
32
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/.gitignore
33
- END
34
- Gemfile
35
- K 25
36
- svn:wc:ra_dav:version-url
37
- V 59
38
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/Gemfile
39
- END
40
- README.md
41
- K 25
42
- svn:wc:ra_dav:version-url
43
- V 61
44
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/README.md
45
- END
data/.svn/dir-prop-base DELETED
@@ -1,6 +0,0 @@
1
- K 10
2
- svn:ignore
3
- V 4
4
- pkg
5
-
6
- END
data/.svn/entries DELETED
@@ -1,238 +0,0 @@
1
- 10
2
-
3
- dir
4
- 371
5
- http://dev.icuetv.int/repos/dw_frontend/trunk/dropwalletGem
6
- http://dev.icuetv.int/repos/dw_frontend
7
-
8
-
9
-
10
- 2012-08-29T19:31:58.084937Z
11
- 371
12
- bcentinaro
13
- has-props
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
- c8b3cc07-65b3-46a0-822a-09fe5650c38a
28
-
29
- dropwallet.gemspec
30
- file
31
- 370
32
-
33
-
34
-
35
- 2012-08-29T14:21:45.000000Z
36
- 504d29644edeb5f6a801fa6cb8ddd85f
37
- 2012-08-29T19:02:08.854313Z
38
- 370
39
- bcentinaro
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
- 804
62
-
63
- test
64
- dir
65
-
66
- LICENSE
67
- file
68
- 370
69
-
70
-
71
-
72
- 2012-08-29T14:16:57.000000Z
73
- 3d648da16fb1ecf3838d080f4b612bd1
74
- 2012-08-29T19:02:08.854313Z
75
- 370
76
- bcentinaro
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
- 1060
99
-
100
- Rakefile
101
- file
102
- 370
103
-
104
-
105
-
106
- 2012-08-29T14:23:02.000000Z
107
- 0774ef8fabbe11937005793500ad15db
108
- 2012-08-29T19:02:08.854313Z
109
- 370
110
- bcentinaro
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
- 162
133
-
134
- .gitignore
135
- file
136
- 370
137
-
138
-
139
-
140
- 2012-08-29T14:16:57.000000Z
141
- 11f69a156e3c69025b9fc4efea25f31c
142
- 2012-08-29T19:02:08.854313Z
143
- 370
144
- bcentinaro
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
- 154
167
-
168
- lib
169
- dir
170
-
171
- Gemfile
172
- file
173
- 370
174
-
175
-
176
-
177
- 2012-08-29T14:16:57.000000Z
178
- d9a52a4287726896b02522bad68fd728
179
- 2012-08-29T19:02:08.854313Z
180
- 370
181
- bcentinaro
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
- 95
204
-
205
- README.md
206
- file
207
- 370
208
-
209
-
210
-
211
- 2012-08-29T19:00:27.000000Z
212
- 3803b466453dd2308cb6b14eac0d984a
213
- 2012-08-29T19:02:08.854313Z
214
- 370
215
- bcentinaro
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
- 253
238
-
@@ -1,17 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in dropwallet.gemspec
4
- gemspec
@@ -1,22 +0,0 @@
1
- Copyright (c) 2012 Bill
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,19 +0,0 @@
1
- # Dropwallet
2
-
3
- Project Gateway: The DropWallet API Bindings for Ruby
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'dropwallet'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install dropwallet
18
-
19
- ## Usage
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
3
- require 'rake/testtask'
4
-
5
- Rake::TestTask.new do |t|
6
- t.libs << 'test'
7
- end
8
-
9
- desc "Run tests"
10
- task :default => :test
@@ -1,23 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/dropwallet/version', __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.authors = ["Bill"]
6
- gem.email = ["bill@theresnobox.net"]
7
- gem.description = %q{Dropwallet API Bindings for Ruby}
8
- gem.summary = %q{Dropwallet API Bindings for Ruby}
9
- gem.homepage = "http://www.dropwallet.net"
10
-
11
- gem.files = `git ls-files`.split($\)
12
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
- gem.name = "dropwallet"
15
- gem.require_paths = ["lib"]
16
- gem.version = Dropwallet::VERSION
17
-
18
- #Dependencies
19
- gem.add_development_dependency "rspec"
20
-
21
- gem.add_dependency('rest-client')
22
- gem.add_dependency('activemodel')
23
- end
data/lib/.svn/all-wcprops DELETED
@@ -1,11 +0,0 @@
1
- K 25
2
- svn:wc:ra_dav:version-url
3
- V 55
4
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/lib
5
- END
6
- dropwallet.rb
7
- K 25
8
- svn:wc:ra_dav:version-url
9
- V 69
10
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/lib/dropwallet.rb
11
- END
data/lib/.svn/entries DELETED
@@ -1,65 +0,0 @@
1
- 10
2
-
3
- dir
4
- 370
5
- http://dev.icuetv.int/repos/dw_frontend/trunk/dropwalletGem/lib
6
- http://dev.icuetv.int/repos/dw_frontend
7
-
8
-
9
-
10
- 2012-08-29T19:02:08.854313Z
11
- 370
12
- bcentinaro
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
- c8b3cc07-65b3-46a0-822a-09fe5650c38a
28
-
29
- dropwallet.rb
30
- file
31
-
32
-
33
-
34
-
35
- 2012-08-29T14:25:13.000000Z
36
- 83032d0c1a6e4a9f754ec9d027d84c54
37
- 2012-08-29T19:02:08.854313Z
38
- 370
39
- bcentinaro
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
- 82
62
-
63
- dropwallet
64
- dir
65
-
@@ -1,4 +0,0 @@
1
- require "dropwallet/version"
2
- require "dropwallet/model"
3
-
4
- require "dropwallet/user"
@@ -1,23 +0,0 @@
1
- K 25
2
- svn:wc:ra_dav:version-url
3
- V 66
4
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/lib/dropwallet
5
- END
6
- user.rb
7
- K 25
8
- svn:wc:ra_dav:version-url
9
- V 74
10
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/lib/dropwallet/user.rb
11
- END
12
- model.rb
13
- K 25
14
- svn:wc:ra_dav:version-url
15
- V 75
16
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/lib/dropwallet/model.rb
17
- END
18
- version.rb
19
- K 25
20
- svn:wc:ra_dav:version-url
21
- V 77
22
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/lib/dropwallet/version.rb
23
- END
@@ -1,130 +0,0 @@
1
- 10
2
-
3
- dir
4
- 370
5
- http://dev.icuetv.int/repos/dw_frontend/trunk/dropwalletGem/lib/dropwallet
6
- http://dev.icuetv.int/repos/dw_frontend
7
-
8
-
9
-
10
- 2012-08-29T19:02:08.854313Z
11
- 370
12
- bcentinaro
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
- c8b3cc07-65b3-46a0-822a-09fe5650c38a
28
-
29
- user.rb
30
- file
31
-
32
-
33
-
34
-
35
- 2012-08-29T17:38:35.000000Z
36
- 9b32a838305ec2ee3b23eb0ba5818147
37
- 2012-08-29T19:02:08.854313Z
38
- 370
39
- bcentinaro
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
- 122
62
-
63
- model.rb
64
- file
65
-
66
-
67
-
68
-
69
- 2012-08-29T17:46:48.000000Z
70
- f8ee5f704a0419407e4279767aa77a0d
71
- 2012-08-29T19:02:08.854313Z
72
- 370
73
- bcentinaro
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- 830
96
-
97
- version.rb
98
- file
99
-
100
-
101
-
102
-
103
- 2012-08-29T14:16:57.000000Z
104
- aad2bce7638b90af74319bb4415a0bfa
105
- 2012-08-29T19:02:08.854313Z
106
- 370
107
- bcentinaro
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
- 42
130
-
@@ -1,40 +0,0 @@
1
- require 'active_model'
2
- module DropWallet
3
- class Model
4
- include ActiveModel::Serialization
5
- include ActiveModel::Validations
6
-
7
- #attr_accessor :attributes
8
- def initialize(attributes = {})
9
- @attributes = attributes
10
- return @attributes
11
- end
12
-
13
- def self.create(attributes = {}, options = {})
14
- model = self.new(attributes)
15
- return model
16
- end
17
-
18
- def self.field(name, options = {})
19
-
20
- define_method("#{name}=") do |value|
21
- write_attribute(name, value)
22
- end
23
- define_method(name) do
24
- read_attribute(name)
25
- end
26
- end
27
-
28
- def read_attribute_for_validation(key)
29
- return read_attribute(key)
30
- end
31
-
32
- def read_attribute(key)
33
- @attributes[key]
34
- end
35
-
36
- def write_attribute(key, value)
37
- @attributes[key] = value
38
- end
39
- end
40
- end
@@ -1,5 +0,0 @@
1
- class Dropwallet::User < DropWallet::Model
2
- validates_presence_of :email, :password
3
- field :email
4
- field :password
5
- end
@@ -1,3 +0,0 @@
1
- module Dropwallet
2
- VERSION = "0.0.1"
3
- end
@@ -1,17 +0,0 @@
1
- K 25
2
- svn:wc:ra_dav:version-url
3
- V 56
4
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/test
5
- END
6
- testUser.rb
7
- K 25
8
- svn:wc:ra_dav:version-url
9
- V 68
10
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/test/testUser.rb
11
- END
12
- testVersion.rb
13
- K 25
14
- svn:wc:ra_dav:version-url
15
- V 71
16
- /repos/dw_frontend/!svn/ver/370/trunk/dropwalletGem/test/testVersion.rb
17
- END
data/test/.svn/entries DELETED
@@ -1,96 +0,0 @@
1
- 10
2
-
3
- dir
4
- 370
5
- http://dev.icuetv.int/repos/dw_frontend/trunk/dropwalletGem/test
6
- http://dev.icuetv.int/repos/dw_frontend
7
-
8
-
9
-
10
- 2012-08-29T19:02:08.854313Z
11
- 370
12
- bcentinaro
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
- c8b3cc07-65b3-46a0-822a-09fe5650c38a
28
-
29
- testUser.rb
30
- file
31
-
32
-
33
-
34
-
35
- 2012-08-29T17:45:41.000000Z
36
- 7bd9dbf67b14ee5200a896416f719242
37
- 2012-08-29T19:02:08.854313Z
38
- 370
39
- bcentinaro
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
- 399
62
-
63
- testVersion.rb
64
- file
65
-
66
-
67
-
68
-
69
- 2012-08-29T14:25:42.000000Z
70
- d703fdd08b8fb253556881272bf3ec23
71
- 2012-08-29T19:02:08.854313Z
72
- 370
73
- bcentinaro
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- 87
96
-
@@ -1,14 +0,0 @@
1
- require 'test/unit'
2
- require 'dropwallet'
3
-
4
- class TestUser < Test::Unit::TestCase
5
- def test_create
6
- user = {:email=>'test@test.com', :password=>'password'}
7
- dwUser = Dropwallet::User.create(user)
8
- assert_equal user[:email], dwUser.email
9
- assert_equal user[:password], dwUser.password
10
- assert_equal dwUser.valid?, true
11
-
12
- assert_equal Dropwallet::User.create().valid?, false
13
- end
14
- end
@@ -1,6 +0,0 @@
1
- require 'test/unit'
2
- require 'dropwallet'
3
-
4
- class TestVersion < Test::Unit::TestCase
5
-
6
- end