ahoy_matey 1.5.5 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/lib/ahoy/version.rb +1 -1
- data/lib/generators/ahoy/stores/active_record_events_generator.rb +7 -1
- data/lib/generators/ahoy/stores/active_record_visits_generator.rb +7 -1
- data/lib/generators/ahoy/stores/templates/active_record_events_migration.rb +1 -1
- data/lib/generators/ahoy/stores/templates/active_record_visits_migration.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d545b42712d52ad3ea16cca410ad316cce728578
|
4
|
+
data.tar.gz: 648e7131dd89915177c8b9f37a4640d5029bacce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87557bbaf04bdf41dbe0e9eb72c74885d917bbe49cadd977b02fef1a46f351492a07e57e7d10e765af1dff0a9ac3ee6b310bb3ec321fbbba2b93efff42eb897c
|
7
|
+
data.tar.gz: cc9b9a7dbed329de70c98b0e3f4f27927f1889e60c3adcb88eadbd4ae84f18de4ec591df98253043609a53f349cfd0b1e1e642cd8d7a0916c939d9e1648699cb
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/lib/ahoy/version.rb
CHANGED
@@ -28,7 +28,7 @@ module Ahoy
|
|
28
28
|
unless @database.in?([nil, "postgresql", "postgresql-jsonb", "mysql", "sqlite"])
|
29
29
|
raise Thor::Error, "Unknown database option"
|
30
30
|
end
|
31
|
-
migration_template "active_record_events_migration.rb", "db/migrate/create_ahoy_events.rb"
|
31
|
+
migration_template "active_record_events_migration.rb", "db/migrate/create_ahoy_events.rb", migration_version: migration_version
|
32
32
|
end
|
33
33
|
|
34
34
|
def generate_model
|
@@ -47,6 +47,12 @@ module Ahoy
|
|
47
47
|
"postgresql"
|
48
48
|
end
|
49
49
|
end
|
50
|
+
|
51
|
+
def migration_version
|
52
|
+
if ActiveRecord::VERSION::MAJOR >= 5
|
53
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
54
|
+
end
|
55
|
+
end
|
50
56
|
end
|
51
57
|
end
|
52
58
|
end
|
@@ -27,7 +27,7 @@ module Ahoy
|
|
27
27
|
unless options["database"].in?([nil, "postgresql", "postgresql-jsonb"])
|
28
28
|
raise Thor::Error, "Unknown database option"
|
29
29
|
end
|
30
|
-
migration_template "active_record_visits_migration.rb", "db/migrate/create_visits.rb"
|
30
|
+
migration_template "active_record_visits_migration.rb", "db/migrate/create_visits.rb", migration_version: migration_version
|
31
31
|
end
|
32
32
|
|
33
33
|
def generate_model
|
@@ -37,6 +37,12 @@ module Ahoy
|
|
37
37
|
def create_initializer
|
38
38
|
template "active_record_initializer.rb", "config/initializers/ahoy.rb"
|
39
39
|
end
|
40
|
+
|
41
|
+
def migration_version
|
42
|
+
if ActiveRecord::VERSION::MAJOR >= 5
|
43
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
44
|
+
end
|
45
|
+
end
|
40
46
|
end
|
41
47
|
end
|
42
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ahoy_matey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -341,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
341
|
version: '0'
|
342
342
|
requirements: []
|
343
343
|
rubyforge_project:
|
344
|
-
rubygems_version: 2.
|
344
|
+
rubygems_version: 2.5.1
|
345
345
|
signing_key:
|
346
346
|
specification_version: 4
|
347
347
|
summary: Simple, powerful visit tracking for Rails
|