land 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/.ruby-version +1 -0
- data/Appraisals +15 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +20 -0
- data/MIT-LICENSE +25 -0
- data/README.md +55 -0
- data/Rakefile +61 -0
- data/TODO.md +1 -0
- data/app/helpers/land/helper.rb +5 -0
- data/app/jobs/land/application_job.rb +4 -0
- data/app/lookups/land/ad_group.rb +9 -0
- data/app/lookups/land/ad_type.rb +9 -0
- data/app/lookups/land/affiliate.rb +9 -0
- data/app/lookups/land/app.rb +9 -0
- data/app/lookups/land/bid_match_type.rb +9 -0
- data/app/lookups/land/brand.rb +9 -0
- data/app/lookups/land/browser.rb +9 -0
- data/app/lookups/land/campaign.rb +10 -0
- data/app/lookups/land/content.rb +9 -0
- data/app/lookups/land/creative.rb +9 -0
- data/app/lookups/land/device.rb +9 -0
- data/app/lookups/land/device_type.rb +9 -0
- data/app/lookups/land/domain.rb +9 -0
- data/app/lookups/land/event_type.rb +9 -0
- data/app/lookups/land/experiment.rb +9 -0
- data/app/lookups/land/http_method.rb +9 -0
- data/app/lookups/land/keyword.rb +9 -0
- data/app/lookups/land/match_type.rb +9 -0
- data/app/lookups/land/medium.rb +9 -0
- data/app/lookups/land/mime_type.rb +9 -0
- data/app/lookups/land/network.rb +9 -0
- data/app/lookups/land/path.rb +10 -0
- data/app/lookups/land/placement.rb +9 -0
- data/app/lookups/land/platform.rb +10 -0
- data/app/lookups/land/position.rb +9 -0
- data/app/lookups/land/query_string.rb +10 -0
- data/app/lookups/land/search_term.rb +9 -0
- data/app/lookups/land/source.rb +9 -0
- data/app/lookups/land/subsource.rb +9 -0
- data/app/lookups/land/target.rb +9 -0
- data/app/lookups/land/user_agent_type.rb +9 -0
- data/app/models/concerns/land/table_name.rb +11 -0
- data/app/models/land/application_record.rb +5 -0
- data/app/models/land/attribution.rb +63 -0
- data/app/models/land/cookie.rb +14 -0
- data/app/models/land/event.rb +10 -0
- data/app/models/land/owner.rb +10 -0
- data/app/models/land/ownership.rb +8 -0
- data/app/models/land/pageview.rb +21 -0
- data/app/models/land/referer.rb +19 -0
- data/app/models/land/user_agent.rb +16 -0
- data/app/models/land/visit.rb +18 -0
- data/bin/console +13 -0
- data/bin/rails +22 -0
- data/bin/setup +11 -0
- data/config.ru +13 -0
- data/db/migrate/20200103012916_create_land_schema.rb +227 -0
- data/gemfiles/rails_5.0.gemfile +13 -0
- data/gemfiles/rails_5.1.gemfile +13 -0
- data/gemfiles/rails_5.2.gemfile +13 -0
- data/gemfiles/rails_6.0.gemfile +13 -0
- data/land.gemspec +56 -0
- data/lib/generators/land/install_generator.rb +17 -0
- data/lib/generators/templates/land.rb +29 -0
- data/lib/land.rb +30 -0
- data/lib/land/action.rb +62 -0
- data/lib/land/config.rb +62 -0
- data/lib/land/engine.rb +18 -0
- data/lib/land/tracker.rb +293 -0
- data/lib/land/trackers/noop_tracker.rb +8 -0
- data/lib/land/trackers/user_tracker.rb +79 -0
- data/lib/land/version.rb +5 -0
- data/lib/tasks/land_tasks.rake +4 -0
- metadata +233 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f1581c60af118cdf4c5e5176abfb178c30e3e37ecc5fe4f6d3a73bb839ff1725
|
4
|
+
data.tar.gz: b1db6762f06f4d51e4b1aefe49c5ce5811559a6b4b498ec3cf7c9191974ce9be
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: aa4a91ca848fec1ae0c83e72c0203571fa13941c3ef2c69d3352d962a2901b7e6844a2bab8afc2c81b27d2d094819027129fe95ea16e54fc0af8ea9ae1c69130
|
7
|
+
data.tar.gz: 8598411cc72d6845dc7535ed35c8b4a08edd660650c5f33ab114a0a9389313da3950a2f3d6f7117bfca83359716f4c4a09b871d35fa9f7df306976fd8925377c
|
data/.gitignore
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.6.6
|
data/Appraisals
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
appraise "rails-5.0" do
|
2
|
+
gem "activerecord", "~> 5.0.0"
|
3
|
+
end
|
4
|
+
|
5
|
+
appraise "rails-5.1" do
|
6
|
+
gem "activerecord", "~> 5.1.0"
|
7
|
+
end
|
8
|
+
|
9
|
+
appraise "rails-5.2" do
|
10
|
+
gem "activerecord", "~> 5.2.0"
|
11
|
+
end
|
12
|
+
|
13
|
+
appraise "rails-6.0" do
|
14
|
+
gem "activerecord", "~> 6.0.0"
|
15
|
+
end
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
|
+
|
4
|
+
# Declare your gem's dependencies in land.gemspec.
|
5
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
6
|
+
# development dependencies will be added by default to the :development group.
|
7
|
+
gemspec
|
8
|
+
|
9
|
+
# Declare any dependencies that are still in development here instead of in
|
10
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
11
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
12
|
+
# your gem to rubygems.org.
|
13
|
+
|
14
|
+
# gem "pry", github: "pry/pry"
|
15
|
+
|
16
|
+
group :development, :test do
|
17
|
+
gem "combustion"
|
18
|
+
gem "pry-rails"
|
19
|
+
gem "simplecov", require: false
|
20
|
+
end
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Erik Peterson
|
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.
|
23
|
+
|
24
|
+
Some code originated from github.com/enova/landable
|
25
|
+
Copyright 2013 Enova International
|
data/README.md
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# Land
|
2
|
+
Land is a clickstream tracker for Rails applications. It will track visits, pageviews, marketing attribution and more.
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
Add this line to your application's Gemfile:
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
gem 'land'
|
9
|
+
```
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle install
|
14
|
+
|
15
|
+
Or, install it yourself:
|
16
|
+
|
17
|
+
$ gem install land
|
18
|
+
|
19
|
+
To copy migrations to db/migrate run:
|
20
|
+
|
21
|
+
$ rails land:install:migrations
|
22
|
+
|
23
|
+
## Configuration
|
24
|
+
|
25
|
+
Install with:
|
26
|
+
|
27
|
+
$ rails g land:install
|
28
|
+
|
29
|
+
Then edit `config/initializers/land.rb`.
|
30
|
+
|
31
|
+
## Development
|
32
|
+
|
33
|
+
After checking out the repo, run `bin/setup` to install dependencies, create database, and confirm test suite is working. You can also run `rails console` for an interactive prompt that will allow you to experiment.
|
34
|
+
|
35
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
36
|
+
|
37
|
+
To start a console run `bin/rails console` or `rails c`
|
38
|
+
|
39
|
+
## Testing
|
40
|
+
|
41
|
+
Land uses a gem called __appraisal__ to test against multiple versions of Rails. Another gem, __combustion__ provides a minimal environment to run Rails.
|
42
|
+
|
43
|
+
Setup your database using `rails db:drop db:create db:migrate`.
|
44
|
+
|
45
|
+
To run the test suite against all versions of rails run `rake` or `appraisal rspec`.
|
46
|
+
To run the test suite against just the latest version of rails run `rspec`.
|
47
|
+
|
48
|
+
[Appraisal](https://github.com/thoughtbot/appraisal) | [Combustion](https://github.com/pat/combustion)
|
49
|
+
|
50
|
+
## Contributing
|
51
|
+
|
52
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/companygardener/land.
|
53
|
+
|
54
|
+
## License
|
55
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
begin
|
2
|
+
require "bundler/setup"
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
|
8
|
+
require 'lookup_by'
|
9
|
+
require "combustion"
|
10
|
+
|
11
|
+
Combustion::Application.configure_for_combustion
|
12
|
+
Combustion::Application.load_tasks
|
13
|
+
|
14
|
+
if defined?(ActiveRecord)
|
15
|
+
ActiveRecord::Base.schema_format = :sql
|
16
|
+
end
|
17
|
+
|
18
|
+
require "rspec/core/rake_task"
|
19
|
+
RSpec::Core::RakeTask.new(:spec)
|
20
|
+
|
21
|
+
require 'rdoc/task'
|
22
|
+
|
23
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
24
|
+
rdoc.rdoc_dir = 'rdoc'
|
25
|
+
rdoc.title = 'Land'
|
26
|
+
rdoc.options << '--line-numbers'
|
27
|
+
rdoc.rdoc_files.include('README.md')
|
28
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
29
|
+
end
|
30
|
+
|
31
|
+
# Lifted from appraisal/task to avoid deprecated clutter.
|
32
|
+
desc "Run the given task for all appraisals"
|
33
|
+
task :appraisal do
|
34
|
+
ARGV.shift
|
35
|
+
exec "bundle exec appraisal rake #{ARGV.join(' ')}"
|
36
|
+
end
|
37
|
+
|
38
|
+
if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"]
|
39
|
+
task default: :appraisal
|
40
|
+
else
|
41
|
+
task default: :spec
|
42
|
+
end
|
43
|
+
|
44
|
+
# Clean up some clutter in `rake -T`.
|
45
|
+
%w[
|
46
|
+
app:template
|
47
|
+
app:update
|
48
|
+
restart
|
49
|
+
].each { |name| Rake::Task[name].clear }
|
50
|
+
|
51
|
+
%w[
|
52
|
+
clean
|
53
|
+
clobber_rdoc
|
54
|
+
install:local
|
55
|
+
log:clear
|
56
|
+
rerdoc
|
57
|
+
secret
|
58
|
+
time:zones
|
59
|
+
tmp:clear
|
60
|
+
tmp:create
|
61
|
+
].each { |name| Rake::Task[name].clear_comments }
|
data/TODO.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
- Add support for circle ci
|