apdm 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +1 -0
  4. data/Gemfile +4 -0
  5. data/README.md +223 -0
  6. data/Rakefile +1 -0
  7. data/apdm.gemspec +34 -0
  8. data/bin/apdm +6 -0
  9. data/features/ad_tech.feature +11 -0
  10. data/features/step_definitions/ad_tech_steps.rb +19 -0
  11. data/features/support/env.rb +5 -0
  12. data/fixtures/approvals/ad_tech_loader_scripts.approved.txt +42 -0
  13. data/fixtures/approvals/ad_tech_placeholders.approved.txt +6 -0
  14. data/lib/apdm.rb +24 -0
  15. data/lib/apdm/ad_tech.rb +96 -0
  16. data/lib/apdm/ad_tech/ad_loader.rb +67 -0
  17. data/lib/apdm/ad_tech/ads.csv +475 -0
  18. data/lib/apdm/ad_tech/data.rb +47 -0
  19. data/lib/apdm/channel.rb +87 -0
  20. data/lib/apdm/channels.rb +569 -0
  21. data/lib/apdm/credentials.rb +26 -0
  22. data/lib/apdm/design_elements.rb +60 -0
  23. data/lib/apdm/design_elements/api.rb +75 -0
  24. data/lib/apdm/feed.rb +65 -0
  25. data/lib/apdm/issues.rb +14 -0
  26. data/lib/apdm/issues/aasavis.rb +51 -0
  27. data/lib/apdm/issues/amta.rb +253 -0
  28. data/lib/apdm/issues/an.rb +302 -0
  29. data/lib/apdm/issues/auraavis.rb +154 -0
  30. data/lib/apdm/issues/austagderblad.rb +154 -0
  31. data/lib/apdm/issues/avisa-hordaland.rb +154 -0
  32. data/lib/apdm/issues/avisa-valdres.rb +177 -0
  33. data/lib/apdm/issues/ba.rb +352 -0
  34. data/lib/apdm/issues/bladet.rb +154 -0
  35. data/lib/apdm/issues/blv.rb +254 -0
  36. data/lib/apdm/issues/bygdeposten.rb +154 -0
  37. data/lib/apdm/issues/demokraten.rb +154 -0
  38. data/lib/apdm/issues/eikerbladet.rb +409 -0
  39. data/lib/apdm/issues/enebakkavis.rb +51 -0
  40. data/lib/apdm/issues/etl.rb +79 -0
  41. data/lib/apdm/issues/eub.rb +254 -0
  42. data/lib/apdm/issues/finnmarkdagblad.rb +302 -0
  43. data/lib/apdm/issues/finnmarken.rb +302 -0
  44. data/lib/apdm/issues/firda.rb +302 -0
  45. data/lib/apdm/issues/firdaposten.rb +153 -0
  46. data/lib/apdm/issues/fremover.rb +304 -0
  47. data/lib/apdm/issues/gd.rb +304 -0
  48. data/lib/apdm/issues/glomdalen.rb +302 -0
  49. data/lib/apdm/issues/ha-halden.rb +302 -0
  50. data/lib/apdm/issues/hadeland.rb +251 -0
  51. data/lib/apdm/issues/hardanger-folkeblad.rb +151 -0
  52. data/lib/apdm/issues/helgeland-arbeiderblad.rb +304 -0
  53. data/lib/apdm/issues/import.csv +12821 -0
  54. data/lib/apdm/issues/indre.rb +151 -0
  55. data/lib/apdm/issues/jarlsbergavis.rb +154 -0
  56. data/lib/apdm/issues/kvinnheringen.rb +202 -0
  57. data/lib/apdm/issues/lofot-tidende.rb +102 -0
  58. data/lib/apdm/issues/lofotposten.rb +304 -0
  59. data/lib/apdm/issues/mb.rb +103 -0
  60. data/lib/apdm/issues/namdalsavisa.rb +302 -0
  61. data/lib/apdm/issues/nordhordland.rb +103 -0
  62. data/lib/apdm/issues/nordlys.rb +304 -0
  63. data/lib/apdm/issues/oa.rb +302 -0
  64. data/lib/apdm/issues/op.rb +304 -0
  65. data/lib/apdm/issues/opdalingen.rb +150 -0
  66. data/lib/apdm/issues/oyene.rb +51 -0
  67. data/lib/apdm/issues/pd.rb +254 -0
  68. data/lib/apdm/issues/r-a.rb +152 -0
  69. data/lib/apdm/issues/ranablad.rb +304 -0
  70. data/lib/apdm/issues/rb.rb +302 -0
  71. data/lib/apdm/issues/retten.rb +151 -0
  72. data/lib/apdm/issues/ringblad.rb +304 -0
  73. data/lib/apdm/issues/rogalandsavis.rb +302 -0
  74. data/lib/apdm/issues/sa.rb +304 -0
  75. data/lib/apdm/issues/smaalenene.rb +304 -0
  76. data/lib/apdm/issues/sognavis.rb +254 -0
  77. data/lib/apdm/issues/ta.rb +304 -0
  78. data/lib/apdm/issues/tk.rb +304 -0
  79. data/lib/apdm/issues/tvedestrandsposten.rb +150 -0
  80. data/lib/apdm/issues/vestbyavis.rb +51 -0
  81. data/lib/apdm/local_paper_area.rb +21 -0
  82. data/lib/apdm/network.rb +49 -0
  83. data/lib/apdm/null_cache.rb +15 -0
  84. data/lib/apdm/origo.rb +46 -0
  85. data/lib/apdm/saxo.rb +58 -0
  86. data/lib/apdm/saxo/iptc.rb +69 -0
  87. data/lib/apdm/saxo/metadata.rb +36 -0
  88. data/lib/apdm/saxo/remote.rb +67 -0
  89. data/lib/apdm/sinatra.rb +85 -0
  90. data/lib/apdm/version.rb +3 -0
  91. data/lib/cli.rb +12 -0
  92. data/spec/ad_tech/ad_loader_spec.rb +27 -0
  93. data/spec/ad_tech/data_spec.rb +14 -0
  94. data/spec/ad_tech_spec.rb +70 -0
  95. data/spec/approvals_helper.rb +6 -0
  96. data/spec/channel_spec.rb +91 -0
  97. data/spec/channels_spec.rb +9 -0
  98. data/spec/credentials_integration_spec.rb +13 -0
  99. data/spec/credentials_spec.rb +34 -0
  100. data/spec/design_elements_spec.rb +132 -0
  101. data/spec/feed_spec.rb +49 -0
  102. data/spec/fixtures/ad_tech.csv +6 -0
  103. data/spec/fixtures/approvals/adtech/ad_loader.approved.txt +9 -0
  104. data/spec/fixtures/approvals/apdm_adtech/data/handles_artikkelboard.approved.txt +10 -0
  105. data/spec/fixtures/approvals/apdm_adtech/data/handles_bunnbanner.approved.txt +10 -0
  106. data/spec/fixtures/approvals/apdm_adtech/data/handles_skyskraper_1.approved.txt +10 -0
  107. data/spec/fixtures/approvals/apdm_adtech/data/handles_toppbanner.approved.txt +10 -0
  108. data/spec/fixtures/approvals/apdm_adtech/data/is_ok_with_new_bandwagon_data.approved.txt +10 -0
  109. data/spec/fixtures/approvals/apdm_adtech/data/loads_default_data.approved.txt +10 -0
  110. data/spec/fixtures/approvals/apdm_designelements/css/via_api.approved.txt +23 -0
  111. data/spec/fixtures/approvals/apdm_designelements/footer_html/via_api.approved.html +85 -0
  112. data/spec/fixtures/approvals/apdm_designelements/header_html/via_api.approved.html +40 -0
  113. data/spec/fixtures/approvals/apdm_designelements/tracking_scripts/api/keyword.approved.txt +54 -0
  114. data/spec/fixtures/approvals/apdm_designelements/tracking_scripts/api/placeholder.approved.txt +54 -0
  115. data/spec/fixtures/issues.csv +3 -0
  116. data/spec/fixtures/test.jpg +0 -0
  117. data/spec/fixtures/vcr_cassettes/apdm_credentials.yml +44 -0
  118. data/spec/fixtures/vcr_cassettes/css.yml +5588 -0
  119. data/spec/fixtures/vcr_cassettes/footer-html.yml +178 -0
  120. data/spec/fixtures/vcr_cassettes/header-html.yml +132 -0
  121. data/spec/fixtures/vcr_cassettes/origo_someone_credentials.yml +43 -0
  122. data/spec/fixtures/vcr_cassettes/origo_westerdal_credentials.yml +56 -0
  123. data/spec/fixtures/vcr_cassettes/site_stat.yml +172 -0
  124. data/spec/fixtures/vcr_cassettes/site_stat_custom_category.yml +172 -0
  125. data/spec/geo_spec.rb +10 -0
  126. data/spec/issues_etl_spec.rb +41 -0
  127. data/spec/mockcached.rb +36 -0
  128. data/spec/network_spec.rb +43 -0
  129. data/spec/null_cache_spec.rb +29 -0
  130. data/spec/origo_spec.rb +24 -0
  131. data/spec/saxo/iptc_spec.rb +105 -0
  132. data/spec/saxo/metadata_spec.rb +79 -0
  133. data/spec/saxo/remote_spec.rb +71 -0
  134. data/spec/saxo/saxo_spec.rb +82 -0
  135. data/spec/spec_helper.rb +22 -0
  136. data/spec/vcr_helper.rb +6 -0
  137. data/test/fixtures/config-example.yml +6 -0
  138. data/test/saxo/acceptance_spec.rb +109 -0
  139. metadata +427 -0
@@ -0,0 +1,26 @@
1
+ module APDM
2
+ class Credentials
3
+
4
+ def self.authorized?(id)
5
+ self.for(id).authorized?
6
+ end
7
+
8
+ def self.for(id)
9
+ new APDM::Origo.fetch_credentials(id)
10
+ end
11
+
12
+ attr_reader :data
13
+ def initialize(data)
14
+ @data = data
15
+ end
16
+
17
+ def authorized?
18
+ data.each do |credential|
19
+ return true if credential["authorized"]
20
+ end
21
+ false
22
+ end
23
+ end
24
+ end
25
+
26
+
@@ -0,0 +1,60 @@
1
+ require 'apdm/design_elements/api'
2
+
3
+ module APDM
4
+ class DesignElements
5
+ VERSION = 4
6
+ ONE_DAY = 60 * 60 * 24
7
+ # .../v4/... returns a 404
8
+ HOST = "http://r.api.no/local/v3/publications/"
9
+
10
+ attr_reader :api_key, :channel
11
+ def initialize(channel, options = {})
12
+ @api_key = options[:api_key]
13
+ @channel = Channel.find(channel)
14
+ end
15
+
16
+ def api
17
+ @api ||= API.new(channel.homepage, :api_key => api_key)
18
+ end
19
+
20
+ def header
21
+ cached('header') do
22
+ api.fetch_html('slimTop')
23
+ end
24
+ end
25
+
26
+ def footer
27
+ cached('footer') do
28
+ api.fetch_html('footer')
29
+ end
30
+ end
31
+
32
+ def css
33
+ cached('css') do
34
+ api.fetch_css
35
+ end
36
+ end
37
+
38
+ def site_stat(category = 'PLACEHOLDER')
39
+ cached("site_stat.#{category}") do
40
+ api.fetch_site_stat(category)
41
+ end
42
+ end
43
+
44
+ private
45
+
46
+ def cached(key)
47
+ content = APDM.cache.get cache_key(key)
48
+ unless content
49
+ content = yield
50
+ APDM.cache.set cache_key(key), content, ONE_DAY
51
+ end
52
+ content
53
+ end
54
+
55
+ def cache_key(key)
56
+ "api.#{key}.#{channel.label}"
57
+ end
58
+
59
+ end
60
+ end
@@ -0,0 +1,75 @@
1
+ require 'curl'
2
+ require 'nokogiri'
3
+
4
+ module APDM
5
+ class DesignElements
6
+ class API
7
+
8
+ attr_reader :api_key, :version, :url
9
+ def initialize(url, options = {})
10
+ @url = url
11
+ @api_key = options[:api_key]
12
+ @version = DesignElements::VERSION
13
+ end
14
+
15
+ def fetch_html(element)
16
+ html = Curl::Easy.http_get(endpoint(element)).body_str
17
+ valid_fragment?(html) ? html.force_encoding(Encoding::UTF_8) : nil
18
+ end
19
+
20
+ def fetch_css_files
21
+ path = '//head/link[@rel = "stylesheet"]/@href'
22
+ Nokogiri::HTML(fetch_html("head")).xpath(path).map(&:to_s)
23
+ end
24
+
25
+ def fetch_css
26
+ css = ''
27
+ fetch_css_files.each do |href|
28
+ css << resolve_css(href) if include_css?(href)
29
+ end
30
+ css.force_encoding(Encoding::UTF_8)
31
+ end
32
+
33
+ def fetch_site_stat(category)
34
+ fetch_html("traffic&counterName=#{category}").force_encoding(Encoding::UTF_8)
35
+ end
36
+
37
+ private
38
+
39
+ def endpoint(element)
40
+ "#{url}/?service=designElements&app=default&version=#{version}&element=#{element}&key=#{api_key}"
41
+ end
42
+
43
+ def resolve_css(href)
44
+ s = Curl::Easy.http_get(href).body_str
45
+ if valid_fragment?(s)
46
+ fix_relative_paths(s)
47
+ else
48
+ ""
49
+ end
50
+ end
51
+
52
+ # The apdm css contains relative paths.
53
+ # Naturally, this breaks on non-apdm sites.
54
+ def fix_relative_paths(s)
55
+ s.gsub('../../../../../resources/web/gfx/', 'http://r.api.no/componada/resources/web/gfx/')
56
+ end
57
+
58
+ def valid_fragment?(s)
59
+ s && !s.include?("<html")
60
+ end
61
+
62
+ def css_files
63
+ [/componentsNormal.css/, /componentsCommon.css/, /normal.css/]
64
+ end
65
+
66
+ def include_css?(href)
67
+ css_files.each do |css_file|
68
+ return true if href =~ css_file
69
+ end
70
+ return false
71
+ end
72
+
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,65 @@
1
+ require 'json'
2
+ require 'feedzirra'
3
+
4
+ # Monkeypatch Feedzirra in order to read attributes in a custom element
5
+ class Feedzirra::Parser::RSSEntry
6
+ element "api:multimedia", :value => :filename, :as => :image_url
7
+ end
8
+
9
+ # Define expected elements
10
+ Feedzirra::Feed.add_common_feed_entry_element('link', :as => :url)
11
+ Feedzirra::Feed.add_common_feed_entry_element('dc:creator', :as => :author)
12
+ Feedzirra::Feed.add_common_feed_entry_element('api:body', :as => :body)
13
+ Feedzirra::Feed.add_common_feed_entry_element('api:multimedia', :as => :image)
14
+ Feedzirra::Feed.add_common_feed_entry_element('description', :as => :summary)
15
+
16
+ module APDM
17
+ class Feed
18
+
19
+ attr_reader :channel
20
+ def initialize(channel)
21
+ @channel = channel
22
+ end
23
+
24
+ def fetch(options = {})
25
+ feed_as_json = APDM.cache.get cache_key
26
+
27
+ return JSON.parse(feed_as_json) if feed_as_json
28
+
29
+ result = Feedzirra::Feed.fetch_and_parse(channel.feed_url(options))
30
+
31
+ # The API will return a 400 response in the case of a non-existant section id
32
+ return nil unless result.is_a?(Feedzirra::Parser::RSS)
33
+
34
+ feed_entries = result.entries.map do |entry|
35
+ sanitize entry
36
+ end.compact
37
+
38
+ APDM.cache.set cache_key, feed_entries.to_json, 60*5
39
+ return feed_entries
40
+ end
41
+
42
+ def sanitize(entry)
43
+ {
44
+ "title" => sanitize_field(entry.title),
45
+ "url" => sanitize_field(entry.url),
46
+ "author" => sanitize_field(entry.author),
47
+ "published" => entry.published,
48
+ "image" => sanitize_field(entry.image_url),
49
+ "content" => sanitize_field(entry.body),
50
+ "summary" => sanitize_field(entry.summary)
51
+ }
52
+ end
53
+
54
+ def sanitize_field(field)
55
+ field ? field.encode(Encoding::UTF_8).sanitize : nil
56
+ end
57
+
58
+ def cache_key(options = {})
59
+ pieces = ["apdm", "rss", channel.label]
60
+ pieces += options.sort_by { |key, value| key }.map { |key, value| "#{key}:#{value}" }
61
+ pieces.join('.')
62
+ end
63
+
64
+ end
65
+ end
@@ -0,0 +1,14 @@
1
+ require 'date'
2
+ require_relative 'channels'
3
+
4
+ module APDM
5
+ ISSUES = {}
6
+ end
7
+
8
+ APDM::Channel.all.each do |channel|
9
+ begin
10
+ require_relative "./issues/#{channel.label}.rb"
11
+ rescue LoadError => e
12
+ # that's ok, we don't have issues for that paper
13
+ end
14
+ end
@@ -0,0 +1,51 @@
1
+ APDM::ISSUES['aasavis'] = [
2
+ Date.parse('2013-01-03'),
3
+ Date.parse('2013-01-10'),
4
+ Date.parse('2013-01-17'),
5
+ Date.parse('2013-01-24'),
6
+ Date.parse('2013-01-31'),
7
+ Date.parse('2013-02-07'),
8
+ Date.parse('2013-02-14'),
9
+ Date.parse('2013-02-21'),
10
+ Date.parse('2013-02-28'),
11
+ Date.parse('2013-03-07'),
12
+ Date.parse('2013-03-14'),
13
+ Date.parse('2013-03-21'),
14
+ Date.parse('2013-04-04'),
15
+ Date.parse('2013-04-11'),
16
+ Date.parse('2013-04-18'),
17
+ Date.parse('2013-04-25'),
18
+ Date.parse('2013-05-02'),
19
+ Date.parse('2013-05-16'),
20
+ Date.parse('2013-05-23'),
21
+ Date.parse('2013-05-30'),
22
+ Date.parse('2013-06-06'),
23
+ Date.parse('2013-06-13'),
24
+ Date.parse('2013-06-20'),
25
+ Date.parse('2013-06-27'),
26
+ Date.parse('2013-07-04'),
27
+ Date.parse('2013-07-11'),
28
+ Date.parse('2013-07-18'),
29
+ Date.parse('2013-07-25'),
30
+ Date.parse('2013-08-01'),
31
+ Date.parse('2013-08-08'),
32
+ Date.parse('2013-08-15'),
33
+ Date.parse('2013-08-22'),
34
+ Date.parse('2013-08-29'),
35
+ Date.parse('2013-09-05'),
36
+ Date.parse('2013-09-12'),
37
+ Date.parse('2013-09-19'),
38
+ Date.parse('2013-09-26'),
39
+ Date.parse('2013-10-03'),
40
+ Date.parse('2013-10-10'),
41
+ Date.parse('2013-10-17'),
42
+ Date.parse('2013-10-24'),
43
+ Date.parse('2013-10-31'),
44
+ Date.parse('2013-11-07'),
45
+ Date.parse('2013-11-14'),
46
+ Date.parse('2013-11-21'),
47
+ Date.parse('2013-11-28'),
48
+ Date.parse('2013-12-05'),
49
+ Date.parse('2013-12-12'),
50
+ Date.parse('2013-12-19')
51
+ ]
@@ -0,0 +1,253 @@
1
+ APDM::ISSUES['amta'] = [
2
+ Date.parse('2013-01-02'),
3
+ Date.parse('2013-01-03'),
4
+ Date.parse('2013-01-04'),
5
+ Date.parse('2013-01-07'),
6
+ Date.parse('2013-01-08'),
7
+ Date.parse('2013-01-09'),
8
+ Date.parse('2013-01-10'),
9
+ Date.parse('2013-01-11'),
10
+ Date.parse('2013-01-14'),
11
+ Date.parse('2013-01-15'),
12
+ Date.parse('2013-01-16'),
13
+ Date.parse('2013-01-17'),
14
+ Date.parse('2013-01-18'),
15
+ Date.parse('2013-01-21'),
16
+ Date.parse('2013-01-22'),
17
+ Date.parse('2013-01-23'),
18
+ Date.parse('2013-01-24'),
19
+ Date.parse('2013-01-25'),
20
+ Date.parse('2013-01-28'),
21
+ Date.parse('2013-01-29'),
22
+ Date.parse('2013-01-30'),
23
+ Date.parse('2013-01-31'),
24
+ Date.parse('2013-02-01'),
25
+ Date.parse('2013-02-04'),
26
+ Date.parse('2013-02-05'),
27
+ Date.parse('2013-02-06'),
28
+ Date.parse('2013-02-07'),
29
+ Date.parse('2013-02-08'),
30
+ Date.parse('2013-02-11'),
31
+ Date.parse('2013-02-12'),
32
+ Date.parse('2013-02-13'),
33
+ Date.parse('2013-02-14'),
34
+ Date.parse('2013-02-15'),
35
+ Date.parse('2013-02-18'),
36
+ Date.parse('2013-02-19'),
37
+ Date.parse('2013-02-20'),
38
+ Date.parse('2013-02-21'),
39
+ Date.parse('2013-02-22'),
40
+ Date.parse('2013-02-25'),
41
+ Date.parse('2013-02-26'),
42
+ Date.parse('2013-02-27'),
43
+ Date.parse('2013-02-28'),
44
+ Date.parse('2013-03-01'),
45
+ Date.parse('2013-03-04'),
46
+ Date.parse('2013-03-05'),
47
+ Date.parse('2013-03-06'),
48
+ Date.parse('2013-03-07'),
49
+ Date.parse('2013-03-08'),
50
+ Date.parse('2013-03-11'),
51
+ Date.parse('2013-03-12'),
52
+ Date.parse('2013-03-13'),
53
+ Date.parse('2013-03-14'),
54
+ Date.parse('2013-03-15'),
55
+ Date.parse('2013-03-18'),
56
+ Date.parse('2013-03-19'),
57
+ Date.parse('2013-03-20'),
58
+ Date.parse('2013-03-21'),
59
+ Date.parse('2013-03-22'),
60
+ Date.parse('2013-03-25'),
61
+ Date.parse('2013-03-26'),
62
+ Date.parse('2013-03-27'),
63
+ Date.parse('2013-04-02'),
64
+ Date.parse('2013-04-03'),
65
+ Date.parse('2013-04-04'),
66
+ Date.parse('2013-04-05'),
67
+ Date.parse('2013-04-08'),
68
+ Date.parse('2013-04-09'),
69
+ Date.parse('2013-04-10'),
70
+ Date.parse('2013-04-11'),
71
+ Date.parse('2013-04-12'),
72
+ Date.parse('2013-04-15'),
73
+ Date.parse('2013-04-16'),
74
+ Date.parse('2013-04-17'),
75
+ Date.parse('2013-04-18'),
76
+ Date.parse('2013-04-19'),
77
+ Date.parse('2013-04-22'),
78
+ Date.parse('2013-04-23'),
79
+ Date.parse('2013-04-24'),
80
+ Date.parse('2013-04-25'),
81
+ Date.parse('2013-04-26'),
82
+ Date.parse('2013-04-29'),
83
+ Date.parse('2013-04-30'),
84
+ Date.parse('2013-05-02'),
85
+ Date.parse('2013-05-03'),
86
+ Date.parse('2013-05-06'),
87
+ Date.parse('2013-05-07'),
88
+ Date.parse('2013-05-08'),
89
+ Date.parse('2013-05-10'),
90
+ Date.parse('2013-05-13'),
91
+ Date.parse('2013-05-14'),
92
+ Date.parse('2013-05-15'),
93
+ Date.parse('2013-05-16'),
94
+ Date.parse('2013-05-21'),
95
+ Date.parse('2013-05-22'),
96
+ Date.parse('2013-05-23'),
97
+ Date.parse('2013-05-24'),
98
+ Date.parse('2013-05-27'),
99
+ Date.parse('2013-05-28'),
100
+ Date.parse('2013-05-29'),
101
+ Date.parse('2013-05-30'),
102
+ Date.parse('2013-05-31'),
103
+ Date.parse('2013-06-03'),
104
+ Date.parse('2013-06-04'),
105
+ Date.parse('2013-06-05'),
106
+ Date.parse('2013-06-06'),
107
+ Date.parse('2013-06-07'),
108
+ Date.parse('2013-06-10'),
109
+ Date.parse('2013-06-11'),
110
+ Date.parse('2013-06-12'),
111
+ Date.parse('2013-06-13'),
112
+ Date.parse('2013-06-14'),
113
+ Date.parse('2013-06-17'),
114
+ Date.parse('2013-06-18'),
115
+ Date.parse('2013-06-19'),
116
+ Date.parse('2013-06-20'),
117
+ Date.parse('2013-06-21'),
118
+ Date.parse('2013-06-24'),
119
+ Date.parse('2013-06-25'),
120
+ Date.parse('2013-06-26'),
121
+ Date.parse('2013-06-27'),
122
+ Date.parse('2013-06-28'),
123
+ Date.parse('2013-07-01'),
124
+ Date.parse('2013-07-02'),
125
+ Date.parse('2013-07-03'),
126
+ Date.parse('2013-07-04'),
127
+ Date.parse('2013-07-05'),
128
+ Date.parse('2013-07-08'),
129
+ Date.parse('2013-07-09'),
130
+ Date.parse('2013-07-10'),
131
+ Date.parse('2013-07-11'),
132
+ Date.parse('2013-07-12'),
133
+ Date.parse('2013-07-15'),
134
+ Date.parse('2013-07-16'),
135
+ Date.parse('2013-07-17'),
136
+ Date.parse('2013-07-18'),
137
+ Date.parse('2013-07-19'),
138
+ Date.parse('2013-07-22'),
139
+ Date.parse('2013-07-23'),
140
+ Date.parse('2013-07-24'),
141
+ Date.parse('2013-07-25'),
142
+ Date.parse('2013-07-26'),
143
+ Date.parse('2013-07-29'),
144
+ Date.parse('2013-07-30'),
145
+ Date.parse('2013-07-31'),
146
+ Date.parse('2013-08-01'),
147
+ Date.parse('2013-08-02'),
148
+ Date.parse('2013-08-05'),
149
+ Date.parse('2013-08-06'),
150
+ Date.parse('2013-08-07'),
151
+ Date.parse('2013-08-08'),
152
+ Date.parse('2013-08-09'),
153
+ Date.parse('2013-08-12'),
154
+ Date.parse('2013-08-13'),
155
+ Date.parse('2013-08-14'),
156
+ Date.parse('2013-08-15'),
157
+ Date.parse('2013-08-16'),
158
+ Date.parse('2013-08-19'),
159
+ Date.parse('2013-08-20'),
160
+ Date.parse('2013-08-21'),
161
+ Date.parse('2013-08-22'),
162
+ Date.parse('2013-08-23'),
163
+ Date.parse('2013-08-26'),
164
+ Date.parse('2013-08-27'),
165
+ Date.parse('2013-08-28'),
166
+ Date.parse('2013-08-29'),
167
+ Date.parse('2013-08-30'),
168
+ Date.parse('2013-09-02'),
169
+ Date.parse('2013-09-03'),
170
+ Date.parse('2013-09-04'),
171
+ Date.parse('2013-09-05'),
172
+ Date.parse('2013-09-06'),
173
+ Date.parse('2013-09-09'),
174
+ Date.parse('2013-09-10'),
175
+ Date.parse('2013-09-11'),
176
+ Date.parse('2013-09-12'),
177
+ Date.parse('2013-09-13'),
178
+ Date.parse('2013-09-16'),
179
+ Date.parse('2013-09-17'),
180
+ Date.parse('2013-09-18'),
181
+ Date.parse('2013-09-19'),
182
+ Date.parse('2013-09-20'),
183
+ Date.parse('2013-09-23'),
184
+ Date.parse('2013-09-24'),
185
+ Date.parse('2013-09-25'),
186
+ Date.parse('2013-09-26'),
187
+ Date.parse('2013-09-27'),
188
+ Date.parse('2013-09-30'),
189
+ Date.parse('2013-10-01'),
190
+ Date.parse('2013-10-02'),
191
+ Date.parse('2013-10-03'),
192
+ Date.parse('2013-10-04'),
193
+ Date.parse('2013-10-07'),
194
+ Date.parse('2013-10-08'),
195
+ Date.parse('2013-10-09'),
196
+ Date.parse('2013-10-10'),
197
+ Date.parse('2013-10-11'),
198
+ Date.parse('2013-10-14'),
199
+ Date.parse('2013-10-15'),
200
+ Date.parse('2013-10-16'),
201
+ Date.parse('2013-10-17'),
202
+ Date.parse('2013-10-18'),
203
+ Date.parse('2013-10-21'),
204
+ Date.parse('2013-10-22'),
205
+ Date.parse('2013-10-23'),
206
+ Date.parse('2013-10-24'),
207
+ Date.parse('2013-10-25'),
208
+ Date.parse('2013-10-28'),
209
+ Date.parse('2013-10-29'),
210
+ Date.parse('2013-10-30'),
211
+ Date.parse('2013-10-31'),
212
+ Date.parse('2013-11-01'),
213
+ Date.parse('2013-11-04'),
214
+ Date.parse('2013-11-05'),
215
+ Date.parse('2013-11-06'),
216
+ Date.parse('2013-11-07'),
217
+ Date.parse('2013-11-08'),
218
+ Date.parse('2013-11-11'),
219
+ Date.parse('2013-11-12'),
220
+ Date.parse('2013-11-13'),
221
+ Date.parse('2013-11-14'),
222
+ Date.parse('2013-11-15'),
223
+ Date.parse('2013-11-18'),
224
+ Date.parse('2013-11-19'),
225
+ Date.parse('2013-11-20'),
226
+ Date.parse('2013-11-21'),
227
+ Date.parse('2013-11-22'),
228
+ Date.parse('2013-11-25'),
229
+ Date.parse('2013-11-26'),
230
+ Date.parse('2013-11-27'),
231
+ Date.parse('2013-11-28'),
232
+ Date.parse('2013-11-29'),
233
+ Date.parse('2013-12-02'),
234
+ Date.parse('2013-12-03'),
235
+ Date.parse('2013-12-04'),
236
+ Date.parse('2013-12-05'),
237
+ Date.parse('2013-12-06'),
238
+ Date.parse('2013-12-09'),
239
+ Date.parse('2013-12-10'),
240
+ Date.parse('2013-12-11'),
241
+ Date.parse('2013-12-12'),
242
+ Date.parse('2013-12-13'),
243
+ Date.parse('2013-12-16'),
244
+ Date.parse('2013-12-17'),
245
+ Date.parse('2013-12-18'),
246
+ Date.parse('2013-12-19'),
247
+ Date.parse('2013-12-20'),
248
+ Date.parse('2013-12-23'),
249
+ Date.parse('2013-12-24'),
250
+ Date.parse('2013-12-27'),
251
+ Date.parse('2013-12-30'),
252
+ Date.parse('2013-12-31')
253
+ ]