landable 1.9.2 → 1.10.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -2
  3. data/README.md +2 -0
  4. data/app/models/concerns/landable/table_name.rb +6 -4
  5. data/app/models/landable/traffic/access.rb +1 -1
  6. data/app/models/landable/traffic/ad_group.rb +1 -1
  7. data/app/models/landable/traffic/ad_type.rb +1 -1
  8. data/app/models/landable/traffic/attribution.rb +2 -1
  9. data/app/models/landable/traffic/bid_match_type.rb +1 -1
  10. data/app/models/landable/traffic/browser.rb +1 -1
  11. data/app/models/landable/traffic/campaign.rb +1 -1
  12. data/app/models/landable/traffic/city.rb +1 -1
  13. data/app/models/landable/traffic/content.rb +1 -1
  14. data/app/models/landable/traffic/cookie.rb +1 -1
  15. data/app/models/landable/traffic/country.rb +1 -1
  16. data/app/models/landable/traffic/creative.rb +1 -1
  17. data/app/models/landable/traffic/device.rb +1 -1
  18. data/app/models/landable/traffic/device_type.rb +1 -1
  19. data/app/models/landable/traffic/domain.rb +1 -1
  20. data/app/models/landable/traffic/event.rb +1 -1
  21. data/app/models/landable/traffic/event_type.rb +1 -1
  22. data/app/models/landable/traffic/experiment.rb +1 -1
  23. data/app/models/landable/traffic/http_method.rb +1 -1
  24. data/app/models/landable/traffic/ip_address.rb +1 -1
  25. data/app/models/landable/traffic/ip_lookup.rb +1 -1
  26. data/app/models/landable/traffic/keyword.rb +1 -1
  27. data/app/models/landable/traffic/location.rb +1 -1
  28. data/app/models/landable/traffic/match_type.rb +1 -1
  29. data/app/models/landable/traffic/medium.rb +1 -1
  30. data/app/models/landable/traffic/mime_type.rb +1 -1
  31. data/app/models/landable/traffic/network.rb +1 -1
  32. data/app/models/landable/traffic/owner.rb +1 -1
  33. data/app/models/landable/traffic/ownership.rb +1 -1
  34. data/app/models/landable/traffic/page_view.rb +1 -1
  35. data/app/models/landable/traffic/path.rb +1 -1
  36. data/app/models/landable/traffic/placement.rb +1 -1
  37. data/app/models/landable/traffic/platform.rb +1 -1
  38. data/app/models/landable/traffic/position.rb +1 -1
  39. data/app/models/landable/traffic/query_string.rb +1 -1
  40. data/app/models/landable/traffic/referer.rb +1 -1
  41. data/app/models/landable/traffic/region.rb +1 -1
  42. data/app/models/landable/traffic/search_term.rb +1 -1
  43. data/app/models/landable/traffic/source.rb +1 -1
  44. data/app/models/landable/traffic/target.rb +1 -1
  45. data/app/models/landable/traffic/user_agent.rb +1 -1
  46. data/app/models/landable/traffic/user_agent_type.rb +1 -1
  47. data/app/models/landable/traffic/visit.rb +1 -1
  48. data/app/models/landable/traffic/visitor.rb +1 -1
  49. data/app/views/templates/preview.liquid +4 -7
  50. data/config/routes.rb +0 -1
  51. data/lib/generators/templates/landable.rb +3 -0
  52. data/lib/landable/configuration.rb +5 -0
  53. data/lib/landable/traffic.rb +1 -0
  54. data/lib/landable/traffic/tracker.rb +7 -2
  55. data/lib/landable/version.rb +3 -3
  56. metadata +5 -6
  57. data/app/models/concerns/landable/traffic/table_name.rb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0aa9dec4d4dea28d1713a070dda1f8896131e927
4
- data.tar.gz: 97367aa585551fad6b9124616e791f9a9f229904
3
+ metadata.gz: 936efb7758fec888e89ca1a24b62a477bb990f3b
4
+ data.tar.gz: f9e57914f0247c9a285e1fa17c28073666f78487
5
5
  SHA512:
6
- metadata.gz: 5e6d41e286c597c016760d815a93d6a6427cb6aed60e667ac4751860c331d9ec4654c727916305ff1bb565521dbda82ab4bf184babcba976de905945dae83027
7
- data.tar.gz: 78b146382e7ed984e3d73e6df7c7d3b0149cd2a3fc40913dfbbe6930526edbaf6cffe5e7d30688601721b5468928144054ffb3cb391dd1730826f3ff6dbe456d
6
+ metadata.gz: 6567ba6077c5ced9c68ba5b29826fff45824b6859ed8dc58883cf9ac27da4f9daaf14d0e2e89ac899aeb0f7bf457142f9564b18d866ee16752d3bdbc9892c9b9
7
+ data.tar.gz: d35d0cafe6fd487ff27af1a0ec1e08a30006dd6be46ad05f0bcd80ff27e1e91cc599ad582b722d42d8d88e082e4ab966b4a87a81646a6f6239301095e6280611
data/CHANGELOG.md CHANGED
@@ -2,9 +2,14 @@
2
2
 
3
3
  See README.md before updating this file.
4
4
 
5
- ## Unreleased [#](https://github.com/enova/landable/compare/v1.9.2...master)
5
+ ## Unreleased [#](https://github.com/enova/landable/compare/v1.10.0.rc1...master)
6
6
 
7
- ## Unreleased [#](https://github.com/enova/landable/compare/v1.9.1...v1.9.2)
7
+ ## 1.10.0.rc1 [#](https://github.com/enova/landable/compare/v1.9.2...v1.10.0.rc1)
8
+ * Handle blank UserAgent [#25]
9
+ * Make table_name.rb generic. [#22]
10
+ * Liquid Preview Template Styling [#21]
11
+
12
+ ## 1.9.2 [#](https://github.com/enova/landable/compare/v1.9.1...v1.9.2)
8
13
  * Added compatibility with new Rails 4.1 JSON-based cookies [#19]
9
14
 
10
15
  ## 1.9.1 [#](https://github.com/enova/landable/compare/v1.9.0...v1.9.1)
data/README.md CHANGED
@@ -41,6 +41,8 @@ Landable.configure do |config|
41
41
  end
42
42
  ```
43
43
 
44
+ Read more about [Visit Tracking](https://github.com/enova/landable/wiki/Visit-Tracking)
45
+
44
46
  ## Development
45
47
 
46
48
  Run `./script/redb` to refresh the dummy app's database.
@@ -3,10 +3,12 @@ module Landable
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  included do
6
+ schema = "#{Landable.configuration.database_schema_prefix}landable"
7
+ suffix = parent.name.demodulize.downcase
8
+
9
+ schema += "_#{suffix}" unless suffix == "landable"
6
10
  model_name = self.model_name.element.pluralize
7
- schema_name = "#{Landable.configuration.database_schema_prefix}landable"
8
- self.table_name = "#{schema_name}.#{model_name}"
11
+ self.table_name = "#{schema}.#{model_name}"
9
12
  end
10
-
11
13
  end
12
- end
14
+ end
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Access < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_for :path, class_name: Path
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class AdGroup < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :ad_group, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class AdType < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :ad_type, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,8 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Attribution < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
+
5
6
  KEYS = %w[ad_type ad_group bid_match_type campaign content creative device_type experiment keyword match_type medium network placement position search_term source target]
6
7
 
7
8
  self.record_timestamps = false
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class BidMatchType < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :bid_match_type, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Browser < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :browser, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Campaign < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :campaign, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class City < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :city, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Content < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :content, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Cookie < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :cookie_id, cache: 100, find: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Country < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :country, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Creative < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :creative, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Device < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :device, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class DeviceType < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :device_type, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Domain < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :domain, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Event < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
  self.record_timestamps = false
6
6
 
7
7
  lookup_for :event_type, class_name: EventType, symbolize: true
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class EventType < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :event_type, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Experiment < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :experiment, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class HTTPMethod < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :http_method, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class IpAddress < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :ip_address, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class IpLookup < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_for :ip_address, class_name: IpAddress
7
7
  lookup_for :domain, class_name: Domain
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Keyword < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :keyword, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Location < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_for :country, class_name: Country
7
7
  lookup_for :region, class_name: Region
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class MatchType < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :match_type, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Medium < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :medium, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class MimeType < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :mime_type, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Network < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :network, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Owner < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  has_many :ownerships
7
7
  has_many :visits
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Ownership < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  belongs_to :cookie
7
7
  belongs_to :owner
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class PageView < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
  self.record_timestamps = false
6
6
 
7
7
  belongs_to :visit
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Path < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :path, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Placement < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :placement, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Platform < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :platform, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Position < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :position, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class QueryString < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :query_string, cache: 50, find_or_create: true, allow_blank: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Referer < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_for :domain, class_name: Domain
7
7
  lookup_for :path, class_name: Path
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Region < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :region, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class SearchTerm < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :search_term, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Source < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :source, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Target < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :target, cache: 50, find_or_create: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class UserAgent < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
  self.record_timestamps = false
6
6
 
7
7
  lookup_by :user_agent, cache: 50, find_or_create: true
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class UserAgentType < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_by :user_agent_type, cache: true
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Visit < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
  self.record_timestamps = false
6
6
 
7
7
  belongs_to :attribution
@@ -1,7 +1,7 @@
1
1
  module Landable
2
2
  module Traffic
3
3
  class Visitor < ActiveRecord::Base
4
- include Landable::Traffic::TableName
4
+ include Landable::TableName
5
5
 
6
6
  lookup_for :ip_address, class_name: IpAddress
7
7
  lookup_for :user_agent, class_name: UserAgent
@@ -84,19 +84,15 @@
84
84
  {% else %}
85
85
  <!-- pretty invalid, this is -->
86
86
  <style type="text/css">
87
- body {
88
- padding-top: 30px;
89
- }
90
-
91
87
  body:before {
92
88
  width: 100%;
93
- position: absolute;
89
+ position: fixed;
94
90
  top: 0;
95
- left: 0;
91
+ right: 0;
96
92
  box-sizing: border-box;
97
93
  box-shadow: inset 0 -10px 5px -10px rgba(0, 0, 0, 0.5);
98
94
  height: 30px;
99
- padding: 5px 0;
95
+ padding: 5px 20px;
100
96
  background-color: #FFDA73;
101
97
  line-height: 20px;
102
98
  font-size: 14px;
@@ -106,6 +102,7 @@
106
102
  color: #7e592d;
107
103
  content: "Preview Mode";
108
104
  text-transform: uppercase;
105
+ z-index: 1000000;
109
106
  }
110
107
 
111
108
  body.publicist-preview {
data/config/routes.rb CHANGED
@@ -2,7 +2,6 @@ Landable::Engine.routes.draw do
2
2
  scope path: Landable.configuration.api_namespace, module: 'api' do
3
3
  resources :access_tokens, only: [:create, :update, :destroy]
4
4
  resources :categories, only: [:index, :show]
5
- resources :status_codes, only: [:index]
6
5
 
7
6
  resources :directories, only: [:index, :show], constraints: {
8
7
  id: /[%a-zA-Z0-9\/_.~-]*/
@@ -31,6 +31,9 @@ Landable.configure do |config|
31
31
 
32
32
  # Where is your site deployed? (required for screenshots)
33
33
  # config.public_url = 'http://myapp.dev/'
34
+
35
+ # If you want to save a different UserAgent if the request.user_agent is blank, set it here
36
+ # config.blank_user_agent_string = 'blank'
34
37
  end
35
38
 
36
39
  # Configure asset uploads. Assets will be uploaded to public/uploads by default.
@@ -9,6 +9,7 @@ module Landable
9
9
  attr_writer :sitemap_exclude_categories, :sitemap_protocol, :sitemap_host, :sitemap_additional_paths
10
10
  attr_writer :reserved_paths, :partials_to_templates, :database_schema_prefix
11
11
  attr_writer :publicist_url, :audit_flags
12
+ attr_writer :blank_user_agent_string
12
13
 
13
14
  def authenticators
14
15
  @authenticators || raise("No Landable authenticator configured.")
@@ -140,6 +141,10 @@ module Landable
140
141
  @screenshots ||= Screenshots.new
141
142
  end
142
143
 
144
+ def blank_user_agent_string
145
+ @blank_user_agent_string ||= 'blank'
146
+ end
147
+
143
148
  class Screenshots
144
149
  attr_accessor :autorun
145
150
  attr_accessor :browserstack_username, :browserstack_password
@@ -9,6 +9,7 @@ require 'landable/traffic/noop_tracker'
9
9
  module Landable
10
10
  module Traffic
11
11
  def track_with_landable!
12
+ yield and return if request.headers["DNT"]
12
13
  begin
13
14
  @tracker = Tracker.for self
14
15
  @tracker.track
@@ -157,7 +157,7 @@ module Landable
157
157
  end
158
158
 
159
159
  def user_agent
160
- @user_agent ||= UserAgent[request.user_agent]
160
+ @user_agent ||= UserAgent[request_user_agent]
161
161
  end
162
162
 
163
163
  def referer
@@ -183,7 +183,7 @@ module Landable
183
183
  end
184
184
 
185
185
  def visitor_hash
186
- Digest::SHA2.base64digest [remote_ip, request.user_agent].join
186
+ Digest::SHA2.base64digest [remote_ip, request_user_agent].join
187
187
  end
188
188
 
189
189
  def referer_hash
@@ -290,6 +290,11 @@ module Landable
290
290
  def visit
291
291
  @visit ||= @visit_id && Visit.find(@visit_id)
292
292
  end
293
+
294
+ def request_user_agent
295
+ return Landable.configuration.blank_user_agent_string if request.user_agent.blank?
296
+ request.user_agent
297
+ end
293
298
  end
294
299
  end
295
300
  end
@@ -1,9 +1,9 @@
1
1
  module Landable
2
2
  module VERSION
3
3
  MAJOR = 1
4
- MINOR = 9
5
- PATCH = 2
6
- PRE = nil
4
+ MINOR = 10
5
+ PATCH = 0
6
+ PRE = 'rc1'
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: landable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.2
4
+ version: 1.10.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Trogdor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-25 00:00:00.000000000 Z
11
+ date: 2014-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -332,7 +332,6 @@ files:
332
332
  - app/models/concerns/landable/has_templates.rb
333
333
  - app/models/concerns/landable/librarian.rb
334
334
  - app/models/concerns/landable/table_name.rb
335
- - app/models/concerns/landable/traffic/table_name.rb
336
335
  - app/models/landable/access_token.rb
337
336
  - app/models/landable/asset.rb
338
337
  - app/models/landable/asset_search_engine.rb
@@ -660,12 +659,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
660
659
  version: '0'
661
660
  required_rubygems_version: !ruby/object:Gem::Requirement
662
661
  requirements:
663
- - - '>='
662
+ - - '>'
664
663
  - !ruby/object:Gem::Version
665
- version: '0'
664
+ version: 1.3.1
666
665
  requirements: []
667
666
  rubyforge_project:
668
- rubygems_version: 2.2.2
667
+ rubygems_version: 2.0.3
669
668
  signing_key:
670
669
  specification_version: 4
671
670
  summary: Mountable CMS engine for Rails
@@ -1,14 +0,0 @@
1
- module Landable
2
- module Traffic
3
- module TableName
4
- extend ActiveSupport::Concern
5
-
6
- included do
7
- model_name = self.model_name.element.pluralize
8
- schema_name = "#{Landable.configuration.database_schema_prefix}landable_traffic"
9
- self.table_name = "#{schema_name}.#{model_name}"
10
- end
11
-
12
- end
13
- end
14
- end