piggybak 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -1
- data/Gemfile.lock +0 -2
- data/VERSION +1 -1
- data/app/models/piggybak/order.rb +0 -12
- data/app/views/rails_admin/main/_ip_address.html.erb +5 -0
- data/lib/piggybak.rb +2 -7
- data/lib/piggybak/config.rb +3 -0
- data/piggybak.gemspec +3 -6
- metadata +44 -55
- data/app/views/rails_admin/main/_whois.html.erb +0 -9
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.4
|
@@ -219,17 +219,5 @@ module Piggybak
|
|
219
219
|
|
220
220
|
v
|
221
221
|
end
|
222
|
-
|
223
|
-
def whois
|
224
|
-
@whois ||= self.find_whois
|
225
|
-
end
|
226
|
-
|
227
|
-
def find_whois
|
228
|
-
return nil if self.ip_address.nil?
|
229
|
-
|
230
|
-
w = Whois::Client.new
|
231
|
-
r = w.query(self.ip_address)
|
232
|
-
r.content
|
233
|
-
end
|
234
222
|
end
|
235
223
|
end
|
data/lib/piggybak.rb
CHANGED
@@ -6,7 +6,6 @@ require 'active_merchant'
|
|
6
6
|
require 'formatted_changes'
|
7
7
|
require 'currency'
|
8
8
|
require 'mask_submissions'
|
9
|
-
require 'whois'
|
10
9
|
|
11
10
|
module Piggybak
|
12
11
|
def self.config(entity = nil, &block)
|
@@ -74,7 +73,7 @@ module Piggybak
|
|
74
73
|
end
|
75
74
|
end
|
76
75
|
field :ip_address
|
77
|
-
field :
|
76
|
+
field :user_agent
|
78
77
|
end
|
79
78
|
list do
|
80
79
|
field :id
|
@@ -126,12 +125,8 @@ module Piggybak
|
|
126
125
|
field :email
|
127
126
|
field :phone
|
128
127
|
field :ip_address do
|
129
|
-
|
128
|
+
partial "ip_address"
|
130
129
|
end
|
131
|
-
field :whois do
|
132
|
-
partial 'whois'
|
133
|
-
help ''
|
134
|
-
end
|
135
130
|
field :user_agent do
|
136
131
|
read_only true
|
137
132
|
end
|
data/lib/piggybak/config.rb
CHANGED
@@ -10,6 +10,7 @@ module Piggybak
|
|
10
10
|
attr_accessor :order_cc
|
11
11
|
attr_accessor :logging
|
12
12
|
attr_accessor :logging_file
|
13
|
+
attr_accessor :whois_url
|
13
14
|
|
14
15
|
def reset
|
15
16
|
@email_sender = "support@piggybak.org"
|
@@ -28,6 +29,8 @@ module Piggybak
|
|
28
29
|
|
29
30
|
@logging = false
|
30
31
|
@logging_file = "/log/orders.log"
|
32
|
+
|
33
|
+
@whois_url = nil
|
31
34
|
end
|
32
35
|
end
|
33
36
|
|
data/piggybak.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "piggybak"
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Steph Skardal", "Brian Buchalter"]
|
12
|
-
s.date = "2012-09-
|
12
|
+
s.date = "2012-09-19"
|
13
13
|
s.description = "Mountable ecommerce"
|
14
14
|
s.email = "steph@endpoint.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -69,12 +69,12 @@ Gem::Specification.new do |s|
|
|
69
69
|
"app/views/piggybak/orders/no_access.text.erb",
|
70
70
|
"app/views/piggybak/orders/receipt.html.erb",
|
71
71
|
"app/views/piggybak/orders/submit.html.erb",
|
72
|
+
"app/views/rails_admin/main/_ip_address.html.erb",
|
72
73
|
"app/views/rails_admin/main/_location_select.html.haml",
|
73
74
|
"app/views/rails_admin/main/_order_details.html.erb",
|
74
75
|
"app/views/rails_admin/main/_order_notes.html.erb",
|
75
76
|
"app/views/rails_admin/main/_payment_refund.html.haml",
|
76
77
|
"app/views/rails_admin/main/_recorded_changer.html.erb",
|
77
|
-
"app/views/rails_admin/main/_whois.html.erb",
|
78
78
|
"config/routes.rb",
|
79
79
|
"db/migrate/20111227150106_create_orders.rb",
|
80
80
|
"db/migrate/20111227150322_create_addresses.rb",
|
@@ -179,7 +179,6 @@ Gem::Specification.new do |s|
|
|
179
179
|
|
180
180
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
181
181
|
s.add_runtime_dependency(%q<countries>, [">= 0"])
|
182
|
-
s.add_runtime_dependency(%q<whois>, [">= 0"])
|
183
182
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
184
183
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
185
184
|
s.add_development_dependency(%q<rspec>, [">= 0"])
|
@@ -201,7 +200,6 @@ Gem::Specification.new do |s|
|
|
201
200
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
202
201
|
else
|
203
202
|
s.add_dependency(%q<countries>, [">= 0"])
|
204
|
-
s.add_dependency(%q<whois>, [">= 0"])
|
205
203
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
206
204
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
207
205
|
s.add_dependency(%q<rspec>, [">= 0"])
|
@@ -224,7 +222,6 @@ Gem::Specification.new do |s|
|
|
224
222
|
end
|
225
223
|
else
|
226
224
|
s.add_dependency(%q<countries>, [">= 0"])
|
227
|
-
s.add_dependency(%q<whois>, [">= 0"])
|
228
225
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
229
226
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
230
227
|
s.add_dependency(%q<rspec>, [">= 0"])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: piggybak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-09-
|
13
|
+
date: 2012-09-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: countries
|
17
|
-
requirement: &
|
17
|
+
requirement: &16921860 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,21 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: whois
|
28
|
-
requirement: &14169140 !ruby/object:Gem::Requirement
|
29
|
-
none: false
|
30
|
-
requirements:
|
31
|
-
- - ! '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: *14169140
|
25
|
+
version_requirements: *16921860
|
37
26
|
- !ruby/object:Gem::Dependency
|
38
27
|
name: bundler
|
39
|
-
requirement: &
|
28
|
+
requirement: &16921140 !ruby/object:Gem::Requirement
|
40
29
|
none: false
|
41
30
|
requirements:
|
42
31
|
- - ~>
|
@@ -44,10 +33,10 @@ dependencies:
|
|
44
33
|
version: 1.0.0
|
45
34
|
type: :development
|
46
35
|
prerelease: false
|
47
|
-
version_requirements: *
|
36
|
+
version_requirements: *16921140
|
48
37
|
- !ruby/object:Gem::Dependency
|
49
38
|
name: jeweler
|
50
|
-
requirement: &
|
39
|
+
requirement: &16919920 !ruby/object:Gem::Requirement
|
51
40
|
none: false
|
52
41
|
requirements:
|
53
42
|
- - ~>
|
@@ -55,10 +44,10 @@ dependencies:
|
|
55
44
|
version: 1.6.4
|
56
45
|
type: :development
|
57
46
|
prerelease: false
|
58
|
-
version_requirements: *
|
47
|
+
version_requirements: *16919920
|
59
48
|
- !ruby/object:Gem::Dependency
|
60
49
|
name: rspec
|
61
|
-
requirement: &
|
50
|
+
requirement: &16936940 !ruby/object:Gem::Requirement
|
62
51
|
none: false
|
63
52
|
requirements:
|
64
53
|
- - ! '>='
|
@@ -66,10 +55,10 @@ dependencies:
|
|
66
55
|
version: '0'
|
67
56
|
type: :development
|
68
57
|
prerelease: false
|
69
|
-
version_requirements: *
|
58
|
+
version_requirements: *16936940
|
70
59
|
- !ruby/object:Gem::Dependency
|
71
60
|
name: rspec-rails
|
72
|
-
requirement: &
|
61
|
+
requirement: &16935280 !ruby/object:Gem::Requirement
|
73
62
|
none: false
|
74
63
|
requirements:
|
75
64
|
- - ~>
|
@@ -77,10 +66,10 @@ dependencies:
|
|
77
66
|
version: 2.7.0
|
78
67
|
type: :development
|
79
68
|
prerelease: false
|
80
|
-
version_requirements: *
|
69
|
+
version_requirements: *16935280
|
81
70
|
- !ruby/object:Gem::Dependency
|
82
71
|
name: factory_girl
|
83
|
-
requirement: &
|
72
|
+
requirement: &16931940 !ruby/object:Gem::Requirement
|
84
73
|
none: false
|
85
74
|
requirements:
|
86
75
|
- - ! '>='
|
@@ -88,10 +77,10 @@ dependencies:
|
|
88
77
|
version: '0'
|
89
78
|
type: :development
|
90
79
|
prerelease: false
|
91
|
-
version_requirements: *
|
80
|
+
version_requirements: *16931940
|
92
81
|
- !ruby/object:Gem::Dependency
|
93
82
|
name: diff-lcs
|
94
|
-
requirement: &
|
83
|
+
requirement: &16959480 !ruby/object:Gem::Requirement
|
95
84
|
none: false
|
96
85
|
requirements:
|
97
86
|
- - ! '>='
|
@@ -99,10 +88,10 @@ dependencies:
|
|
99
88
|
version: '0'
|
100
89
|
type: :development
|
101
90
|
prerelease: false
|
102
|
-
version_requirements: *
|
91
|
+
version_requirements: *16959480
|
103
92
|
- !ruby/object:Gem::Dependency
|
104
93
|
name: shoulda
|
105
|
-
requirement: &
|
94
|
+
requirement: &16957980 !ruby/object:Gem::Requirement
|
106
95
|
none: false
|
107
96
|
requirements:
|
108
97
|
- - ! '>='
|
@@ -110,10 +99,10 @@ dependencies:
|
|
110
99
|
version: '0'
|
111
100
|
type: :development
|
112
101
|
prerelease: false
|
113
|
-
version_requirements: *
|
102
|
+
version_requirements: *16957980
|
114
103
|
- !ruby/object:Gem::Dependency
|
115
104
|
name: simplecov
|
116
|
-
requirement: &
|
105
|
+
requirement: &16956480 !ruby/object:Gem::Requirement
|
117
106
|
none: false
|
118
107
|
requirements:
|
119
108
|
- - ! '>='
|
@@ -121,10 +110,10 @@ dependencies:
|
|
121
110
|
version: '0'
|
122
111
|
type: :development
|
123
112
|
prerelease: false
|
124
|
-
version_requirements: *
|
113
|
+
version_requirements: *16956480
|
125
114
|
- !ruby/object:Gem::Dependency
|
126
115
|
name: tzinfo
|
127
|
-
requirement: &
|
116
|
+
requirement: &16955480 !ruby/object:Gem::Requirement
|
128
117
|
none: false
|
129
118
|
requirements:
|
130
119
|
- - ! '>='
|
@@ -132,10 +121,10 @@ dependencies:
|
|
132
121
|
version: '0'
|
133
122
|
type: :development
|
134
123
|
prerelease: false
|
135
|
-
version_requirements: *
|
124
|
+
version_requirements: *16955480
|
136
125
|
- !ruby/object:Gem::Dependency
|
137
126
|
name: devise
|
138
|
-
requirement: &
|
127
|
+
requirement: &16954320 !ruby/object:Gem::Requirement
|
139
128
|
none: false
|
140
129
|
requirements:
|
141
130
|
- - ! '>='
|
@@ -143,10 +132,10 @@ dependencies:
|
|
143
132
|
version: '0'
|
144
133
|
type: :development
|
145
134
|
prerelease: false
|
146
|
-
version_requirements: *
|
135
|
+
version_requirements: *16954320
|
147
136
|
- !ruby/object:Gem::Dependency
|
148
137
|
name: rails_admin
|
149
|
-
requirement: &
|
138
|
+
requirement: &16971320 !ruby/object:Gem::Requirement
|
150
139
|
none: false
|
151
140
|
requirements:
|
152
141
|
- - ! '>='
|
@@ -154,10 +143,10 @@ dependencies:
|
|
154
143
|
version: '0'
|
155
144
|
type: :runtime
|
156
145
|
prerelease: false
|
157
|
-
version_requirements: *
|
146
|
+
version_requirements: *16971320
|
158
147
|
- !ruby/object:Gem::Dependency
|
159
148
|
name: devise
|
160
|
-
requirement: &
|
149
|
+
requirement: &16970180 !ruby/object:Gem::Requirement
|
161
150
|
none: false
|
162
151
|
requirements:
|
163
152
|
- - ! '>='
|
@@ -165,10 +154,10 @@ dependencies:
|
|
165
154
|
version: '0'
|
166
155
|
type: :runtime
|
167
156
|
prerelease: false
|
168
|
-
version_requirements: *
|
157
|
+
version_requirements: *16970180
|
169
158
|
- !ruby/object:Gem::Dependency
|
170
159
|
name: activemerchant
|
171
|
-
requirement: &
|
160
|
+
requirement: &16969420 !ruby/object:Gem::Requirement
|
172
161
|
none: false
|
173
162
|
requirements:
|
174
163
|
- - ! '>='
|
@@ -176,10 +165,10 @@ dependencies:
|
|
176
165
|
version: '0'
|
177
166
|
type: :runtime
|
178
167
|
prerelease: false
|
179
|
-
version_requirements: *
|
168
|
+
version_requirements: *16969420
|
180
169
|
- !ruby/object:Gem::Dependency
|
181
170
|
name: countries
|
182
|
-
requirement: &
|
171
|
+
requirement: &16968400 !ruby/object:Gem::Requirement
|
183
172
|
none: false
|
184
173
|
requirements:
|
185
174
|
- - ! '>='
|
@@ -187,10 +176,10 @@ dependencies:
|
|
187
176
|
version: '0'
|
188
177
|
type: :runtime
|
189
178
|
prerelease: false
|
190
|
-
version_requirements: *
|
179
|
+
version_requirements: *16968400
|
191
180
|
- !ruby/object:Gem::Dependency
|
192
181
|
name: rspec
|
193
|
-
requirement: &
|
182
|
+
requirement: &16965620 !ruby/object:Gem::Requirement
|
194
183
|
none: false
|
195
184
|
requirements:
|
196
185
|
- - ! '>='
|
@@ -198,10 +187,10 @@ dependencies:
|
|
198
187
|
version: '0'
|
199
188
|
type: :development
|
200
189
|
prerelease: false
|
201
|
-
version_requirements: *
|
190
|
+
version_requirements: *16965620
|
202
191
|
- !ruby/object:Gem::Dependency
|
203
192
|
name: rspec-rails
|
204
|
-
requirement: &
|
193
|
+
requirement: &16975240 !ruby/object:Gem::Requirement
|
205
194
|
none: false
|
206
195
|
requirements:
|
207
196
|
- - ! '>='
|
@@ -209,10 +198,10 @@ dependencies:
|
|
209
198
|
version: '0'
|
210
199
|
type: :development
|
211
200
|
prerelease: false
|
212
|
-
version_requirements: *
|
201
|
+
version_requirements: *16975240
|
213
202
|
- !ruby/object:Gem::Dependency
|
214
203
|
name: diff-lcs
|
215
|
-
requirement: &
|
204
|
+
requirement: &16996760 !ruby/object:Gem::Requirement
|
216
205
|
none: false
|
217
206
|
requirements:
|
218
207
|
- - ! '>='
|
@@ -220,10 +209,10 @@ dependencies:
|
|
220
209
|
version: '0'
|
221
210
|
type: :development
|
222
211
|
prerelease: false
|
223
|
-
version_requirements: *
|
212
|
+
version_requirements: *16996760
|
224
213
|
- !ruby/object:Gem::Dependency
|
225
214
|
name: factory_girl
|
226
|
-
requirement: &
|
215
|
+
requirement: &17007500 !ruby/object:Gem::Requirement
|
227
216
|
none: false
|
228
217
|
requirements:
|
229
218
|
- - ! '>='
|
@@ -231,10 +220,10 @@ dependencies:
|
|
231
220
|
version: '0'
|
232
221
|
type: :development
|
233
222
|
prerelease: false
|
234
|
-
version_requirements: *
|
223
|
+
version_requirements: *17007500
|
235
224
|
- !ruby/object:Gem::Dependency
|
236
225
|
name: shoulda
|
237
|
-
requirement: &
|
226
|
+
requirement: &17002620 !ruby/object:Gem::Requirement
|
238
227
|
none: false
|
239
228
|
requirements:
|
240
229
|
- - ! '>='
|
@@ -242,7 +231,7 @@ dependencies:
|
|
242
231
|
version: '0'
|
243
232
|
type: :development
|
244
233
|
prerelease: false
|
245
|
-
version_requirements: *
|
234
|
+
version_requirements: *17002620
|
246
235
|
description: Mountable ecommerce
|
247
236
|
email: steph@endpoint.com
|
248
237
|
executables: []
|
@@ -303,12 +292,12 @@ files:
|
|
303
292
|
- app/views/piggybak/orders/no_access.text.erb
|
304
293
|
- app/views/piggybak/orders/receipt.html.erb
|
305
294
|
- app/views/piggybak/orders/submit.html.erb
|
295
|
+
- app/views/rails_admin/main/_ip_address.html.erb
|
306
296
|
- app/views/rails_admin/main/_location_select.html.haml
|
307
297
|
- app/views/rails_admin/main/_order_details.html.erb
|
308
298
|
- app/views/rails_admin/main/_order_notes.html.erb
|
309
299
|
- app/views/rails_admin/main/_payment_refund.html.haml
|
310
300
|
- app/views/rails_admin/main/_recorded_changer.html.erb
|
311
|
-
- app/views/rails_admin/main/_whois.html.erb
|
312
301
|
- config/routes.rb
|
313
302
|
- db/migrate/20111227150106_create_orders.rb
|
314
303
|
- db/migrate/20111227150322_create_addresses.rb
|
@@ -415,7 +404,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
415
404
|
version: '0'
|
416
405
|
segments:
|
417
406
|
- 0
|
418
|
-
hash: -
|
407
|
+
hash: -228033822239556312
|
419
408
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
420
409
|
none: false
|
421
410
|
requirements:
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<script style="text/javascript">
|
2
|
-
$('#whois-toggle').live('click', function() {
|
3
|
-
$(this).siblings('#whois').toggle('slow');
|
4
|
-
return false;
|
5
|
-
});
|
6
|
-
</script>
|
7
|
-
|
8
|
-
<a href="#" id="whois-toggle">Click to show/hide</a>
|
9
|
-
<pre style="display:none" class='prettyprint' id="whois"> <%= form.object.whois.html_safe %></pre>
|