piggybak 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/Gemfile.lock +2 -0
- data/VERSION +1 -1
- data/app/models/piggybak/order.rb +12 -0
- data/app/views/rails_admin/main/_whois.html.erb +9 -0
- data/lib/piggybak.rb +7 -0
- data/piggybak.gemspec +6 -2
- metadata +55 -43
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
@@ -219,5 +219,17 @@ 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
|
222
234
|
end
|
223
235
|
end
|
@@ -0,0 +1,9 @@
|
|
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>
|
data/lib/piggybak.rb
CHANGED
@@ -6,6 +6,7 @@ require 'active_merchant'
|
|
6
6
|
require 'formatted_changes'
|
7
7
|
require 'currency'
|
8
8
|
require 'mask_submissions'
|
9
|
+
require 'whois'
|
9
10
|
|
10
11
|
module Piggybak
|
11
12
|
def self.config(entity = nil, &block)
|
@@ -72,6 +73,8 @@ module Piggybak
|
|
72
73
|
value.inject([]) { |arr, o| arr << o.details }.join("<br /><br />").html_safe
|
73
74
|
end
|
74
75
|
end
|
76
|
+
field :ip_address
|
77
|
+
field :whois
|
75
78
|
end
|
76
79
|
list do
|
77
80
|
field :id
|
@@ -125,6 +128,10 @@ module Piggybak
|
|
125
128
|
field :ip_address do
|
126
129
|
read_only true
|
127
130
|
end
|
131
|
+
field :whois do
|
132
|
+
partial 'whois'
|
133
|
+
help ''
|
134
|
+
end
|
128
135
|
field :user_agent do
|
129
136
|
read_only true
|
130
137
|
end
|
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.3"
|
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-14"
|
13
13
|
s.description = "Mountable ecommerce"
|
14
14
|
s.email = "steph@endpoint.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -74,6 +74,7 @@ Gem::Specification.new do |s|
|
|
74
74
|
"app/views/rails_admin/main/_order_notes.html.erb",
|
75
75
|
"app/views/rails_admin/main/_payment_refund.html.haml",
|
76
76
|
"app/views/rails_admin/main/_recorded_changer.html.erb",
|
77
|
+
"app/views/rails_admin/main/_whois.html.erb",
|
77
78
|
"config/routes.rb",
|
78
79
|
"db/migrate/20111227150106_create_orders.rb",
|
79
80
|
"db/migrate/20111227150322_create_addresses.rb",
|
@@ -178,6 +179,7 @@ Gem::Specification.new do |s|
|
|
178
179
|
|
179
180
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
180
181
|
s.add_runtime_dependency(%q<countries>, [">= 0"])
|
182
|
+
s.add_runtime_dependency(%q<whois>, [">= 0"])
|
181
183
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
182
184
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
183
185
|
s.add_development_dependency(%q<rspec>, [">= 0"])
|
@@ -199,6 +201,7 @@ Gem::Specification.new do |s|
|
|
199
201
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
200
202
|
else
|
201
203
|
s.add_dependency(%q<countries>, [">= 0"])
|
204
|
+
s.add_dependency(%q<whois>, [">= 0"])
|
202
205
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
203
206
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
204
207
|
s.add_dependency(%q<rspec>, [">= 0"])
|
@@ -221,6 +224,7 @@ Gem::Specification.new do |s|
|
|
221
224
|
end
|
222
225
|
else
|
223
226
|
s.add_dependency(%q<countries>, [">= 0"])
|
227
|
+
s.add_dependency(%q<whois>, [">= 0"])
|
224
228
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
225
229
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
226
230
|
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.3
|
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-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: countries
|
17
|
-
requirement: &
|
17
|
+
requirement: &14169700 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,21 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *14169700
|
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
|
26
37
|
- !ruby/object:Gem::Dependency
|
27
38
|
name: bundler
|
28
|
-
requirement: &
|
39
|
+
requirement: &14168280 !ruby/object:Gem::Requirement
|
29
40
|
none: false
|
30
41
|
requirements:
|
31
42
|
- - ~>
|
@@ -33,10 +44,10 @@ dependencies:
|
|
33
44
|
version: 1.0.0
|
34
45
|
type: :development
|
35
46
|
prerelease: false
|
36
|
-
version_requirements: *
|
47
|
+
version_requirements: *14168280
|
37
48
|
- !ruby/object:Gem::Dependency
|
38
49
|
name: jeweler
|
39
|
-
requirement: &
|
50
|
+
requirement: &14167520 !ruby/object:Gem::Requirement
|
40
51
|
none: false
|
41
52
|
requirements:
|
42
53
|
- - ~>
|
@@ -44,10 +55,10 @@ dependencies:
|
|
44
55
|
version: 1.6.4
|
45
56
|
type: :development
|
46
57
|
prerelease: false
|
47
|
-
version_requirements: *
|
58
|
+
version_requirements: *14167520
|
48
59
|
- !ruby/object:Gem::Dependency
|
49
60
|
name: rspec
|
50
|
-
requirement: &
|
61
|
+
requirement: &14166860 !ruby/object:Gem::Requirement
|
51
62
|
none: false
|
52
63
|
requirements:
|
53
64
|
- - ! '>='
|
@@ -55,10 +66,10 @@ dependencies:
|
|
55
66
|
version: '0'
|
56
67
|
type: :development
|
57
68
|
prerelease: false
|
58
|
-
version_requirements: *
|
69
|
+
version_requirements: *14166860
|
59
70
|
- !ruby/object:Gem::Dependency
|
60
71
|
name: rspec-rails
|
61
|
-
requirement: &
|
72
|
+
requirement: &14324900 !ruby/object:Gem::Requirement
|
62
73
|
none: false
|
63
74
|
requirements:
|
64
75
|
- - ~>
|
@@ -66,10 +77,10 @@ dependencies:
|
|
66
77
|
version: 2.7.0
|
67
78
|
type: :development
|
68
79
|
prerelease: false
|
69
|
-
version_requirements: *
|
80
|
+
version_requirements: *14324900
|
70
81
|
- !ruby/object:Gem::Dependency
|
71
82
|
name: factory_girl
|
72
|
-
requirement: &
|
83
|
+
requirement: &14324340 !ruby/object:Gem::Requirement
|
73
84
|
none: false
|
74
85
|
requirements:
|
75
86
|
- - ! '>='
|
@@ -77,10 +88,10 @@ dependencies:
|
|
77
88
|
version: '0'
|
78
89
|
type: :development
|
79
90
|
prerelease: false
|
80
|
-
version_requirements: *
|
91
|
+
version_requirements: *14324340
|
81
92
|
- !ruby/object:Gem::Dependency
|
82
93
|
name: diff-lcs
|
83
|
-
requirement: &
|
94
|
+
requirement: &14323860 !ruby/object:Gem::Requirement
|
84
95
|
none: false
|
85
96
|
requirements:
|
86
97
|
- - ! '>='
|
@@ -88,10 +99,10 @@ dependencies:
|
|
88
99
|
version: '0'
|
89
100
|
type: :development
|
90
101
|
prerelease: false
|
91
|
-
version_requirements: *
|
102
|
+
version_requirements: *14323860
|
92
103
|
- !ruby/object:Gem::Dependency
|
93
104
|
name: shoulda
|
94
|
-
requirement: &
|
105
|
+
requirement: &14323320 !ruby/object:Gem::Requirement
|
95
106
|
none: false
|
96
107
|
requirements:
|
97
108
|
- - ! '>='
|
@@ -99,10 +110,10 @@ dependencies:
|
|
99
110
|
version: '0'
|
100
111
|
type: :development
|
101
112
|
prerelease: false
|
102
|
-
version_requirements: *
|
113
|
+
version_requirements: *14323320
|
103
114
|
- !ruby/object:Gem::Dependency
|
104
115
|
name: simplecov
|
105
|
-
requirement: &
|
116
|
+
requirement: &14322820 !ruby/object:Gem::Requirement
|
106
117
|
none: false
|
107
118
|
requirements:
|
108
119
|
- - ! '>='
|
@@ -110,10 +121,10 @@ dependencies:
|
|
110
121
|
version: '0'
|
111
122
|
type: :development
|
112
123
|
prerelease: false
|
113
|
-
version_requirements: *
|
124
|
+
version_requirements: *14322820
|
114
125
|
- !ruby/object:Gem::Dependency
|
115
126
|
name: tzinfo
|
116
|
-
requirement: &
|
127
|
+
requirement: &14322280 !ruby/object:Gem::Requirement
|
117
128
|
none: false
|
118
129
|
requirements:
|
119
130
|
- - ! '>='
|
@@ -121,10 +132,10 @@ dependencies:
|
|
121
132
|
version: '0'
|
122
133
|
type: :development
|
123
134
|
prerelease: false
|
124
|
-
version_requirements: *
|
135
|
+
version_requirements: *14322280
|
125
136
|
- !ruby/object:Gem::Dependency
|
126
137
|
name: devise
|
127
|
-
requirement: &
|
138
|
+
requirement: &14321760 !ruby/object:Gem::Requirement
|
128
139
|
none: false
|
129
140
|
requirements:
|
130
141
|
- - ! '>='
|
@@ -132,10 +143,10 @@ dependencies:
|
|
132
143
|
version: '0'
|
133
144
|
type: :development
|
134
145
|
prerelease: false
|
135
|
-
version_requirements: *
|
146
|
+
version_requirements: *14321760
|
136
147
|
- !ruby/object:Gem::Dependency
|
137
148
|
name: rails_admin
|
138
|
-
requirement: &
|
149
|
+
requirement: &14321100 !ruby/object:Gem::Requirement
|
139
150
|
none: false
|
140
151
|
requirements:
|
141
152
|
- - ! '>='
|
@@ -143,10 +154,10 @@ dependencies:
|
|
143
154
|
version: '0'
|
144
155
|
type: :runtime
|
145
156
|
prerelease: false
|
146
|
-
version_requirements: *
|
157
|
+
version_requirements: *14321100
|
147
158
|
- !ruby/object:Gem::Dependency
|
148
159
|
name: devise
|
149
|
-
requirement: &
|
160
|
+
requirement: &14320380 !ruby/object:Gem::Requirement
|
150
161
|
none: false
|
151
162
|
requirements:
|
152
163
|
- - ! '>='
|
@@ -154,10 +165,10 @@ dependencies:
|
|
154
165
|
version: '0'
|
155
166
|
type: :runtime
|
156
167
|
prerelease: false
|
157
|
-
version_requirements: *
|
168
|
+
version_requirements: *14320380
|
158
169
|
- !ruby/object:Gem::Dependency
|
159
170
|
name: activemerchant
|
160
|
-
requirement: &
|
171
|
+
requirement: &14319180 !ruby/object:Gem::Requirement
|
161
172
|
none: false
|
162
173
|
requirements:
|
163
174
|
- - ! '>='
|
@@ -165,10 +176,10 @@ dependencies:
|
|
165
176
|
version: '0'
|
166
177
|
type: :runtime
|
167
178
|
prerelease: false
|
168
|
-
version_requirements: *
|
179
|
+
version_requirements: *14319180
|
169
180
|
- !ruby/object:Gem::Dependency
|
170
181
|
name: countries
|
171
|
-
requirement: &
|
182
|
+
requirement: &14318680 !ruby/object:Gem::Requirement
|
172
183
|
none: false
|
173
184
|
requirements:
|
174
185
|
- - ! '>='
|
@@ -176,10 +187,10 @@ dependencies:
|
|
176
187
|
version: '0'
|
177
188
|
type: :runtime
|
178
189
|
prerelease: false
|
179
|
-
version_requirements: *
|
190
|
+
version_requirements: *14318680
|
180
191
|
- !ruby/object:Gem::Dependency
|
181
192
|
name: rspec
|
182
|
-
requirement: &
|
193
|
+
requirement: &14317860 !ruby/object:Gem::Requirement
|
183
194
|
none: false
|
184
195
|
requirements:
|
185
196
|
- - ! '>='
|
@@ -187,10 +198,10 @@ dependencies:
|
|
187
198
|
version: '0'
|
188
199
|
type: :development
|
189
200
|
prerelease: false
|
190
|
-
version_requirements: *
|
201
|
+
version_requirements: *14317860
|
191
202
|
- !ruby/object:Gem::Dependency
|
192
203
|
name: rspec-rails
|
193
|
-
requirement: &
|
204
|
+
requirement: &15783940 !ruby/object:Gem::Requirement
|
194
205
|
none: false
|
195
206
|
requirements:
|
196
207
|
- - ! '>='
|
@@ -198,10 +209,10 @@ dependencies:
|
|
198
209
|
version: '0'
|
199
210
|
type: :development
|
200
211
|
prerelease: false
|
201
|
-
version_requirements: *
|
212
|
+
version_requirements: *15783940
|
202
213
|
- !ruby/object:Gem::Dependency
|
203
214
|
name: diff-lcs
|
204
|
-
requirement: &
|
215
|
+
requirement: &15783100 !ruby/object:Gem::Requirement
|
205
216
|
none: false
|
206
217
|
requirements:
|
207
218
|
- - ! '>='
|
@@ -209,10 +220,10 @@ dependencies:
|
|
209
220
|
version: '0'
|
210
221
|
type: :development
|
211
222
|
prerelease: false
|
212
|
-
version_requirements: *
|
223
|
+
version_requirements: *15783100
|
213
224
|
- !ruby/object:Gem::Dependency
|
214
225
|
name: factory_girl
|
215
|
-
requirement: &
|
226
|
+
requirement: &15782340 !ruby/object:Gem::Requirement
|
216
227
|
none: false
|
217
228
|
requirements:
|
218
229
|
- - ! '>='
|
@@ -220,10 +231,10 @@ dependencies:
|
|
220
231
|
version: '0'
|
221
232
|
type: :development
|
222
233
|
prerelease: false
|
223
|
-
version_requirements: *
|
234
|
+
version_requirements: *15782340
|
224
235
|
- !ruby/object:Gem::Dependency
|
225
236
|
name: shoulda
|
226
|
-
requirement: &
|
237
|
+
requirement: &15781660 !ruby/object:Gem::Requirement
|
227
238
|
none: false
|
228
239
|
requirements:
|
229
240
|
- - ! '>='
|
@@ -231,7 +242,7 @@ dependencies:
|
|
231
242
|
version: '0'
|
232
243
|
type: :development
|
233
244
|
prerelease: false
|
234
|
-
version_requirements: *
|
245
|
+
version_requirements: *15781660
|
235
246
|
description: Mountable ecommerce
|
236
247
|
email: steph@endpoint.com
|
237
248
|
executables: []
|
@@ -297,6 +308,7 @@ files:
|
|
297
308
|
- app/views/rails_admin/main/_order_notes.html.erb
|
298
309
|
- app/views/rails_admin/main/_payment_refund.html.haml
|
299
310
|
- app/views/rails_admin/main/_recorded_changer.html.erb
|
311
|
+
- app/views/rails_admin/main/_whois.html.erb
|
300
312
|
- config/routes.rb
|
301
313
|
- db/migrate/20111227150106_create_orders.rb
|
302
314
|
- db/migrate/20111227150322_create_addresses.rb
|
@@ -403,7 +415,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
403
415
|
version: '0'
|
404
416
|
segments:
|
405
417
|
- 0
|
406
|
-
hash:
|
418
|
+
hash: -1877220411298348562
|
407
419
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
408
420
|
none: false
|
409
421
|
requirements:
|