trackdown 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/generators/trackdown/install_generator.rb +8 -0
- data/lib/trackdown/configuration.rb +0 -24
- data/lib/trackdown/version.rb +1 -1
- data/lib/trackdown.rb +0 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07f58b2d8b21b6a7a7a556cb1c5ed24023e751506cc42e630f30fd10c45b1ae4
|
4
|
+
data.tar.gz: b307787b7160c444b8ac7e73883e38c8bcd60f8c7d532bb35a12cb9d0c957472
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e5a9dee06f9c556d10ed33880fef9ab5f1acc4323367a73ba6721dc492790b03d28ec62ec39a405b8d76f46e3f442a1a5459883cdd3ee7b7dd904e58a811279
|
7
|
+
data.tar.gz: 7c2ccb29ec564cd3d70762e2746eb1cc236191687eab91757597f8e6c2074096c91524c1b64bddccef14ac93e712b1f2dbc56854c307f9536b6a24bdfbc1850a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -60,7 +60,7 @@ production:
|
|
60
60
|
refresh_maxmind_database:
|
61
61
|
class: TrackdownDatabaseRefreshJob
|
62
62
|
queue: default
|
63
|
-
schedule: every
|
63
|
+
schedule: every week at 4am US/Pacific
|
64
64
|
```
|
65
65
|
|
66
66
|
After setting everything up, you can run the following command to update the MaxMind database / get the first fresh copy of it:
|
@@ -11,6 +11,14 @@ module Trackdown
|
|
11
11
|
template 'trackdown_database_refresh_job.rb', 'app/jobs/trackdown_database_refresh_job.rb'
|
12
12
|
end
|
13
13
|
|
14
|
+
def add_mmdb_to_gitignore
|
15
|
+
if File.exist?('.gitignore')
|
16
|
+
append_to_file '.gitignore', "\n\n# Trackdown\n*.mmdb"
|
17
|
+
else
|
18
|
+
create_file '.gitignore', "# Trackdown\n*.mmdb"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
14
22
|
def display_post_install_message
|
15
23
|
say "\tThe `trackdown` gem has been successfully installed!", :green
|
16
24
|
say "\nTo complete the setup:"
|
@@ -17,33 +17,9 @@ module Trackdown
|
|
17
17
|
@reject_private_ips = true
|
18
18
|
end
|
19
19
|
|
20
|
-
def validate!
|
21
|
-
missing = []
|
22
|
-
missing << 'maxmind_license_key' if maxmind_license_key.nil?
|
23
|
-
missing << 'maxmind_account_id' if maxmind_account_id.nil?
|
24
|
-
|
25
|
-
raise Error, "Missing required configuration: #{missing.join(', ')} – Please set these in your config/initializers/trackdown.rb initializer." unless missing.empty?
|
26
|
-
|
27
|
-
validate_paths!
|
28
|
-
validate_timeouts!
|
29
|
-
end
|
30
|
-
|
31
20
|
def reject_private_ips?
|
32
21
|
@reject_private_ips
|
33
22
|
end
|
34
23
|
|
35
|
-
private
|
36
|
-
|
37
|
-
def validate_paths!
|
38
|
-
unless database_path && !database_path.empty?
|
39
|
-
raise Error, "database_path cannot be empty"
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
def validate_timeouts!
|
44
|
-
raise Error, "timeout must be positive" unless timeout.positive?
|
45
|
-
raise Error, "pool_timeout must be positive" unless pool_timeout.positive?
|
46
|
-
raise Error, "pool_size must be positive" unless pool_size.positive?
|
47
|
-
end
|
48
24
|
end
|
49
25
|
end
|
data/lib/trackdown/version.rb
CHANGED
data/lib/trackdown.rb
CHANGED